Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/development/web-ui-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ The core-screen sweep is committed and scripted — run it before you hand-roll

The launcher builds `./mcpproxy` if needed, serves a throwaway instance on `127.0.0.1:18080` under a freshly generated throwaway API key (your own `MCPPROXY_API_KEY` is deliberately ignored — the key ends up in report URLs and traces), installs Chromium from the committed `e2e/web-ui-sweep/package-lock.json` via `npm ci`, and runs [`e2e/web-ui-sweep/web-ui-sweep.spec.ts`](https://github.com/smart-mcp-proxy/mcpproxy-go/blob/main/e2e/web-ui-sweep/web-ui-sweep.spec.ts) — servers list, server detail (+ security tab), tools page and search, activity log, settings — failing on uncaught page exceptions. Pass `MCPPROXY_FIXTURE_PATH=$(go build -o /tmp/mcpfixture ./cmd/mcpfixture && echo /tmp/mcpfixture)` to register a live stdio upstream so the server- and tool-dependent checks run instead of skipping. The HTML report lands in `tmp/web-smoke-artifacts/playwright-report/`.

Alongside it, [`e2e/web-ui-sweep/visual-a11y-sweep.spec.ts`](https://github.com/smart-mcp-proxy/mcpproxy-go/blob/main/e2e/web-ui-sweep/visual-a11y-sweep.spec.ts) guards the *appearance* contract that the 2026-08 UX audit found broken: it walks every visible text node on the main screens in both shipped themes, resolves the effective foreground/background through a canvas (theme tokens are `oklch()`, so a naive `rgb()` parse silently measures nothing) and fails anything below WCAG AA; it also checks the 390/820/1440px layouts, accessible names on every form control, the activity log's `aria-live` region and caption, the system-theme resolution, and that the header search button is not disabled at rest. Same launcher, same environment variables.

The release QA gate runs this exact script on every tag as its **advisory** `web-ui-sweep` job — see [Release Gate](release-gate.md#web-ui-sweep-t2--advisory). Extend the committed sweep when you add a screen worth guarding on releases; use the ad-hoc pattern below for the deeper, spec-specific verification that ships beside a spec.

## Ad-hoc, spec-specific verification
Expand Down
524 changes: 524 additions & 0 deletions e2e/web-ui-sweep/visual-a11y-sweep.spec.ts

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
<!-- Top Header -->
<TopHeader />

<!-- Page content -->
<main class="overflow-y-auto p-6">
<!-- Page content. `min-h-0` / `min-w-0`: a grid item defaults to
`min-height:auto`, so a tall page pushed this scroll container past
its track and the footer ended up overlapping the last row at 390px
(UX audit F14). -->
<main class="overflow-y-auto min-h-0 min-w-0 p-4 sm:p-6">
<router-view />
</main>

Expand Down
375 changes: 375 additions & 0 deletions frontend/src/assets/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/components/AddServerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<label class="label">
<span class="label-text font-semibold">Command</span>
</label>
<select v-model="formData.command" class="select select-bordered" required>
<select v-model="formData.command" class="select select-bordered" aria-label="Command" required>
<option value="">Select command</option>
<option value="npx">npx (Node.js)</option>
<option value="uvx">uvx (Python)</option>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/OnboardingWizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
<input
type="checkbox"
class="checkbox checkbox-sm mt-0.5"
aria-label="Require API key on /mcp"
:checked="requireMcpAuth"
:disabled="securityBusy"
@change="onToggleRequireAuth(($event.target as HTMLInputElement).checked)"
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/ProfileSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<svg class="w-4 h-4 opacity-60" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
<span class="text-xs opacity-60">Profile:</span>
<span class="text-xs text-base-content/60">Profile:</span>
<span class="font-medium truncate max-w-[10rem]" data-test="profile-switcher-active">{{ activeLabel }}</span>
<svg
class="w-3 h-3 opacity-60 transition-transform"
Expand All @@ -30,7 +30,7 @@
class="absolute right-0 top-full mt-2 p-2 shadow-lg bg-base-100 rounded-box w-80 border border-base-300 z-50"
data-test="profile-switcher-menu"
>
<div class="text-xs font-semibold opacity-60 mb-1 px-2 pt-1">Active profile</div>
<div class="text-xs font-semibold text-base-content/60 mb-1 px-2 pt-1">Active profile</div>

<!-- "All servers" / zero-config default — always selectable to clear. -->
<button
Expand All @@ -45,7 +45,7 @@
<span class="font-medium">All servers</span>
<span v-if="isAllServers" class="badge badge-xs badge-primary" data-test="profile-active-badge">active</span>
</div>
<div class="text-xs opacity-50 mt-0.5">No profile filter — every enabled server is in scope</div>
<div class="text-xs text-base-content/60 mt-0.5">No profile filter — every enabled server is in scope</div>
</div>
<svg v-if="isAllServers" class="w-4 h-4 text-success shrink-0 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
Expand All @@ -57,14 +57,14 @@
<!-- Empty / zero-profile state. -->
<div
v-if="!profilesStore.hasProfiles && !profilesStore.loading"
class="px-2 py-3 text-xs opacity-60"
class="px-2 py-3 text-xs text-base-content/60"
data-test="profile-switcher-empty"
>
No profiles configured. Add a <code class="font-mono">profiles</code> block to your config to scope tool
discovery to a subset of servers.
</div>

<div v-if="profilesStore.loading && !profilesStore.loaded" class="px-2 py-3 text-xs opacity-60" data-test="profile-switcher-loading">
<div v-if="profilesStore.loading && !profilesStore.loaded" class="px-2 py-3 text-xs text-base-content/60" data-test="profile-switcher-loading">
Loading profiles…
</div>

Expand All @@ -87,7 +87,7 @@
:data-test="`profile-active-badge-${p.name}`"
>active</span>
</div>
<div class="text-xs opacity-50 mt-0.5">
<div class="text-xs text-base-content/60 mt-0.5">
{{ p.servers.length }} {{ p.servers.length === 1 ? 'server' : 'servers' }}
· {{ p.tool_count }} {{ p.tool_count === 1 ? 'tool' : 'tools' }}
</div>
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/ServerCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@
<div class="stat-title text-xs">Status</div>
<div class="stat-value text-lg">
<div class="flex items-center space-x-1">
<!-- UX audit F30: the toggle carried no accessible name, so a
screen reader announced five identical unlabelled checkboxes
on /servers. -->
<input
type="checkbox"
:checked="server.enabled"
@change="toggleEnabled"
class="toggle toggle-sm"
:disabled="loading"
:aria-label="`${server.enabled ? 'Disable' : 'Enable'} server ${server.name}`"
/>
<span class="text-sm">{{ server.enabled ? 'Enabled' : 'Disabled' }}</span>
</div>
Expand Down Expand Up @@ -276,7 +280,7 @@
:data-tip="scanDisabledReason"
>
<button
class="btn btn-sm btn-outline btn-ghost"
class="btn btn-sm btn-outline"
disabled
:title="scanDisabledReason"
:aria-label="`Scan — ${scanDisabledReason}`"
Expand All @@ -291,7 +295,7 @@
<router-link
v-else
:to="serverDetailPath(server.name, 'security')"
class="btn btn-sm btn-outline btn-ghost"
class="btn btn-sm btn-outline"
title="Security Scan"
>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
Expand Down
50 changes: 45 additions & 5 deletions frontend/src/components/SidebarNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
:class="{ 'active': isActiveRoute(item.path) }"
class="rounded-lg"
:title="collapsed ? item.name : ''"
:aria-label="collapsed ? item.name : undefined"
>
<span :class="collapsed ? 'mx-auto' : ''">{{ item.name }}</span>
</router-link>
Expand All @@ -121,6 +122,7 @@
:class="{ 'active': isActiveRoute(item.path) }"
class="rounded-lg"
:title="collapsed ? item.name : ''"
:aria-label="collapsed ? item.name : undefined"
>
<span :class="collapsed ? 'mx-auto' : ''">{{ item.name }}</span>
</router-link>
Expand All @@ -145,6 +147,7 @@
? 'bg-gradient-to-r from-primary/10 to-secondary/10 hover:from-primary/15 hover:to-secondary/15'
: 'text-base-content/60'"
:title="collapsed ? setupTitleAttr : ''"
:aria-label="collapsed ? setupTitleAttr : undefined"
data-test="sidebar-setup"
@click.prevent="onClickSetup"
>
Expand Down Expand Up @@ -185,6 +188,7 @@
:class="{ 'active': isActiveRoute('/') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Dashboard' : ''"
:aria-label="collapsed ? 'Dashboard' : undefined"
>
<IconDashboard class="w-5 h-5 shrink-0" />
<span v-show="!collapsed">Dashboard</span>
Expand All @@ -208,6 +212,7 @@
:class="{ 'active': isActiveRoute('/servers') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Servers' : ''"
:aria-label="collapsed ? 'Servers' : undefined"
>
<IconServers class="w-5 h-5 shrink-0" />
<span v-show="!collapsed">Servers</span>
Expand All @@ -223,6 +228,7 @@
:class="{ 'active': isActiveRoute('/tools') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Tools' : ''"
:aria-label="collapsed ? 'Tools' : undefined"
>
<IconTools class="w-5 h-5 shrink-0" />
<span v-show="!collapsed">Tools</span>
Expand All @@ -238,6 +244,7 @@
:class="{ 'active': isActiveRoute('/secrets') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Secrets' : ''"
:aria-label="collapsed ? 'Secrets' : undefined"
>
<IconSecrets class="w-5 h-5 shrink-0" />
<span v-show="!collapsed">Secrets</span>
Expand All @@ -258,6 +265,7 @@
collapsed ? 'rounded-lg' : 'rounded-lg !pl-7 text-[13px] text-base-content/75',
]"
:title="collapsed ? 'Agent Tokens' : ''"
:aria-label="collapsed ? 'Agent Tokens' : undefined"
>
<IconTokens class="w-4 h-4 shrink-0" :class="collapsed ? 'w-5 h-5' : ''" />
<span v-show="!collapsed">Agent Tokens</span>
Expand All @@ -284,6 +292,7 @@
:class="{ 'active': isActiveRoute('/activity') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Activity Log' : ''"
:aria-label="collapsed ? 'Activity Log' : undefined"
>
<IconActivity class="w-5 h-5 shrink-0" />
<span v-show="!collapsed">Activity Log</span>
Expand All @@ -295,6 +304,7 @@
:class="{ 'active': isActiveRoute('/sessions') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Sessions' : ''"
:aria-label="collapsed ? 'Sessions' : undefined"
data-test="sidebar-sessions"
>
<IconSessions class="w-5 h-5 shrink-0" />
Expand All @@ -307,6 +317,7 @@
:class="{ 'active': isActiveRoute('/security') }"
class="rounded-lg font-medium"
:title="collapsed ? 'Security Scanners' : ''"
:aria-label="collapsed ? 'Security Scanners' : undefined"
>
<IconShield class="w-5 h-5 shrink-0" />
<span v-show="!collapsed">Security Scanners</span>
Expand All @@ -330,6 +341,7 @@
:class="{ 'active': isActiveRoute('/repositories') }"
class="rounded-lg text-base-content/70"
:title="collapsed ? 'Repositories' : ''"
:aria-label="collapsed ? 'Repositories' : undefined"
>
<IconRepo class="w-5 h-5 shrink-0" />
<span v-show="!collapsed" class="text-[13px]">Repositories</span>
Expand All @@ -341,6 +353,7 @@
:class="{ 'active': isActiveRoute('/settings') }"
class="rounded-lg text-base-content/70"
:title="collapsed ? 'Configuration' : ''"
:aria-label="collapsed ? 'Configuration' : undefined"
>
<IconSettings class="w-5 h-5 shrink-0" />
<span v-show="!collapsed" class="text-[13px]">Configuration</span>
Expand Down Expand Up @@ -393,20 +406,41 @@
class="btn btn-ghost btn-sm font-normal"
:class="collapsed ? 'btn-square w-full' : 'w-full justify-start gap-2 px-2'"
:title="collapsed ? 'Theme' : ''"
:aria-label="collapsed ? 'Theme' : undefined"
>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<span v-show="!collapsed">Theme</span>
</div>
<ul tabindex="0" class="dropdown-content z-[1] menu flex-nowrap p-2 shadow-2xl bg-base-300 rounded-box w-72 max-h-96 overflow-y-auto mb-2">
<ul tabindex="0" class="dropdown-content z-[1] menu flex-nowrap p-2 shadow-2xl bg-base-300 rounded-box w-72 max-h-96 overflow-y-auto mb-2" aria-label="Choose theme">
<li class="menu-title">
<span>Choose theme</span>
</li>
<li v-for="theme in systemStore.themes" :key="theme.name">
<!-- Default: follow the OS light/dark setting (UX audit F29). -->
<li>
<a
@click="systemStore.setTheme(theme.name)"
data-test="theme-option-system"
:aria-current="systemStore.currentTheme === 'system' ? 'true' : undefined"
:class="{ 'active': systemStore.currentTheme === 'system' }"
@click="systemStore.setTheme('system')"
>
<span :data-theme="systemStore.resolvedTheme" class="bg-base-100 rounded-badge w-4 h-4 mr-2"></span>
System
<span class="ml-auto text-xs opacity-60">
{{ systemStore.resolvedTheme === 'dark' ? 'dark' : 'light' }}
</span>
</a>
</li>
<li class="menu-title pt-2">
<span>More themes</span>
</li>
<li v-for="theme in explicitThemes" :key="theme.name">
<a
:data-test="`theme-option-${theme.name}`"
:aria-current="systemStore.currentTheme === theme.name ? 'true' : undefined"
:class="{ 'active': systemStore.currentTheme === theme.name }"
@click="systemStore.setTheme(theme.name)"
>
<span :data-theme="theme.name" class="bg-base-100 rounded-badge w-4 h-4 mr-2"></span>
{{ theme.displayName }}
Expand Down Expand Up @@ -444,6 +478,7 @@
import { computed, h, onMounted, ref, type FunctionalComponent } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useSystemStore } from '@/stores/system'
import { formatDateTime } from '@/utils/datetime'
import { useAuthStore } from '@/stores/auth'
import { useOnboardingStore } from '@/stores/onboarding'
import api from '@/services/api'
Expand Down Expand Up @@ -495,6 +530,12 @@ onMounted(() => {

const collapsed = computed(() => systemStore.sidebarCollapsed)

// "System" is rendered on its own above the divider; the rest are the explicit
// theme choices grouped under "More themes" (UX audit F29).
const explicitThemes = computed(() =>
systemStore.themes.filter((t) => t.name !== 'system'),
)

// Strip a leading "v" so the template can format consistently as `v<version>`.
const displayVersion = computed(() => systemStore.version.replace(/^v/i, ''))

Expand Down Expand Up @@ -525,8 +566,7 @@ const updateCompactLabel = computed(() => {
const updateStatusTitle = computed(() => {
const ts = systemStore.updateCheckedAt
if (!ts) return 'Check for updates on GitHub'
const d = new Date(ts)
return `Last checked ${d.toLocaleString()}`
return `Last checked ${formatDateTime(ts)}`
})

async function handleCheckForUpdates() {
Expand Down
15 changes: 10 additions & 5 deletions frontend/src/components/TelemetryBanner.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<template>
<div v-if="visible" class="alert alert-info" data-test="telemetry-banner">
<svg class="w-6 h-6 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<!-- UX audit F14: a daisyUI alert is a GRID that flows in columns, so at 390px
the message shared the row with the action buttons and rendered as a
~10-character column ~440px tall — over half the viewport, before any
content. Below `sm` the alert stacks (`alert-vertical`) and the text child
gets `min-w-0` so it may shrink inside its track. -->
<div v-if="visible" class="alert alert-vertical sm:alert-horizontal alert-info" data-test="telemetry-banner">
<svg class="w-6 h-6 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<div class="flex-1">
<div class="flex-1 min-w-0">
<span>MCPProxy sends anonymous usage statistics to help improve the product. No personal data is collected. </span>
<a
href="https://mcpproxy.app/telemetry"
Expand All @@ -12,11 +17,11 @@
class="link link-hover underline"
>Learn more</a>
<!-- Transparency note (MCP-2482): disclose the one-time opt-out signal. -->
<p class="text-xs opacity-80 mt-1" data-test="telemetry-banner-disclosure">
<p class="text-xs mt-1" data-test="telemetry-banner-disclosure">
Disabling sends a single anonymous opt-out signal, then stops all telemetry.
</p>
</div>
<div class="flex items-center gap-2">
<div class="flex items-center gap-2 shrink-0">
<RouterLink
to="/settings?focus=telemetry.enabled"
class="btn btn-sm btn-ghost"
Expand Down
Loading
Loading