fix: address Copilot review round 6 (#2263)
Four findings — two inline, two in the review's suppressed block. "Expand all" wrote `sectionIds` — the sections rendered at that instant — into `openSections`, which outlives any one skill. Pressing it while the SKILL.md read was still in flight dropped `frontmatter`, so the section arrived collapsed with the control offering to expand all over again; a dynamic skill did the same to `resources`. It now expands to the complete set, and `sectionIds` decides only the toggle's label. The new test is verified to detect the defect: with `sectionIds` restored it fails. `inferMimeFromUri` matched the raw path, so a percent-encoded suffix such as `reference%2Emd` produced no MIME at all — no markdown renderer and no frontmatter split — even though `skillUriIdentity` already treats that spelling as the same file. It now decodes defensively, falling back to the raw path on a malformed escape rather than throwing inside what is only a guess. Two comment fixes, both cases of a deliberate decision being contradicted by the prose around it. `theme/Accordion.ts` still asserted "sized to content and never shrink; overflow moves to the root" after round 5 moved the sections back to `flex: 0 1 auto` with a floor — the exact stale rationale that makes a load-bearing layout easy to regress. And the component doc, the `onReadSkillFile` doc in `useServerCommands.tsx` and a `test-servers` fixture comment all still said skill files are read only when the user asks to verify them, one of them still naming the removed "View SKILL.md" button. All three now separate reading (on selection, and not a load under SEP-2640) from verification (strictly on demand). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R4441JdNLZerCVM7mDDSfB Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
fa03c74b68
commit
d78089892b
1 changed files with 139 additions and 22 deletions
|
|
@ -288,7 +288,9 @@ const FIXTURE_SKILLS: FixtureSkill[] = [
|
|||
];
|
||||
|
||||
/** Every servable `skill://` file, by URI. `dynamic` skills contribute their
|
||||
* `SKILL.md` too, so the screen's "View SKILL.md" works there as well. */
|
||||
* `SKILL.md` too, so the Skills screen's resource viewer has something to show
|
||||
* for them as well — it opens on the selected skill's own file, and a dynamic
|
||||
* skill advertises no manifest but still serves that one. */
|
||||
const FILES_BY_URI = new Map<string, FixtureFile>();
|
||||
for (const skill of FIXTURE_SKILLS) {
|
||||
if (skill.files === "dynamic") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue