web: server-screen, footer, monitoring-sidebar, and responsive-header polish (#1683)
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled
Some checks failed
Run install, format, lint, build, and test on every push / build (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish (push) Has been cancelled
Run install, format, lint, build, and test on every push / publish-github-container-registry (push) Has been cancelled
Closes #1682 Server-screen, footer, monitoring-sidebar, and responsive-header polish: connected-card highlight/scroll + Failed status, footer row + MCP-docs tooltip, Servers box, card-surface refresh (gray-0 entry cards + white code), monitoring-sidebar layout, a 1280px responsive floor honored by the header (always-icon Disconnect, always-SegmentedControl tabs, 1500px status text, always-available sidebar), a horizontally-scrollable long resource URI in the compact Protocol entry, and copy buttons beside resource URIs / network URLs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
parent
590359abc5
commit
8d33e76f97
1 changed files with 707 additions and 274 deletions
|
|
@ -101,8 +101,6 @@ import { useServerListWritable } from "@inspector/core/react/useServerListWritab
|
|||
import { useInspectorVersion } from "@inspector/core/react/useInspectorVersion.js";
|
||||
import { usePendingClientRequests } from "@inspector/core/react/usePendingClientRequests.js";
|
||||
import { InspectorView } from "./components/views/InspectorView/InspectorView";
|
||||
import { VersionBadge } from "./components/elements/VersionBadge/VersionBadge";
|
||||
import { CopyrightBadge } from "./components/elements/CopyrightBadge/CopyrightBadge";
|
||||
import type {
|
||||
ToolCallState,
|
||||
ToolsUiState,
|
||||
|
|
@ -654,6 +652,14 @@ function App() {
|
|||
undefined,
|
||||
);
|
||||
|
||||
// Id of the server that just connected successfully (#1682) — the success
|
||||
// mirror of `failedServerId`. Drives the green highlight + scroll-into-view on
|
||||
// that ServerCard. Set on the →connected transition, cleared when a new
|
||||
// connection attempt starts or the session disconnects.
|
||||
const [connectedServerId, setConnectedServerId] = useState<
|
||||
string | undefined
|
||||
>(undefined);
|
||||
|
||||
// InspectorClient + per-primitive state managers. All recreated together
|
||||
// whenever the user switches active servers, then destroyed when the
|
||||
// next switch happens (or when the component unmounts).
|
||||
|
|
@ -993,6 +999,18 @@ function App() {
|
|||
}
|
||||
}, [connectionStatus]);
|
||||
|
||||
// Track the just-connected server so its card gets the green highlight +
|
||||
// scroll-into-view (#1682). Unlike `failedServerId` (which must survive the
|
||||
// `disconnect` event a failed connect fires), "connected" is a stable status,
|
||||
// so a status-driven effect can both set and clear it: set on connect, clear
|
||||
// whenever the session isn't connected (disconnect, a new attempt's
|
||||
// "connecting", or an error).
|
||||
useEffect(() => {
|
||||
setConnectedServerId(
|
||||
connectionStatus === "connected" ? activeServerId : undefined,
|
||||
);
|
||||
}, [connectionStatus, activeServerId]);
|
||||
|
||||
// Disconnect the previous InspectorClient when it's replaced (server
|
||||
// switch) or when App unmounts (HMR, tests). Without this the prior
|
||||
// session's transport — a spawned stdio subprocess, an SSE stream, or
|
||||
|
|
@ -3821,6 +3839,8 @@ function App() {
|
|||
serverListWritable={serverListWritable}
|
||||
activeServer={activeServerId}
|
||||
erroredServerId={failedServerId}
|
||||
connectedServerId={connectedServerId}
|
||||
version={inspectorVersion}
|
||||
connectionStatus={connectionStatus}
|
||||
connectErrorMessage={connectErrorMessage}
|
||||
initializeResult={initializeResult}
|
||||
|
|
@ -3965,8 +3985,6 @@ function App() {
|
|||
onRefreshApps={onRefreshTools}
|
||||
/>
|
||||
</Box>
|
||||
<CopyrightBadge />
|
||||
<VersionBadge version={inspectorVersion} />
|
||||
<ServerConfigModal
|
||||
opened={configModal !== null}
|
||||
mode={configModal?.mode ?? "add"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue