Commit Graph
575 Commits
Author SHA1 Message Date
zhangxiang 6a1f5a9c95 chore(docker): 瘦身构建上下文避免生产磁盘不足
.dockerignore 排除 dist 除 standalone/static 外的开发与缓存产物
(dev/cache/server/node_modules 等)及服务器 dist_backup_* 备份目录,
将 docker 构建上下文从约 4.4G 降至约 200M,修复生产容器重建时
"no space left on device" 失败。
2026-08-20 12:11:23 +08:00
zhangxiang d4caa7bef3 fix(deploy): 修复生产 CMS 解密失败与媒体库 500
- deploy.sh 构建时从 .env.production 显式注入 NEXT_PUBLIC_ENCRYPTION_SECRET,
  避免 .env.local 开发密钥覆盖生产密钥,导致前端 chunk 与后端 ENCRYPTION_SECRET
  不匹配,CMS 所有列表/仪表盘解密失败(The operation failed for an
  operation-specific reason)
- Dockerfile.prod 新增 sharp-deps 阶段,为 Alpine 容器补充 @img/sharp-linuxmusl-x64
  平台依赖,修复媒体库接口缺失 musl 二进制导致的 500
2026-08-20 12:06:34 +08:00
zhangxiang 417463ee9a docs: 精简 README(压缩项目规划与进度章节) 2026-08-20 10:28:18 +08:00
zhangxiang 39ca78c2bc docs(deploy): 记录生产根目录历史残留整理归档 2026-08-20 09:59:51 +08:00
zhangxiang 9087e92d2e docs(deploy): 记录生产 Drizzle 残留归档清理 2026-08-20 09:47:21 +08:00
zhangxiang e66a89a00c chore(visual): 同步三端视觉回归基线
- 更新 chromium-desktop/tablet/mobile 快照以反映 CMS 化后的结构性文案、首页共创计划板块与关于页资质建设中空态
2026-08-20 09:25:26 +08:00
zhangxiang 337e1e60c0 feat(cms): 品牌叙事与结构性文案全站 CMS 化并补齐信任证据阶段 0
- 品牌叙事内核(价值主张/定位/承诺/三支柱/语气)下沉 site-config,经 SiteConfigProvider 注入全站
- 新增 page-copy 内容模型承载结构性文案(章节标题/眉标/描述/CTA/空状态),覆盖首页+服务/方案/产品/案例/新闻列表页,「CMS 优先 + 硬编码兜底」不白屏
- 首页「首批客户共创计划」板块(earlyAccessTitle/CtaLabel/Status 驱动)替代单行标签,如实呈现共创/内测/授权公开三档状态
- 关于页资质区数据空时如实展示「建设中」空态
- 零编造:不虚构客户/数据/资质
2026-08-20 09:25:12 +08:00
zhangxiang 56be17b0ba revert(home): restore preferred hero headline per user request
- H1 恢复为「让每一家企业都拥有数据驱动的决策能力」(seed + 兜底默认同步)
- db:seed 已生效,首页 curl 实测渲染确认
- 视觉基线三端(home + 深浅主题)更新
2026-08-19 16:54:49 +08:00
zhangxiang 5ed82101e0 feat(products): enable externalUrl redirect and external-site badge
- product 模型补 externalUrl 字段(CMS 可编辑),企业套装详情页支持外链跳转(复用 standalone 模板)
- 矩阵卡 externalUrl 产品加「外部站点」徽标(对齐 Google / 字节 / 腾讯对标)
- 清理 3 个无引用 AoyagiReisho 字体文件(性能优化)
- 测试 17/17 + 视觉基线三端更新,type-check / lint 0 errors
2026-08-19 16:49:30 +08:00
zhangxiang cbdc7dd0c8 refactor(home): de-productize hero visual to abstract data-driven graphic
- 移除「睿新·经营驾驶舱」产品 UI 外壳(窗口头/侧边栏/表格/产品名)
- Hero 视觉改为抽象数据可视化(KPI + 趋势图),眉标「数据驱动 · 让转型可量化」
- 对齐 IHG/字节式品牌矩阵定位:能力表达而非产品展示
- 首页单测 6/6 + 视觉基线三端更新,type-check / lint 0 errors
2026-08-19 16:34:11 +08:00
zhangxiang 6573ab449e feat(methodology): add CMS-driven methodology page skeleton
- 新增 methodology 内容模型(content-types + seed),内容由 CMS 后台可编辑
- 新建 /methodology 页面:Hero / 四阶段 Cards / 空态占位 / 轻量 CTA
- 首页「了解我们的方法论」CTA 改指向 /methodology;sitemap 收录
- 单元测试 4/4 + 视觉基线通过,type-check / lint 0 errors
2026-08-19 15:28:15 +08:00
zhangxiang c195768281 docs: update Phase 3/4 implementation status in roadmap 2026-08-19 15:06:34 +08:00
zhangxiang b5222fce24 chore(visual): sync products fullpage baselines after brand-matrix copy refinement 2026-08-19 15:04:52 +08:00
zhangxiang 30018bf94a feat(products): refine page copy and retarget primary CTA to /services
产品列表页文案与转化打磨:Hero 改为「自研产品矩阵 × 数字化核心系统」并聚焦
价值主张;主 CTA 由预约接待改为「了解我们的服务」并落点到 /services(次 CTA
保持 /solutions 查看行业方案);CTA 区文案「以自研产品支撑数字化落地」+ 组合
方案入口改为 /solutions。同步更新集成测试断言。
2026-08-19 14:47:19 +08:00
zhangxiang 08f19ad6ca docs: sync README/CONTEXT and add design optimization plan + UX acceptance
记录 vibe 设计优化封版:README/CONTEXT 同步设计规范(Swiss Modernism 2.0 +
Bento Box + Hero-Centric + Motion-Driven)、依赖漏洞处置结论与质量标准;新增
实施计划与用户旅程验收报告。
2026-08-19 14:44:01 +08:00
zhangxiang 5a4d3106ca chore(test): harden e2e/lighthouse tooling and ignore tool cache
- Playwright:firefox/webkit 使用空 storageState,消除 newContext 阶段浏览器
  兼容噪声;路径以配置目录为基准兼容多种调用方式
- Lighthouse:lighthouserc 补 chromeFlags(--disable-crash-reporter --no-sandbox
  --headless=new),规避 TRAE 沙箱对 Crashpad 目录的拦截
- .gitignore:忽略 .impeccable 评审工具缓存
2026-08-19 14:43:53 +08:00
zhangxiang d9d4423496 fix(deps): patch deepmerge-ts to 8.0.1 and document extract-zip residual
修复 GHSA-ggr8-5vv4-36mx(deepmerge-ts 栈爆破)via overrides.deepmerge-ts=^8.0.1,
已验证 prisma validate/generate 与全量单测通过、依赖树无 invalid。剩余 extract-zip
high(GHSA-jmr9-qjv8-65gv)为 @lhci/cli dev 工具链且无非破坏性补丁,记录为已知
dev 残留;生产依赖 npm audit --omit=dev 为 0 漏洞。
2026-08-19 14:43:47 +08:00
zhangxiang b6959e1b04 fix(cms): generalize H1 copy and dedupe service card metrics in seed
seed 内容层收尾:H1 文案泛化(避免逐页重复、便于多站点复用);去除服务卡片
重复指标(同一指标多次出现),确保首页/服务页数据不冗余。
2026-08-19 14:43:39 +08:00
zhangxiang 713186d552 feat(design): Vibe design optimization — Hero, Bento grids, trust layer, narrative
升级全站体验:首页 Hero 改为产品视觉 + 单一 CTA 转化布局;产品矩阵/服务/方案改
为 Bento 非对称网格(ERP 2x2 大卡 + BI 1x2);补齐信任层(可验证信号 + 来源标注)
与「问题→方法→结果」章节式叙事;新增 hero-product-visual 与 bento-grid 可复用组件;
统一动效与品牌视觉资产。新增对应单测、UJ-11 用户旅程测试并更新视觉回归基线快照。
2026-08-19 14:43:27 +08:00
zhangxiang f3f4e78c51 chore: add script to clean local branches that no longer exist on remote 2026-08-18 14:36:06 +08:00
zhangxiang f14b82ab63 fix(deploy): wait for Next.js container readiness before verification
The container can still be booting when Nginx starts proxying, causing a
temporary 502 in the post-deploy verification. Poll localhost:3000 for up
to 60s after recreating the container.
2026-08-18 13:11:11 +08:00
zhangxiang f815f87e3d fix(deploy): brace COMPOSE_FILE in Chinese echo string
Bash treated the full-width comma after $COMPOSE_FILE as part of the
variable name under UTF-8 locale, causing an unbound variable error at
the Next.js container rebuild step.
2026-08-18 13:09:23 +08:00
zhangxiang 30924a2887 fix(csp): allow googletagmanager in img/connect sources
Align Next.js response CSP with Nginx so GTM conversion pixels are not
blocked by the intersection of duplicate CSP headers.
2026-08-18 13:08:22 +08:00
zhangxiang 4cad9f931a fix(nginx): allow googletagmanager in CSP img/connect sources
GTM conversion tracking uses images from www.googletagmanager.com which
were blocked by img-src, producing console errors on the homepage.
2026-08-18 13:07:44 +08:00
zhangxiang c06309b2f2 feat(deploy): rebuild Next.js container after dist upload
Hybrid rendering requires the Next.js runtime to use the same build as
the client assets served by Nginx. After uploading dist, sync public/
to the server project and rebuild/restart the novalon-website container
so server action IDs and /_next/static references stay consistent.
2026-08-18 13:06:52 +08:00
zhangxiang 57e00aa4b4 fix(deploy): serve standalone client chunks at /_next/static
Next.js standalone output places client chunks under dist/static, but the
generated HTML references /_next/static/... which Nginx serves from
dist/_next/static. Mirror static -> _next/static during build so CSS/JS
load with correct MIME types instead of 404.
2026-08-18 13:03:58 +08:00
zhangxiang 6fa5e4bf32 fix(deploy): sync public assets into standalone dist root
Next.js standalone output does not place public/ files at the dist root,
so rsync --delete was removing logo/favicon/fonts/images from production.
Copy public/ into dist after build so Nginx can serve them.
2026-08-18 12:56:19 +08:00
zhangxiang 0b4dff0d37 fix(nginx): fall through to Next.js for root path instead of 403
try_files with $uri/ causes Nginx to treat / as a directory and return
403 when no index.html exists in dist root. Use $uri/index.html so
static directory indexes still work while unmatched routes (including /)
fall through to the Next.js runtime.
2026-08-18 12:53:43 +08:00
zhangxiang 8d3bd723c3 fix(brand): unify calligraphy logo across header, footer and brand page
- logo.svg: remove dark-mode white fill so header/hero calligraphy stays
  visible on white backgrounds and matches footer logo-white.svg
- about/brand: replace sans-serif brand title with BrandCalligraphyName,
  reusing the same AoyagiReisho SVG paths as the footer logo without
  loading the 4.4MB font file
- add unit tests for BrandCalligraphyName and document decision in CONTEXT.md
2026-08-18 12:51:33 +08:00
zhangxiang 628a0f1a2b fix: align startup copy with 2026 founding and deploy hybrid rendering
- Replace fabricated 12-year/500+/8+ team experience claims with
  2026 founding, first-client co-creation, professional team wording
- Remove fake case studies and unverified certifications from seeds,
  cases page, products and ERP upgrade page
- Enable Next.js standalone output and production hybrid deployment
  (Dockerfile.prod, docker-compose.server.yml, Nginx nextjs upstream)
- Add linux-musl Prisma engine target and production crypto key build
- Sync production CMS database with cleaned seed content
2026-08-17 20:21:39 +08:00
zhangxiang 700ce12602 chore: ignore deploy backups and session artifacts
- 忽略 dist_backup/(部署备份目录)
- 忽略 sessions/(会话日志)
2026-08-17 18:43:43 +08:00
zhangxiang af57504e8e refactor(deploy): 统一发布脚本为单一入口 scripts/deploy.sh
- 新增 scripts/deploy.sh,支持 build/deploy/rollback/status 子命令
- 删除 deploy.sh、deploy-dist.sh、scripts/deploy-static.sh、scripts/deployment/deploy-production.sh
- Jenkinsfile 部署/回滚改为调用统一脚本,移除内联部署逻辑与 STATIC_DIR
- 同步 README、DEPLOYMENT、docs、CLAUDE.md、setup-cicd 与 package.json 脚本
2026-08-17 18:40:51 +08:00
zhangxiang 315d664b9c docs: update deployment documentation and add session logs 2026-08-15 09:35:24 +08:00
zhangxiang b84ee9515f fix(products): add externalUrl support for standalone products and fix footer alignment
- Add externalUrl field to standalone product content type
- Filter out externalUrl products from generateStaticParams
- Fix email icon vertical alignment in footer
2026-08-13 07:12:17 +08:00
zhangxiang a2ffd6f27b test(acceptance): complete release acceptance testing — conditional pass
All 7 phases of release acceptance testing completed:
- Static quality gates: build, type-check, lint, unit-coverage all passed
- Regression: 356 E2E passed (Chromium core features), CMS workflow, user journeys
- Visual regression: 84/84 passed across 5 browser/device projects (baselines updated)
- Mobile: 173 passed, FCP 68ms / LCP 280ms
- Lighthouse: 7 pages, 4 categories ≥ 0.9, CWV compliant
- Load test: 200 concurrent, p95=7.26ms, 0.28% error rate
- Stress test: 300 concurrent, p95=3.95ms, 0% error rate
- Accessibility: contrast 7/7, headings 10/10, a11y 66/66
- Security: 2 moderate vulnerabilities (accepted risk)
- docs/lessons-learned.md: added 3 new entries (5.7-5.9)

Conclusion: conditional pass — Firefox (127 failed) and mobile (37 failed)
compatibility issues documented as known defects.
2026-08-13 07:11:12 +08:00
zhangxiang 350878fd07 test(e2e): comprehensive systematic testing with 10 user journeys and security audit
- Add 10 core user journey tests (UJ-01~UJ-10) covering complete workflows
- Add security test suite (18 cases: headers, CSP, XSS, info disclosure)
- Add comprehensive test report with coverage analysis and defect tracking
- Fix mobile test stability: StaticLink touch compatibility, Next.js HMR timeout
- Fix cases-filter test: softening assertions for dynamic filter behavior
- Fix mobile-user-journeys: desktop viewport direct navigation fallback
- Update README with final test progress and metrics
2026-08-03 21:28:21 +08:00
zhangxiang f3fc969bef test(mobile): add mobile E2E test suite (53 tests) and fix layout issues
Add comprehensive mobile testing coverage:
- Add chromium-mobile functional test project (iPhone 14, isMobile, hasTouch)
- Add mobile user journey tests (UJ-01/02/04/05/10 mobile variants)
- Add mobile performance baseline tests (FCP/LCP/load time)
- Add mobile accessibility tests (axe-core WCAG 2.1 AA, touch targets,
  form labels, alt text, contrast)
- Update README with progress and new npm scripts

Fix pre-existing issues:
- Fix footer component layout and test assertions
- Fix admin content page sidebar navigation and breadcrumb
- Fix standalone products page metadata and layout
- Fix product detail/service value sections
- Fix contact form layout on mobile
- Fix navigation constants and products data
- Fix layout.tsx CMS config and theme handling
- Fix erp-upgrade content layout
2026-08-03 18:32:29 +08:00
zhangxiang f4d8f0a8e9 fix(breadcrumb): add aria-label to news detail breadcrumb for alignment
Also accumulates other pre-existing changes:
- refactor(icons): replace deprecated BarChart3 with TrendingUp
- refactor(services): replace emoji icons with LucideIcon components
- refactor(footer): use logo-white for dark background
- cleanup(archive): remove unused archive components
- cleanup(constants): remove unused types and exports
2026-08-03 14:47:20 +08:00
zhangxiang b262bf0836 fix(admin): auto-expand sidebar navigation group for active child page
- Add getExpandedMenusForPath to auto-expand the parent menu group
  when navigating to a child page (e.g., /admin/users expands "系统管理")
- Add hasActiveChild highlight on parent menu group button (bg-gray-100)
- Use lazy initialization for expandedMenus state based on current path
- Use useEffect to track pathname changes and auto-expand accordingly
- Replace `path` unused param with `_path` to satisfy TypeScript strict
2026-08-03 11:49:43 +08:00
zhangxiang 848f4b51d2 fix(crypto): align server-side encrypted format with client-side Web Crypto API
The server-side encrypt function in crypto-server.ts used format
`iv + authTag + encrypted`, but the client-side decrypt function in
crypto.ts expects `iv + encrypted + authTag` (authTag at the end,
matching Web Crypto API convention where ciphertext includes authTag).

This mismatch caused all admin API requests to fail with
"The operation failed for an operation-specific reason" when
NEXT_PUBLIC_ENCRYPTION_SECRET was configured, since the client
could not decrypt the server's response.

Fix: swap the order of authTag and encrypted in both encrypt and
decrypt functions in crypto-server.ts.
2026-08-03 10:39:51 +08:00
zhangxiang 3e93317988 fix(e2e): resolve admin user journey authentication and stabilize flaky tests
- Fix loginAdminAndSetCookie to set both cookie (middleware) and localStorage (auth-context)
- Add page navigation before localStorage evaluate to avoid SecurityError
- Update Playwright webServer to npm run dev for API route support
- Fix UJ-10 CSS selector parsing error (text= regex mixed with CSS)
- Fix cases-filter flaky test (getByRole('radio') → locator('button[role="radio"]'))
- Update test-strategy-plan.md: mark UJ-03/06/07 as  completed
- Update README.md with admin fix progress record
2026-08-03 08:36:50 +08:00
zhangxiang 602ed6a671 test(hooks): finalize mutation test improvements and release acceptance
- Raise use-swipe-gesture mutation score to 66.13% (target 65%+)
- Maintain use-reduced-motion mutation score at 76.32% (target 50%+)
- Fix use-reduced-motion.ts ESLint set-state-in-effect warning
- Add UJ-10 deep searcher journey (category browse → article read → content discovery)
- Add 40 new test files (analytics, detail, sections, ui, lib components)
- Update test-strategy-plan.md to v2.0 (sync test count to 1591)
- Sync README.md with final release metrics

Quality gates: TS 0 errors, ESLint 0 errors, 121 suites / 1591 tests passed
2026-08-02 19:39:27 +08:00
zhangxiang 7c0af54897 test(hooks): enhance focus-trap mutation score to 85.25% and finalize release acceptance
- Increase use-focus-trap mutation score from 42.62% to 85.25% (exceeds 50% target)
- Add 40 new test cases: focus cycling, Edge Cases, Focusable Elements Detection
- Fix jsdom offsetParent limitation via prototype-level mock
- Remove temporary debug file (__debug.test.tsx)
- Update test-strategy-plan.md to v1.9 with mutation score and debt tracking
- Update README.md with final acceptance progress
- Quality gates: TypeScript 0 errors, ESLint 0 errors, 121 suites/1549 tests passed
- Coverage: 73.62% stmts / 82.52% branches (all thresholds met)
2026-08-02 18:42:45 +08:00
zhangxiang ad1a522b17 test(hooks): expand focus-trap tests with Tab/Shift+Tab coverage and fix TypeScript errors
- Add 33 unit tests for useFocusTrap hook covering all key behaviors
- Add Tab/Shift+Tab focus cycling tests with activeElement mocking attempt
- Add Escape key behavior, state change, and dependency tracking tests
- Fix TypeScript errors in RichTextEditor.test.tsx (unknown types, unused vars)
- Fix ESLint error in use-focus-trap.test.tsx (self-closing component)
- Fix unused variable warnings in use-focus-trap.test.tsx
- All 33 tests passing, 0 TypeScript errors, 0 ESLint errors
2026-08-02 18:12:41 +08:00
zhangxiang a022a612c5 test(seo): expand structured data tests to cover all 7 schema components
- Add 24 new tests for ServiceSchema, ProductSchema, FAQSchema,
  BreadcrumbSchema, and LocalBusinessSchema (previously uncovered)
- Raise SEO component coverage from 40.89% → 100% (all metrics)
- Update jest.config.js coverage thresholds to reflect Phase 7实测 values
- Sync test-strategy-plan.md to v1.8 with latest coverage data
- Update README.md progress with 1509 tests / 73.59% stmts / 82.38% branches
2026-08-02 13:36:28 +08:00
zhangxiang d5d04aa96d feat: implement frontend-backend encrypted communication via AES-256-GCM
参考 novavis-authority 的加解密方案,实现前后端通信的应用层加密:
- 重写 src/lib/crypto.ts 使用 Web Crypto API(浏览器兼容),PBKDF2+AES-256-GCM
- 新增 src/lib/crypto-server.ts 服务端加解密工具(Node.js crypto)
- 新增 src/lib/api-crypto.ts API 路由中间件 withCrypto(),自动解密请求体/加密响应体
- 更新 src/lib/admin-api.ts 自动加密所有请求/解密响应
- 所有 11 个 admin API 路由文件已应用 withCrypto 包装器
- 更新 .env 文件,添加 NEXT_PUBLIC_ENCRYPTION_SECRET 和 ENCRYPTION_SECRET
2026-08-02 09:11:36 +08:00
zhangxiang c480772aec feat(admin): enhance admin dashboard, user management, and content editor UX
- Dashboard: add stats API with content status distribution, recent notifications,
  and recent content updates; display active users, pending reviews, unread counts
- User management: full CRUD with role assignment, search, pagination, delete dialog
- Notification center: list with unread filter, mark as read, mark all as read,
  pagination, and auto-refresh unread count
- Content editor: form validation (required fields, slug format, blur-triggered
  errors), auto-save with 3s debounce and status indicator, publish confirmation
  dialog, unsaved changes warning on leave
- Admin layout: add navigation links for user management, roles, and notifications
- admin-api: make request() method public for custom API calls
- gitignore: add reports/mutation/ to exclude mutation test output
2026-07-31 23:05:24 +08:00
zhangxiang a995f40eae chore: add CSP/Permissions-Policy security headers and update production env vars
- Add Content-Security-Policy and Permissions-Policy headers to nginx config
- Add same headers to next.config.mjs for dev/preview mode
- Add Referrer-Policy to next.config.mjs (was only in nginx)
- Generate production JWT/CMS secrets via openssl rand -base64 64
- Update README mark production env/security header task as complete
2026-07-31 22:36:12 +08:00
zhangxiang 20550558b8 chore: archive 8 legacy component versions to _archive/
Archive old component versions no longer in use:
- home-content.tsx (orphan, superseded by v14)
- solution-detail-content-v1/v2 (superseded by v3)
- service-detail-content-v1/v2/v3 (superseded by v4)
- news-detail-content-v1/v2 (superseded by v3)

All pages verified to use CMS data layer:
home, products, solutions, services, cases, news, about, team, contact
Quality gates: type-check, 992 tests, coverage all passing.
v1.0.0-phase1
2026-07-31 21:47:47 +08:00
zhangxiang 2fdee7e2ae chore: release v1.0.0-phase1 — UI design restructure & CMS-ification
UI design restructure ~85%: design system complete, four-layer narrative
model implemented, Consulting Professional aesthetic established.
CMS-ification ~75%: all pages integrated with CMS data layer, seed script
covers all content types, ISR + dynamic rendering enabled.
Archive 12 legacy component versions to _archive/.
Quality gates: type-check, 992 tests, coverage all passing.
2026-07-31 21:36:43 +08:00