Repository navigation
Open
Labels
Description
Source PR: #108
Branch: feat/herdr-desktop-tui-gaps
Head reviewed: a25e695
Push the fixes to the branch above; do not open a new pull request. Comment on the PR and on this issue when done.
Blocking findings
- Ctrl+A Ctrl+N jumps to a different space than the number the sidebar shows (
herdr/desktop/mods/refactoria-spaces/main.js:130): focusAgent resolves N through spaceOrder(), which returns rows in the order the list renders them: this computer first, then machines by name, worktrees under their main checkout (spaceOrder at main.js:123-127 over ordered() at main.js:289-307). The sidebar's visible numbers come from somewhere else: compact() renders String(i + 1) (main.js:444) where i is the space's index in spaces() (ordered() builds rows withsp.map((w, i) => ({ w, i, ... }), main.js:293). Any reordering performed by grouped()/ordered() therefore desynchronises the printed number from the space the shortcut targets. The PR body and docs/keymaps.md claim the keys number spaces the way the sidebar shows them, so the two must agree.- Failure scenario: Sidebar dragged narrow (< 160 px, so compact() draws) with two spaces: space A created first on machine
vps, space B created second locally. spaces() is [A, B], so compact() labels A "1" and B "2"; grouped()/spaceOrder() put local first, so spaceOrder() is [B, A]. Pressing Ctrl+A Ctrl+1 focuses B (local) while the row labelled 1 is A (vps). The same happens with a worktree space created before its main checkout's space: ordered() re-emits main first and the worktree after it, so the label and the jump disagree. A folded machine group adds a third case: its spaces are not rendered at all but still occupy ordinal slots in spaceOrder().
- Failure scenario: Sidebar dragged narrow (< 160 px, so compact() draws) with two spaces: space A created first on machine
Acceptance criteria
- Fixed: Ctrl+A Ctrl+N jumps to a different space than the number the sidebar shows (herdr/desktop/mods/refactoria-spaces/main.js:130). The scenario below no longer reproduces: Sidebar dragged narrow (< 160 px, so compact() draws) with two spaces: space A created first on machine
vps, space B created second locally. spaces() is [A, B], so compact() labels A "1" and B "2"; grouped()/spaceOrder() put local first, so spaceOrder() is [B, A]. Pressing Ctrl+A Ctrl+1 focuses B (local) while the row labelled 1 is A (vps). The same happens with a worktree space created before its main checkout's space: ordered() re-emits main first and the worktree after it, so the label and the jump disagree. A folded machine group adds a third case: its spaces are not rendered at all but still occupy ordinal slots in spaceOrder().
Activity
barbatdev commentedon Nov 1, 2026
Implemented in #111 (Closes #109), commit b12ba28. Labels and shortcuts now use the same visible order across machine grouping, worktree nesting, and folding. Seven regression tests pass, existing Herdr merge/asset checks pass, and CI Smoke checks passed on the exact PR head. PR #108 was already merged, so the correction uses a new branch/PR. Live Herdr Desktop validation remains unavailable in this Linux workspace.