From 3970410e66222313ad4a0ee1356c36f7d359cbfd Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Thu, 20 Aug 2026 15:51:20 +0800 Subject: [PATCH 1/2] fix(ci): keep sidebar contract aligned with rectification chat-panel class BUG-322 added an is-rectification modifier on SidebarInset, but the sidebar source contract still required a fixed className and failed staging frontend CI. Co-authored-by: Cursor --- docs/BUG_HISTORY.md | 16 ++++++++++++++++ frontend/tests/sidebar-contract.test.ts | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index d38a992c..f4d11b87 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -4874,3 +4874,19 @@ - 相关记录:BUG-120、BUG-297、BUG-313 - 复发自:BUG-313(有 follow-up 时仍可因 compare 投影为 adopt 而 offer);BUG-297(compare/offer 不共享提出门) - 修复版本:7dc97a49 + +## BUG-324 | 侧栏合同仍断言固定 chat-panel class,staging frontend 测试失败 + +- 状态:resolved +- 首次发现:2026-08-20 +- 最近更新:2026-08-20 +- 影响面:Gitea `Jyotish Skill CI` / `backend-quality-gate` 的 `npm test --prefix frontend`、`frontend/tests/sidebar-contract.test.ts` +- 用户现象:staging 推送后质量门禁失败。日志末尾 `truth source identity` 两条都是 `ok`,摘要为 `# tests 1833 / pass 1832 / fail 1`。 +- 触发条件:向 `staging` 推送含 BUG-322 生时纠正分栏布局的提交后跑 frontend 全量测试。 +- 根因:BUG-322 把 `SidebarInset` 的 class 改成 `chat-panel` 加上 `rectificationSurfaceOpen` 时的 `is-rectification`。侧栏源码合同仍匹配固定的 `className="chat-panel"`,所以 `not ok 1676 - composes the chat page with the app sidebar shell`。 +- 修复:侧栏合同改为锁定当前模板 class,并继续要求 `inert={modalOpen}`。 +- 验证:`npx tsx --test tests/sidebar-contract.test.ts`。 +- 防复发:改 `SidebarInset` class 时必须同步 `sidebar-contract`;生时纠正分栏 class 另由 `rectification-agentic-entry` 锁定。 +- 相关记录:BUG-322 +- 复发自:无 +- 修复版本:本次修复提交 diff --git a/frontend/tests/sidebar-contract.test.ts b/frontend/tests/sidebar-contract.test.ts index 50e0fb91..e7f0c169 100644 --- a/frontend/tests/sidebar-contract.test.ts +++ b/frontend/tests/sidebar-contract.test.ts @@ -172,7 +172,10 @@ test("composes the chat page with the app sidebar shell", () => { assert.match(page, /const modalOpen = activeAccountDialog !== null \|\| onboardingPaywallOpen/); assert.match(page, //); assert.match(page, /
[\s\S]*/); + assert.match( + page, + //, + ); assert.match(page, //); }); From 0b80728b37ef219c7002fffc539986bfdece771a Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Thu, 20 Aug 2026 15:52:16 +0800 Subject: [PATCH 2/2] docs: record BUG-324 fix SHA Co-authored-by: Cursor --- docs/BUG_HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index f4d11b87..f89e7cf5 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -4889,4 +4889,4 @@ - 防复发:改 `SidebarInset` class 时必须同步 `sidebar-contract`;生时纠正分栏 class 另由 `rectification-agentic-entry` 锁定。 - 相关记录:BUG-322 - 复发自:无 -- 修复版本:本次修复提交 +- 修复版本:3970410e