perf(frontend): split chat streaming, load Inter, isolate admin CSS
Independent Staging Quality Gate / validate (push) Successful in 10m14s
Independent Staging Quality Gate / publish (push) Successful in 11m5s

Settled messages no longer rebuild on every token, Inter is actually
requested, and admin routes drop the 33 KB chat stylesheet. Root
force-dynamic is gone so public shells can prerender without changing
the no-store Cache-Control contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-29 03:39:43 +08:00
parent bf697d71a2
commit 3198fb6b2b
41 changed files with 1528 additions and 307 deletions
+32
View File
@@ -6557,3 +6557,35 @@
- 复发自:无
- 修复版本:待发布
## BUG-429 | 同一账号资料变化时星盘库被两个 effect 各写一遍 localStorage
- 状态:resolved
- 首次发现:2026-08-29
- 最近更新:2026-08-29
- 影响面:`/` 主对话页星盘库 hydration 与本人记录 upsert
- 用户现象:进入对话或改一次出生资料时,主线程同步 `JSON.stringify` 并写 `localStorage` 两次;账号切换时两条路径靠 ref 提前 return 分工,没有显式分支。
- 触发条件:`accountId``profile` 引用变化。
- 根因:两个 `useEffect` 依赖数组都是 `[accountId, profile]`,一个负责首次本地+云端,一个无条件 upsert 本人。行为能跑通,但每次资料变化都重复序列化。
- 修复:合并为一个 effect,按 `clear` / `hydrate-then-persist` / `persist-self` 显式分支。云端失败仍保留本地库;本人记录仍 upsert;切账号仍清空。
- 验证:`frontend/tests/chart-library-session.test.ts` 覆盖清空、切账号 hydration、同账号 persist-self、云端只保留 other、云端失败保留本地。既有 `chart-library-other-profile` 源码锁未改。
- 防复发:同一份资料不得用两个同依赖 effect 靠 ref 提前 return 分工;分支名必须写在代码里。
- 相关记录:无
- 复发自:无
- 修复版本:待发布
## BUG-430 | 字体栈声明了 Inter 却从未加载,Windows/Linux 静默落到系统黑体
- 状态:resolved
- 首次发现:2026-08-29
- 最近更新:2026-08-29
- 影响面:全站 `--font-body`、后台 antd `fontFamily`
- 用户现象:设计稿写了 Inter,实际请求里没有 woff2;非苹果系统落到 Segoe UI / 微软雅黑。
- 触发条件:打开任意带根布局的页面。
- 根因:仓库 0 个字体文件、0 处 `@font-face`、0 处 `next/font`CSS 与 admin token 却把 Inter 写在 StyreneB 之后。
- 修复:根布局用 `next/font/google` 加载 Inter`display: "swap"``--font-inter`)。`--font-body` 与 admin `fontFamily` 改为 `var(--font-inter, Inter)`。Tiempos / 宋体栈未改。构建产物与 `/` HTML 可见 woff2 preload。
- 验证:`frontend/tests/site-style-isolation-contract.test.ts``next build``/` HTML 含 Inter woff2 preload。
- 防复发:字体栈里出现的西文家族必须有 `next/font``@font-face`;缺授权的展示字体(Tiempos)不得用同一套办法偷偷补上。
- 相关记录:无
- 复发自:无
- 修复版本:待发布