The check flagged an untested backend behavior change, and it was right —
withholding the MCP credential is the whole feature, and nothing asserted it.
Credential issuance is the observable that matters: it is the only place a
credential is minted and `/mcp` accepts nothing else, so withholding it is
what actually denies every provider and any external MCP client.
Testing it needed a seam. The real issuer reads a module-global registry that
only a running MCP server installs, so from a unit test the enabled and
disabled paths look identical — both leave no session behind. Reading the
stored session back would have passed either way, which is worse than no test.
`ProviderServiceLiveOptions` already carries a test override for the canonical
event logger, so the issuer follows that existing pattern.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Agents could always drive the preview browser, with no way to say no. Adds
Settings → Integrations → Browser → Agent browser access, on by default.
Turning it off withholds the MCP credential in `prepareMcpSession`. That is
the only place a credential is minted and the `/mcp` endpoint accepts nothing
else, so one branch covers all five providers and any external MCP client —
every adapter already treats a missing session as "no MCP server".
The Codex developer instructions describing `preview_*` drop out with the
tools. That is derived from the session's actual MCP configuration via the
existing `hasConfiguredMcpServer`, not from a second read of the setting, so
the prompt cannot describe tools the turn doesn't have. Leaving the text in
would be worse than saying nothing: it steers the model away from Playwright
and agent-browser, so it would talk the agent out of its only remaining
browser automation.
An unreadable settings file denies rather than propagating the error, which
would mean adding ServerSettingsError to a union every caller handles. Denying
is the safe direction: an explicit "off" silently becoming "on" would violate
the user's choice, while the reverse costs one toolset and is visible at once.
The toggle applies to sessions started from then on; a running agent keeps the
tools it was given, which the UI states rather than implying otherwise.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Three findings from the UI-consistency check, all in the new panel:
The viewport cluster forced a hard minimum width — `min-w-36` on the select
plus a non-shrinking group of two `w-24` fields and the rotate button — so the
row overflowed at narrow widths once a non-fill default was set. The cluster
now wraps and the fields are narrower.
Control heights were mixed in one `items-center` row: a default-size select
beside `sm` number fields and an `icon-sm` button. The select is now `sm` too,
so all three measure 28px.
The wrapper's `opacity-64` compounded with each primitive's own
`disabled:opacity-64`, dimming the controls to roughly 0.41 alpha — dimmer
than disabled controls anywhere else in Settings. The wrapper now dims only
the row text, leaving each control at the standard disabled opacity.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`preview.open` now carries the configured default viewport and `createTab`
carries the zoom/appearance defaults, so the call-shape assertions had to move
with them.
PreviewView's test stubs `browserDefaults` directly rather than deepening the
`state/session` mock: the component now reaches `useSettings`, which pulls in
`state/server`, and a test about browser chrome shouldn't drag the settings and
connection graph along with it.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Disabling each control on its own left labels and descriptions at full
strength, so the group still read as editable. The defaults now sit in a
bordered, dimmed block with the reason at its top.
The explanation stays outside the dimmed area: the one part that must remain
readable is the part saying why the rest isn't.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The preview browser is a Chromium guest the desktop app hosts, so its defaults
mean nothing in a web client. They are also client-local, which is why these
are disabled rather than hidden: editing them from a browser tab would write
preferences belonging to a different client, reading as though the desktop app
had been configured when it hadn't.
Follows the pattern Keybindings already uses for a desktop-only concern — an
inline notice above the affected controls. Reset affordances are withheld too,
since there is nothing to reset from here.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Three follow-ups to the browser defaults:
The dimension inputs were bare `Input type=number` at w-16, which clipped
4-digit values ("1280" rendered as "128("). They are now `NumberField`, the
repo's real numeric control, widened to fit and with grouping switched off so
a height reads "1024" rather than "1,024".
They commit on blur via `onValueCommitted` instead of per keystroke. Typing
"2560" passes through "256", which is itself a legal dimension, so a
change-handler would persist that intermediate size and rewrite settings on
every key.
Adds an orientation control next to the dimensions, reusing the device
toolbar's rotate affordance — its icon moves to a shared module rather than
being duplicated. Rotating a preset keeps the preset: `resolvePreviewViewport`
already stores rotated presets as the id plus swapped dimensions, so a rotated
iPad Mini stays an iPad Mini instead of decaying into a custom size.
Adds `browserAutoShowFloatingPreview` (on by default) for whether an
agent-opened preview pops the floating player into view. An explicit
`open`/`show` on `preview_open` still wins: that is the agent deliberately
surfacing or hiding its work, which shouldn't be overridden by a default.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The preview browser always opened in fill mode, at 100% zoom, following the
system appearance. That is rarely what you want if you work in responsive mode
against a handful of known viewports, and there was no way to say otherwise.
Adds a Settings → Integrations page whose first section is Browser, holding the
defaults a preview tab opens at: viewport (fill, responsive, or a device
preset), zoom, and appearance. They apply to every entry point that opens a tab
without stating its own size — a hand-opened browser panel and an agent calling
`preview_open` alike.
The viewport travels with `preview.open` and zoom/appearance with `createTab`,
so a tab is born configured rather than reflowing a frame later.
Agents keep their 1280x800 fallback, but only when no default is configured:
a fill-mode tab would otherwise be sized by whatever the panel happens to be,
and agents assert against what they open.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>