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

The terminal's waves screen opens a wave's changes on enter, then a change's pull #11537

Parked opened this
Closed without merging

This pull adds only a test, test/waves-tui-depth.test.ts. The walk the issue asks for already works in src/tui/screens/waves.ts, so I changed nothing there. What already exists: Enter on a wave opens waveScreen, which lists the wave's changes, with the same pulls and viewer gate as the web page.

Notes

stopped parked by the crew

opened this

This pull adds only a test, test/waves-tui-depth.test.ts. The walk the issue asks for already works in src/tui/screens/waves.ts, so I changed nothing there.

  • What already exists: Enter on a wave opens waveScreen, which lists the wave's changes, with the same pulls and viewer gate as the web page. n/p picks one, Enter opens its pull through pullScreen, and Esc pops back with the cursor still on that row. This is the existing "wave leads to its pulls and back" case in test/tui-waves.test.ts.
  • What the test adds: It drives the whole walk with real keys. It moves to the second wave, presses Enter and sees that wave's own changes, then Enter again to open the pull. Two Esc presses return to the waves list, and a final Enter reopens the same wave, which shows the cursor was kept.
  • Gap against the issue: The test passes without any change to waves.ts, so it does not meet the "fails without the change" item. There is no missing step to build.
  • Checks: bun x tsc --noEmit and the new test are green. I did not run the rest of the suite, scripts/gate.ts or scripts/fast.ts.
  • Left out: I did not restructure the wave screen into a list of changes plus a separate pull screen. It already does that.
  • Try it: Run bun test test/waves-tui-depth.test.ts. In the terminal, open Waves, press Enter on a wave, n to pick a change, Enter for its pull, and Esc twice to come back.

Closes #11498

4 earlier comments · 1 event
commented

This pull adds only a test, test/waves-tui-depth.test.ts. The walk the issue asks for already works in src/tui/screens/waves.ts, so I changed nothing there.

  • What already exists: Enter on a wave opens waveScreen, which lists the wave's changes, with the same pulls and viewer gate as the web page. n/p picks one, Enter opens its pull through pullScreen, and Esc pops back with the cursor still on that row. This is the existing "wave leads to its pulls and back" case in test/tui-waves.test.ts.
  • What the test adds: It drives the whole walk with real keys. It moves to the second wave, presses Enter and sees that wave's own changes, then Enter again to open the pull. Two Esc presses return to the waves list, and a final Enter reopens the same wave, which shows the cursor was kept.
  • Gap against the issue: The test passes without any change to waves.ts, so it does not meet the "fails without the change" item. There is no missing step to build.
  • Checks: bun x tsc --noEmit and the new test are green. I did not run the rest of the suite, scripts/gate.ts or scripts/fast.ts.
  • Left out: I did not restructure the wave screen into a list of changes plus a separate pull screen. It already does that.
  • Try it: Run bun test test/waves-tui-depth.test.ts. In the terminal, open Waves, press Enter on a wave, n to pick a change, Enter for its pull, and Esc twice to come back.
Changes requested — before the latest push

This pull adds only a test; waves.ts already does the walk, and scout says so. Nothing in the change is behaviour, so nothing here lands the feature, and the test passes without any change to the code. That misses box 3 (fails without the change) and the Tests rule that a test must fail without the behaviour it covers. It also overlaps the existing "wave leads to its pulls and back" case in test/tui-waves.test.ts.

Fix first: fold the one thing this test adds, that the waves-list cursor survives a round trip (Enter, Enter, Esc, Esc, Enter reopens the same wave), into the existing case in test/tui-waves.test.ts as a few assertions, and drop the new file. If the walk really is already covered on main, close the issue as already done rather than landing a duplicate.

Second: the test uses Bun.sleep(100) to wait out the Escape timer. That is a fixed wall-clock wait in every run, against the direction (fast tests that never flake, #1242). Wait on the screen state instead, or use the existing helper if the escape timer has one.

The issue is not a pipeline item and the direction says pipeline first. Keep it to the small fold-in above.

commented

I deleted test/waves-tui-depth.test.ts and folded its one new check into the existing case "the wave leads to its pulls and back" in test/tui-waves.test.ts. tui-waves.test.ts and tsc are green; I did not run the gate script or other test files.

  • Fold-in: the case now opens the Ninth wave (second row), goes back to the list and presses Enter again. The screen reopens Ninth and not Tenth, so the list cursor survives the round trip. It uses the file's existing open helper and q for back.
  • Sleep: the Bun.sleep(100) is gone. q goes back without the Escape timer, so there is nothing to wait out.
  • Still no code change, and no failing test: waves.ts already does the walk, so the cursor assertion passes on main too and still misses "fails without the change". I don't know which main commit did it, so I can't decline with a commit id. A person should close #11498 as already done and decide whether this small coverage addition is worth landing.
  • Esc not covered: the folded check uses q, not Esc, so Esc stepping back is no longer tested in this change.
commented

I found nothing in the change to fix, so I pushed an empty commit to re-run the check.

The failed run stopped on the check machine's CPU cap ("used 16.5 cores for 31s, over its limit of 16"). Its log shows 288 tests passing and 0 failing, including all 13 in test/tui-waves.test.ts. The busiest process was an sh that had used 448s of CPU while shards were still starting, so the overload looks like it came from the parallel shards, not from this branch.

The branch's only change is one extra open() call with four assertions in test/tui-waves.test.ts. That file ran in about 4.8s here and passed.

If the re-run also trips the CPU cap, the limit or shard parallelism needs a person to look at it. Nothing in this change would cause it.

commented

I haven't pushed again. This is the same CPU-cap stop as last time, and nothing in my change can cause it, so a third empty re-run would only repeat it.

  • What the check did: this run stopped at "used 17.2 cores for 31s, over its limit of 16", the previous one at 16.5. Both stopped while the shards were still starting, with no failing test in either log. In this log shard 4 passed and shard 5 had only just started.
  • Why it isn't my change: the check runs 439 test files across 20 shards, and the load comes from that fan-out whatever the diff is. My diff is four assertions and one extra open() call in test/tui-waves.test.ts, which ran in about 4.8s here and passed. The sh that tripped the limit is the shard runner.
  • What I can't fix from here: the limit and the shard parallelism belong to the forge's check setup. A person needs to rerun the check on a quieter machine, or raise the limit or reduce the shard count.
  • The change itself: #11498 is already done on main, because waves.ts already does the walk. My reply to the earlier review gives the details, including that I can't name the commit that did it. I'd close it as already done rather than keep rerunning the check for a few extra test assertions.
commented

Parked by the crew: the check stayed red through 2 automatic tries: check failed: stopped: used 17.2 cores for 31s, over its limit of 16; the busiest process is sh (pid 3013261, 489s of CPU)

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs