feat(skills): registry card polish and persisted pagination state#2102
Merged
feat(skills): registry card polish and persisted pagination state#2102
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds UI polish and state persistence improvements to the Skills → Registry experience, including normalized repo labels, pagination enhancements, and a persisted “items per page” preference stored via the existing UI preferences IPC.
Changes:
- Add
getDisplayRepoLabel()utility + tests, and swap registry card/detail badge UI to show a normalized repo label instead of namespace. - Enhance shared
Paginationwith a “last page” control and adjust Skills registry layout so pagination stays anchored at the bottom of the registry tab panel. - Persist Skills Registry page size across sessions via new
ui.pageSize.skillsRegistrypreference with preload + main-process IPC wiring and tests.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| renderer/src/routes/skills.tsx | Makes limit optional in route search parsing and falls back to default when querying. |
| renderer/src/features/skills/lib/get-display-repo-label.ts | New helper to normalize repository URL display strings. |
| renderer/src/features/skills/lib/tests/get-display-repo-label.test.ts | Unit tests for repo label normalization behavior. |
| renderer/src/features/skills/components/skills-page.tsx | Wires persisted page size preference into registry query/pagination and adjusts layout classes. |
| renderer/src/features/skills/components/skill-detail-page.tsx | Replaces namespace badge with normalized repo label in the detail header. |
| renderer/src/features/skills/components/card-registry-skill.tsx | Replaces card subtitle from namespace to normalized repo label. |
| renderer/src/features/skills/components/tests/skills-page.test.tsx | Adds tests covering persisted page size + URL precedence. |
| renderer/src/features/skills/components/tests/card-registry-skill.test.tsx | Updates tests to assert namespace is hidden and repo label is shown when available. |
| renderer/src/common/mocks/electronAPI.ts | Extends Electron API test stub with page-size preference methods. |
| renderer/src/common/hooks/use-page-size-preference.ts | New React Query hook to read/write persisted page size via IPC. |
| renderer/src/common/hooks/tests/use-page-size-preference.test.tsx | Hook tests for loading state, read, and optimistic write behavior. |
| renderer/src/common/components/ui/pagination.tsx | Adds a “go to last page” button. |
| renderer/src/common/components/ui/tests/pagination.test.tsx | Extends pagination tests to cover the new last-page control. |
| preload/src/api/ui-preferences.ts | Adds preload API methods for get/set page size preference. |
| main/src/ui-preferences.ts | Adds page-size preference keys and DB read/write helpers with validation. |
| main/src/ipc-handlers/ui-preferences.ts | Adds IPC handlers for get/set page size preference. |
peppescg
reviewed
Apr 27, 2026
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.
Follow-up polish to the Skills → Registry tab on top of #2097 / #2098.
Kapture.2026-04-24.at.19.18.32.mp4
Summary