Repository navigation
fix(webui): forms & modals UX audit — F6, F8, F16 - #1050
Merged
Merged
Conversation
Three findings from the August 2026 Web UI UX audit, all in the
forms-and-modals cluster.
F6 — Add Server modal
The box measured scrollHeight 1494 against a 900px viewport, so 594px of
the form — the submit row included — sat below the fold with no sticky
footer and no close affordance. Escape did nothing and focus stayed on
the triggering button, because `<dialog :open>` (as opposed to
showModal()) gives none of the modal affordances.
The box is now a flex column capped at 85vh: header (title + ✕),
tabs, a single scrolling body, and the action row pinned as a sticky
footer, per tab. A new `useModalA11y` composable supplies the rest of the
ARIA dialog contract — initial focus into the form (skipping the ✕),
a Tab trap, Escape to close, and focus restored to the trigger — and is
applied to AddSecretModal as well, since F8 makes that the primary path
into it. role/aria-modal/aria-labelledby are on both boxes.
F8 — Secrets page could not add a secret
`AddSecretModal` was only reachable from a per-row "Add Value" button
that renders when a secret is referenced in config but not yet set. With
zero rows the page's stated purpose was unreachable. The backend route
(POST /api/v1/secrets) was fine; nothing led to it.
Adds a page-level "+ Add Secret" button and the same CTA in the empty
state, both opening the modal with no predefined name so the user can
name a brand new secret. The empty-state copy now explains what a secret
is for instead of restating "no secrets available". No API change.
F16 — Settings promised instant apply; enable_code_execution did not apply
`PATCH /api/v1/config {"enable_code_execution": true}` answered
applied_immediately: true, requires_restart: false, and GET reported the
new value — yet `code_execution` kept answering "Code execution is
disabled", including from a brand-new MCP session.
Two independent causes, both fixed rather than papered over with a
restart badge, because the hot-reload seam already existed:
* `buildCodeExecutionTool` read the construction-time `p.config`, so
the routing-mode surfaces kept serving the "disabled" stub — whose
handler refuses unconditionally, never reaching the handler-level
gate that *had* already gone live. It now reads `currentConfig()`.
* The stub was built once at init and never rebuilt.
`RefreshCallToolModeTools` joins its direct/code-exec siblings, and
`RefreshCodeExecutionAvailability` re-advertises the tool on every
surface that carries it from the config.reloaded listener — the same
shape PR #973 used for aggregate_upstream_prompts. The stdio surface
is updated with AddTools, not SetTools, so registerTools' other tools
survive.
`DetectConfigChanges` gains `enable_code_execution` as a hot-reloadable
field; without it a lone toggle computed empty ChangedFields and was
swallowed as "no changes detected".
Also fixes the mislabelled `changed_fields` the audit noted alongside it:
Servers were compared with reflect.DeepEqual, but handlePatchConfig
round-trips the live config through JSON before merging, and neither
`Created`/`Updated` (monotonic reading + *time.Location) nor omitempty
empty slices survive that. Every PATCH therefore reported ["mcpServers"]
— and, worse, drove a spurious full upstream reload on every settings
save. Now compared with jsonEqual, the same helper docker_isolation and
trusted_hosts already use for this exact reason, with a length guard so
nil vs [] does not reintroduce it.
Restart honesty, since F16 asked for a real list rather than guesswork:
`code_execution_pool_size` gains the restart badge it always warranted
(Go forces a restart for it), `tls.hsts` joins the Go-side TLS restart
check to match the badge TS already showed (HSTS wraps the handler chain
once, at construction), and the Settings hints panel derives its
"Requires restart" list from the fields that actually carry the badge
instead of hardcoding prose that had drifted — it named "Data directory",
which has no settings field at all.
Verified on an isolated instance (127.0.0.1:18422, scratch dirs):
* F6 measured live at 1440x900 — modal scrollHeight 765 == clientHeight
765, bottom 832 < 900, submit row bottom 816 (above the fold), body
scrollHeight 1290 vs clientHeight 556, focus lands on the first radio
inside the dialog, Tab x40 never escapes, Escape closes and focus
returns to the Add Server trigger. Also checked at 1280x700.
* F8 both CTAs render on an empty page, the modal opens with an
editable name, and the form reaches POST /api/v1/secrets with the
typed payload (this sandbox has no usable keyring backend, so the
backend's refusal is what the dialog shows — the wiring is the point).
* F16 toggled for real: /mcp, /mcp/call and /mcp/code all flip from the
disabled stub to a working code_execution (6*7 -> 42) on a brand-new
MCP session with no restart, and back off again; changed_fields now
reads ["enable_code_execution"], and an unrelated tools_limit patch
reads ["tools_limit"] instead of ["mcpServers"].
Deploying mcpproxy-docs with
|
| Latest commit: |
483ef8a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://838d34f9.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-ux-forms-modals.mcpproxy-docs.pages.dev |
onBeforeUnmount only detached the keydown listener. A modal torn down while open (route change, a v-if around it) therefore stranded focus wherever the trap had put it. deactivate() does both, and its document.contains guard makes the restore a no-op when the trigger left with the same subtree.
Cross-model review (P2): the keydown listener sits on document, and stopPropagation does not stop sibling listeners bound to the same node in the same phase — so with two modals open one Escape closed both. The composable now keeps a stack of open instances and the ones underneath the top ignore the key entirely, giving up the Tab trap with it.
Cross-model review round 2: with the open-modal stack in place, a modal that closes while another is still open restored focus to its own trigger — dragging focus out of the top dialog and behind it. Focus is now restored only when the stack empties; until then the top modal owns it and restores to its own trigger when it goes.
Cross-model review round 3, three points on useModalA11y: - The focus-on-open runs on nextTick, which may land after the modal closed again or after a second modal opened on top; it now checks it is still open and still topmost before grabbing focus. - Focus restoration on unmount is deferred one tick so it runs after Vue detaches the subtree. A trigger torn down with the modal then fails the contains() check and is left alone, instead of taking a focus/blur pair (which scrolls and is announced) on its way out. A trigger that outlives the modal still gets focus back, which was the case worth keeping. - visibleFocusables() claimed to skip hidden controls but did not. It now uses checkVisibility() where the browser has it, so a v-show-hidden control cannot bound the Tab trap and make Tab appear to stick; jsdom lacks the method and falls through, matching how the tests build the DOM. Also documents the one residual: unwinding a stack bottom-up in a single tick lands focus on <body> rather than the original opener. Top-down (the normal order) restores correctly, and nothing in the app stacks these.
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 32844667004 --repo smart-mcp-proxy/mcpproxy-go
|
…Focus honours it Cross-model review round 4: - checkVisibility() on its own catches display:none and content-visibility:hidden but not visibility:hidden, whose options default to off. Pass checkVisibilityCSS so a visibility-hidden control cannot bound the Tab trap. - The initialFocus option resolved through a raw querySelector, bypassing the filter entirely, so a configured selector could hand focus to a hidden or disabled control and silently focus nothing. It now matches against the same filtered candidate set. No caller passes the option today; this closes it before one does.
Cross-model review round 5: routing initialFocus through the Tab-order list blocked the option's main use — the dialog heading carrying tabindex="-1", which is programmatically focusable but deliberately outside the tab order, the standard ARIA dialog pattern. The selector resolves with its own query again, but the visibility/disabled predicate is now shared with the trap (extracted as isFocusable), so a selector still cannot hand focus to something that cannot take it. isFocusable also gained the disabled check the trap was missing: a disabled control matched [tabindex] or slipped past the :not([disabled]) selector variants and could bound the trap. The option has no caller in the app yet, so a dedicated spec holds the contract in both directions: a tabindex="-1" heading is honoured, and a missing or disabled target falls back to the first tabbable control.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 25, 2026
…ve catalog (#1056) PR #1050 marked the field restart-required in the Web UI one minute before PR #1055 landed the widened settings-parity gate; neither branch saw the other, and native-tests.yml is path-filtered to native/**, so main went red on a job that had not run since 08-22. One-line catalog sync; parity now reports 58 settings consistent.
Dumbris
added a commit
that referenced
this pull request
Aug 26, 2026
The document read as an open P0-P3 backlog, but eight PRs merged on 2026-08-25 (#1044, #1048, #1049, #1050, #1051, #1052, #1053, #1054) closed it. Anyone opening this file against current main was being handed 36 stale defects. Added a status banner and a Resolution section that separates four things: - Re-checked live on v0.61.0 against a running isolated core with real /mcp traffic: F1, F4, F5, F6, F7, F8, F12, F13, F20, F24, F26, F33 confirmed fixed, each with the observed evidence rather than a PR reference. - Not re-checked: named explicitly rather than implied, so the next reader knows which closures rest on a PR body and which on an observation. F28 is called out as partial - its "key called optional" half is fixed, its three-surfaces-at-once state is not. - Corrections to the audit itself: F23 mis-diagnosed a per-request structural estimate as a stale aggregation, and F31's "Manual badge has no tooltip" half was wrong even at audit time (spec-088 trust-mode badge, already titled). - Five defects found on main while re-checking, recorded separately since they are not regressions of anything in the audit. The first is security-relevant: quarantining a server through the config file leaves its tools in the search index, so retrieve_tools still hands the agent their names and descriptions - which is exactly what quarantine exists to prevent - before the call is refused. Runtime.QuarantineServer purges the index; the reload path detects the same transition (quarantined_changed: true) and does not. F6 carries a methodology note. Re-checking it produced a false negative: Escape driven through the browser-automation layer never reaches the page's document keydown listener, so the dialog looked stuck open. Dispatched in-page it closes at once, and #1050's useModalA11y is wired into all five <dialog :open> modals. The sweep assertion this document proposes must dispatch in-page, or it tests the automation layer instead of the app. Also corrects the record on #1053: its body names F1-F16, which is the tray audit's numbering mis-pasted. #1055 is the tray PR; #1053 touches no Swift file.
Dumbris
added a commit
that referenced
this pull request
Aug 26, 2026
* docs(qa): Web UI UX audit — ranked findings (ux-audit epic) Heuristic + live-instance audit of every routed Web UI view in light/dark, first-run and populated states, at 1440/820/390px. 36 findings ranked P0-P3 with view, evidence, heuristic violated, suggested fix and effort. Audited against standard heuristics plus the house activity-UI rules (grouping, failure-only status, intent reason, histogram/log parity). * docs(qa): record what the Web UI audit's backlog actually resolved to The document read as an open P0-P3 backlog, but eight PRs merged on 2026-08-25 (#1044, #1048, #1049, #1050, #1051, #1052, #1053, #1054) closed it. Anyone opening this file against current main was being handed 36 stale defects. Added a status banner and a Resolution section that separates four things: - Re-checked live on v0.61.0 against a running isolated core with real /mcp traffic: F1, F4, F5, F6, F7, F8, F12, F13, F20, F24, F26, F33 confirmed fixed, each with the observed evidence rather than a PR reference. - Not re-checked: named explicitly rather than implied, so the next reader knows which closures rest on a PR body and which on an observation. F28 is called out as partial - its "key called optional" half is fixed, its three-surfaces-at-once state is not. - Corrections to the audit itself: F23 mis-diagnosed a per-request structural estimate as a stale aggregation, and F31's "Manual badge has no tooltip" half was wrong even at audit time (spec-088 trust-mode badge, already titled). - Five defects found on main while re-checking, recorded separately since they are not regressions of anything in the audit. The first is security-relevant: quarantining a server through the config file leaves its tools in the search index, so retrieve_tools still hands the agent their names and descriptions - which is exactly what quarantine exists to prevent - before the call is refused. Runtime.QuarantineServer purges the index; the reload path detects the same transition (quarantined_changed: true) and does not. F6 carries a methodology note. Re-checking it produced a false negative: Escape driven through the browser-automation layer never reaches the page's document keydown listener, so the dialog looked stuck open. Dispatched in-page it closes at once, and #1050's useModalA11y is wired into all five <dialog :open> modals. The sweep assertion this document proposes must dispatch in-page, or it tests the automation layer instead of the app. Also corrects the record on #1053: its body names F1-F16, which is the tray audit's numbering mis-pasted. #1055 is the tray PR; #1053 touches no Swift file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three findings from the August 2026 Web UI UX audit, all in the forms-and-modals cluster.
F6 — Add Server modal: submit below the fold, Escape dead, focus never entered
The audit measured
scrollHeight 1494against a 900px viewport: 594px of the form — the submit row included — sat below the fold, with no sticky footer and no close affordance. Escape did nothing anddocument.activeElementwas still the triggering button, because<dialog :open>(as opposed toshowModal()) gives none of the modal affordances.The box is now a flex column capped at
85vh: header (title + ✕), tabs, one scrolling body, and the action row pinned as a sticky footer — per tab, since the Manual and Import tabs each have their own. A newuseModalA11ycomposable supplies the rest of the ARIA dialog contract: initial focus into the form (deliberately skipping the ✕), a Tab trap, Escape to close, and focus restored to the trigger on close. It is applied toAddSecretModaltoo, since F8 makes that the primary path into it.role/aria-modal/aria-labelledbyon both boxes.F8 — Secrets page could not add a secret
AddSecretModalwas only reachable from a per-row Add Value button that renders when a secret is referenced in config but not yet set. With zero rows the page's stated purpose — "Manage secrets stored in your system's secure keyring" — was unreachable. The backend route (POST /api/v1/secrets) was fine; nothing led to it.Adds a page-level + Add Secret button and the same CTA in the empty state, both opening the modal with no predefined name so a brand new secret can be named. The empty-state copy now explains what a secret is for instead of restating "no secrets available". No API change.
F16 — Settings promised instant apply;
enable_code_executiondid not applyPATCH /api/v1/config {"enable_code_execution": true}answeredapplied_immediately: true, requires_restart: false, andGETreported the new value — yetcode_executionkept answering "Code execution is disabled", including from a brand-new MCP session.I took the hot-apply path rather than adding a restart badge, because the seam already existed and the handler-level gate was already live-reading. Two independent causes:
buildCodeExecutionToolread the construction-timep.config, so the routing-mode surfaces kept serving the "disabled" stub — whose handler refuses unconditionally and never reaches the live gate. It now readscurrentConfig().RefreshCallToolModeToolsjoins its direct/code-exec siblings, andRefreshCodeExecutionAvailabilityre-advertises the tool on every surface that carries it, driven from theconfig.reloadedlistener — the same shape PR feat: Aggregate upstream MCP prompts through prompts/list #973 used foraggregate_upstream_prompts. The stdio surface is updated withAddTools, notSetTools, soregisterTools' other tools survive.DetectConfigChangesgainsenable_code_executionas hot-reloadable; without it a lone toggle computed emptyChangedFieldsand was swallowed as "no changes detected", soconfig.reloadednever fired.Also fixes the mislabelled
changed_fieldsthe audit noted alongside it. Servers were compared withreflect.DeepEqual, buthandlePatchConfiground-trips the live config through JSON before merging, and neitherCreated/Updated(monotonic reading +*time.Location) noromitemptyempty slices survive that. Every PATCH therefore reported["mcpServers"]— and, worse, drove a spurious full upstream reload/reconnect on every settings save. Now compared withjsonEqual, the helperdocker_isolationandtrusted_hostsalready use for this exact reason, with a length guard sonilvs[]does not reintroduce it.Restart honesty, since F16 asked for a real list rather than guesswork:
code_execution_pool_sizegains the restart badge it always warranted (Go forces a restart for it).tls.hstsjoins the Go-side TLS restart check to match the badge TS already showed — HSTS wraps the handler chain once, at construction.Verification
Live, on an isolated instance (
127.0.0.1:18422, scratch config + data dir), Playwright at 1440×900:F6 — modal
scrollHeight 765 == clientHeight 765,bottom 832 < 900; submit rowbottom 816(above the fold); the body is the only scroll region (scrollHeight 1290vsclientHeight 556); focus lands on the first radio inside the dialog; Tab ×40 never escapes; Escape closes and focus returns to the Add Server trigger. Repeated at 1280×700.F8 — both CTAs render on an empty page, the modal opens with an editable name field, and the form reaches
POST /api/v1/secretscarrying the typed payload. (The sandbox has no usable keyring backend, so the dialog shows the backend's refusal — the wiring is what F8 was about.)F16 — toggled for real.
/mcp,/mcp/calland/mcp/codeall flip from the disabled stub to a workingcode_execution(6*7→42) on a brand-new MCP session with no restart, and back off again:Before the fix the same probe returned
Code Execution (Disabled)intools/listand the refusal message fromtools/call, withchanged_fields: ["mcpServers"].Suites:
go test -racefull tree with the CI skip regex (green) ·go test -tags server -race ./internal/serveredition/...(green) · both-edition builds ·golangci-lintv2 with.github/.golangci.yml(0 issues) ·vitest681/681 across 68 files, incl. 3 new specs ·vue-tscclean.No new dependencies. No API-surface change, so no swagger regen.
Not addressed
F36's sub-items are all outside this cluster (Dashboard status chip, Sessions label clipping, Tools table Approval column, collapsed sidebar, telemetry banner) — none are forms or modals.
Modal a11y hardening
useModalA11ywent through five cross-model review rounds; the follow-up commits are its findings, each with a regression test:document, andstopPropagationdoes not stop sibling listeners bound to the same node in the same phase, so one Escape used to close a whole stack.visibleFocusables()now actually skips what it claimed to —checkVisibility({ checkVisibilityCSS: true })where the browser has it, plus adisabledcheck — so a hidden or disabled control cannot bound the trap and make Tab appear to stick. jsdom has nocheckVisibility, so the browser path is covered by a Playwright case that injectsdisplay:none/visibility:hiddendecoys and sweeps Tab over them.initialFocusresolves with its own query so it can target atabindex="-1"heading (the standard ARIA pattern, outside the tab order), while the shared visibility/disabled predicate still prevents it handing focus to something that cannot take it. The option has no caller yet, so a dedicated spec holds the contract in both directions.One residual is documented in the source rather than fixed: unwinding a stack bottom-up in a single tick lands focus on
<body>rather than the original opener. Top-down (the normal order) restores correctly, and the reviewer confirmed no caller in this codebase stacks these modals.