@@ -200,9 +200,9 @@ export async function runInteractive(
200200 * so they are included in the replay command even if no additional interactive picks are made. */
201201 const confirmedPicks : Record < string , string > = { ...initialPickTeams } ;
202202
203- // ─── Team dispatch ( re-pick) mode state ───────────────────────────────────────
203+ // ─── Team re-pick mode state ─────────── ───────────────────────────────────────
204204 // Feat: re-pick mode — re-assign a picked (◈) repo to a different team — see issue #87
205- let dispatchMode : {
205+ let repickMode : {
206206 active : boolean ;
207207 repoIndex : number ;
208208 candidates : string [ ] ;
@@ -250,7 +250,7 @@ export async function runInteractive(
250250 filterTarget,
251251 filterRegex,
252252 teamPickMode : teamPickMode . active ? teamPickMode : undefined ,
253- dispatchMode : dispatchMode . active ? dispatchMode : undefined ,
253+ repickMode : repickMode . active ? repickMode : undefined ,
254254 } ) ;
255255 process . stdout . write ( ANSI_CLEAR ) ;
256256 process . stdout . write ( rendered ) ;
@@ -310,51 +310,51 @@ export async function runInteractive(
310310
311311 // ── Team re-pick mode key handler ─────────────────────────────────────────
312312 // Feat: re-pick mode — re-assign a picked (◈) repo to a different team — see issue #87
313- if ( dispatchMode . active ) {
313+ if ( repickMode . active ) {
314314 if ( key === KEY_CTRL_C ) {
315315 process . stdout . write ( ANSI_CLEAR ) ;
316316 process . stdin . setRawMode ( false ) ;
317317 process . exit ( 0 ) ;
318318 } else if ( key === ANSI_ARROW_LEFT ) {
319319 // ← — cycle candidate teams backwards
320- dispatchMode = {
321- ...dispatchMode ,
320+ repickMode = {
321+ ...repickMode ,
322322 focusedIndex :
323- ( dispatchMode . focusedIndex - 1 + dispatchMode . candidates . length ) %
324- dispatchMode . candidates . length ,
323+ ( repickMode . focusedIndex - 1 + repickMode . candidates . length ) %
324+ repickMode . candidates . length ,
325325 } ;
326326 } else if ( key === ANSI_ARROW_RIGHT ) {
327327 // → — cycle candidate teams forwards
328- dispatchMode = {
329- ...dispatchMode ,
330- focusedIndex : ( dispatchMode . focusedIndex + 1 ) % dispatchMode . candidates . length ,
328+ repickMode = {
329+ ...repickMode ,
330+ focusedIndex : ( repickMode . focusedIndex + 1 ) % repickMode . candidates . length ,
331331 } ;
332332 } else if ( key === KEY_ENTER_CR || key === KEY_ENTER_LF ) {
333333 // Enter — confirm re-pick, move repo to the focused candidate team
334- const targetTeam = dispatchMode . candidates [ dispatchMode . focusedIndex ] ;
335- const g = groups [ dispatchMode . repoIndex ] ;
334+ const targetTeam = repickMode . candidates [ repickMode . focusedIndex ] ;
335+ const g = groups [ repickMode . repoIndex ] ;
336336 groups = moveRepoToSection ( groups , g . repoFullName , targetTeam ) ;
337337 const newRows = buildRows ( groups , filterPath , filterTarget , filterRegex ) ;
338338 cursor = Math . min ( cursor , Math . max ( 0 , newRows . length - 1 ) ) ;
339339 scrollOffset = Math . min ( scrollOffset , cursor ) ;
340- dispatchMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
340+ repickMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
341341 } else if ( key === "0" || key === "u" ) {
342342 // 0 / u — undo pick, restore repo to its original combined section.
343343 // Remove the confirmedPick entry for the combined label so the replay
344344 // command no longer emits --pick-team for that section.
345- const combinedLabel = groups [ dispatchMode . repoIndex ] ?. pickedFrom ;
345+ const combinedLabel = groups [ repickMode . repoIndex ] ?. pickedFrom ;
346346 if ( combinedLabel ) delete confirmedPicks [ combinedLabel ] ;
347- groups = undoPickedRepo ( groups , dispatchMode . repoIndex ) ;
347+ groups = undoPickedRepo ( groups , repickMode . repoIndex ) ;
348348 const newRows = buildRows ( groups , filterPath , filterTarget , filterRegex ) ;
349349 cursor = Math . min ( cursor , Math . max ( 0 , newRows . length - 1 ) ) ;
350350 scrollOffset = Math . min ( scrollOffset , cursor ) ;
351- dispatchMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
351+ repickMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
352352 } else if ( key === "\x1b" && ! key . startsWith ( "\x1b[" ) && ! key . startsWith ( "\x1b\x1b" ) ) {
353353 // Esc — cancel re-pick mode
354- dispatchMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
354+ repickMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
355355 } else if ( key === "t" ) {
356356 // t — toggle re-pick mode off
357- dispatchMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
357+ repickMode = { active : false , repoIndex : - 1 , candidates : [ ] , focusedIndex : 0 } ;
358358 }
359359 redraw ( ) ;
360360 continue ;
@@ -535,17 +535,17 @@ export async function runInteractive(
535535 continue ;
536536 }
537537
538- // `t` — on a picked repo (◈, has pickedFrom): enter dispatch mode to re-assign to a
538+ // `t` — on a picked repo (◈, has pickedFrom): enter re-pick mode to re-assign to a
539539 // different team. Otherwise cycle the filter target: path → content → repo → path.
540- // Feat: team dispatch mode — see issue #86
540+ // Feat: re-pick mode — see issue #87
541541 if ( key === "t" ) {
542542 const isPickedRepo =
543543 groupByTeamPrefix && row ?. type === "repo" && ! ! groups [ row . repoIndex ] ?. pickedFrom ;
544544 if ( isPickedRepo ) {
545- // Enter dispatch mode — candidates come from the original combined label
545+ // Enter re-pick mode — candidates come from the original combined label
546546 const pickedFrom = groups [ row ! . repoIndex ] . pickedFrom ! ;
547547 const candidates = pickedFrom . split ( " + " ) . map ( ( c ) => c . trim ( ) ) ;
548- dispatchMode = { active : true , repoIndex : row ! . repoIndex , candidates, focusedIndex : 0 } ;
548+ repickMode = { active : true , repoIndex : row ! . repoIndex , candidates, focusedIndex : 0 } ;
549549 } else {
550550 // Cycle filter target when not on a picked repo
551551 filterTarget =
0 commit comments