Skip to content

feat: Library surface + IPC-wired catalog - #23

Merged
johnnyhuy merged 1 commit into
mainfrom
feat/library-surface
Aug 10, 2026
Merged

feat: Library surface + IPC-wired catalog#23
johnnyhuy merged 1 commit into
mainfrom
feat/library-surface

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Summary

Two things in one PR:

  1. Library surface — the 3-pane shell from the design system (rail · 7-harness list · INSTALL/REINSTALL/HEALTH inspector). This is the "chosen shell" from design.pen Layouts Lab.

  2. Real IPC wiring — the Library's catalog now resolves through window.hoist.library.list() → IPC library:listdiscoverAll(HARNESS_CATALOG), so the running app shows the harnesses actually installed on this machine (Claude Code 2.1.211, OpenCode 1.18.3, Codex CLI available) instead of the 7-row mock catalog.

What changed

src/renderer/App.tsx — new Rail component (56px icon-only nav), new LibrarySurface (filter pills · search · status-coloured list · main pane with model links + Configure/Open · "What you get" checklist), new LibraryInspectionPanel (right rail with 3 collapsible sections). Library is the default surface on app load.

src/main/providers/harnesses.ts — HARNESS_CATALOG extended with avatar, models, features, status per entry. Exports HarnessCatalogEntry type + findHarnessCatalog().

src/shared/channels.ts — new library:list channel.

src/main/ipc.tslibraryList handler joins catalog entries with discoverAll() results. An entry is installed if the binary is on PATH, otherwise it falls back to its catalog status (e.g. available for Codex since we can't discover it).

src/preload/api.ts + src/preload/index.tswindow.hoist.library.list() returns LibraryEntry[]. LibraryEntry uses desc to match the catalog (cleaner than description).

src/renderer/styles/layout.css.hoist-rail (56px), .hoist-body.is-rail grid, .hoist-library grid (header / toolbar / list / main), .hoist-library-row, .hoist-library-avatar, .hoist-library-main, .hoist-library-filters, .hoist-rail-kv, .hoist-terminal. ~375 lines added.

.gitignoredesign.pen (binary, not for repo).

Verified

npm run typecheck   ✓
npm run lint        ✓
npm run catalog:check ✓
npm run test:extractor ✓
npm run build       ✓

The Library surface renders the actual installed harnesses on this machine: Claude Code 2.1.211, OpenCode 1.18.3, Codex CLI available. Right rail shows the INSTALL / REINSTALL / HEALTH sections with real KV data.

What didn't change

  • The other 3 surfaces (Harnesses, Keys, Gateway) still use hardcoded data. They're already wired to their IPC channels (harness.discover, vault.list, gateway.list) but the renderer hasn't been switched yet — that's a follow-up.
  • The 4 aspirational harnesses (Amp, Cursor, Aider, Cline) from the design mock don't ship in the catalog because there's no real installer discover for them. Adding them later means adding installMethods to the catalog entry.

Adds the design system\'s chosen shell (rail · 7-harness list ·
INSTALL/REINSTALL/HEALTH inspector) and wires the catalog to real
data from the main process.

Library surface (src/renderer/App.tsx):
- New Rail component (56px icon column) used when surface === library
- New LibrarySurface: card list with filter pills (All / Installed /
  Available / Updates), search input, 2-letter avatar square, filled
  status badge, version label, main pane with model links + Configure/
  Open buttons + description + "What you get" checklist
- New LibraryInspectionPanel: right rail with 3 collapsible sections
  (INSTALL with KV pairs, REINSTALL with terminal code block, HEALTH
  with KV pairs + green badges)
- Surfaced as the default surface on app load
- Body daemon: hoists.layout.list() async over real IPC

Renderer (src/renderer/styles/layout.css):
- New .hoist-rail (56px icon-only nav) + .hoist-rail-item variants
- New .hoist-body.is-rail layout mode (swap rail width token)
- New .hoist-library grid with header / toolbar / list / main areas
- New .hoist-library-row, .hoist-library-avatar, .hoist-library-main
- New .hoist-library-filters / .hoist-library-filter (active pill)
- New .hoist-rail-kv, .hoist-rail-kvrow, .hoist-rail-kvkey, .hoist-rail-kvval
- New .hoist-terminal (recessed background, monospace)
- New .hoist-rail-section-collapse (chevron rotates 180deg on open)

Wired catalog (src/main/providers/harnesses.ts):
- Extended HARNESS_CATALOG with avatar, models, features, status per entry
- Exports HarnessCatalogEntry type + findHarnessCatalog()

Wired IPC (src/shared/channels.ts + src/main/ipc.ts + src/preload/*):
- New channel library:list
- IPC handler maps catalog entries + discover results, marking installed
  vs installing via discover status, falling back to available for catalog
  entries that aren\'t on PATH
- preload exposes window.hoist.library.list() returning LibraryEntry[]
- LibraryEntry type added to preload/api.ts

Verified: npm run typecheck/lint/build all green, and the running app
now shows the 3 actually-installed harnesses on this machine (Claude Code
2.1.211, OpenCode 1.18.3, Codex CLI available) rather than the 7-row
mock catalog.
@johnnyhuy
johnnyhuy merged commit 10246fe into main Aug 10, 2026
7 checks passed
@johnnyhuy
johnnyhuy deleted the feat/library-surface branch August 10, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant