What problem does this solve?
Git registration and Supacode sidebar visibility are different states. supacode worktree list currently prints every worktree known to Supacode, including archived worktrees, while supacode worktree list -f only narrows that list to the focused worktree. Neither command identifies the default workspace, pinned worktrees, and unpinned worktrees as visible or archived worktrees as archived.
Scripts therefore have to read ~/.supacode/sidebar.json and depend on its private schema to reproduce what the app shows. Git cannot provide this state because pinning and archival belong to Supacode.
Proposed solution
Preserve the existing default output of one percent-encoded worktree ID per line, and add the smallest stable machine-readable interface needed to:
- filter the list to sidebar-visible worktrees;
- optionally emit each ID with a
visible or archived classification when listing all worktrees;
- report the repository's default workspace as visible;
- preserve the existing percent-encoded IDs.
For example, worktree list --visible could keep the existing one-ID-per-line shape while filtering, and worktree list --with-visibility could emit tab-separated <id>\t<visible|archived> rows. The app's existing sidebar-state owner should provide the classification; the CLI should not parse sidebar.json or duplicate the UI rules.
Related, but not duplicates:
Alternatives considered
- Parse
~/.supacode/sidebar.json: couples scripts to private storage and duplicates Supacode's classification rules.
- Infer state from Git locks, tabs, branches, paths, or processes: none represents Supacode sidebar visibility.
- Change the default
worktree list rows: risks breaking scripts that consume one percent-encoded ID per line.
Supacode version
0.10.6
Are you planning to build this yourself?
Before submitting
What problem does this solve?
Git registration and Supacode sidebar visibility are different states.
supacode worktree listcurrently prints every worktree known to Supacode, including archived worktrees, whilesupacode worktree list -fonly narrows that list to the focused worktree. Neither command identifies the default workspace, pinned worktrees, and unpinned worktrees as visible or archived worktrees as archived.Scripts therefore have to read
~/.supacode/sidebar.jsonand depend on its private schema to reproduce what the app shows. Git cannot provide this state because pinning and archival belong to Supacode.Proposed solution
Preserve the existing default output of one percent-encoded worktree ID per line, and add the smallest stable machine-readable interface needed to:
visibleorarchivedclassification when listing all worktrees;For example,
worktree list --visiblecould keep the existing one-ID-per-line shape while filtering, andworktree list --with-visibilitycould emit tab-separated<id>\t<visible|archived>rows. The app's existing sidebar-state owner should provide the classification; the CLI should not parsesidebar.jsonor duplicate the UI rules.Related, but not duplicates:
worktree archive --forceto the CLI #628 requests programmatic archival.Alternatives considered
~/.supacode/sidebar.json: couples scripts to private storage and duplicates Supacode's classification rules.worktree listrows: risks breaking scripts that consume one percent-encoded ID per line.Supacode version
0.10.6
Are you planning to build this yourself?
ready.Before submitting
ready.