Files
xiaoxia-saas/apps/web/package.json
T
小应 577f0c58c5
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 45s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 40s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 54s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 58s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 1m1s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 5m0s
AI Code Review / AI Code Review (pull_request) Successful in 6m41s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 7m10s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 7m36s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 32s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 59s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 16m12s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Failing after 1s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
fix(title): 标题模板 v3 全面审计修复——解决选模板预览不变/新建保存变白等问题
核心问题:
1. TitleTemplateEditor 独立调用 useTitleTemplates(),与 TitleStylePanel 内的 hook 实例形成双实例状态孤岛——保存时只更新 editor 实例的 state 和 localStorage,同 tab 下 storage 事件不触发,导致 TitleStylePanel 的 templates state 陈旧,卡片显示旧样式(新建模板选黄色保存后卡片变白)
2. TITLE_PRESETS 的 BASE 对象缺 position 字段,选预设后 position 被 DEFAULT_TITLE_SETTINGS_FULL.position="top" 覆盖,与预期默认位置 bottom 不一致
3. ColorPicker 的原生 color input 始终 width:0/height:0,即使展开自定义颜色也无法点击

修复内容:
- 移除 TitleTemplateEditor 中的 useTitleTemplates 调用,改为 onSave(data) 回调 props;所有 CRUD 统一由 TitleStylePanel 的 hook 实例完成,彻底解决双实例不同步
- handleRequestCreate 改为只构造草稿(空 id,不写入 localStorage),保存时再 createTemplate,避免打开编辑器即产生脏数据
- TITLE_PRESETS BASE 加 position: "bottom",预设默认位置一致
- ColorPicker 展开自定义时原生 input 设为 28x28 可点击,选色后自动收起
- 补充 package.json 中缺失的 classnames/dayjs 显式依赖(被代码引用但未声明)

验证:
- tsc --noEmit 零错误
- eslint 零警告
- prettier 格式化
2026-09-23 15:44:30 +08:00

58 lines
1.7 KiB
JSON
Executable File

{
"name": "@xiaoxia/web",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"build": "tsc && vite build",
"dev": "vite",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest",
"test:coverage": "vitest --coverage",
"test:e2e": "playwright test",
"test:e2e:ci": "npx playwright test --project=chromium --reporter=line",
"test:e2e:ui": "playwright test --ui",
"test:ui": "vitest --ui",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@ant-design/icons": "^5.3.7",
"@tanstack/react-query": "^5.45.0",
"antd": "^5.18.0",
"axios": "^1.7.2",
"classnames": "^2.5.1",
"dayjs": "^1.11.23",
"mp4box": "^2.4.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.24.0",
"zustand": "^4.5.2"
},
"devDependencies": {
"@playwright/test": "^1.45.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^20.14.9",
"@types/react": "^18.3.31",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^1.6.1",
"@vitest/ui": "^1.6.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"jsdom": "^24.1.0",
"prettier": "^3.9.5",
"typescript": "^5.5.3",
"vite": "^5.3.1",
"vitest": "^1.6.0"
}
}