Repository navigation
fix(web): re-read the viewed skill file on a skills/get fetch (#2516) - #2694
Merged
Merged
Conversation
The Skills screen read SKILL.md once per manifest, so a server that changed the file after selection was never re-asked: the viewer kept the first resources/read until a reconnect. Fetch with skills/get now also re-reads the file the viewer is showing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
2 tasks done
There was a problem hiding this comment.
🟢 Approval recommended
The refresh behavior is correctly attempt-stamped, preserves verification-owned content, and has focused regression coverage.
0 open findings
What changed in this PR
Refreshes the currently viewed skill resource whenever skills/get is fetched, preventing stale viewer content.
Changes:
- Re-reads the active
SKILL.mdor supporting file afterskills/get. - Adds tests for both viewer states.
| File | Description |
|---|---|
SkillsScreen.tsx |
Refreshes the currently viewed resource on fetch. |
SkillsScreen.test.tsx |
Verifies entry and supporting-file refreshes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
Copilot review loop closed: round 1 was clean (0 open findings, no inline or suppressed comments), so no further round was requested. |
2 tasks done
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 #2516
Problem
The Skills screen read the selected skill's
SKILL.mdexactly once per manifest. The automatic read is guarded byautoReadKey === manifestKey, which exists so that StrictMode effect replays don't send a duplicate request. Fetch with skills/get sent onlyskills/getand compared the entry against the listing; it never re-read the file in the viewer. So if the server changed the file, the viewer kept showing the firstresources/readresponse until the listing changed or the server was reconnected. That is the "stale response" in the report. No response cache was involved: core'sreadResourcecaches nothing, andttlMsis not consulted on this path.Fix
fetchEntryinSkillsScreen.tsxnow also re-reads the file the viewer is showing, through the existingshowResourcepath. That isSKILL.mdby default, or the supporting file the reader opened. The re-read goes out right afterskills/get, so the Protocol tab shows the two in the order the click implies. It reusesshowResource's manifest key and attempt stamp, so a stale or superseded result is still dropped. It also keeps the rule that a re-read never overwrites a verification's ownSKILL.mdbytes.Out of scope
The report lists three adjacent items. They are not part of this fix:
skills/getresponse.resources/directory/read. The Directory section already does this when the server declaresdirectoryRead: true.Tests
Two new cases in
SkillsScreen.test.tsx:SKILL.md, and the viewer shows the server's new content.SKILL.md.npm run local:gatepasses.Screenshots
Captured at 1280×900 against
test-servers/configs/skills-http.json. The fixture serves static content, so these show the traffic rather than changed content: after the click, a freshresources/readfollowsskills/get.Before clicking Fetch. One

resources/read, from the selection:After clicking Fetch with skills/get.

skills/get, then a newresources/readofSKILL.md:🤖 Generated with Claude Code