Keep type-permission retry focus inside the card editor - #3099
Chris0Jeky wants to merge 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a220887411
ℹ️ 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".
| </span> | ||
| </span> | ||
| <button | ||
| v-if="typePermissionChecking || typePermissionUnknown" |
There was a problem hiding this comment.
Preserve the retry control through the real recovery transition
When the initial permission read fails and a keyboard user activates this button through CardModal, refreshPermission() synchronously sets permissionRecovery to true. Because CardModal.vue passes both permission props with && !permissionRecovery, this condition immediately becomes false and unmounts the focused button before the request settles. The watcher therefore sees neither the checking state nor the later successful transition, so focus still falls to <body> rather than moving to the enabled selector—the production flow the change is intended to fix. The new component test misses this because it drives a checking→success prop sequence that CardModal never supplies.
Useful? React with 👍 / 👎.
Purpose
A keyboard user can activate Refresh permission in the card editor, receive a successful permission read, and then lose focus when the retry controls unmount. The next Tab can escape the modal's focus trap into the page behind it.
This PR takes the focused accessibility slice from #3030 without entering the parked permission-ordering work in #3072. The contract is:
Red → green evidence
RED — proven before production changed. Commit
075033a12245f2ac86b4c691a109566c2ead505dadded onlyCardModalFormPermissionFocus.spec.ts. CI run34911759194, Ubuntu frontend job104200696307, passed lint, typecheck, build, and PWA validation, then failed in Run frontend tests with coverage thresholds because successful recovery neither retained the live region nor placed focus on the enabled selector.GREEN — exact hosted head. Commit
a220887411965dd12159511d05e8ee011467260badds the focused ownership-aware transfer and persistent live region.34912236004: success.34912236144: success.34912236190: all 17/17 jobs are terminal with no failure, queued, in-progress, or null-conclusion job. The GitHub Actions parent run still reportsin_progress, which is workflow-finalization/API lag rather than an executing or failed job.Scope
main: one focused component regression andCardModalForm.vue.CardModal.spec.tsalready proves the first board read can fail, the explicit retry can succeed, and the selector then becomes writable; this PR pins the component-level focus/live-region contract at that transition.Refs #3030