Repository navigation
Description
Summary
BaseToggle applies disabled:opacity-45 to the whole <button> (src/frontend/src/components/base/BaseToggle.vue:15), and the visible label is a child of that button (:36). Every disabled toggle therefore renders its label at 45% opacity. That is right for "this setting can't apply right now". It is wrong for "you may not change this": a viewer who can read but not edit sees every capability name faded, including the ones that are on.
Seen in agent Settings › Guardrails › "Permissions to change itself" for an agent owner who is not an instance admin. Every row is disabled there (SelfChangePermissionsPanel.vue:67; canEdit is role === 'admin', :164), so the names of granted permissions read as disabled (reported in the #3570 review).
Measured
In Chromium against the real stylesheet, the label opacity goes from 1 to 0.45 when the button is disabled. Effective label contrast:
| Theme | Enabled | Disabled |
|---|---|---|
| Light (gray-900 on white) | 17.7:1 | 2.9:1 |
| Dark (gray-100 on gray-800) | 13.3:1 | 3.9:1 |
WCAG 1.4.3 exempts inactive controls, but in a read-only view the label is the information the viewer came to read.
Where it applies
Consumers that disable a toggle because the viewer may not change it:
SelfChangePermissionsPanel.vue:67agent-settings/GeneralPane.vue:248(!canEdit || readOnlyLoading)skills/SkillCard.vue:167settings/TemplateRegistryPanel.vue:75(config.hard_disabled)
Consumers that disable only while a save is in flight, where a short fade is arguably right: GitSyncSettingsPanel.vue, settings/AAuthPanel.vue, PeerSkillGrants.vue, settings/A2AEndpointsPanel.vue, settings/SkillRunnerPanel.vue.
Decision needed
design-system.md §5 BaseToggle says nothing about the disabled state; the nearest rule is BaseButton's "Disabled = opacity .45". Options:
- (a) Fade the track only and keep the label at its ink.
- (b) Keep the whole-control fade for in-flight, and add a read-only state that keeps the label at full ink.
- (c) Keep it as is and document it.
Acceptance criteria
- A toggle the viewer cannot change renders its label at label ink (gray-900 / gray-100), measured from a live render in both themes.
- The switch still reads as non-interactive (cursor, track treatment,
disabled/aria-disabled). -
design-system.md§5 BaseToggle states the disabled and read-only treatment. - Checked on the self-change panel as a non-admin owner, in light and dark.
Activity