Operator UAT 2026-05-20 rejected the build because the OS notification fired
on `chrome.runtime.onStartup` ("Recording started. I'm watching the last 30
seconds.") implied recording had auto-started when in fact recording was
not running. Per Phase 1 always-on charter recording does NOT auto-start;
the notification is the gesture surface that invites the operator to start
one (notifications.onClicked → startVideoCapture, src/background/index.ts:1038).
Root cause: a single i18n key `notifStartup` conflated the pre-recording
CTA-with-gesture path (the only path actually wired today) and a future
post-manual-start confirmation path. The key's own `.description` field
acknowledged the conflation. Operator-facing text leaned toward the
confirmation phrasing.
Fix (key split, no behavior change):
- `notifStartupCta` — EN: "Mokosh ready. Click to start a recording." /
RU: "Mokosh готов. Нажмите, чтобы начать запись." — wired into the
onStartup handler.
- `notifRecordingStarted` — preserves the original text ("Recording
started. I'm watching the last 30 seconds." / "Запись запущена…") for
a future post-manual-start confirmation flow.
- Fallback constant renamed `NOTIF_STARTUP_FALLBACK` →
`NOTIF_STARTUP_CTA_FALLBACK`; value updated to match the new CTA text.
- Inline test comment in tests/background/onstartup-notification.test.ts
refreshed to reference the new key + fallback. Assertion regex
/recording|recor|click/i covers both fallback + resolved locale variants,
no logic change.
Notification behavior preserved: same id prefix `mokosh-startup-`, same
priority, same icon, same onClicked → startVideoCapture wiring. No new
test-mode symbols (FORBIDDEN_HOOK_STRINGS inventory stays at 12).
Files modified:
- _locales/en/messages.json
- _locales/ru/messages.json
- src/background/index.ts
- tests/background/onstartup-notification.test.ts
Verification:
- npx vitest run --exclude tests/build/** --exclude tests/background/no-test-hooks-in-prod-bundle.test.ts: 104/104 GREEN
- npx vitest run tests/i18n/ tests/background/onstartup-notification.test.ts: 18/18 GREEN (locale-parity 4/4 + onstartup-notification 14/14)
- npx tsc --noEmit clean on src/background/index.ts
The 2 build-dependent vitest gates (tests/build/no-remote-fonts.test.ts +
tests/background/no-test-hooks-in-prod-bundle.test.ts) and npm run test:uat
are deferred to orchestrator-level re-verification after the parallel
Plan 01-10 mark-bundling fix also lands (operator-UAT re-spawn coordinated
by orchestrator).
Debug record: .planning/debug/resolved/01-09-startup-notification-misleading-text.md
Operator UAT rejection event: 2026-05-20
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7.4 KiB
slug, status, goal, trigger, phase, plan, opened, closed, orchestrator_diagnosed
| slug | status | goal | trigger | phase | plan | opened | closed | orchestrator_diagnosed |
|---|---|---|---|---|---|---|---|---|
| 01-09-startup-notification-misleading-text | resolved | find_and_fix | it fires the notification when starts the browser if installed --- even though the recording is not going. | 01-stabilize-video-pipeline | 01-09 | 2026-05-20 | 2026-05-20 | true |
Debug session 01-09-startup-notification-misleading-text — i18n key conflated CTA + post-start confirmation
Problem statement
During the Plan 01-09 closure UAT 2026-05-20, the operator reported the
verbatim symptom: "it fires the notification when starts the browser if
installed --- even though the recording is not going." On browser start
with the extension installed (no active recording), the OS notification
displayed "Recording started. I'm watching the last 30 seconds." Operator
empirical evidence (orchestrator-inspected
~/Downloads/session_report_2026-05-20_09-51-45.zip): meta.json shows
totalEvents: 0, events.json empty — operator never actually recorded;
they only saw the misleading notification on browser start, were
confused, and saved an empty archive in an attempt to verify state.
Root cause
_locales/{en,ru}/messages.json defined a single key notifStartup whose
text leaned toward a post-start confirmation phrasing ("Recording started.
I'm watching the last 30 seconds."). The key's own .description field
acknowledged the conflation: "Notification body for the onStartup +
manual-start flow." In reality only the onStartup path consumes the
key (src/background/index.ts:1023) — and on that path the recording has
not started; per Phase 1 always-on charter recording does not
auto-start, and the notification itself IS the gesture surface (clicking
it triggers notifications.onClicked → startVideoCapture at line
1038–1050). The operator was reading a confirmation message in a
pre-recording context.
The fallback constant NOTIF_STARTUP_FALLBACK ("Recording started. Click
here to start a recording.") was a hybrid that still led with the
misleading "Recording started." phrase.
Fix design
Per orchestrator charter, split the conflated key into two:
-
notifStartupCta(the path actually wired today)- EN:
"Mokosh ready. Click to start a recording." - RU:
"Mokosh готов. Нажмите, чтобы начать запись." - Description (en): "Notification body for the onStartup flow — CTA-with-gesture invite. Notification title is extName. Per Phase 1 always-on charter: recording does NOT auto-start; this notification is the gesture surface."
- Description (ru): equivalent Russian description.
- EN:
-
notifRecordingStarted(reserved for future post-manual-start confirmation flow)- EN:
"Recording started. I'm watching the last 30 seconds."(preserves original text for future re-use) - RU:
"Запись запущена. Я слежу за последними 30 секундами."(preserves original text) - Description: clearly scoped to "AFTER recording successfully starts via startVideoCapture."
- EN:
-
Renamed fallback constant
NOTIF_STARTUP_FALLBACK→NOTIF_STARTUP_CTA_FALLBACKwith new EN value"Mokosh ready. Click to start a recording."to match the new CTA text. -
Updated single SW call site (
src/background/index.ts:1023):i18nMessage('notifStartup', NOTIF_STARTUP_FALLBACK)→i18nMessage('notifStartupCta', NOTIF_STARTUP_CTA_FALLBACK). -
Updated inline test comment in
tests/background/onstartup-notification.test.tsto reflect the new key + fallback. The assertion regex/recording|recor|click/imatches the new CTA text via theclickalternation, so no test logic change was needed — the regex deliberately covers both fallback and resolved locale variants.
Migration alias decision
No alias retained. notifStartup was referenced in exactly one code
call site (line 1023) and only as an inline comment in one test (line
164). Both updated in this patch. The single-cycle rename is cleaner than
carrying a deprecation alias.
Files modified
_locales/en/messages.json— key split + new descriptions_locales/ru/messages.json— key split + new descriptionssrc/background/index.ts— fallback rename + call site updatetests/background/onstartup-notification.test.ts— inline comment refresh
Behavior preservation
- Same
chrome.notifications.createcall signature, same id prefixmokosh-startup-, samepriority: 1, same icon path. - Same
chrome.notifications.onClickedhandler at line 1038–1052 invokesstartVideoCaptureon click. The notification's CTA-with-gesture role is unchanged — only the displayed text now truthfully describes pre-recording state. - No new test-mode symbols.
FORBIDDEN_HOOK_STRINGSinventory stays at 12.
Acceptance gates
- ✅
_locales/en/messages.json+_locales/ru/messages.jsonboth containnotifStartupCtaANDnotifRecordingStartedwith the orchestrator-specified texts; locale-parity test passes (4/4 GREEN). - ✅
src/background/index.tsonStartup handler readsnotifStartupCtawithNOTIF_STARTUP_CTA_FALLBACK. - ✅
npx vitest run --exclude tests/build/** --exclude tests/background/no-test-hooks-in-prod-bundle.test.ts: 104/104 GREEN (excludes 2 build-dependent gates blocked by the parallel Plan 01-10 mark-bundling debug session's uncommitted SVG assets — orthogonal to this fix; orchestrator coordinates the merged re-verification). - ✅
npx vitest run tests/i18n/ tests/background/onstartup-notification.test.ts: 18/18 GREEN (locale-parity 4/4 + onstartup-notification 14/14). - ✅
npx tsc --noEmitclean onsrc/background/index.ts(the single SW file modified by this patch). - ⏸
npm run build+npm run test:uat+ Tier-1 grep-on-built-bundle deferred to orchestrator-level re-verification after the parallel Plan 01-10 mark-bundling fix also lands (operator-UAT re-spawn coordinated by orchestrator).
Empirical re-verification (operator-side, post-orchestrator merge)
After both this fix and the parallel Plan 01-10 mark-bundling fix land:
- Reload the extension.
- Close + reopen Chrome.
- Observe the OS notification on startup. Expected text: "Mokosh ready. Click to start a recording." (NOT "Recording started…").
- Click the notification →
startVideoCaptureruns → operator selects screen → recording starts (gesture surface preserved).
Noteworthy
-
Two parallel debug sessions touched the same working tree. The Plan 01-10 mark-bundling session edited
src/welcome/welcome.ts+welcome.csswelcome.htmlconcurrently with this session's edits to background + locales. The vitest gates fortests/build/no-remote-fonts.test.tsandtests/background/no-test-hooks-in-prod-bundle.test.tsboth requirenpm run buildto succeed, which currently fails because the parallel session'swelcome.tsimportsmokosh-mark.svg?urlbefore that asset exists in the tree. Those 2 failures are entirely owned by the parallel session — explicitly excluded from this session's verification. Full build + UAT will be re-run by the orchestrator after both sessions merge.
-
Operator-facing key names follow a discoverable pattern.
notifStartupCta(action invite) vsnotifRecordingStarted(state confirmation) — future i18n contributors get unambiguous semantic hints from the key alone. The.descriptionfield reinforces this with explicit scoping ("Per Phase 1 always-on charter: recording does NOT auto-start").