Repository navigation
refactor(skills): unify flat layout, toolbar, and header refresh across Skills tabs - #10050
Conversation
farion1231
left a comment
There was a problem hiding this comment.
Thanks for this, the three tabs read much more consistently now. I checked the filters, repo toggles, "Install to", "Update all (N)" and the bulk actions against main and they're all still there, and each tab keeps its own state. Three regressions I could reproduce before this lands:
-
Refresh on skills.sh empties the results. The new header Refresh reuses the retry handler, which clears the accumulated list and refetches. When skills.sh returns the same data, TanStack Query keeps the same
datareference, so the effect that fills the list never re-runs and you get the "no results" message. A test with real TanStack Query and identical responses shows two requests and an empty list. After "Load more", Refresh also just drops back to page one without refetching for 5 minutes. -
Opening the Skills page now downloads every enabled repo.
UnifiedSkillsPanelcallsuseDiscoverableSkills()anduseSkillRepos()at the top level only to drive the header spinner. That query refetches on its first mount after each launch, and the backend repo cache only lives in memory for 10 minutes, so the first visit to Skills after each start pulls every repo from GitHub, even when you only look at Installed. Main mounts it lazily on purpose. Subscribing withuseIsFetchingon that query key, plususeRefreshDiscoverableSkillsfor the action, would keep the spinner without mounting the query. -
Selecting rows on Installed hides the search box, the Filter button and the chips. Selection survives search changes, so on main you can select A, change the search, select B and bulk-enable both. Here that no longer works, and while rows are selected there's no sign that a search or filter is active. The assertion in the old test that the Filter button stays visible during selection was removed in this PR.
Smaller things, no need to block on them:
- While rows are selected, the "Updating N/M" progress no longer shows during a bulk update, because the selection branch is checked first. Fixing 3 at the same place covers it.
- The fallback that opened skills.sh when no repo is configured is gone. Users with zero repos now land on an empty Repositories view that says the repos couldn't be read.
- The fixed
h-14toolbar dropped the wrap. With a narrow window, two chips, the count and "Update all" can overlap. skillsPage.viewDiscover,discover.sourceRepos,discover.sourceAria,repos.buttonAllandfilter.sourceButtonare now unused in all eight locales. localeParity doesn't catch dead keys like these.{{count}} Skillshas no plural form, so English shows "1 Skills".
|
Thanks for the thorough review! All three regressions and the smaller items have been fixed:
|
farion1231
left a comment
There was a problem hiding this comment.
Thanks for the quick turnaround. I rechecked everything from the last round and it's all fixed: Refresh on skills.sh keeps the results, the header no longer mounts the discovery query (Installed now shows zero mounts), search and filters stay visible while rows are selected, bulk-update progress is back, the zero-repo empty state works, the toolbars wrap, and the dead keys are gone.
One new regression came from the refresh fix:
After "Load more", a background refetch of the same page appends it again. The effect that fills the list now also depends on the data's update time, so when TanStack Query refetches a page on window focus or reconnect after the 5-minute stale time and gets the same data back, the effect runs again and appends that page a second time. In a test with real TanStack Query, the page-2 row shows up twice with this head and once with the previous SkillsPage. "Load more" can also disappear early. The skills.sh tab stays mounted after you switch away, so this can happen while you're on another tab. Deduplicating by key when appending, or appending only when the page number changes and replacing the page on a same-page refetch, would fix it.
Minor: Russian 2–4 should use «навыка», but it currently shows «2 навыков». Not worth blocking on.
|
Good catch — fixed both:
|
# Conflicts: # src/components/skills/SkillsPage.tsx # src/hooks/useSkills.ts
|
Thanks @allenxu09! The three Skills tabs now line up with the MCP and Plugins pages, and every issue from the earlier rounds got fixed quickly and with regression tests. #10061 landed first and conflicted with this branch, so I pushed a merge commit on top: the branch column in the new repo filter popover now uses |
Summary
Unifies the Skills page layout so all tabs share the same calm, flat structure and align with the MCP and Plugins pages:
Installed/Repositories/skills.sh): Removes the nestedRepos | skills.shsegmented control inside the Discover card header and matches the 3-tab structure of the Plugins page. KeepsPageTabspurely for navigation (removescreatePortalsearch injection).Check for updates/Refresh repos/Refreshinto a single consistent slot inAppPageHeader(left of+ Add Skill), matchingPluginsPage.h-14flat toolbar across all tabs:320pxleft-aligned search input (MatrixSearch), matching MCP & Plugins — zero horizontal jumping when switching tabs.Filterpopover (InstalledFilterMenu/ReposFilterPopover) that consolidates Status, Source, Only-uninstalled, and repo toggles, with dismissible chips only when a filter is active.Update all (N)when updates exist, orInstall toonRepositories/skills.sh).Screenshots
Installed
Repositories
skills.sh
Verification
pnpm typecheckpassedpnpm test:unit tests/components/UnifiedSkillsPanel.test.tsx tests/components/SkillsPageInstall.test.tsx(48/48 tests passed)prettierformatted all modified files