From d16413ef4306ddb5875dc52e96aa51ff3a39b4d5 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:01:49 -0700 Subject: [PATCH] fix(desktop): stop Skills Hub picker overlaying the installed list and cut Capabilities lag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Layout (overlap bug): the EmbeddedHubPicker section had no flex containment — its fixed-height iframe viewport made the section's min-content height rigid, so at a tall persisted drag height or a short window the flex column starved the installed-skills area to 0px and the hub header row painted straight over the list's sort strip and "changes apply to new sessions" footer. The picker section now clips its own content (overflow-hidden, shrinkable, min-h for the header row), the hub viewport uses flex-basis instead of a hard height so it gives pixels back first, the list region keeps a min-h-40 floor, and the sash drag is clamped against the actual column height (list reserve) rather than just the window. Perf (Capabilities lag): - The hub iframe (a full Docusaurus site) mounted eagerly with the view and re-mounted on every scope change (key={`picker-${scopeKey}`}). It now lazy-mounts the first time the Skills tab is shown, then stays mounted but display:none across Tools/MCP so a tab bounce never reloads the site. The scope key is gone — the picker fetches nothing; the profile rides into each install call as a prop. - EmbeddedHubPicker is memo()ed and subscribes to the single UPDATE_ALL_KEY running flag via useStoreSelector instead of the whole $hubActions map, which churns on every tailed log line during installs. - Collapse state now persists through the pane store (0 = collapsed), matching DetailPane, instead of resetting open on every mount. - CapRow gets content-visibility:auto so 80+ row lists skip offscreen layout/paint (fixed row heights keep scroll geometry stable). Validation: npm run check:lint (tsc x3 + eslint) clean; vitest src/app/skills 9/9 passing, including a new test asserting the iframe is absent on non-Skills tabs, mounts with the Skills tab, and survives a tab switch hidden. --- apps/desktop/src/app/master-detail.tsx | 6 +- .../src/app/skills/embedded-hub-picker.tsx | 82 +++++- apps/desktop/src/app/skills/index.test.tsx | 36 +++ apps/desktop/src/app/skills/index.tsx | 275 +++++++++--------- 4 files changed, 252 insertions(+), 147 deletions(-) diff --git a/apps/desktop/src/app/master-detail.tsx b/apps/desktop/src/app/master-detail.tsx index f62edff46d..3b8ad95bab 100644 --- a/apps/desktop/src/app/master-detail.tsx +++ b/apps/desktop/src/app/master-detail.tsx @@ -449,7 +449,11 @@ export function CapRow({ return (