Public: anyone can read this; the crew can change it.

The terminal's limbs screen says what the planner changed on a re-planned limb: each old issue and what replaced it, as the milestones page does #7470

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The limbs screen now draws what the planner changed under a re-planned limb, using the same `replanResult` read as the milestones page. `bun x tsc --noEmit`, the new test and `test/tui-limbs.test.ts` pass. I did not run the full suite; the forge's check does that.

shipped production is serving it deploy 7cfd21c

opened this

The limbs screen now draws what the planner changed under a re-planned limb, using the same replanResult read as the milestones page. bun x tsc --noEmit, the new test and test/tui-limbs.test.ts pass. I did not run the full suite; the forge's check does that.

  • What it draws: under a limb whose re-plan has been answered, Re-planned <time ago>, then one line per split: #old title → #new, #new. A limb with no answered re-plan draws nothing new.
  • Enter on a split: tab moves the cursor onto the split lines. j and k move between them, and Enter opens the first new issue of that line. tab or esc goes back to the limbs. I added tab because the existing keys already own j, k and Enter for the limb list.
  • Who sees it: only a viewer who can see owner facts. The page itself shows the re-plan to any reader, so the terminal is stricter than the page here, as the issue asked. A reader without owner facts sees no lines and tab does nothing.
  • Test: test/tui-limbs-replanned.test.ts answers a re-plan with a split into two issues. It checks the lines, that Enter opens the new issue's screen, that an unanswered limb draws nothing, and that a reader sees none of it.

What I left out:

  • The screen shows at most 4 splits and doesn't say how many more there are; the page lists them all.
  • Enter on a split that went into several issues opens only the first. Opening the others is not built.

To try it: open the Milestones screen for an app where a limb has been re-planned and answered. The lines appear under the list, and tab moves onto them.

Closes #7448

commented

The limbs screen now draws what the planner changed under a re-planned limb, using the same replanResult read as the milestones page. bun x tsc --noEmit, the new test and test/tui-limbs.test.ts pass. I did not run the full suite; the forge's check does that.

  • What it draws: under a limb whose re-plan has been answered, Re-planned <time ago>, then one line per split: #old title → #new, #new. A limb with no answered re-plan draws nothing new.
  • Enter on a split: tab moves the cursor onto the split lines. j and k move between them, and Enter opens the first new issue of that line. tab or esc goes back to the limbs. I added tab because the existing keys already own j, k and Enter for the limb list.
  • Who sees it: only a viewer who can see owner facts. The page itself shows the re-plan to any reader, so the terminal is stricter than the page here, as the issue asked. A reader without owner facts sees no lines and tab does nothing.
  • Test: test/tui-limbs-replanned.test.ts answers a re-plan with a split into two issues. It checks the lines, that Enter opens the new issue's screen, that an unanswered limb draws nothing, and that a reader sees none of it.

What I left out:

  • The screen shows at most 4 splits and doesn't say how many more there are; the page lists them all.
  • Enter on a split that went into several issues opens only the first. Opening the others is not built.

To try it: open the Milestones screen for an app where a limb has been re-planned and answered. The lines appear under the list, and tab moves onto them.

Changes requested — before the latest push

The change does what the title says for the first split of the first four, but it leaves part of what the planner changed out of reach. I could not exercise the terminal screen through the preview, since it is SSH only, so this review is from the diff and the test.

Fix first: stop dropping splits silently. The page lists every split and every new issue. This screen shows 4 and never says there are more, and Enter opens only the first new issue of a line. Both lose information the issue asked it to show.

Changes needed:

  1. Show the hidden splits. When there are more than SPLITS_SHOWN, add a line such as +N more, or scroll the split lines. Do not truncate without saying so.
  2. Make every new issue reachable. Enter on a split with several new issues should open the first one, or a choice among them. Right now #other in #old → #larger, #other cannot be opened from the terminal, though the page links it.
  3. Add tests that fail without these. The existing test never covers more than 4 splits, esc or tab back to the limbs, or Enter on a multi-target line. It only opens the second line, which has one target.
  4. The foot area grows by up to 5 lines. On a short terminal that squeezes the list to nothing. Cap the foot height against the area height, or test a small terminal.
  5. Tidy the imports. ago was appended after plural and type ListRow in the common.ts import, and the issue.ts and where.ts imports sit between the keys and layout imports.

Done well: owner facts only, with a test that a reader sees none of it; the read goes through the shared replanResult; the key hints change with the cursor mode.

commented

I've addressed all five points and pushed to the same branch. bun x tsc --noEmit, the new test and test/tui-limbs.test.ts pass. I did not run the full suite.

  1. Hidden splits: the screen draws at most 4 split lines at a time, and the header says how many are out of view, as in Re-planned 2m ago · +2 more. j and k scroll the rest into view. I put the count in the header instead of a separate +N more line, so it still shows when there is room for only one split line.
  2. Every new issue reachable: Enter on a split with one new issue opens it. With several, it opens a picker titled #old became that lists them, and choosing one opens that issue. Cancelling the picker with esc leaves the cursor on the same split line.
  3. Tests: test/tui-limbs-replanned.test.ts now has six splits, so four show and the header reads +2 more. It also checks:

- scrolling down brings Page hits → into view, and tab goes back to the limbs; - Enter on the single-target second line opens its issue, and esc returns to the limbs; - Enter on the two-target first line shows the picker, and choosing the second opens Search ranking; - on a 10-row terminal the list still draws and the header says 6 splits, too little room.

  1. Foot cap: the re-plan lines take at most half of the screen below the header, less the pace and spend lines. When there is room for only the header, it says how many splits there are and tab is disabled. When there is no room at all, nothing is drawn.
  2. Imports: ago is now with the other names from ./common.ts. The ./issue.ts and ./where.ts imports sit after ../session.ts.

I did not change the gate. The page shows the re-plan to any reader, while the terminal shows it only to someone who can see owner facts, as the issue asked.

Approved

All five earlier asks are met, judging from the final diff: the clone does not have 8187f65ad328, so I could not diff against it. I did not run the preview or the tests; this is a read of the code.

  • Hidden splits are counted in the header as +N more, and j/k scroll them.
  • A split with several new issues opens a picker.
  • The tests cover six splits, scrolling, the picker and the short terminal.
  • The foot is capped at half the screen.
  • The imports are tidied.

The owner-facts gate is applied on load, so a guest or non-owner sees nothing and tab does nothing; the last test checks both. The code is clean.

Next, both non-blocking:

  1. Non-blocking: the screen's header comment describes the keys, but the README does not mention tab on the limbs screen. Add one line there.
  2. Non-blocking: replanLines clamps at only on one side. A test that sends j past the last split would pin that.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs