Unified Library sidebar, ⌘K command palette, and keyboard/menu polish - #101
Open
tonkapark wants to merge 14 commits into
Open
Unified Library sidebar, ⌘K command palette, and keyboard/menu polish#101tonkapark wants to merge 14 commits into
tonkapark wants to merge 14 commits into
Conversation
Browse Skills opened to a blank placeholder and only the fuzzy name-search API (e.g. "react" -> 1 result). Scrape skills.sh's trending page once (~600 skills ranked by installs), cache it in memory and on disk (6h TTL), and drive an instant local substring filter — broader and faster than the API, with API hits merged in for the long tail. Adds an Official-only toggle and badge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fold Agents/Rules into a unified Skills list showing all item kinds, drop the Tools section header, and add a Discovery row that opens the Browse Registry sheet. Remove the now-unused allAgents/allRules filters. Document the current sidebar in docs/feature/sidebar.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A keyboard-first command palette (⌘K, in the View menu) for quick actions: jump to any tool's library (or Library/Favorites), open the Browse Registry sheet, or create a new skill/agent/rule. Fuzzy search, ↑/↓ to move, ↵ to run, ⎋ to dismiss. The chosen action runs after the palette sheet dismisses so two sheets are never presented at once. Results are keyed by a stable per-command id (header nested inside each row) so filtering never shows stale rows, and hover is a separate visual state that never moves the keyboard selection — keyboard arrows are the single source of truth. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add View-menu commands: ⌘B toggles the sidebar via the standard toggleSidebar responder action, and ⌘⇧L selects the Library filter. Document the ⌘K palette contents and all app keyboard shortcuts in docs/feature/keyboard-navigation.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-consolidation Six validated code-review fixes, no user-facing behavior change vs the already-documented Unreleased features: - ⌘B now drives SwiftUI columnVisibility (.all <-> .doubleColumn) via a .toggleSidebar notification instead of the AppKit firstResponder tryToPerform hack; removes the SwiftUI/AppKit dual source of truth and the now-unused AppKit import. - Trending in-memory cache is now static (survives sheet re-presentations) and carries a fetchedAt timestamp with the same 6h TTL check as the disk cache, so a long-running session no longer serves indefinitely-stale data. - parseTrending logs dropped unparseable fragments; fetchTrending logs an error when a scrape parses zero skills (markup likely changed). - RegistrySheet surfaces an explicit "Couldn't load trending" + Retry state instead of silently degrading to the generic browse placeholder; search stays available. - Unified Library list title and empty state no longer say "Skills" (now "Library" / neutral "No Items"), matching the sidebar and palette. Verified: build succeeds; ⌘B toggles the sidebar both ways, Library title renders, ⌘K -> Browse Registry loads Trending, parse logged zero drops. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Settings window now opens with the section tab bar focused via @focusstate + .defaultFocus, so ←/→ switch between sections (General, Library, AI Assist, Scan Directories, Servers, About) without the mouse. .focusEffectDisabled() suppresses the redundant focus ring — the selected tab's accent background already indicates position, and the ring otherwise rendered as a misaligned double box around the selected tab. ⌘, already opened Settings via SwiftUI's native Settings scene (no custom binding needed); documented it and the new keyboard nav in docs/feature/keyboard-navigation.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… to Window menu Chops is a single-window app, so the File menu's "New Window" is removed (CommandGroup(replacing: .newItem)). Close is no longer a File-menu command: it now lives in the Window menu as "Close Window" (⌘W), grouped next to the system "Remove Window from Set" item via CommandGroup(after: .windowSize), calling NSApp.keyWindow?.performClose(nil). The File menu is now just Save. Restores `import AppKit` for performClose. The Settings window (and any window) closes with ⌘W or its close button; closing the main window is recoverable via the dock icon. Documented in docs/feature/keyboard-navigation.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use a Label("Close Window", systemImage: "xmark") so the Window-menu Close
command shows an ✕ icon, matching the adjacent "Remove Window from Set" item.
Action and ⌘W shortcut unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tcuts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What you get (user-facing)
This branch is stacked on #100 (Trending browse + local filter for skills registry) and includes its commits. Please review/merge #100 first — once it lands, this PR’s diff collapses to just the sidebar / palette / settings / menu work below. The incremental change over #100 is 16 files, +501/−53.
Code changes (incremental over #100, for reviewers)
CommandPaletteView.swift;AppStategains aPaletteActionthat runs after the palette sheet dismisses (so two sheets never present at once);ContentViewadds the sheet.SidebarView/SkillListViewfold all item kinds into “Library”, drop theallAgents/allRulesfilters, add the Discovery row, and rename the title/empty-state copy.NewSkillSheetalways lands new items in Library.ChopsApp.swift,SkillEditorView.swift) — ⌘B/⌘⇧L/⌘K commands; ⌘B drives SwiftUIcolumnVisibilityvia a notification (no AppKit responder hack); New Window removed; Close moved to the Window menu viaperformClose.SettingsView.swift) —@FocusState+.defaultFocusfocus the tab bar on open; ←/→ switch tabs; focus ring suppressed since the selected-tab accent already indicates position.SkillRegistry.swift,RegistrySheet.swift) — trending cache madestatic+ timestamped with a TTL check; explicit error/Retry UI; scrape parse logging.docs/feature/sidebar.md,docs/feature/keyboard-navigation.md.No test suite (per
CLAUDE.md); verified by building (LocalRelease) and exercising each path in the running app — ⌘K palette, ⌘B toggle, Settings ←/→, Window-menu Close, and trending load (screenshot above). The sidebar/registry commit also resolves an earlier adversarial code review of the branch.