Skip to content

feat(hub): exclude projects via right-click menu on project cards - #64

Merged
antfu merged 1 commit into
antfu:mainfrom
antfubot:rare-steaks-hear
Jun 26, 2026
Merged

feat(hub): exclude projects via right-click menu on project cards#64
antfu merged 1 commit into
antfu:mainfrom
antfubot:rare-steaks-hear

Conversation

@antfubot

Copy link
Copy Markdown
Contributor

What

Adds the ability to exclude (hide) projects from the hub without disabling them, plus a right-click context menu on each project card.

Right-clicking a project card on the hub home opens a menu with:

  • Sync this project now — triggers a sync for just that project (was previously only possible by entering the project, or via "Sync all").
  • Exclude this project — hides it from the hub.

Excluded projects stay enabled and keep syncing in the background; they are simply filtered out of the hub home grid, the summary aggregates, the project switcher, prev/next project navigation, "Sync all", and the recent / todo / queue feeds. This is intentionally lighter-weight than disabling a project (which tears the project down entirely).

Details

  • Persistence: a new excludedProjects list in ~/.config/ghfs/hub.json, mirroring enabledProjects. The hub broadcasts onProjectsChange on toggle, so every open client updates live. ProjectSummary now carries an excluded flag (always false in single-project mode), which the client uses as the single source of truth for filtering.
  • New RPC: ghfs:hub-set-excluded(id, excluded). Disabling a project also clears any lingering exclusion, and removing a hub root prunes excluded paths under it.
  • Restore: excluded projects appear in a new "Excluded from hub" section in the Manage projects settings panel, each with a Restore button.
  • Keyboard: the context menu is fully keyboard-operable (reka-ui). In addition, when a card is focused on the hub home, e excludes it; both actions are registered commands (hub.exclude-project, hub.sync-project) surfaced in the help overlay.

Notes

  • New unit tests cover the excludedProjects config round-trip, setExcludedProjects, root-removal pruning, and never-set vs. explicitly-empty semantics. Full vitest suite green; CLI typecheck clean; UI + CLI production builds succeed.

This PR was created with the help of an agent.

Add the ability to hide projects from the hub without disabling them.
Excluded projects stay enabled and keep syncing in the background, but
are filtered out of the hub home, summary aggregates, project switcher,
prev/next navigation, sync-all, and the recent/todo/queue feeds.

Right-clicking a project card opens a context menu with "Sync this
project now" and "Exclude this project". Exclusions persist to hub.json
and broadcast to every open client. Hidden projects can be restored from
the Manage projects settings panel.
@antfu
antfu merged commit ab16b86 into antfu:main Jun 26, 2026
3 checks passed
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.

2 participants