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

Next up's pace line wins only when the cost line is unknown: a test shows both #16763

Merged opened this

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

Merged

This adds a test that pins which line lineAfter draws on Next up when both a cost line and a pace line are available. It changes no app code. test/week-pace.test.ts passes with 16 tests.

Notes

opened this

This adds a test that pins which line lineAfter draws on Next up when both a cost line and a pace line are available. It changes no app code. test/week-pace.test.ts passes with 16 tests. tsc and gate.ts --fix came back clean.

The existing weekView chooses test only proves that pace is used when capacity is unknown, and that no pace exists once it is known. It never puts a cost line and a pace line side by side. The new lineAfter tests do, using a cost line that reaches 2 rows and a pace line that reaches 5:

  • Cost line known: it wins, so the line sits after 2 rows, even with a pace line present.
  • Cost line unsure: the pace line wins, so the line sits after 5 rows.
  • Cost line unsure and no pace line: no line is drawn.

I left the page, terminal and next_up surfaces alone, since #12134's tests already cover them. No door change is needed because this is test-only. I didn't run similar.ts, since I wrote no new functions.

To try it: bun test test/week-pace.test.ts.

Closes #12501

commented

This adds a test that pins which line lineAfter draws on Next up when both a cost line and a pace line are available. It changes no app code. test/week-pace.test.ts passes with 16 tests. tsc and gate.ts --fix came back clean.

The existing weekView chooses test only proves that pace is used when capacity is unknown, and that no pace exists once it is known. It never puts a cost line and a pace line side by side. The new lineAfter tests do, using a cost line that reaches 2 rows and a pace line that reaches 5:

  • Cost line known: it wins, so the line sits after 2 rows, even with a pace line present.
  • Cost line unsure: the pace line wins, so the line sits after 5 rows.
  • Cost line unsure and no pace line: no line is drawn.

I left the page, terminal and next_up surfaces alone, since #12134's tests already cover them. No door change is needed because this is test-only. I didn't run similar.ts, since I wrote no new functions.

To try it: bun test test/week-pace.test.ts.

commented

This adds a test that pins which line lineAfter draws on Next up when both a cost line and a pace line are present. It changes no app code.

The check on the earlier push failed on a gate rule: the test cast its fixtures with as never. The fixtures are now real Cut and PaceCut records. After the fix, bun scripts/gate.ts exits 0, and bun x tsc --noEmit and test/week-pace.test.ts (16 tests) pass. The forge's full check hasn't run on the new push yet.

The new tests use a cost line that reaches 2 rows and a pace line that reaches 5:

  • Cost line known: it wins, so the line sits after 2 rows, even with a pace line present.
  • Cost line unsure: the pace line wins, so the line sits after 5 rows.
  • Cost line unsure and no pace line: no line is drawn.

I left the page, terminal and next_up surfaces alone, since #12134's tests already cover them. No door change is needed because this is test-only. I wrote no new functions, so I didn't run similar.ts.

To try it: bun test test/week-pace.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs