Skip to content

feat(design): DS-X-06 RadioGroup and SwitchField - #1687

Merged
mergify[bot] merged 3 commits into
mainfrom
claude/ds-x-06
Oct 17, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
claude/ds-x-06

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Die Vorschau-Schalter unter Einstellungen › Allgemein (und der Schalter für die neue Oberfläche in den klassischen Einstellungen) sind jetzt echte Ein/Aus-Schalter mit dem Wort „An“ oder „Aus“, das zusammen mit der Beschriftung ein Bedienelement bildet. Dazu kommen zwei neue Bausteine für das Designsystem, eine Auswahlgruppe (RadioGroup) und das Schaltfeld (SwitchField); was die Schalter bewirken, ändert sich nicht. Du musst nichts tun; die Bildschirmfotos liegen auf dem Server bereit, das Review kommissioniert Root.

Report

Plan-ID: DS-X-06

Package: DS-X-06 · Review tier: B

Goal / benefit: RadioGroup and SwitchField in src/design/forms/, feature flags in Einstellungen and PreviewToggle use SwitchField · Parent / ticket / owner: DS blueprint cut 16.10. (DS-X-06), depends on DS-X-05 (#1678) · Claude worker.

What changed

  • src/design/forms/RadioGroup.tsx: role=radiogroup, one tab stop, arrows move and select, Home/End jump, IME-safe (same roving idiom as Segmented, copied; no change to Segmented).
  • src/design/forms/SwitchField.tsx: native <input type="checkbox" role="switch"> plus drawn track and the state word (de.ts forms.switch.on/off) in one <label>; the word is aria-hidden so the accessible name stays the label.
  • forms.css: .g-rg* and .g-swf*, tokens only (knob uses --g-on-accent).
  • EinstellungenScreen.tsx flag rows and PreviewToggle.tsx use SwitchField; dead .es-preview-control css and previewOn/previewOff texts removed; existing tests changed from role checkbox to switch (EinstellungenScreen.test.tsx, mount.test.tsx, scope-entry.mount.test.tsx).
  • registry.ts: entries RadioGroup and SwitchField; scripts/contrast-check.mjs: track/glass and knob/track pairs (≥3:1); docs/PLAN.md: one row DS-X-06.
  • Not touched: WegWahl.tsx (KR-05a), no seam, no new dependency. RadioGroup is not used by any screen yet (the brief migrates only the flags).
  • Size: 276 changed lines incl. tests (budget 300).

Evidence (red → green)

  • Red commit a2358c3 (compiling stubs): the three named tests fail. Green at head 621e4a8.
  • bash scripts/ci/red-first.sh --plan Exit 0; bash scripts/ci/red-first.sh Exit 0
  • npx vitest run (211 files, 1588 tests) Exit 0
  • npm run typecheck Exit 0
  • node scripts/contrast-check.mjs Exit 0 (760 pairs)
  • node scripts/plan-check.mjs --offline Exit 0
  • bash scripts/ci/gates.sh lane prepush Exit 0 (299 s, own worktree)
  • bash scripts/ci/secret-scan.sh Exit 0 (also in the commit hook)
  • Screenshots (Vite with browser mocks, headless Chromium, 1440×900, flag section looked at): pa-orch/reports/ds-x-06-light.png, pa-orch/reports/ds-x-06-dark.png (server-local files, not in the repo). Both show two switches on (An) and two off (Aus) with visible track contrast.
  • Architecture drift: no new finding.

NICHT ABGEDECKT

  • Windows half: the #[cfg(windows)] tests and the Windows lane (runs in the merge queue); no Rust code changed.
  • gates.sh lane prepush skips browser smoke, frontend build and workflow gates (lane linux, CI).
  • Real keyboard Tab/Space/arrow behaviour in a browser: jsdom does not turn Space into a click or implement native radio/Tab order; the tests cover the handlers and the native input, the screenshots cover looks only. RadioGroup has no screenshot (no screen uses it yet).
  • Desktop app not launched; e2e specs not run (none reference the changed checkboxes by role, checked with grep).
  • RadioGroup duplicates the Segmented key handling (about 15 lines) instead of sharing a hook; a shared hook would touch controls/.

Review

Review: ausstehend (Stufe B), pending, Root commissions one independent non-Anthropic reviewer.

🤖 Generated with Claude Code on the ProjectA server worker

Root review disposition and acceptance (head 621e4a8)

Tier B (TS/CSS in src/design/forms/, settings flags, no seam). Author family: Anthropic (Claude Sonnet 5.5, server job log). Reviewer: Cohere north-mini-code:free via kilo (scripts/review/run-local.sh 1687 --via kilo), reviewed head 621e4a8, verdict APPROVE WITH CONDITIONS. One non-author-family reviewer is the AGENTS.md rule 5 minimum for tier B. Root is Anthropic and does not count as an independent reviewer. The cited line numbers are diff offsets, so Root checked every finding against the head files.

ID Source Severity Finding Disposition
R1687-F1 Cohere medium STEP keys never match event.key rejected: RadioGroup.tsx:15 keys are exactly ArrowRight/ArrowDown/ArrowLeft/ArrowUp; the arrow/Home/End test is green
R1687-F2 Cohere medium ref callback array is inefficient rejected: useRef array with callback refs (RadioGroup.tsx:22,45), the same roving idiom as Segmented.tsx; no extra renders
R1687-F3 Cohere low new i18n keys break naming no change: forms.switch.on/off follow the forms.* namespace of DS-X-05
R1687-F4 Cohere high switch track contrast not checked rejected: scripts/contrast-check.mjs adds switch g-sw-on/g-sw-off / glass and switch knob / track at 3:1; gate exit 0 (760 pairs)
R1687-F5 Cohere medium PreviewToggle misses forms.css rejected: src/shell/mount/PreviewToggle.tsx:1 imports it
R1687-F6 Cohere medium forms.css import order or bundle size no change: plain side-effect CSS import, as in the other screens
R1687-F7 Cohere medium registry entries lack variants rejected: both entries carry variants: [] like Field/Checkbox
R1687-F8 Cohere low explicit 3:1 in the contrast check no change: non-text pairs pass 3 explicitly, as the DS-X-05 pairs do
R1687-P1..P7 Cohere info smells no change

Root screenshot check: ds-x-06-light.png and ds-x-06-dark.png (server reports folder) were looked at. The four preview flags show as switches with the state word "An"/"Aus" next to the label, and on and off are distinguishable in both themes. Evidence from the job: red-first exit 0, full vitest run (211 files, 1588 tests), typecheck, contrast-check, plan-check offline, secret-scan and bash scripts/ci/gates.sh lane prepush all exit 0.

Accepted by Root on 2026-10-17 for head 621e4a8; review-ok is bound to this head.

Cuarroc and others added 3 commits October 17, 2026 05:28
…ngs switches

Compiling stubs render nothing, so the three named tests fail until the
implementation commit; the registry entries are already in place.

Test-First: src/design/forms/radiogroup.test.tsx::one tab stop; arrows move and select; Home and End jump
Test-First: src/design/forms/switchfield.test.tsx::label and state word are one control
Test-First: src/screens/einstellungen/EinstellungenScreen.test.tsx::flags render as switches

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…me switches

RadioGroup follows the Segmented roving idiom (one tab stop, arrows move
and select, Home/End jump, IME-safe). SwitchField is a native checkbox
with role=switch in one label together with the An/Aus state word (de.ts).
The preview flags in Einstellungen and PreviewToggle use it; what the
flags do is unchanged. Contrast pairs added for track and knob.

Test-First: src/design/forms/radiogroup.test.tsx::one tab stop; arrows move and select; Home and End jump
Test-First: src/design/forms/switchfield.test.tsx::label and state word are one control
Test-First: src/screens/einstellungen/EinstellungenScreen.test.tsx::flags render as switches

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No-Test: plan text only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 17, 2026 03:48
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 17, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T03:51:59.317064Z 621e4a8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 621e4a8a3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/PLAN.md
| DS-X-02 | Additive Design-Skalen und Breakpoint-Konstante (Fabrik-Designsystem, Welle 0): Schrift-, Abstands-, Radius-, Höhen-, Ebenen- und Fokus-Token in `src/design/tokens.css`, `BREAKPOINTS` in `src/design/breakpoints.ts` | Implementierer · Claude; Root nimmt ab | Designsystem-Entscheidungen D1–D7 (`docs/decisions.md`) | Server | B | Erledigt: #1601 (merged 2026-10-16); Tokens und Breakpoint-Konstante geliefert, Umstellung der Ansichten separat | `vitest run src/design` Exit 0; contrast-check grün; prepush Exit 0; zwei Stufe-B-Reviews fremder Familien | – |
| DS-X-04 | Fabrik-Orb und sechs Zustandswort-Aliase gemäß D4 | Root | Entscheidung D4 vom 15.10. (`docs/decisions.md`) | Server | B | Erledigt: PR #1603; statischer Orb, Aliase und Kontrastprüfung geliefert; Bildschirmeinbindung und Bewegung bleiben DS-X-23/24 beziehungsweise DN-03. | sieben Orb-Formen je mit eigenem Zeichen, sechs Aliase ohne zweites Vokabular; Belege im Report von #1603: Fabrik-/Zustands-/i18n-Tests, red-first, `node scripts/contrast-check.mjs` (740 Paarungen) und eigene prepush je Exit 0; zwei Stufe-B-Reviews fremder Familien; Root-Abnahme | – |
| DS-X-05 | Formular-Bausteine `Field` und `Checkbox` (Fabrik-Designsystem, Welle 1): `src/design/forms/{Field,Checkbox}.tsx` und `forms.css`; Beschriftung, Hinweis und Fehlertext hängen per Kennung am Steuerelement, das Ankreuzfeld kennt „teils“ | Implementierer · Claude; Root nimmt ab | Designsystem-Entscheidungen D1–D7 (`docs/decisions.md`); DS-Blueprint-Schnitt 16.10. (DS-X-05) | Server | B | Erledigt: #1678; Bausteine nur im Register und in der Galerie-Navigation, keine Ansicht umgestellt (RadioGroup und SwitchField folgen in DS-X-06) | Tests rot→grün (`red-first.sh` Exit 0); `vitest run src/design`, typecheck, `contrast-check`, `plan-check --offline` und prepush Exit 0; Bildschirmfotos hell/dunkel; ein Stufe-B-Review einer Nicht-Anthropic-Familie, Root kommissioniert | – |
| DS-X-06 | Formular-Bausteine `RadioGroup` (ein Tabstopp, Pfeiltasten wählen, Pos1/Ende springen) und `SwitchField` (Beschriftung und Zustandswort „An“/„Aus“ sind ein Steuerelement) in `src/design/forms/`; die Vorschau-Schalter unter Einstellungen › Allgemein und `PreviewToggle` sind jetzt Schalter; was die Schalter bewirken, bleibt gleich | Implementierer · Claude; Root nimmt ab | DS-X-05 (#1678); DS-Blueprint-Schnitt 16.10. (DS-X-06) | Server | B | In Arbeit: Entwurfs-PR `claude/ds-x-06`; `WegWahl.tsx` bleibt unberührt (KR-05a) | Tests rot→grün (`red-first.sh` Exit 0); `vitest run`, typecheck, `contrast-check`, `plan-check --offline` und prepush Exit 0; Bildschirmfotos hell/dunkel; ein Stufe-B-Review einer Nicht-Anthropic-Familie, Root kommissioniert | – |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark DS-X-06 complete in the post-merge plan

When this commit is merged, the canonical plan will still describe DS-X-06 as an active draft even though this same commit delivers the package. Update the row to the state that will be true after merge so scheduling and status tooling do not continue treating completed work as in progress.

AGENTS.md reference: AGENTS.md:L121-L121

Useful? React with 👍 / 👎.

Comment thread docs/PLAN.md
| DS-X-02 | Additive Design-Skalen und Breakpoint-Konstante (Fabrik-Designsystem, Welle 0): Schrift-, Abstands-, Radius-, Höhen-, Ebenen- und Fokus-Token in `src/design/tokens.css`, `BREAKPOINTS` in `src/design/breakpoints.ts` | Implementierer · Claude; Root nimmt ab | Designsystem-Entscheidungen D1–D7 (`docs/decisions.md`) | Server | B | Erledigt: #1601 (merged 2026-10-16); Tokens und Breakpoint-Konstante geliefert, Umstellung der Ansichten separat | `vitest run src/design` Exit 0; contrast-check grün; prepush Exit 0; zwei Stufe-B-Reviews fremder Familien | – |
| DS-X-04 | Fabrik-Orb und sechs Zustandswort-Aliase gemäß D4 | Root | Entscheidung D4 vom 15.10. (`docs/decisions.md`) | Server | B | Erledigt: PR #1603; statischer Orb, Aliase und Kontrastprüfung geliefert; Bildschirmeinbindung und Bewegung bleiben DS-X-23/24 beziehungsweise DN-03. | sieben Orb-Formen je mit eigenem Zeichen, sechs Aliase ohne zweites Vokabular; Belege im Report von #1603: Fabrik-/Zustands-/i18n-Tests, red-first, `node scripts/contrast-check.mjs` (740 Paarungen) und eigene prepush je Exit 0; zwei Stufe-B-Reviews fremder Familien; Root-Abnahme | – |
| DS-X-05 | Formular-Bausteine `Field` und `Checkbox` (Fabrik-Designsystem, Welle 1): `src/design/forms/{Field,Checkbox}.tsx` und `forms.css`; Beschriftung, Hinweis und Fehlertext hängen per Kennung am Steuerelement, das Ankreuzfeld kennt „teils“ | Implementierer · Claude; Root nimmt ab | Designsystem-Entscheidungen D1–D7 (`docs/decisions.md`); DS-Blueprint-Schnitt 16.10. (DS-X-05) | Server | B | Erledigt: #1678; Bausteine nur im Register und in der Galerie-Navigation, keine Ansicht umgestellt (RadioGroup und SwitchField folgen in DS-X-06) | Tests rot→grün (`red-first.sh` Exit 0); `vitest run src/design`, typecheck, `contrast-check`, `plan-check --offline` und prepush Exit 0; Bildschirmfotos hell/dunkel; ein Stufe-B-Review einer Nicht-Anthropic-Familie, Root kommissioniert | – |
| DS-X-06 | Formular-Bausteine `RadioGroup` (ein Tabstopp, Pfeiltasten wählen, Pos1/Ende springen) und `SwitchField` (Beschriftung und Zustandswort „An“/„Aus“ sind ein Steuerelement) in `src/design/forms/`; die Vorschau-Schalter unter Einstellungen › Allgemein und `PreviewToggle` sind jetzt Schalter; was die Schalter bewirken, bleibt gleich | Implementierer · Claude; Root nimmt ab | DS-X-05 (#1678); DS-Blueprint-Schnitt 16.10. (DS-X-06) | Server | B | In Arbeit: Entwurfs-PR `claude/ds-x-06`; `WegWahl.tsx` bleibt unberührt (KR-05a) | Tests rot→grün (`red-first.sh` Exit 0); `vitest run`, typecheck, `contrast-check`, `plan-check --offline` und prepush Exit 0; Bildschirmfotos hell/dunkel; ein Stufe-B-Review einer Nicht-Anthropic-Familie, Root kommissioniert | – |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require both Tier-B reviewers before acceptance

The added acceptance criterion requires only one non-author review, which permits DS-X-06 to be accepted without the second independent family required for Tier B. The temporary review-route exception can replace the subscription reviewer with another OpenRouter reviewer, but it does not reduce the total below two; update this row to require both reviews before merge.

AGENTS.md reference: AGENTS.md:L106-L112

Useful? React with 👍 / 👎.

@Cuarroc

Cuarroc commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify mergify Bot added the queued label Oct 17, 2026
@Cuarroc

Cuarroc commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

Root auto-queue: head 621e4a8 unchanged since review-ok, all checks green. @Mergifyio queue

@mergify
mergify Bot merged commit 738bf81 into main Oct 17, 2026
25 checks passed
@mergify

mergify Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 13 minutes 2 seconds in the queue, including 12 minutes 15 seconds running CI.

Required conditions to merge
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • github-review-approved [🛡 GitHub repository ruleset rule main-pr-required-checks]
  • label != do-not-merge
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (linux)
    • check-neutral = @github-actions/gates (linux)
    • check-skipped = @github-actions/gates (linux)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (windows)
    • check-neutral = @github-actions/gates (windows)
    • check-skipped = @github-actions/gates (windows)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/red-first
    • check-neutral = @github-actions/red-first
    • check-skipped = @github-actions/red-first
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant