Skip to content

feat: add --group/-g flag to launch TUI scoped to a specific group#475

Open
johnuopini wants to merge 13 commits intoasheshgoplani:mainfrom
johnuopini:feat/group-scoped-tui
Open

feat: add --group/-g flag to launch TUI scoped to a specific group#475
johnuopini wants to merge 13 commits intoasheshgoplani:mainfrom
johnuopini:feat/group-scoped-tui

Conversation

@johnuopini
Copy link
Copy Markdown
Contributor

Summary

Add --group / -g CLI flag to launch the TUI locked to a specific group, showing only that group's sessions and children. Intended for automation workflows that open dedicated windows per group.

  • --group <name> filters the session list, group tree, and all hotkey operations to the specified group and its children
  • Validates group existence at startup (exits with code 2 if not found)
  • Scopes hotkeys: n/N create sessions under the scope root, g creates subgroups under the scope, M only shows in-scope move targets, d prevents deleting the scope root (with feedback)
  • Shows scope indicator in the title bar and a dedicated empty state when the group has no sessions
  • Adds startup flags section to help overlay
  • Composes with the existing status filter (!, @, etc.)

Usage

agent-deck --group work        # scoped TUI
agent-deck -g work             # short form
agent-deck --profile dev -g work  # combined with profile

Test plan

  • TestExtractGroupFlag covers all flag forms (short, long, equals, space-separated, combined with -p)
  • TestSetGroupScope and TestGroupScopeNormalization verify field setting and normalization
  • TestRebuildFlatItemsGroupScope verifies filtering excludes out-of-scope groups
  • TestRebuildFlatItemsGroupScopeComposesWithStatusFilter verifies scope + status filter compose correctly
  • go vet clean, all tests pass on cmd/agent-deck and internal/ui packages

Add --group/-g flag to launch the TUI locked to a specific group,
showing only that group's sessions and children. Intended for
automation workflows that open dedicated windows per group.
…n, add delete feedback

- Add groupScopeDisplayName() helper on Home, used in all 5 scope-name display sites
- Replace two wrong strings.LastIndex usages with the helper (group tree lookup is correct)
- Pass raw groupScope to SetGroupScope() so normalization happens exactly once
- Show "cannot delete the scoped root group" error when pressing d on the scope root
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