inspector/clients/web/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall d830213796 fix: address round-2 review — stale disconnect, lint-project gap, coverage
Copilot round 2 (PR #2039) surfaced no new visible comments but six
suppressed ones. Four were actionable.

`clients/tui/src/App.tsx` — a stale-completion race in the new banner:
start disconnecting server A, switch to B, then let A's disconnect
reject, and A's failure appears under B. Rapid same-server retries had
the same shape, and the stale attempt is the one most likely to reject.
Claim a monotonic attempt token before awaiting and publish only if it
is still current and the server has not changed; `handleConnect` bumps
the same counter so a connect retires an in-flight disconnect. The
rejection is still owned when superseded — just not published. The
regression test drives a deferred rejection across a server switch, and
fails without the guard.

`tsconfig.lint.json` — the root type-aware block matches
`test-servers/src/**/*.tsx` but the parser project omitted that
extension, so such a file would have failed with "not found in any of
the provided project(s)" instead of being linted. Added, and AGENTS.md
now states the invariant: the include must stay a superset of the lint
globs.

`clients/web/server/{server,vite-hono-plugin}.ts` — the `open()`
rejection branch was untested, and duplicated. Both were fixed by
removing the duplication: `openBrowser` now lives beside
`printServerBanner` in `web-server-config.ts`, with one implementation
to test. Two copies of a one-line `.catch` is two chances for one to
drift back to a bare `open(url)`. The dev plugin is not booted in tests
— it returns early under VITEST by design — but it calls the same
tested helper.

`core/mcp/remote/node/server.ts` — `closeAbortedStream`'s rejecting-close
path, the entire reason the helper exists, had no test. Exported it (as
this file already does for `requestIdForSendWait` / `mcpParamHeadersOnly`)
and covered both legs, asserting no unhandledRejection fires.

Also corrects AGENTS.md, which said each client lists "both" tsconfig
projects — true for cli/tui/launcher, but web lists four leaf projects.

Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-16 21:52:43 -04:00
..
browser-externalized-builtin-gate.ts build(web): fail vite build on a browser-externalized Node built-in (#1769) (#1777) 2026-07-25 19:45:11 -04:00
ensure-web-build.ts feat(web): build dist on demand for prod --web + end-to-end CI smoke (#1486) (#1497) 2026-06-16 18:34:52 -04:00
inject-auth-token.ts feat(auth): inject MCP_INSPECTOR_API_TOKEN into served index.html (#1378) (#1382) 2026-05-30 20:10:27 -04:00
resolve-bind-host.ts fix: bind loopback by address and pin the sandbox port so containers work 2026-08-15 12:33:27 -04:00
run-web.ts feat(web): enforce localhost-only binding; expand loopback origin allow-list (#1796) 2026-07-26 22:15:10 -04:00
sandbox-controller.ts fix: bind loopback by address and pin the sandbox port so containers work 2026-08-15 12:33:27 -04:00
server.ts fix: address round-2 review — stale disconnect, lint-project gap, coverage 2026-08-16 21:52:43 -04:00
start-vite-dev-server.ts feat(web): enforce localhost-only binding; expand loopback origin allow-list (#1796) 2026-07-26 22:15:10 -04:00
types.ts Port v1.5 web dev backend (vite-hono-plugin + remote-server bootstrap) (#1321) 2026-05-18 19:22:14 -04:00
vite-base-config.ts fix: load @napi-rs/keyring lazily so an unsupported platform degrades instead of crashing (#1905) (#1948) 2026-08-08 18:15:20 -07:00
vite-hono-plugin.ts fix: address round-2 review — stale disconnect, lint-project gap, coverage 2026-08-16 21:52:43 -04:00
web-server-config.ts fix: address round-2 review — stale disconnect, lint-project gap, coverage 2026-08-16 21:52:43 -04:00