Skip to content

[feature request] Project Groups: collapsible folders in the sidebar project list #76

Description

@MHohlios

Use case

I check out a lot of repos into Termic and many are similarly named (service prefixes, app variants). The flat project list gets hard to scan. I
want to group projects into UI-only collapsible folders, e.g. by product area, or Backend vs Frontend, without touching anything on disk.

Sketch

Today (flat, hard to scan):

app-android
app-ios
app-web
dotfiles
pty-probe
service-auth
service-platform
termic

With groups:

▼ Apps                        3
│   app-ios
│   app-android
│   app-web
▶ Services                ●   2
▼ External                    2
│   termic
│   pty-probe
dotfiles                          (ungrouped projects stay loose)

Folder headers collapse/expand and show a member count. A collapsed folder rolls up member agent state into a dot (orange = an agent needs
attention, blue = an agent finished) so hidden members can still call for you. Drag a project onto a header to file it; drag the header to move
the whole group.

Proposed behavior

  • Projects carry an optional group label. A group is purely derived: it exists while at least one project has that label. No group entity, no
    filesystem effect.
  • Grouped projects render under a collapsible folder header in the sidebar, at the group's position in the existing manual order. Collapse state
    persists locally.
  • Manage membership via the project context menu (Move to group / New group / Remove from group) and via drag and drop: drag a project into, out
    of, or within a folder; drag a folder header to reorder whole groups.
  • "Expand all agents" / "Collapse all agents" also expand/collapse group folders.

Where it'd live

  • src-tauri/src/lib.rs: optional group field on Project (serde default + skip-if-none, so existing projects.json files load unchanged)
    plus one atomic project_set_group(ids, group) command so a rename/dissolve is a single write.
  • src/components/sidebar/Sidebar.tsx: folder rendering and the pointer-event drag logic.
  • src/lib/projectGroups.ts (new): shared visual-order helpers so keyboard navigation matches the rendered order.
  • src/store/app.ts: collapsed-state map persisted to localStorage.

Status

I have a working change for this on a branch and will open a PR shortly. Happy to adjust the approach based on feedback here first or remove it if this is not the direction you would like to go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions