Skip to content

test(tui): follow the breadcrumb and the block splash mark - #190

Merged
sosidudku1 merged 2 commits into
mainfrom
fix/stale-tui-test-assertions
Aug 20, 2026
Merged

test(tui): follow the breadcrumb and the block splash mark#190
sosidudku1 merged 2 commits into
mainfrom
fix/stale-tui-test-assertions

Conversation

@sosidudku1

Copy link
Copy Markdown
Collaborator

Seven tests were failing on main against code that behaves correctly. They assert on a UI surface that two merged PRs replaced.

What changed under them

Why this is a test fix and not a code fix

The behavioural assertion in the same file — does not quit when Esc is pressed twice from an Observe tab, which counts quit/abort callbacks rather than matching text — passed throughout. Esc has been returning to Run correctly the whole time; only the strings moved.

The changes

  • escape-observe-tabs.test.tsx▸ ObserveObserve ▸, ▸ RunRun
  • escape-import-tab.test.tsx▸ ManageManage ▸, ▸ RunRun
  • tui-app.test.tsx — the splash assertion now checks the rail the Run screen always carries, since the mark's glyphs vary with the surface

Tests only; no production code is touched.

Delta

v0.2.2 baseline: 7 failures / 4075 tests. Before this PR: 14 / 4309. After: 5 / 4309.

The five that remain were all failing on v0.2.2 too and are out of scope here: two TuiApp (smoke) cases (Shift+Tab expects Telegram as the last Manage tab, now Privacy; two-mode LLM panel expects a heading the panel no longer renders), plus persistEmbeddingHybridRecall, the Sibiliainen CV search case, and the sidecar FIFO concurrency test. Esc from an idle Manage panel also appears intermittently — it passes in isolation and settles ~10ms after the write, under Ink's 20ms flush delay.

🤖 Generated with Claude Code

sosidudku and others added 2 commits August 20, 2026 04:09
#171 replaced the three-section pill row with a breadcrumb, and #151 made
the splash mark a scaled block raster. Three test files still asserted the
old surface, so seven tests failed on main against code that behaves
correctly — the one behavioural assertion in the same file (Esc twice does
not quit) passed throughout.

- escape-observe-tabs / escape-import-tab: the section is now the left half
  of a crumb (`Observe > Feed`), so assert `Observe >` rather than `> Observe`,
  and `Run` rather than `> Run`.
- tui-app smoke: the splash mark is drawn in block glyphs whose exact shape
  varies with the surface, so assert the rail the Run screen always carries.

Tests only; no production code touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Shift+Tab from Run wraps to the LAST Manage sub-tab. That is privacy, not
telegram — MANAGE_TABS gained import and privacy after the test was
written. The marker matters: a bare "Privacy" also matches the inactive
chip in the sub-tab strip, so the assertion carries the active marker.

The two-mode LLM panel test asserted RouteCard chrome the panel
deliberately drops. ink-testing-library reports no rows, so LlmPanel falls
back to the 80x24 surface and picks its compact header — correct code
never renders "Active chat route" at that budget. The full/compact split
is owned by components/llm-panel.test.tsx, which drives maxRows directly;
the smoke test now asserts the two-mode body every budget keeps.

Both assertions were checked by ablation: they fail when the behaviour
they describe is removed.
@sosidudku1

Copy link
Copy Markdown
Collaborator Author

Pushed two more fixes so this closes out the stale-expectation cleanup completely rather than leaving two behind.

  • Shift+Tab from Run expected Telegram as the last Manage sub-tab; MANAGE_TABS gained import and privacy since, so the wrap target is Privacy. The assertion carries the active marker — a bare "Privacy" also matches the inactive chip in the strip, which made the first version of this fix pass even with privacy removed from the list.
  • The two-mode LLM panel asserted RouteCard chrome that correct code deliberately drops: ink-testing-library reports no rows, so LlmPanel falls back to 80x24 and picks its compact header. The full/compact decision is already owned by components/llm-panel.test.tsx, which drives maxRows explicitly, so the smoke test now asserts the two-mode body every budget keeps.

Both were checked by ablation — each fails when the behaviour it describes is removed.

Suite on this branch over current main (which now includes #165): 4766 tests, 2 failures, down from 5. The two left are the flaky sidecar FIFO case and the $HOME-dependent glob test, both failing on pristine main and out of scope here.

@sosidudku1
sosidudku1 merged commit a87cb01 into main Aug 20, 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.

2 participants