test(gallery): cover classic new tab page

Merged
TE
25d ago
+253-2

What changed

Add a gallery entry for the legacy (variant-A) NewTabPage still selectable from the host while the newer NewTabScreen is dogfooded.

The entry covers:

  • Terminal, Browser, and Agent switching, including Tab and Shift+Tab
  • ! and ? prefix edits, Escape clearing, and omnibar keyboard activation
  • project/folder chooser filtering and keyboard selection
  • default-kind cycling
  • existing-session, All sessions, and submit host receipts

It removes only the NewTabPage#KindIcon and NewTabPage#NewTabPage allowlist rows. The NewTabScreen gallery and all composer/changes lanes remain untouched.

Validation

  • bun run typecheck
  • bun test test/gallery-coverage.test.ts (6 pass; 55 entries / 533 variants)
  • bun run gallery:build
  • bunx vp fmt src/agent-session/acpmux/NewTabPage.gallery.tsx --check
  • git diff --check
  • Happy DOM smoke: kind switch, ! prefix, default-kind receipt, open-session receipt, and project chooser selection

Gallery build emitted the existing ::highlight(...) CSS parser warnings; the build passed.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds a gallery entry covering the classic (variant-A) NewTabPage so its keyboard flows and host receipts stay visible while the newer NewTabScreen is dogfooded.

The entry exercises Terminal/Browser/Agent switching, ! and ? prefix edits, Escape clearing, omnibar keyboard activation, project chooser filtering, default-kind cycling, and existing-session, All sessions, and submit host receipts. It removes the KindIcon and NewTabPage rows from the coverage allowlist; the NewTabScreen gallery and all composer/changes lanes are untouched.


[!NOTE]
Low Risk
Test and gallery-only changes; no production UI or runtime behavior.

Overview
Adds a component gallery entry for the legacy classic NewTabPage (agent-pane.new-tab-page) so it stays covered while NewTabScreen is dogfooded.

The entry wires fixtures, a receipt wrapper on host callbacks (onSubmit, onJump, onOpenSession, etc.), and Play scenarios for kind switching, !/? prefixes, Tab/omnibar keyboard navigation, Escape clear, project chooser, default-kind cycling, open-session, and “All sessions”. It declares covers for NewTabPage and KindIcon plus layout/perf gallery checks.

gallery-coverage.allowlist.json drops the two NewTabPage.tsx rows that are now satisfied by this entry.

Reviewed by Cursor Bugbot for commit bec2253b95c10e2ba04e5493f46f43f64e4441ea. Bugbot is set up for automated code reviews on this repo. Configure here.