Repository navigation
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
Design Review (Fable 5, fork) —
|
Opus 4.8 Review (fork) —
|
First Principles Review (Fable 5, fork) —
|
GPT 5.6 Review (fork) —
|
172acc4 to
bad5017
Compare
bad5017 to
92a6205
Compare
…editor Two bundles can vend a skill under one display name, so picker rows and mapped chips now carry a disambiguating path fragment, and a failed catalog load or a refused key states its reason in visible text. Hand-authored skill:// URIs move into their own region with a confirm-guarded remove, and removing a mapping names only the removal instead of resubmitting the caller's remaining set.
92a6205 to
8f6415a
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes: removing a skill chip silently does nothing, and the new token test imports a file main deleted
1. Against the current backend, removing a mapped skill has no effect.
website/src/components/AgentSkillsEditor.tsx:443 now sends only the key being removed:
save.mutate({ agent: agentName, removedSkill: key }):331-336 leaves out skills whenever next is undefined. The PATCH body is therefore {removed_skill: key}, plus unmanaged_skills when there are any. No backend reads that field. removed_skill, removed_unmanaged_skill and skills_unknown have no hits in src/kiro_crew on main, and the backend half in PR #7105 does not add them.
On main, api_agent_detail changes the mapping only if "skills" in patch_body: (src/kiro_crew/dashboard/handlers/agents.py:3715). Otherwise it reads the unchanged set back with agent_skill_keys and returns 200 {"ok": true, "skills": mapped} (:3825). The client then runs const applied = res?.skills ?? next ?? skills (:359), which gives the unchanged list, and passes it to onChange.
What the user sees: they click X on a mapped chip in the crew pane or the Agent templates tab. The server returns 200, the chip stays, and no error appears. The agent keeps loading a skill the user thinks they removed. This works on main today, where remove sends {skills: skills.filter(k => k !== key)}.
The new remove button for unmanaged URIs (:717) does nothing either, for the same reason. The skills_unknown refusal parsing never matches, because main's 400 has no code field. The tests mock api.agentPatch, so they pass without any backend.
Smallest fix: keep sending {skills: remaining} for removals until a backend that reads removed_skill / removed_unmanaged_skill lands. The other option is to land that backend first and link it here.
2. The new test fails to resolve its import on current main.
website/src/test/AgentSkillsEditor.themeTokens.test.ts:19:
import tailwindConfig from '../../tailwind.config.js'PR #12220 (the Tailwind v4 upgrade, merged 2026-09-20, after this commit) deleted website/tailwind.config.js. The theme now lives in src/tailwind-theme.css. The merge is textually clean, but vitest run cannot resolve the import. tsc does not catch it, because tsconfig.app.json excludes src/test. If this PR merges as-is, main's website test job goes red.
Note: PR #13681 cherry-picks this commit and already moves the token test over to tailwind-theme.css. It still carries the removal change at the same line (443), so finding 1 needs a fix whichever PR goes forward.
From a full open-PR audit against origin/main c66f95b (2026-09-25); findings were checked by independent reviewers reading the code. Reply here if this is wrong.
|
Closing as a duplicate of PR #13681, which carries this PR's commit and fixes its two breaks on current main PR #13681 is an in-repo branch whose description says "Supersedes #11923, original author @rnoack1". Its first commit, Why #13681 is the one to keep. Its follow-up commit
#13681 also moves the four PNGs out of the tree and into the PR body. It is 48 commits behind main, against 790 for this branch, and drive-to-green can push to it, which it can't do on this fork. Every AI review lane on this PR failed to complete. #13681 has real verdicts to work from. Harvest: nothing. The only lines unique to this PR are the committed PNGs and the two variants above, and neither variant works on main. The removal problem from the earlier review here still applies: If this is the wrong call, for example because you plan to keep working on this branch yourself, reopen the PR and say so here. From a full open-PR audit against origin/main c66f95b (2026-09-25); findings were checked by independent reviewers reading the code. Reply here if this is wrong. |
One unit of a split of #7105, which was 6.9x over the 1500 added-line cap. This is the
frontend half and stands alone: it touches only
website/src, needs nothing from the backendunits, and is 721 added lines.
Problem / Motivation
Two bundles can vend a skill under the same display name. The agent skills editor rendered both
identically, so:
nothing to tell them apart, so which copy you mapped was a coin flip;
empty state that contradicted the failure;
skill://URI was read-only — it rendered in the picker's chip row withno way to remove it, so undoing one meant editing the agent's config by hand.
Removing a mapping also worked by resubmitting the client's remaining keys, which silently
overwrites whatever a concurrent session added in the meantime.
Why it matters
Mapping the wrong copy of a colliding skill is silent: the agent loads a different file than the
user intended and nothing reports it. The catalog-failure case is worse than unhelpful — the
empty state actively asserts something false.
What changed (motivation → approach → change)
The disambiguator has to be readable and announced, so it is rendered inside the control
rather than left to a hover title, and it is shown only where it carries information:
packagerows only: a user's own copy sharinga crew skill's name is not an ambiguity, so an ordinary skill stays a plain label.
distinguishes them.
32-hex digest, which is not something a user can act on.
state can contradict the notice.
name — and advises a re-pick only when the refused key is the one just picked. A blocked add
holds the user's pick rather than making them find it again, and does not resubmit it when the
blocker clears.
skill://URIs move into their own region with a config glyph and aconfirm-guarded remove. The confirmation exists because the picker cannot put one back: an
unasked mis-click would be recoverable only by editing config.
removed_skill/removed_unmanaged_skill) instead ofresubmitting the remaining set, so a stale tab cannot delete a mapping another session added.
The component was composed onto the current
main, which had rebuilt this popup on RadixPopover in #11283. That shell is kept wholesale —
Popover/PopoverTrigger/PopoverContent,the focus-return on close, the Escape handling and the IME latch — and this change is layered
inside it. The earlier hand-rolled
createPortaldropdown and its computed positioning blockare gone.
Tests
AgentSkillsEditor.test.tsx— the two existing removal tests are updated to pin the newcontract: removing a chip PATCHes only the removal, and removing an unmanaged URI asks
first and then names the URI rather than omitting it from a resubmitted set. Also asserts the
remove control lives in the unmanaged region.
AgentSkillsEditor.themeTokens.test.ts— new: the notice surfaces name theme tokens ratherthan literal colours, so they stay readable in every theme.
typecheck,lint,lint:theme-colors,lint:phantom-classes,lint:i18n,i18n:check.Deferred, and why: the full behavioural suite for the disambiguator, the refusal notice and
the not-installed marker is ~900 further added lines, which would put this PR over the cap. It
follows as its own PR once this lands — it asserts behaviour that does not exist on
maintoday, so it cannot be opened in parallel. It was run against this branch during development:
49 of 50 passing, the single failure being a test that reads a capture-harness script
belonging to a different deferred unit (
ENOENT), not a behavioural failure.Manual verification
N/A — the behaviour above is covered by the suite described under Tests, including the ~900
deferred lines that were run against this branch before the cut.
Screenshots / video
Captured from the real built SPA by
website/scripts/capture-agent-skill-copy-qualifier.mjs,committed in this PR. It answers every
/api/**call from fixtures and asserts each contractbefore it writes a frame, so a stale or half-rendered capture fails the run instead of shipping.
1 — the bound chip names which copy it bound. Two installed bundles each ship a
code-reviewskill. The mapped chip reads
Located in skills/papyrus-writer; the non-collidingmemorystays aplain label, so an ordinary skill gains no qualifier.
2 — both colliding copies are separately addressable in the picker. The two
code-reviewrowsare distinguished by their own paths rather than rendering as one repeated label.
3 — a mapping whose copy is gone reads as a warning, not as healthy. The chip takes the warn
style with a triangle, and the count line states the remedy in visible text rather than only in a
tooltip.
4 — a failed catalog read is stated, not shown as an empty list. An unreadable catalog would
otherwise look like a catalog with nothing in it.
Correcting an earlier note that stood in this section: it said captures were blocked on the
deferred capture unit. That was wrong. A harness driving the built SPA with stubbed APIs imports
nothing from the deferred slices, so the evidence was producible in this unit all along.
Related Issues
Part of the split of #7105. Composes with #11283, which rebuilt this popup on Radix Popover.
Checklist