Monitoring sidebar toggle, Prompts-style Tools results, and icon-button UI polish (#1661) (#1662)

* feat(web): single header MonitoringToggle + Prompts-style Tools results (#1661)

Consolidate the monitoring column's open/close affordances into one header
toggle, and align the Tools/Prompts result panes and the sidebar log layout.

- Add a single `MonitoringToggle` in the header, to the right of the theme
  icon. It opens/closes the monitoring column and only shows when a server is
  connected OR a connect attempt failed (wide viewport + a monitor tab
  available) — the same availability rule the column uses.
- Remove the scattered pin/close icons: delete `PinColumnButton`; drop `onPin`
  from the Logs/Protocol/Network/Console screens and their stream panels; drop
  `onOpenMonitor` from the server list; remove the close button from
  `MonitoringControls`/`MonitoringScreen`.
- Tools screen: remove the "Results will appear here" placeholder pane. Results
  now replace the input form in a single content pane (the Prompts pattern),
  with a top-left X (ToolResultPanel) that dismisses them back to the form;
  form values are preserved for a re-run.
- Prompts screen: the argument form fills the content pane width (drop the 40%
  cap), matching the Tools input.
- LogEntry: add a `compact` two-line layout (time/level/logger on line one,
  message wrapping below) used by the embedded monitoring-column Logs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sMW1YZXkM7fDkdPtHpE95

* polish(web): tooltips on icon buttons + rename "monitoring column" → "monitoring sidebar" (#1661)

- Add Mantine `Tooltip`s to the icon-only controls: Client settings, Theme
  (dynamic light/dark label), the monitoring-sidebar toggle, the list-level and
  per-entry Expand/Collapse toggles, the Pin/Unpin toggle, and the Replay
  button. Labels mirror each control's existing aria-label.
- Rename the feature term "monitoring column" → "monitoring sidebar" across the
  user-facing labels (Open/Close/Resize), comments, and tests, so the UI calls
  it a sidebar consistently.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sMW1YZXkM7fDkdPtHpE95

* review: consistent sidebar wording + reuse MonitoringToggleProps (#1661)

Address the two optional notes from the PR #1662 review:
- Make the MonitoringToggle JSDoc voice consistent ("sidebar" throughout,
  no lingering "column").
- Drop ViewHeader's duplicate `MonitorToggleProps` and reuse the element's
  exported `MonitoringToggleProps` as the single source of truth.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sMW1YZXkM7fDkdPtHpE95

* feat(web): slide-in/out animation for the monitoring-sidebar toggle (#1661)

The header MonitoringToggle now animates in/out via a Mantine Transition whose
in/out styles drive width + margin-left (plus opacity/translateX): as its slot
grows from 0 → the 36px icon, the flex-end header row reflows and pushes the
theme + client-settings buttons one slot to the left; the exit reverses and they
slide back over. A negative margin-left while collapsed cancels the row gap so
the theme icon stays flush-right when the toggle is absent. Only appearance/
disappearance (connect / disconnect / narrow viewport) animates — opening or
closing the sidebar leaves the toggle in place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sMW1YZXkM7fDkdPtHpE95

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cliff Hall 2026-07-11 17:30:16 -04:00 • committed by GitHub
commit dbda70e83b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 613 additions and 440 deletions

View file

@ -24,31 +24,6 @@ describe("ServerListControls", () => {
).toBeInTheDocument();
});
it("hides the open-monitor button unless onOpenMonitor is provided", () => {
renderWithMantine(<ServerListControls {...baseProps} serverCount={2} />);
expect(
screen.queryByRole("button", { name: "Open monitoring column" }),
).toBeNull();
});
it("shows and wires the open-monitor button when onOpenMonitor is provided", async () => {
const user = userEvent.setup();
const onOpenMonitor = vi.fn();
renderWithMantine(
<ServerListControls
{...baseProps}
serverCount={2}
onOpenMonitor={onOpenMonitor}
/>,
);
const openBtn = screen.getByRole("button", {
name: "Open monitoring column",
});
expect(openBtn).toBeInTheDocument();
await user.click(openBtn);
expect(onOpenMonitor).toHaveBeenCalledTimes(1);
});
it("shows the list toggle alongside Export + Add Servers when servers exist", () => {
renderWithMantine(<ServerListControls {...baseProps} serverCount={2} />);
expect(screen.getAllByRole("button")).toHaveLength(3);

View file

@ -1,6 +1,5 @@
import { Button, Group } from "@mantine/core";
import { ListToggle } from "../../elements/ListToggle/ListToggle";
import { PinColumnButton } from "../../elements/PinColumnButton/PinColumnButton";
import {
ServerAddMenu,
type AddServerMenuProps,
@ -14,12 +13,6 @@ export interface ServerListControlsProps extends AddServerMenuProps {
onExport: () => void;
/** When false (read-only session), the Add menu is hidden. Defaults to true. */
writable?: boolean;
/**
* Open the monitoring column. Provided (by the caller) only when a server is
* connected, the column can open, and it isn't already shown — otherwise
* omitted so the open-sidebar affordance is hidden.
*/
onOpenMonitor?: () => void;
}
export function ServerListControls({
@ -31,7 +24,6 @@ export function ServerListControls({
onImportServerJson,
onExport,
writable = true,
onOpenMonitor,
}: ServerListControlsProps) {
return (
// `gap="sm"` matches the header's control spacing (its RightSection group),
@ -50,9 +42,6 @@ export function ServerListControls({
{serverCount > 0 && (
<ListToggle compact={compact} onToggle={onToggleList} />
)}
{onOpenMonitor && (
<PinColumnButton onPin={onOpenMonitor} label="Open monitoring column" />
)}
</Group>
);
}