Skip to content

feat(mar-882): Ask the chief opens a prefilled composer (redo, no boundary above the heading) - #353

Merged
Thebeatkicks merged 2 commits into
masterfrom
000henrik/mar-882-chief-prefill-redo
Sep 7, 2026
Merged

Thebeatkicks merged 2 commits into
masterfrom
000henrik/mar-882-chief-prefill-redo

Conversation

@Thebeatkicks

Copy link
Copy Markdown
Contributor

Summary

  • Redo of feat(mar-882): Ask the chief opens a prefilled composer #349 (reverted as revert: MAR-882 chief prefill (#349) — master shell-smoke proof 1 red #351): "Ask the chief about this agent" now opens the fleet's composer with a prefilled "About <agent title>: " and focus, without wrapping app/page.tsx's default export in Suspense.
  • The regression in feat(mar-882): Ask the chief opens a prefilled composer #349 was the Suspense boundary above the fleet page's own <h1>: this app's static export serves the fallback (no heading) as its first paint until useSearchParams resolves, which is exactly what master's post-merge shell-smoke caught (headings: 0 at dash-app://ui/).
  • This redo never touches app/page.tsx. ChiefChat already receives the whole fleet as its agents prop, so it resolves its own ?ask=<agent> from window.location.search inside a mount effect instead of taking a prop computed by a useSearchParams call above the heading.
  • app/_data/routes.ts (chiefAskHref/CHIEF_ASK_PARAM), lib/copy/chief-chat.ts (describeChiefPrefill), app/_components/composer.tsx (focusSignal), and app/_components/ask.tsx (the two chief-entry links) are reapplied unchanged from feat(mar-882): Ask the chief opens a prefilled composer #349 — none of them depended on how the id reaches ChiefChat.
  • New tests/fleet-first-paint.test.tsx source-greps app/page.tsx for Suspense/useSearchParams and renders AgentsPage via renderToStaticMarkup, asserting the <h1> is present — the regression guard for this exact defect.

Test plan

  • pnpm typecheck — clean
  • pnpm brand:check — passed
  • Focused vitest run (12 files, 218 tests) — all passed
  • pnpm test (whole suite, 281 files / 5337 tests / 13 skipped) — all passed, no flakes
  • pnpm build:renderer + pnpm build:shell — both succeeded
  • Local shell-smoke on a scratch store (--user-data-dir/DASH_DATA_DIR both scoped, basename orchestratedash): proof 1 now reads {"headings":1} at dash-app://ui/ (was 0 on master post-feat(mar-882): Ask the chief opens a prefilled composer #349); final tally 85 PASS / 0 FAIL, [smoke] all proofs passed. Scratch runner retired afterward via scripts/retire-scratch-runners.mjs (RETIRED).
  • No capture-harness proof that the prefilled text actually lands and focuses on a real screen — see docs/mar-882-handoff.md's "Evidence class" and "What is NOT done".

See docs/mar-882-handoff.md for the full account, including the one open question about a re-render edge case (appliedPrefill remembering a dismissed prefill across an unrelated agents reference change) named under "What is NOT done" item 3.

🤖 Generated with Claude Code

…ndary above the heading)

Reapplies the prefill mechanism from #349 (reverted as #351 after
shell-smoke found the fleet page's first paint had 0 headings). The
regression was a Suspense boundary wrapped around app/page.tsx's default
export so an inner component could call useSearchParams; this redo never
touches app/page.tsx at all. ChiefChat already receives the fleet as its
own `agents` prop, so it resolves `?ask=<agent>` from
window.location.search inside a mount effect instead, with a new
tests/fleet-first-paint.test.tsx guarding against a future Suspense/
useSearchParams reintroduction. Local shell-smoke on a scratch store
confirms proof 1 now reads headings:1 (85 PASS / 0 FAIL overall).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Thebeatkicks
Thebeatkicks marked this pull request as ready for review September 7, 2026 11:23
@Thebeatkicks
Thebeatkicks merged commit 5c3bb35 into master Sep 7, 2026
2 checks passed
Thebeatkicks added a commit that referenced this pull request Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant