Skip to content

test(agent): pin the onboarding demo - OnboardingDemo (Closes #1528) - #1964

Merged
dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1528-onboarding-demo
Oct 14, 2026
Merged

dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1528-onboarding-demo

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #1528

What changed

One new file: trios/agent-server/apps/agent/entrypoints/onboarding/demo/OnboardingDemo.test.ts (the path the issue's Success Criteria names). The subject OnboardingDemo.tsx is untouched.

The 1 exported symbol is exercised (1 it( block; 0 blocked). The demo reads the user MCP integrations, the onboarding storage and the sidepanel messaging, so each seam is stubbed with a full stand-in: the integrations hook with no data, the storage fake underneath the graph's own items, the metrics track (a no-op - its real module pulls the adapter graph other suites stub incompletely), and the messaging module (whose real load pulls the extension polyfill, which refuses outside an extension) answering a no-op. Measured, the static render goes through and shows the demo as it first mounts: the heading, the default suggestion rows (the news and the restaurant queries - the app-specific rows only appear for connected integrations), the custom-task field and the skip control.

Not pinned, and why (issue User Story 2): the task flow itself - opening the sidepanel with the chosen task, the chrome tab swap, the onboarding-completed write - they live in handlers that need a live document and window. The port env seam is seeded before any import can reach the env module (its one-time snapshot - the trap the agent-outputs suite documented), with the subject imported dynamically for that reason.

How it was verified (FR-004)

  • Passing run against the unmodified subject: 1 pass / 0 fail / 4 expect() calls, Ran 1 test across 1 file.
  • Deliberately broken copy (the demo heading changed, valid syntax): 0 pass / 1 fail / 1 expect() calls. The subject was restored byte-identical (git checkout; git diff --name-only prints nothing) and the suite passes again.
  • No network, database or container; no existing test modified or weakened. The file is biome-check clean. The local typecheck reports 19 errors - the pre-existing base of this tree - and 0 mentions of the new file. Verified in-process: the full agent group passes this file next to every suite of this wave (255 pass / 3 fail, the 3 pre-existing local-only env failures, green in CI).
  • Local reproducibility note (issue bun test cannot resolve @/ aliases once .wxt/tsconfig.json exists (wxt prepare output breaks the bun 1.3.6 runtime resolver)Β #1909): bun run typecheck runs wxt prepare, whose generated .wxt/tsconfig.json makes bun 1.3.6 stop resolving @/ aliases for test runs until that generated directory is removed. CI's Tests jobs never run wxt prepare; every run quoted above is from a checkout without .wxt/.

Not verified

  • Nothing beyond the quoted local runs; the CI Tests / agent job re-runs the suite on this SHA.

Dmitrii Fedorov (@dmitrii-f-t27)

@tri-claw

tri-claw Bot commented Oct 14, 2026

Copy link
Copy Markdown

Summary by t27-bees

Worth a look

  • trios/agent-server/apps/agent/entrypoints/onboarding/demo/OnboardingDemo.test.ts:14 β€” process.env.VITE_BROWSEROS_SERVER_PORT is set before imports to avoid the env module's one-time snapshot. If other tests run in the same process and rely on a different port or on the snapshot having already fired, they could see this value instead.
  • trios/agent-server/apps/agent/entrypoints/onboarding/demo/OnboardingDemo.test.ts:16-28 β€” The fakeItem storage stand-in uses a module-level Map (values). State leaks across test runs; if the suite grows multiple it blocks or runs in parallel, getValue/setValue will share data unexpectedly.
  • trios/agent-server/apps/agent/entrypoints/onboarding/demo/OnboardingDemo.test.ts:30-35 β€” mock.module('@​wxt-dev/storage', …) replaces the whole module. Any other test that imports @wxt-dev/storage after this file loads will receive the fake, potentially breaking tests that expect the real implementation or a different mock.
  • trios/agent-server/apps/agent/entrypoints/onboarding/demo/OnboardingDemo.test.ts:37-48 β€” The useGetUserMCPIntegrations mock returns isSuccess: true with data: undefined. If the component ever guards on isSuccess && data, this mock would satisfy the guard but provide no integrations, possibly masking a conditional branch.
  • trios/agent-server/apps/agent/entrypoints/onboarding/demo/OnboardingDemo.test.ts:56-61 β€” mock.module('@/lib/messaging/sidepanel/openSidepanelWithSearch', …) exports no-op functions. The real module pulls the extension polyfill; if the component ever calls onOpenSidePanelWithSearch during render (e.g., in a useEffect with empty deps), the no-op is fine, but any assertion on side-effects would silently pass.

Read: 1 files, +93 -0, the whole diff. Head cca7ca0. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@github-actions

Copy link
Copy Markdown

βœ… Tests passed β€” 3630/3700

Suite Passed Failed Skipped
βœ… agent 258/258 0 0
βœ… build 9/9 0 0
βœ… cdp-protocol 5/5 0 0
βœ… eval 93/93 0 0
βœ… server-agent 280/280 0 0
βœ… server-api 2159/2228 0 69
βœ… server-browser 6/6 0 0
βœ… server-integration 10/11 0 1
βœ… server-lib 279/279 0 0
βœ… server-pglive 166/166 0 0
βœ… server-root 68/68 0 0
βœ… server-sim 8/8 0 0
βœ… server-skills 31/31 0 0
βœ… server-tools 244/244 0 0
βœ… shared 14/14 0 0

View workflow run

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator Author

CI gates on this SHA:

  • Tests / agent: pass β€” the onboarding-demo pin runs in the agent group.
  • All other Tests/ matrix jobs pass*, including server-pglive (no flake rerun needed).
  • Typecheck job: 19 errors = the known base count; 0 mentions of OnboardingDemo.test.ts in the job log.
  • Biome job: red from base findings; 0 mentions of OnboardingDemo.test.ts in the job log.

Dmitrii Fedorov (@dmitrii-f-t27)

@dmitrii-f-t27
dmitrii-f-t27 merged commit 41bedfa into queen Oct 14, 2026
17 of 19 checks passed
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