You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae68419
Browse filesBrowse the repository at this point in the historyBrowse files
Check Cancel's focus against the control focused before the update, and test the disabled fallback (#194 review round 22)
Also word the fallback as "not disabled (aria-disabled qualifies)" in the
rule and the comment, drop the second write of Merge status's
visibility, and document every focus move in merge-handoff.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ For features with background jobs, polling, retries, cancellation, or shutdown:
32
32
- Preserve completed historical results, but visibly mark them stale when their snapshot, plan revision, assignment, or referenced code no longer matches.
33
33
- When polling updates one part of the screen, update only that state. Preserve scroll position unless the user was already following the bottom.
34
34
- While a request is in flight, do not disable the control that has keyboard focus; disabling it drops focus to the page. Mark it `aria-disabled`, ignore repeat activation with an in-flight guard, and test that focus stays on the control after the response.
35
-
- When a background update (a poll, a reload, an answer) hides or removes the control that has keyboard focus, move focus to a named fallback that is still shown and enabled once the update has set every control's final state, and test that focus lands there for each way the control can be hidden. Decide a focusable control's visibility once per update: hiding it and showing it again blurs it.
35
+
- When a background update (a poll, a reload, an answer) hides or removes the control that has keyboard focus, move focus to a named fallback that is still shown and not `disabled` (an `aria-disabled` control qualifies) once the update has set every control's final state, and test that focus lands there for each way the control can be hidden. Decide a focusable control's visibility once per update: hiding it and showing it again blurs it.
36
36
- When a row or control's visual selection determines the current content or input, expose the same state with the appropriate accessibility attribute, such as `aria-current` or `aria-selected`, and test it across navigation.
Copy file name to clipboardExpand all lines: docs/implementation/merge-handoff.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ The job saves each change to the list in its `merge_jobs` record, so the list su
78
78
- The step that was running is **Failed** even when its own work succeeded and a check during it stopped the job. For example, **Fetch** fails when the fetch shows the pull request head moved, **Push** fails when the pull request moves after the push, and **Already-fixed check** fails for any refusal in the guarded merge's validation, such as a pull request that changed.
79
79
- When no step was running, the list stays as it was. For example: preparation stops for review after the rebase (a stale approval); its final inspection or authorization, after **Re-run checks**, refuses; it refuses before **Fetch** starts (an earlier push was settled, or cleanup is unresolved); the review changed between the click and the job's first review load; or the merge was cancelled during that load. Then every step may still read **Waiting**.
80
80
81
-
The list stays on screen after the job ends until the review reloads (**Refresh**, or any review action, plan import or **Apply**), also while the page follows the merge queue a job ended `queued` in. **Cancel merge** shows only while the job runs, not "always" as the design says: an ended job has nothing to cancel. When Cancelhides (the job ends, or the bar hides), keyboard focus on it moves to the merge control, or to **Refresh** when that is hidden too. A job saved before the list existed has no `steps`; the page then shows its step as before, without the list or Cancel.
81
+
The list stays on screen after the job ends until the review reloads (**Refresh**, or any review action, plan import or **Apply**), also while the page follows the merge queue a job ended `queued` in. **Cancel merge** shows only while the job runs, not "always" as the design says: an ended job has nothing to cancel. When Cancel, **Merge PR** or the **Merge status** button hides (the job ends, the bar hides, a reload clears the blockers or makes merging unavailable, or a load fails), keyboard focus on it moves to **Merge PR**, or to **Refresh** when Merge PR is hidden or `disabled`. The page reads the focused control before it changes any control and moves focus once every control's final state is set. A job saved before the list existed has no `steps`; the page then shows its step as before, without the list or Cancel.
82
82
83
83
**Cancel merge** stops the job without cancelling the task. The page sends `{action: "cancel-merge", jobId}` to `POST /api/action`:
constgateway:MergeGateway={inspect:async()=>{constsnapshot=(awaitapp.service.load()).snapshot;return{base:snapshot.base,head:snapshot.head,pullRequestState:'OPEN',mergeable:'MERGEABLE',rulesKnown:true,atomicBaseGuard:true,mergeQueue:false,requiredChecks:[],alreadyFixed:'clear',pullRequest:7,draft:false};},merge:async()=>{thrownewError('The browser test answers every merge request itself.');}};
for(constcontrolof['merge','merge-details']asconst)for(constreloadof['unavailable','failed']asconst)test(`moves focus off ${control==='merge'?'Merge PR':'the blockers button'} to Refresh when a reload ${reload==='failed'?'fails':'makes merging unavailable'} (D16)`,async({page})=>{
constgateway:MergeGateway={inspect:async()=>{constsnapshot=(awaitapp.service.load()).snapshot;return{base:snapshot.base,head:snapshot.head,pullRequestState:'OPEN',mergeable:'MERGEABLE',rulesKnown:true,atomicBaseGuard:true,mergeQueue:false,requiredChecks:[],alreadyFixed:'clear',pullRequest:7,draft:false};},merge:async()=>{thrownewError('The browser test answers every merge request itself.');}};
0 commit comments