Procházet zdrojové kódy

fix(web): correct the golden comment, use the derived session-event type, and relocate the note

The file header now states the committed golden exactly (three boolean
verdicts; the exit result is an assertion, not golden content). The exit
predicate uses the derived SessionEvent<'plan/mode'> form instead of a
hand-written shape. The Agent Note triplet moves from implemented/feature/
to implemented/bug-fix/ following the composer defect-note precedent, and
the zh side uses the machine-checked ASCII header tokens; the pairing
sidecar is re-recorded for the new paths.
Chinesezjc před 1 měsícem
rodič
revize
552e8c9dcb

+ 2 - 2
.agents/notes/implemented/feature/2026-08-06-plan-narrow-viewport-regression.i18n.yaml → .agents/notes/implemented/bug-fix/2026-08-06-plan-narrow-viewport-regression.i18n.yaml

@@ -1,6 +1,6 @@
 # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
 # side as of the last confirmed-consistent state. Both languages carry equal authority;
 # after editing either side, bring the other along and re-record with:
-#   pnpm run verify-translation-pairing --write .agents/notes/implemented/feature/2026-08-06-plan-narrow-viewport-regression.md
+#   pnpm run verify-translation-pairing --write .agents/notes/implemented/bug-fix/2026-08-06-plan-narrow-viewport-regression.md
 2026-08-06-plan-narrow-viewport-regression.md: a183a17ce90eecbf0d1af524dbbefe8e417dd463
-2026-08-06-plan-narrow-viewport-regression.zh.md: 6c26ee1b5e4b00806e5fe5548ec8740ba8a66de8
+2026-08-06-plan-narrow-viewport-regression.zh.md: 5ef610b12e9e5c8c79e2a2279f70f20e1e59aee7

+ 0 - 0
.agents/notes/implemented/feature/2026-08-06-plan-narrow-viewport-regression.md → .agents/notes/implemented/bug-fix/2026-08-06-plan-narrow-viewport-regression.md


+ 2 - 2
.agents/notes/implemented/feature/2026-08-06-plan-narrow-viewport-regression.zh.md → .agents/notes/implemented/bug-fix/2026-08-06-plan-narrow-viewport-regression.zh.md

@@ -1,6 +1,6 @@
-# Agent Note窄视口下 Plan chip 点击区域回归测试
+# Agent Note: 窄视口下 Plan chip 点击区域回归测试
 
-状态:已实现
+Status: implemented
 
 [English](2026-08-06-plan-narrow-viewport-regression.md) | 中文
 

+ 6 - 7
apps/web/tests/plan-control-row.e2e.ts

@@ -13,9 +13,10 @@
 // commands.execute, which needs the live agent the recorded turn keeps — the
 // product's own user path for this scenario.
 //
-// The geometry golden records stable facts — viewport membership, disjoint
-// click areas, and the exit result — never absolute coordinates, whose pixel
-// values depend on installed fonts and differ between macOS and Linux. The
+// The geometry golden records stable facts — viewport membership on both
+// axes for the chip and the trigger, and disjoint click areas — never
+// absolute coordinates, whose pixel values depend on installed fonts and
+// differ between macOS and Linux. The
 // center hit-test is Playwright's actionability check: clicking the chip
 // fails in a real engine when the element center does not receive pointer
 // events. jsdom resolves no layout, so only a real engine can answer any of
@@ -150,11 +151,9 @@ describe('web e2e: plan chip click area at the narrow viewport', () => {
     // inactive (the recorded turn's entry event stays active:true earlier in
     // the log, so the pair proves the exit and not just the entry).
     const planModes = sessionEvents.filter(
-      (event): event is SessionEvent & { type: 'plan/mode'; data: { active: boolean } } =>
-        event.type === 'plan/mode',
+      (event): event is SessionEvent<'plan/mode'> => event.type === 'plan/mode',
     )
-    const lastPlanMode = planModes.at(-1)
-    expect(lastPlanMode?.data.active).toBe(false)
+    expect(planModes.at(-1)?.data.active).toBe(false)
     expect(tripwire.pageErrors).toEqual([])
     expect(tripwire.warnings).toEqual([])
   }, 200_000)