fix(cmux-next history): a lost host is said once, without the raw error banner
Layout pass, running list (lane: layout-pass; full list in cmuxterm-hq knowledge/layout-pass.md)
- Merged: #22785 Settings, #22825 Markdown toolbar, #22839 Chief latency bars, #22847 Harnesses, #22862 gallery Settings cascade, #22872 code editor find pill, #22880 gallery model picker, #22904 Passwords header, #22917 Agent Activity split
- Open: #22897 diff toolbar, #22954 Stats week and month, #22959 path picker long folder
- This PR: History when the host is lost
- Next: Apps header offset, coderouter row heights
What
When History loses its host, it said so twice:
- a banner under the filters with the raw error text ("history is unavailable");
- the page's own message centered below it ("History is not available until cmux reconnects.").
The banner now shows only while the host is connected, for errors such as a refused remove. A lost host is said once, in the page's words, so a person never sees the transport's English error text.
Review follow-ups in the same PR:
- The disconnected message is a
role="status"region, so a screen reader still hears about the lost host now that the banner's alert is gone. - When the host comes back, the store drops the lost link's error as it starts re-reading, so the stale error doesn't flash back as a banner and alert.
- Clear is disabled while the host is gone, like the search field, and draws muted.
Test
bun test test/history-page-error.test.tsx (jsdom). The new case runs the mock provider offline and checks:
- the page is disconnected;
- the empty state says
page.disconnected; - there is no
.history-errorbanner.
It also checks that the message has role="status" and that Clear is disabled. A second new case checks that a host coming back clears the error before the re-read. The existing case, where a refused remove still shows the banner, still passes.
Results:
- Base (red commit): fails, because the banner is there.
- Head: 15 pass, together with
history-page-parity.test.tsx. The follow-up checks were red on commit 2 and green on the head.
Screenshots
Gallery pages.history / network-error at 640. "Before" is the gallery, "after" hides the banner the same way this change does.
| Before | After | |
|---|---|---|
| Dark | ![]() | ![]() |
| Light | ![]() | ![]() |
Observed / Not run
- Observed: the test above, red then green.
tsc --noEmitreports no errors in the changed files. Clean:oxlint,vp fmtand thecheck:*scripts.prepush-gate.py: no new violations. - Not run locally: the full
vp checkand a gallery build, because heavy jobs are off huge-blue. - The HQ note also listed "two rows highlighted at once" on History. I couldn't reproduce it in the gallery states (
filtered-selectedhighlights one row), so it isn't in this PR.
Changelog
Fixed: when cmux loses its connection, History says so once instead of also showing a raw error line.
Agent session: huge-blue
🤖 Generated with Claude Code



