Repository navigation
feat: Public URL UX, accessible OAuth switch, and dashboard focus rings - #129
Merged
Merged
Conversation
Show a Settings shortcut and a hint instead of falling back to the page origin for the MCP server URL. Persist Public URL check results, auto-check on change, and warn when OAuth is on with a missing or failed URL. Add a per-browser Access tokens base URL choice. Replace the Enable MCP OAuth checkbox with an accessible switch in the dashboard and editor sidebar, and use thin :focus-visible accent rings on dashboard nav, summaries, and buttons.
Replace the Access tokens base URL select with a right-aligned segmented control on the heading row. Persist a check only when it matches the current Public URL; do not store unsaved or invalid raw values. Clearing the URL skips the probe and stores null. PUT returns immediately and runs probes serially with latest-wins; the dashboard refetches when the result arrives. Use the same OAuth warning text in the dashboard and editor sidebar.
Assigning undefined to an optional string field failed CI type-check.
Catch fire-and-forget probe rejections so a persistence failure cannot become an unhandledRejection. On plugin cleanup, bump the check generation, abort in-flight probes, and refuse later settings writes. Cancel Settings poll loops when leaving the tab, and show a Refresh affordance if a pending check outlasts the poll budget. Handle Home and End on the Access tokens base URL radiogroup.
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.
Summary
Dashboard and editor UX around Public URL, MCP OAuth, and keyboard focus. No version bump.
A. Public URL (field stays on the Settings tab)
location.originwhen Public URL is unset. The UI shows “Set a Public URL to get the MCP server URL” and disables Copy.ok,status,checkedAt,publicBaseUrl) is persisted as SettingsStore metadata (not a lockable settings.js field) and returned onGET /settings.POST /settings/check-public-urlwrites it. The existing SSRF-guarded probe is reused; no new fetch paths.A.5 decision: this is a per-browser UI preference in
localStorage(ai-access.token-url-base), not a server setting. It only changes what the Access tokens UI displays and copies. Server-side access-path fallback is unchanged. A<select>is used instead of a binary switch so the two named bases stay explicit.B. Enable MCP OAuth
The dashboard and editor sidebar checkboxes are accessible
role="switch"toggles (aria-checked, Space/Enter, clickable labels). Existing confirm-dialog behavior when enabling without a suitable Public URL is unchanged.C. Focus rings
Dashboard nav items,
<summary>(including Diagnostics), and buttons use a thin 2pxvar(--accent)outline with a 2px offset on:focus-visibleonly (no ring on mouse click). Section heading programmatic focus still has no ring (h2:focus { outline: none },#128).Test plan
SKIP_TEST_BUILD=1 npx vitest run— 1,356 testsyarn lint— 0 errors, 80 warningsyarn build/yarn build:prod/mcphint, Set Public URL shortcut, Access tokens base both states, toggle on/off in dashboard and editor sidebar, keyboard Tab vs mouse click on nav and Diagnostics/workspace/shots-puburl/nr4-*.pngandnr5-*.pngDo not merge or release until review.