Repository navigation
fix(platform): truthful skill reads, lossless labels, keyboard access - #3894
Merged
Merged
Conversation
The icon picker's 97 options were native buttons that picked on mousedown only, so each was a Tab stop that ignored Enter and Space. The search box already owns the grid through aria-activedescendant, the way SearchableSelect's search box owns its list. The options now sit outside the Tab order and pick on click (a pointer, or a key on an option assistive technology focused) through the same pick as Enter in the search box, and the highlighted option scrolls into view as the arrows move it past the fold. Closes #3754
The bundle tree stored the folders left open, then re-added every folder missing from that set on mount, so a collapsed folder reopened expanded (#3755). It now stores the collapsed folders, per organization and skill, so every other folder, one the bundle gains later included, opens expanded. The older open-folder record is dropped unread: a folder missing from it may have been collapsed or added since. Its one Tab stop followed the selected file, so collapsing that file's folder unmounted the only tabbable row and Tab skipped the tree (#3756). The stop now falls to the outermost collapsed folder above the selection (bundleTreeEntryPath), or to SKILL.md. The tree renders the shared file-tree primitives (TreeRowButton and its tabbable override, treeNavigationKeyDown, iconForPath) instead of its own copies. The shared row takes a className for the tree's larger top level, so nothing moves on screen. Closes #3755 Closes #3756
The skill dialog read a failed detail read as "Skill not found" and a failed file read as an empty preview, with no error and no way back. Both panes now read one state (skill-read-state.ts). A failed read offers Try again (CatalogLoadError, with failureDetail's reason); a retry masks the pane again and a success shows the saved content without reopening. The door's 404 and a genuinely empty file keep their own messages, the empty one now saying so. A failed refresh of a shown skill or file keeps it on screen, drafts included, under a notice whose Try again stays through its own retry; a Try again that fails again hands focus back to the new control. Closes #3752
The labels parser cut the list to eight, so a ninth label vanished behind a "Skill saved" toast. The field now keeps every entry, sends exactly what it holds, and holds changed labels to the caps the doors enforce (MAX_SKILL_LABELS, MAX_SKILL_LABEL_LENGTH): a translated field error names the excess or the long label, and Save waits. Labels the member did not touch are not sent, so stored labels the comma-separated field cannot represent survive an unrelated save. Closes #3753
The skill library guide (EN/DE/FR) says what the Labels field takes and does past the cap, that the Bundle tree remembers collapsed folders, and what a failed load or refresh looks like. The skills suite gains SKILL-F21, SKILL-B7, SKILL-B8, SKILL-A3 and SKILL-A4 for what only a real browser can judge, with their pins and a component-half row in the automation register. The suite table in the manual readme is recounted against the suites as they stand; six other suites had drifted since the last recount. Refs #3752, #3753, #3754, #3755, #3756
yannickmonney
commented
Sep 29, 2026
yannickmonney
left a comment
Contributor
Author
There was a problem hiding this comment.
One actionable focus regression found in the Skills repair; see the inline reproduction. Please fix this before acceptance. The remaining scoped checks passed (144 existing tests); no merge approval.
…s-labels-keyboard # Conflicts: # services/platform/tests/manual/readme.md
This was referenced Sep 29, 2026
…s-labels-keyboard # Conflicts: # services/platform/tests/manual/readme.md
…s-labels-keyboard # Conflicts: # services/platform/tests/manual/readme.md
The Try again recovery put focus on the new control after every retry the member started that failed again, even when they had moved focus to a control that stayed on screen while it ran (a bundle tree row, the dialog's close button), or had opened another file whose own first read then failed. It now restores focus only when removing the control stranded it, on the page or on a container around it where the dialog's focus trap parks it, and opening another skill or file disarms it. The approvals card in #3881 is asked to follow the same rule. The new cases hold a retry on the network while the member acts: a move to a tree row, a move to the close button, another file opened, and the stranded control that must still recover. SKILL-A5 covers the same in a browser. Refs #3752
…s-labels-keyboard
Knip flagged the exported isFocusStranded: nothing outside the retry hook reads it.
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.
Repairs the five parent-verified skill dialog findings. Each one has its own commit and its own regression tests.
Closes #3752
Closes #3753
Closes #3754
Closes #3755
Closes #3756
What changed
#3752 — failed detail/asset reads (
skill-read-state.ts,skill-detail-pane.tsx,skill-asset-viewer.tsx)loading: this includes Try again after a failed first read, because react-query goes back topending.failed: no answer and nothing on screen.ready:nullis the door's 404. An empty file is a successful answer.refreshFailed: a shown answer whose last refresh failed.CatalogLoadErrorwith Try again andfailureDetail's reason. It never showsskills.notFoundor an empty preview, and Copy stays off.use-retry-focus.ts). A member who moved focus while the retry ran keeps it there, and opening another skill or file disarms the hook. This is the same rule the approvals card in fix(platform): preserve approval decisions and scope card recovery #3881 is asked to follow.skills.viewer.notFound. A genuinely empty file now saysskills.viewer.empty.#3753 — labels past the cap (
skill-metadata-fields.tsx,skill-detail-pane.tsx)parseLabelsInputno longer cuts the list.MAX_SKILL_LABELS,MAX_SKILL_LABEL_LENGTH) through the sharedInputhint and error:aria-invalid,aria-describedby,role="alert".#3754 — icon options and the keyboard (
skill-icon-picker.tsx)SearchableSelect's model. The options aretabIndex={-1}while the search box ownsaria-activedescendant.click, andmousedownkeeps focus in the search box. A pointer click, a key press on an option that assistive technology focused, and Enter in the search box all go through the samepick.block: 'nearest'. Before, ArrowDown ×9 left it below the listbox fold.#3755 — remembered folders (
skill-bundle-tree-panel.tsx)usePersistedState, underskill-bundle-tree-collapsed:<organizationId>:<slug>. Every other folder opens expanded, including one the bundle gains later.skill-bundle-tree-expanded:<slug>record listed the open folders and was never honoured. It is removed unread: a folder missing from it may have been collapsed, or may have been added since.#3756 — the tree's keyboard entry point (
build-bundle-tree.ts,skill-bundle-tree-panel.tsx)bundleTreeEntryPathpicks the one Tab stop: the selected entry while it is on screen, otherwise the outermost collapsed folder hiding it, otherwise its nearest folder still in the bundle, otherwiseSKILL.md.Shared concepts reused. The skill tree now renders
@tale/ui/file-tree-primitives(TreeRowButtonwith itstabbableoverride,treeNavigationKeyDown,iconForPath) instead of its own copies. The shared row gains an optionalclassName, so the tree's larger top level keeps its look: identical pixels in the before/after screenshots, and tailwind-merge resolvespy-1.5 text-sm. Other pieces reused:CatalogLoadError,failureDetail,usePersistedState, andInputhint/errorMessage.Locales, docs, manual
skills.detail.loadFailed/refreshFailed,skills.viewer.loadFailed/refreshFailed/empty,skills.editor.labelsTooMany/labelTooLong.docs/{en,de,fr}/platform/workspace/skills.md("Update and troubleshoot", plus the file reference row).SKILL-F21,SKILL-B7,SKILL-B8,SKILL-A3,SKILL-A4, with their pins and a component-half row inreference/automation.md.tests/manual/readme.mdis recounted against the suites as they stand. Six other suites had drifted since fix(manual): recount the platform suite totals #3807.How it was verified
ROLE=all, andvite previewof the production build. That stack had no provider, no egress and no agent runs. Faults were injected only on the fixture skill's own requests withpage.route: 503 for all 4 attempts the hook makes, and 403 on the PUT for refused saves.<pre>and no error. This branch shows "Couldn't load this file." + Try again, which restores the contents.SKILL_PUBLISH_FORBIDDEN) whose invalidation refresh fails ×4. On both builds the draft stays. Only this branch says so (refresh notice + Try again) and recovers with the draft intact.references/and reopen, and it is expanded again. On this branch it stays collapsed, after a reload as well. A nested collapse persists, and a folder added on disk opens expanded.references/, Shift+Tab returns to it, the arrows and Enter select another file, and a reopen starts onSKILL.md.["a,b","c,d","e,f","g,h","i"]) show no error. A body-only save sends nolabelskey, and they stay stored as they were.xxxxxxxxxxxxxxxxxxxx….skill-bundle-tree-collapsed:<orgId>:<slug>.skill-bundle-tree-expanded:<slug>record is removed and opens every folder.skill-detail-pane.test.tsx(read failure, lost connection, retry mask, focus back on Try again, 404 control, failed refresh keeps the draft and its notice through the retry; nine labels, eight saved, long label, untouched labels not sent).skill-asset-viewer.test.tsx,skill-read-recovery.test.tsx(a realQueryClientwith the production retry rule: fail ×4 → Try again fails ×4 with focus kept → success; the same for a file).skill-icon-picker.test.tsx,skill-bundle-tree-panel.test.tsx(realuser-eventTab, arrows and Enter; remembered folders per org and skill; the old record dropped).skill-metadata-fields.test.ts,skill-read-state.test.ts,build-bundle-tree.test.ts(bundleTreeEntryPath),file-tree-primitives.test.tsx(className).oxlint --type-aware --type-checkonapp/features/skills,lib/skills, the shared primitive and its two other consumers: clean.oxfmt.vitest --project client app/features/skills/and--project server lib/skills.vitest related --project server --project clientfor every changed module: 29 files / 234 tests before the review round.skill-asset-viewer.browser.test.tsxandskills-settings.browser.test.tsx.lib/i18n/messages.test.ts; the docs suite (36 files / 200 tests).bun run lint:manual;check-guide.tsonsuites/skills.md(OK) and on the two registers (the same 44/3 existing findings as main).hooks/use-retry-focus.test.tsxhas 6 cases. Stranded focus is restored, and a focus-trap container counts as stranded. Focus moved to a mounted control is kept. An answer and another read both disarm the hook, and a press made without focus on the control stays disarmed.skill-read-recovery.test.tsxuses a realQueryClientwith a held response. A held file retry followed by a click onreferences/keeps focus on the folder. A held retry with nothing moved puts focus on Try again. Another file opened while the retry is held keeps focus on its row.6d23cc4c, with the next retry held behind a gate:references/, to another file's row, or to the dialog's Close stays there. With the previous hook, each of these was moved to Try again.7ad78429, oncb14a619and on the current head6d23cc4c, all 53 checks pass; 4 are skipped by design (fork-only, release, Trivy). On6d23cc4cthe UI job executed (cache miss) and ranuse-retry-focus.test.tsx(6) andskill-read-recovery.test.tsx(5). Knip, which flagged the first push of this round (5b344be6) for an unused export, passes.cache miss, executingfor@tale/platformand@tale/ui, and the UI job ran every new skills test file.vite buildand was cancelled at 15 minutes. It passed in 2m53s on the next head.visual-aspect-analyzer, embed path with a logged-ininteract, final build):fill()it reports one 0.001 layout shift of the Visibility row, because the new error line pushes it down.Notes
Input's field frame, 6 px lower than before, which is the design-system spacing for every input hint. Theskill-library-detaildocs screenshot is otherwise unchanged. I did not retake it, because the capture pipeline needs the Docker-seeded stack.afterCreateOrganizationqueuesorg.scaffoldwithcleanFirst: true. A skill saved through the door before that job runs (a PUT answering 200) was gone from the org tree afterwards, twice.integration-check.tsalready waits for the job for the same reason. I have not investigated it further; it is worth an issue of its own.Screenshots (before/after, DE/FR/dark) and the probe results are attached to TALE-90.
Reviewer: Yannick Monney