inspector/clients
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 269ff5fefc fix(web): follow a rename whose list reload failed, and drop a double cast
Copilot review r2.

`onConfigSubmit` moved `activeServerId` to the renamed id only after
`updateServer` resolved. Once a failed list reload rejects, the rename is
still on disk — so the active id stayed on the old one and the next
successful refresh left it pointing at a row that no longer exists. Apply
the rename from the catch when the rejection is a `ServerListReloadError`,
then rethrow so the modal still shows the error. `addServerHighlighted`
gets the same treatment: the row is on disk, so it belongs in the
highlight batch the next successful refresh renders.

`activeServerId` is not rendered anywhere, so the test reads it back
through the one handler that hands it to a spy — the pagination toggle's
`updateServerSettings(activeServerId, …)` — after letting the renamed row
land as a later refresh would. It fails without the catch-side call. The
new describe installs its own `useServers` return value and restores the
previous implementation afterwards, since earlier describes' overrides
outlive them (which is why the first draft's spy was never called).

Also replaced the `as unknown as` in the new test with a single
`EventTarget & {…}` intersection, per the TypeScript rules. The other 19
in this file are the same pattern and are left for a separate sweep.

The third comment — that the pagination toggle's rollback baseline goes
stale after a failed list read — is a real defect but pre-existing and
unchanged by this PR; the end state is identical before and after it.
Filed as #2089 rather than widening this fix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UL9retfvAXRgvi6EWk4SY4
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-23 09:58:56 -04:00
..
cli chore(deps): bump nanoid to 3.3.18 to clear the high-severity advisory 2026-08-18 23:12:10 -04:00
launcher chore(deps): bump nanoid to 3.3.18 to clear the high-severity advisory 2026-08-18 23:12:10 -04:00
tui chore(deps): bump nanoid to 3.3.18 to clear the high-severity advisory 2026-08-18 23:12:10 -04:00
web fix(web): follow a rename whose list reload failed, and drop a double cast 2026-08-23 09:58:56 -04:00