fix(portal): show skill revisions in run details - #1412
Gile (Gile987) wants to merge 3 commits into
Conversation
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Storybook stories add a nested MemoryRouter, causing runtime errors; remove the local router decorator.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates Portal run details to display pinned skill revisions while preserving legacy skill entries.
Changes:
- Adds shared skill parsing and revision fallback logic.
- Displays shortened commit hashes with full hashes on hover.
- Adds tests, Storybook coverage, and documentation.
| File | Summary |
|---|---|
docs/architecture/skills.md |
Documents revision display behavior. |
apps/portal/src/pages/RunDetail.tsx |
Uses revision-aware skill links. |
apps/portal/src/pages/ProfileDetail.tsx |
Reuses shared parsing logic. |
apps/portal/src/lib/skill-spec.ts |
Parses and deduplicates skill references. |
apps/portal/src/lib/skill-spec.test.ts |
Tests parsing and fallback behavior. |
apps/portal/src/components/SkillRevisionLinks.tsx |
Renders skill links and revisions. |
apps/portal/src/components/SkillRevisionLinks.test.tsx |
Tests rendering and navigation. |
apps/portal/src/components/SkillRevisionLinks.stories.tsx |
Adds versioned and legacy stories. |
apps/portal/src/components/SkillPicker.tsx |
Uses shared parsing logic. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Cedric Vidal (cedricvidal)
left a comment
There was a problem hiding this comment.
Thank you Gile (@Gile987) for this contribution, and welcome to Scope! 🎉 Community PRs like this one really help, and this one fixes a real problem. Run details were dropping the pinned commit and showing only the slug, so two runs of the same skill at different revisions looked the same. Moving parseSkillSpec into lib/skill-spec also removes the odd pages → components/SkillPicker import. Tests and docs are included.
Verified locally: tsc --noEmit passes, and the full portal suite passes (61 files, 423 tests).
Nothing here blocks merging. A few small follow-ups:
-
The link drops the revision.
SkillRevisionLinkslinks to/skills/${slug}, andSkillDetailalways highlights the latest revision. A run pinned to an older commit therefore links to a page that shows a different commit. We could fix this later by havingSkillDetailaccept something like?revision=<hash>and linking to it here. Worth a follow-up issue rather than more work in this PR. -
Duplicate rendering in
ProfileDetail.ProfileDetail.tsx(~L347–356) renders the sameslug@short-hashbadge by hand withcommitHash.substring(0, 7). It could use<SkillRevisionLinks>instead, which would also make profile skills clickable, or at least useshortCommitHash.SkillDetailalso has two.slice(0, 7)calls that could use the helper. Optional. -
The count changed slightly (fine, just noting it).
Skills (N)now counts unique references, not unique slugs. A run with two revisions of the same skill would show both. I think that's more accurate.
LGTM 👍 Thanks again, and we'd be glad to see more contributions from you.
You're welcome. I will gladly work on a follow-up issue. |
|
Gile (@Gile987) following up on point 2 of my review: I marked it optional, but on reflection I'd really like to see it done in this PR, if you don't mind. Since this PR adds the nice shared
There's no need to touch the other If you have any questions, just ask. I'm happy to take another look as soon as you push. Thanks so much! |
Done. ProfileDetail now uses SkillRevisionLinks, and the skill commit hashes in SkillPicker and SkillDetail use shortCommitHash(). Portal tests, typecheck, and the production build pass. |

Summary
Closes #768.
skillsentries.Demo
Before
before.mp4
After
after.mp4
Testing
pnpm exec vitest run --config apps/portal/vite.config.ts apps/portal/srcpnpm --filter portal lint— passed.pnpm --filter portal build— passed.pnpm --filter portal build-storybook— passed.pnpm headers:check— passed.The repository-wide checks were also attempted:
pnpm lintreached and passed the Portal check, then failed because several unrelated workspace packages invoke an undeclaredeslintexecutable.pnpm testfailed in the local Windows environment on POSIX-specific shell/path tests and root Vitest alias resolution. The scoped Portal suite above passes.Documentation and compatibility
Updated
docs/architecture/skills.md.This change does not modify the API, database schema, dependencies, or CLI behavior.
Checklist