inspector/clients/web/src/theme
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Cliff Hall 0890c7509a
feat(web): add Mantine clear buttons to text inputs app-wide (#1333) (#1448)
* feat(web): add Mantine clear buttons to text inputs app-wide (#1333)

Add a clear (×) affordance to every user-editable text input across the
web client so a populated field can be reset in one click.

- Autocomplete: enable `clearable` by default via the theme
  (`theme/Autocomplete.ts`) — covers the prompt-argument and
  resource-template variable autocomplete branches.
- TextInput / Textarea: Mantine v8 does not expose a public `clearable`
  prop on these primitives (only the combobox-based components do), so
  add the clear button manually via `rightSection` + `CloseButton`
  (aria-label="Clear") shown only when the field has a value, wired to
  reset the field's controlled value to "".

Applied to sidebar search inputs (prompts, tools, apps, tasks, history,
resources, network, logs), prompt-argument and resource-template
variable inputs, the sampling response/model fields, server config &
settings forms, roots table, schema form, experimental features panel,
and the server.json import panel. Read-only/display Textareas
(OutputValidationModal, UrlElicitationErrorModal) are intentionally left
untouched.

Tests cover the clear behavior on representative inputs from each
category (sidebar search, prompt argument, resource-template variable,
sampling response, plus the config/settings forms).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(web): disable ServerConfigModal clear buttons while submitting

Address review #2 on #1448: the clear CloseButton sat in `rightSection`
with `rightSectionPointerEvents="auto"`, so it stayed clickable even
while the field was `disabled={submitting}`, letting a user wipe a field
mid-submit. Forward `disabled={submitting}` to each clear button so it
locks together with its input.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(web): remove redundant Auto-respond from SamplingRequestPanel

The sampling modal pre-loads its draft with the default stub result, and
"Send Response" sends that draft — so on an untouched form "Auto-respond"
did exactly the same thing as "Send Response", just with a fresh copy of
the same defaults. Drop the redundant button and its `onAutoRespond` prop;
"Send Response" now covers both the unedited (stub) and edited cases.

The InlineSamplingRequest variant keeps its Auto-respond button — there it
is the quick path versus "Edit & Send" (which opens this editable modal),
not a duplicate of an adjacent send action.

Updated PendingClientRequestModal wiring, stories, and tests accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 09:51:05 -04:00
..
assets refine UI layout, theming, and component consistency across screens 2026-03-23 16:56:53 -04:00
ActionIcon.ts formatting 2026-03-17 16:43:27 -04:00
Alert.ts formatting 2026-03-17 16:43:27 -04:00
AppShell.ts formatting 2026-03-17 16:43:27 -04:00
Autocomplete.ts feat(web): add Mantine clear buttons to text inputs app-wide (#1333) (#1448) 2026-06-12 09:51:05 -04:00
Badge.ts Add new components, typography, badge contrast, and screen layout refactors 2026-03-28 20:38:04 -04:00
Button.ts formatting 2026-03-17 16:43:27 -04:00
Card.ts Expose live resource subscriptions via a hook (#1325) (#1326) 2026-05-19 20:15:51 -04:00
Code.ts fix InlineError blank space and ElicitationUrlPanel URL overflow 2026-03-22 18:49:26 -04:00
Flex.ts Add new components, typography, badge contrast, and screen layout refactors 2026-03-28 20:38:04 -04:00
Group.ts feat(web): History — Pin & Replay, plus two history-status fixes (#1438) (#1441) 2026-06-07 20:21:52 -04:00
index.ts feat(web): History — Pin & Replay, plus two history-status fixes (#1438) (#1441) 2026-06-07 20:21:52 -04:00
Input.ts Phase 1: Style refinements and component tweaks from Storybook review 2026-04-17 19:26:21 -04:00
Paper.ts Add new components, typography, badge contrast, and screen layout refactors 2026-03-28 20:38:04 -04:00
Select.ts formatting 2026-03-17 16:43:27 -04:00
Switch.ts formatting 2026-03-17 16:43:27 -04:00
Text.ts feat(network): add Network screen surfacing backend fetch log (#1355) (#1363) 2026-05-27 08:35:25 -04:00
TextInput.ts formatting 2026-03-17 16:43:27 -04:00
theme.ts feat(web): History — Pin & Replay, plus two history-status fixes (#1438) (#1441) 2026-06-07 20:21:52 -04:00
Title.ts feat(connection-info): wire Connection Info modal to the connection handshake (#1377) 2026-05-30 16:42:37 -04:00
UnstyledButton.ts Redesign Resources screen: template panel, subscriptions, hover states, and callback architecture 2026-03-29 20:04:25 -04:00