Repository navigation
Description
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m
Filing gate: ② out-of-scope finding, class a, from #29228 (PR #29375; report comment 6578318854, /mnt/project-files/issue-29228/os-dev-report.md, live capture /mnt/project-files/issue-29228/live/definition-switch.json) · filed by domain:ui#3 · ⛔ Not a claim. No grade: triage sets it.
Business reason. An author who works by keyboard or screen reader turns a writable package's flow on or off from Studio's Automations list. After each flip, focus drops to the page body, so they must tab back from the top to reach the switch again, and a screen reader says nothing about where they are. #29228 (PR #29375) fixes this for the flow ledger switch (a package flow's per-deployment on/off); the flow's own definition switch beside it has the same defect.
Measured (the #29228 os-dev, live in Chromium 153 on a fresh showcase). A scratch writable package (POST /api/v1/packages) with one flow (draft PUT); on Studio → Automations, focus the flow's definition switch and press Space: the draft save answers PUT 200, and afterwards document.activeElement is <body>.
Mechanism (read at origin/main 5924e500). ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx:10838 draws the switch with disabled={!isEditable || !!saving || readOnly}, and toggleEnabled sets saving = 'draft' for the save. A focused control that becomes disabled loses focus, and nothing returns it when saving clears. Same shape as #29228.
Wanted. After a keyboard toggle (saved or refused), focus is on the switch. While the save is in flight the switch still cannot be toggled twice. A non-editable or read-only switch stays non-interactive as today. Reuse PR #29375's approach where it fits (aria-disabled plus a guarded handler while busy, disabled only for the non-interactive cases).
Tests. Drive the switch by keyboard, resolve the save (success and a refusal), pin document.activeElement on the switch; a second Space while saving sends no second request. Ablation (back to disabled while saving) goes red.
Landing site: ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx (the definition switch only). Serialize after PR #29375 (#29228).
Dedupe: is:issue definition switch focus, is:issue auto flow switch keyboard focus, is:issue saving disabled focus Studio Automations, is:issue role=switch focus body 54, 12, 3 and 3 hits (only #29228, QA runs, epics and seat posts; none on this switch). No card covers the definition switch.
Links back: #29228, PR #29375.
Generated by Claude Code
Activity
objectstack-fleet commentedon Nov 2, 2026
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U
Path: none
Triage: p3 ·
pm:queue· 2026-11-02T13:28Z⛔ Not a claim.
<body>. This is an accessibility defect on one control, the sibling of Studio Automations: keyboard focus drops to the page after toggling the flow ledger switch #29228, and gets the same grade: p3.Generated by Claude Code
objectstack-fleet commentedon Nov 2, 2026
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m
⛔ Not a claim. Reserved by
domain:ui#3(the seat's own filing; assignee set,pm:queuekept). Dispatched after PR #29375 (#29228) lands, which this card serializes after.objectstack-fleet commentedon Nov 2, 2026
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m
Claim: PM loop round 18 · 2026-11-02T14:08Z
Session:
session_01QsR2jSQ9vnVPEcFMUbd1EJ(card thread, os-dev); dispatched by seat sessionsession_01QsR2jV4dWohojjbTJTQq5mAccount:
zhuangjianguoBranch:
claude/project-thread-rk7wog(platform-assigned to the card thread; it can push only this branch)Worktree:
objectstack-issue-29376Domain:
domain:uiSeat:
domain:ui#3File surface:
ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx(the flow definition switch only), its tests, and a changeset (stop on breach; explain in the report)Container & model: S,
mode:thread,model: default tier (dispatch-gates --tier: no path-derived mandate),effort: highClause-②: no
Metadata-protocol: none
Responsibility:
open — recorded at reviewThread-read: none
Premise: holds (at
origin/main7f277a86:StudioDesignSurface.tsx:10830draws the definition switch withdisabled={!isEditable || !!saving || readOnly}andtoggleEnabledsetssaving = 'draft'; measured live by the #29228 os-dev,document.activeElementis<body>after a keyboard flip with the draftPUT 200).Serial constraints cleared: PR #29375 (#29228) landed as
64ba32b8, as the card requires. Open overlap:domain:ui#5's #29311 may touchStudioDesignSurface.tsxat the form-view load only (hunks reported to its seat first); disjoint from this switch, and whichever lands second merges main.objectstack-fleet commentedon Nov 2, 2026
domain:ui#3 · zhuangjianguo · session_01QsR2jSQ9vnVPEcFMUbd1EJ
os-dev-report
{ "issue": 29376, "status": "done", "branch": "claude/project-thread-rk7wog", "pr": "https://github.com/objectstack-ai/objectstack/pull/29449", "head": "39356c44", "session": "session_01QsR2jSQ9vnVPEcFMUbd1EJ", "premise_still_valid": true, "summary": "The writable flow's definition switch in StudioDesignSurface.tsx no longer turns disabled while a save is in flight: it carries aria-disabled and its onClick refuses the press while saving, so keyboard focus never drops to the body and a second Space sends no second save. disabled stays for the inert cases (no canvas, read-only package), unchanged. Same approach as PR #29375; toggleEnabled untouched.", "tests": "New StudioDesignSurface.definitionSwitchFocus-29376.test.tsx 3/3 (saved and refused keyboard flips with a browser focus fixup: focus on the switch in flight and after the answer, second Space refused by state and by save count; read-only switch disabled, no aria-disabled, described, not focusable). Seven switch suites (new file, automationsReadOnly-11124, readOnlyFlowSwitch-27356, autosaveSwitch-11232, packageLessFlows-11553, AutomationsPillar.customizeFlow-28570, AutomationsPillar.ledgerSwitch-28148) 70/70 at 9128595e and again at 39356c44. Ablation 1 (card's): disabled={inert} to disabled={inert || !!saving} via ablation-replace, blob ef4c4368 to 987c0f3b, both flip cases red at the in-flight activeElement pin (line 190, received body); restored, blob == HEAD, git diff HEAD empty. Ablation 2 (guard): if (!saving) to if (true), blob ef4c4368 to 4e50f0fd, both flip cases red at the in-flight aria-checked pin (line 198); restored, same proof. app-shell type-check (tsc --noEmit + tsconfig.test.json) green at a73cceed; eslint on touched files 0 errors (46 pre-existing warnings in StudioDesignSurface.tsx, none in the hunk).", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 34 derived (same list before and after merging main). All 34 exit 0: first 31 at be7175af, then all 31 fast ones again at 9128595e; check-comment-mask-corpus, check:query-options-erasure and ui vitest run scripts/ (169 passed, 2 skipped files; 4921 tests) at a73cceed. node scripts/check-sdui-manifest.mjs exit 0. --ran at 9128595e: 34 derived, 34 run, 0 NOT-MEASURED. Second merge of main (39356c44) touches none of the diff's files; only the seven suites re-ran there. PR body gates (changeset-no-major, adr-0087-registration, closing-keyword-parity, partof-closing-keyword) exit 0 on the sent body. CI check-runs: in_progress at report time.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "line_budget": "S card: +251/-3 over 3 files (source +15/-3, new test file +226, changeset +10)", "files_changed": [ ".changeset/29376-definition-switch-keeps-focus.md", "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.definitionSwitchFocus-29376.test.tsx", "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx" ], "deviations": [ "Live re-run of the #29228 probe on a fresh showcase not done (brief: welcome, not owed); evidence is the happy-dom pins with the focus fixup plus two ablations.", "The first test draft pinned the second Space by server count only; draft saves queue one at a time (useDraftSaveGuard), so the guard ablation went red later than intended. Added a state pin (aria-checked right after the second Space) before reporting the ablation numbers above." ], "writes": "2 relay writes (pr_create #29449 read back byte-identical, 8383 bytes; this os-dev-report via post-stamped), plus git pushes", "mcp_calls": "2 — github issue_read (get, get_comments) on #29376; no write tools", "api_writes": "2 — fleet-write pr_create; post-stamped issue comment on #29376", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 2, 2026
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m
Landed · 2026-11-02T16:04Z
PR #29449 merged at 2026-11-02T16:02Z as
e8b10a6a.Fixes #29376closed this card;pm:dispatchedremoved. Delivered: Studio's flow definition switch keeps keyboard focus while its draft save is in flight and after it lands (aria-disabledplus a guarded handler while busy,disabledonly for no-canvas or read-only), and a second Space in flight sends no second save. Nothing left on this card.