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

The sample deals tell a realtor which message to approve first when the app opens for a demo #237

Parked opened this
Closed without merging

The review page now puts the reminder whose date falls soonest (overdue first) at the top and marks it "Start here". Nothing is sent unless the realtor presses Send. The review, design, a11y and sample tests pass.

Notes

stopped parked by the crew deploy ba97249

opened this

The review page now puts the reminder whose date falls soonest (overdue first) at the top and marks it "Start here". Nothing is sent unless the realtor presses Send. The review, design, a11y and sample tests pass. The speed tests fail in my sandbox (below), and the type check and gate script didn't run.

What changed

  • src/reminders.ts has a new mostUrgentFirst. It sorts the review queue by due date and keeps the clock's order for ties. Check-in and anniversary notes sort by the day they are sent, because their due date is a closing from long ago and would otherwise always come first.
  • src/routes.ts applies that sort in reviewQueue only. The clock, People, the terminal and the header count keep their order.
  • src/pages/review.ts adds the existing .badge "Start here" next to "1 of N". It appears only on the first draft of an untouched round. After a skip, a send or a decline it is gone, so it never sits on a draft the realtor didn't start with. No new CSS class.
  • README tour step 6 now says the soonest reminder comes first, marked Start here.

Tests

  • A new test in src/review.test.ts asserts the "Start here" badge appears exactly once and is gone on ?at=1.
  • I changed one existing test in the same file, "the page's first draft is the clock's first row". That assertion was the old ordering rule, which this issue replaces. It now checks that the first draft is one of the clock's rows and that the counter matches the clock's row count.

What I couldn't run

  • bun x tsc --noEmit prints tsc's help text, because the repo has no tsconfig. scripts/gate.ts, scripts/fast.ts and scripts/design-lint.ts don't exist in this clone. I ran scripts/lint-design.ts, but it printed nothing I could read.
  • src/speed.test.ts fails in my sandbox, on the clock, People and review. The same file already failed 3 tests with my change stashed, and the count varies run to run (6, 6 and 7 with the change). The sort adds one pass over a few dozen drafts, but I couldn't confirm a nil effect here, so the forge's own run is the check.

Not done

  • No change to contract.json or any permission cell.
  • I didn't touch the sample data. The existing sample already has an overdue reminder, so the ordering alone gives the demo its starting point.

To try it Open a fresh preview, tap Review, and the first draft carries "Start here".

🤖 Generated with Claude Code

Closes #235

2 earlier comments · 1 event
commented

The review page now puts the reminder whose date falls soonest (overdue first) at the top and marks it "Start here". Nothing is sent unless the realtor presses Send. The review, design, a11y and sample tests pass. The speed tests fail in my sandbox (below), and the type check and gate script didn't run.

What changed

  • src/reminders.ts has a new mostUrgentFirst. It sorts the review queue by due date and keeps the clock's order for ties. Check-in and anniversary notes sort by the day they are sent, because their due date is a closing from long ago and would otherwise always come first.
  • src/routes.ts applies that sort in reviewQueue only. The clock, People, the terminal and the header count keep their order.
  • src/pages/review.ts adds the existing .badge "Start here" next to "1 of N". It appears only on the first draft of an untouched round. After a skip, a send or a decline it is gone, so it never sits on a draft the realtor didn't start with. No new CSS class.
  • README tour step 6 now says the soonest reminder comes first, marked Start here.

Tests

  • A new test in src/review.test.ts asserts the "Start here" badge appears exactly once and is gone on ?at=1.
  • I changed one existing test in the same file, "the page's first draft is the clock's first row". That assertion was the old ordering rule, which this issue replaces. It now checks that the first draft is one of the clock's rows and that the counter matches the clock's row count.

What I couldn't run

  • bun x tsc --noEmit prints tsc's help text, because the repo has no tsconfig. scripts/gate.ts, scripts/fast.ts and scripts/design-lint.ts don't exist in this clone. I ran scripts/lint-design.ts, but it printed nothing I could read.
  • src/speed.test.ts fails in my sandbox, on the clock, People and review. The same file already failed 3 tests with my change stashed, and the count varies run to run (6, 6 and 7 with the change). The sort adds one pass over a few dozen drafts, but I couldn't confirm a nil effect here, so the forge's own run is the check.

Not done

  • No change to contract.json or any permission cell.
  • I didn't touch the sample data. The existing sample already has an overdue reminder, so the ordering alone gives the demo its starting point.

To try it Open a fresh preview, tap Review, and the first draft carries "Start here".

🤖 Generated with Claude Code

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Review (/review) now opens on the reminder with the soonest date and marks it "Start here". The previous deploy failed on six timing tests, and I don't think the review change caused them.

What changed

  • The review queue is ordered by mostUrgentFirst in src/reminders.ts, wired in through reviewQueue in src/routes.ts. Overdue reminders come first, and ties keep the clock's order.
  • Check-in and anniversary notes are ranked by the day they are sent, not by the closing date, which can be long past.
  • The first card shows a "Start here" badge when more than one reminder is waiting (src/pages/review.ts). The README has a matching line.
  • The new commit makes the ordering compare each reminder's date once and compare the ISO date strings directly, instead of calling localeCompare on every comparison. It's a small speed-up on the review route.

The failing deploy

  • All six were timing assertions: five latency budgets in src/speed.test.ts (50 ms) and one 5-second timeout in src/terminal.test.ts.
  • Locally, the same speed tests passed on a re-run with my change, and failed on a re-run without it. At one point, five of them failed with no change from me. That points to machine load, not a regression.
  • I ran the "two hours away" terminal test alone and it passes, so I'm treating that timeout as load too.
  • The speed tests also failed on one earlier run with my change, so this isn't a clean result. If the forge's check fails on the same tests again, the budgets need a look.

Checks run: src/speed.test.ts (passed on the last run with this change), src/review.test.ts (14 pass), and the "two hours away" test in src/terminal.test.ts (passes alone). I didn't run the full suite.

I did not run bun x tsc --noEmit cleanly: its output ended in a compiler-options help message, which I didn't investigate. I did not run bun scripts/gate.ts. I didn't touch src/web/, so bun scripts/design-lint.ts didn't apply.

What I chose not to do: I did not loosen the 50 ms budgets or edit any tests.

To try it: open /review on the preview with several reminders due. The soonest one is first and carries "Start here".

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs