fix(vc-blade): give a save a focus target of its own (VCST-5670) - #370
Merged
Merged
Conversation
Saving re-renders the toolbar, and the control the user activated can stop existing. Nothing owned repairing that: a blade that happened to remount was rescued by the mount repair, which is an accident of the consumer's code rather than a guarantee, and it would have failed silently the day a blade stopped remounting. QA flagged it twice on this ticket, on two separate builds, without a ticket to carry it. Repair the loose focus on the load transition itself, the same shape the other two repairs in this file already use. It declines when something live holds focus, so a user mid-edit is never yanked. The remaining acceptance item was that the target is documented per transition, so QA can assert it rather than infer it. focus.docs.md states all eight, which mechanism delivers each, and whether it is a repair or a deliberate handoff. It also records how to measure one: focus is invisible to axe, and the Tab-once check is non-discriminating where the nav precedes main in DOM order.
|
📦 Preview published for commit Install the preview with dist-tag: npm install @vc-shell/framework@pr-370Or pin to the exact commit: npm install @vc-shell/framework@2.6.0-pr370.de147eaPublished packages (dist-tag
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the last open item on VCST-5670, which QA reopened on 2026-09-02.
What was left
The two failures from that run are already fixed and shipped in
2.6.0-rc.1: themod+\shortcut with focus in the sidebar (#353) and self-disabling buttons (#355). Two items were not:e10641 → e10809 → e11144), so the blade remounts andonMounted(focusIfLoose)picks the loose focus up. That is an accident of the consumer's implementation — the day a blade stops remounting on save, focus lands on<body>and nothing reports it.Changes
vc-blade.vue— repair loose focus on the load transition itself:Same shape as the two repairs already in the file.
focusIfLoosedeclines when something live holds focus, so a user mid-edit is never yanked.focus.docs.md— a table of all eight transitions: target, which code delivers it, and whether it is a repair (declines when focus is held) or a deliberate handoff (moves it because the node is about to be unmounted). Plus how to measure one, including why the Tab-once check proves nothing where the nav precedesmainin DOM order.Verification
vc-blade.focus.test.ts— two cases added. RED baseline taken: with the watch reverted, "takes focus when the save left it nowhere" fails and the other four still pass.npx vitest run ui/components/organisms/vc-blade/— 18 files, 178 tests, green.focus.test.ts,vc-app,vc-auth-layout,usePopup) — 27 files, 261 tests, green.yarn typecheckclean,yarn docs:lint0 errors, eslint--max-warnings=0clean on the changed files.Note for QA
vcmp-dev was serving
2.6.0-rc.0at the last run.2.6.0-rc.1(published 2026-09-08 fromcd4eeb6d6) already carries #353 and #355 — verified withgit merge-base --is-ancestor. This PR is not in any published version yet.