Skip to content

Commit 9c779fa

Browse files
authored
Merge pull request #124 from fulll/feat/team-dispatch
Add arrow-based team re-pick mode; remove --dispatch option
2 parents 4e10b5f + 143c582 commit 9c779fa

File tree

10 files changed

+1109
-65
lines changed

10 files changed

+1109
-65
lines changed

docs/reference/keyboard-shortcuts.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Section header rows (shown when `--group-by-team-prefix` is active) are skipped
2929

3030
## Filtering
3131

32-
| Key | Action |
33-
| --- | ------------------------------------------------------------------------------------------------------ |
34-
| `f` | Open the filter bar and enter filter mode |
35-
| `t` | Cycle the **filter target**: `path``content``repo``path`. Only works **outside** filter mode. |
36-
| `r` | Reset the active filter and return to showing all repos / extracts |
32+
| Key | Action |
33+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34+
| `f` | Open the filter bar and enter filter mode |
35+
| `t` | Cycle the **filter target**: `path``content``repo``path`. Only works **outside** filter mode and when **not** on a picked repo (see [Team ownership](#team-ownership) below). |
36+
| `r` | Reset the active filter and return to showing all repos / extracts |
3737

3838
### Filter targets
3939

@@ -69,9 +69,10 @@ Invalid regex patterns do not crash the TUI but are treated as matching nothing
6969

7070
Available only when `--group-by-team-prefix` is active.
7171

72-
| Key | Action |
73-
| --- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
74-
| `p` | On a **multi-team** section header: enter team pick mode to assign the section to a single owner. Does nothing on single-team section headers. |
72+
| Key | Action |
73+
| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
74+
| `p` | On a **multi-team** section header: enter team pick mode to assign the section to a single owner. Does nothing on single-team section headers. |
75+
| `t` | On a **picked repo** (marked ``, moved by a previous pick): enter re-pick mode to change its team assignment or restore it to the combined section. |
7576

7677
### Pick mode bindings
7778

@@ -83,6 +84,17 @@ When pick mode is active (after pressing `p` on a multi-team section header):
8384
| `Enter` | Confirm the pick and exit pick mode |
8485
| `Esc` | Cancel and exit pick mode without changes |
8586

87+
### Re-pick mode bindings
88+
89+
When re-pick mode is active (after pressing `t` on a picked repo marked ``):
90+
91+
| Key | Action |
92+
| ----------- | --------------------------------------------------------------------------------------------------- |
93+
| `` / `` | Cycle through candidate teams (from the original combined section label) |
94+
| `Enter` | Confirm and move the repo to the focused candidate team |
95+
| `0` / `u` | Undo the entire section pick — restore all repos from that combined section to their original label |
96+
| `Esc` / `t` | Exit re-pick mode without changes |
97+
8698
## Help and exit
8799

88100
| Key | Action |

docs/usage/interactive-mode.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ github-code-search "useFeatureFlag" --org fulll
3333

3434
## Keyboard shortcuts
3535

36-
| Key | Action |
37-
| -------------- | --------------------------------------------------------------------------------------------------------------------------------- |
38-
| `` / `` | Navigate between repos and extracts |
39-
| `` | Fold the repo under the cursor |
40-
| `` | Unfold the repo under the cursor |
41-
| `Space` | Select / deselect the current repo or extract |
42-
| `a` | Select **all** — on a repo row: all repos and extracts; on an extract row: all extracts in that repo. Respects any active filter. |
43-
| `n` | Select **none** — same context rules as `a`. Respects any active filter. |
44-
| `f` | Open the **filter bar** — type to narrow visible repos or files |
45-
| `t` | Cycle the **filter target**: `path``content``repo``path` |
46-
| `r` | **Reset** the active filter and show all repos / extracts |
47-
| `h` / `?` | Toggle the **help overlay** |
48-
| `Enter` | Confirm and print selected results (also closes the help overlay) |
49-
| `q` / `Ctrl+C` | Quit without printing |
36+
| Key | Action |
37+
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38+
| `` / `` | Navigate between repos and extracts |
39+
| `` | Fold the repo under the cursor |
40+
| `` | Unfold the repo under the cursor |
41+
| `Space` | Select / deselect the current repo or extract |
42+
| `a` | Select **all** — on a repo row: all repos and extracts; on an extract row: all extracts in that repo. Respects any active filter. |
43+
| `n` | Select **none** — same context rules as `a`. Respects any active filter. |
44+
| `f` | Open the **filter bar** — type to narrow visible repos or files |
45+
| `t` | Cycle the **filter target**: `path``content``repo``path`. When on a **picked repo** (marked ``, `--group-by-team-prefix` active): enter re-pick mode instead. |
46+
| `r` | **Reset** the active filter and show all repos / extracts |
47+
| `h` / `?` | Toggle the **help overlay** |
48+
| `Enter` | Confirm and print selected results (also closes the help overlay) |
49+
| `q` / `Ctrl+C` | Quit without printing |
5050

5151
## Selection behaviour
5252

docs/usage/team-grouping.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,48 @@ github-code-search query "useFeatureFlag" --org fulll \
109109

110110
The flag is repeatable — add one `--pick-team` per combined section to resolve. The replay command emits `--pick-team` automatically when a pick was confirmed in the TUI.
111111

112+
> **Note:** Per-repo re-picks performed in the TUI (pressing `t` on a `` repo) are **not** encoded in the replay command. They are interactive-only adjustments and must be repeated manually if you re-run the command.
113+
112114
If the combined label is not found (typo, or the section was not formed), a warning is emitted on stderr listing the available combined sections — the run continues without error.
113115

114-
::: tip Combined with --dispatch
115-
`--pick-team` resolves ownership at the **section level** (all repos in the section move to one team). For finer-grained control — assigning individual repos or extracts to different teams — see `--dispatch`.
116-
:::
116+
## Re-pick & undo pick
117+
118+
After using `--pick-team` (or the interactive `p` shortcut) to assign a combined section to a team, individual repos marked `` can be re-assigned or restored to their original combined section at any time.
119+
120+
### TUI — re-pick mode
121+
122+
Navigate to any **picked repo** (marked ``) and press **`t`** to enter re-pick mode.
123+
124+
```text
125+
── squad-frontend
126+
▶ ◈ fulll/frontend-app ← press t here
127+
▶ ◈ fulll/mobile-sdk
128+
```
129+
130+
The hints bar shows a horizontal pick bar — exactly like team pick mode — with the current focused team highlighted in `[ brackets ]`:
131+
132+
```text
133+
Re-pick: [ squad-frontend ] squad-mobile 0/u restore ← → move ↵ confirm Esc/t cancel
134+
```
135+
136+
| Key | Action |
137+
| ----------- | --------------------------------------------------------------- |
138+
| `` / `` | Cycle through candidate teams |
139+
| `Enter` | Confirm and move repo to the focused team |
140+
| `0` / `u` | Restore **all** repos from the combined section (undo the pick) |
141+
| `Esc` / `t` | Exit re-pick mode without changes |
142+
143+
### Undoing a pick (merge)
144+
145+
Pressing `0` or `u` in re-pick mode restores **all** repos from the same combined section back to where they came from (e.g. `squad-frontend + squad-mobile`). Every `` badge from that section is removed and all repos are treated as unassigned again.
146+
147+
```text
148+
── squad-frontend + squad-mobile ← all repos restored
149+
▶ ◉ fulll/frontend-app
150+
▶ ◉ fulll/mobile-sdk
151+
```
152+
153+
In **non-interactive mode**, undoing a pick is implicit: simply omit the `--pick-team` flag for that combined section in the replay command.
117154

118155
## Team list cache
119156

0 commit comments

Comments
 (0)