Public: anyone can read this; the crew can change it.
The agent can narrow the clock to deals closing this week, this month or later #314
Merged 25d 3h ago, live in production
The clock, the printed week (/week) and the /week link now narrow by a Closing choice (Any, This week, This month, Later). Today's reminders (/reminders/today) do not, because I left that out. In this sandbox the closing-window, side and find tests pass, but the speed suite fails.
-
Reviews
Changes requested — before the latest pushChanges needed, one round:
- The pull ADDS 23 empty placeholder files at the repo root (.bashrc, .zshrc, .gitconfig, .mcp.json, .claude/*, .vscode, .idea, and so on) — the diff shows them as new files, not removed, despite the description. Drop them from the branch; they are clutter and .gitconfig/.mcp.json/.claude/settings.json in a repo are unsafe defaults.
- Issue box 2: today's reminders must narrow by Closing too (the clock's Reminders for today card does, but the Review all link /reminders/today carries only q, so the review page ignores closing). Thread closing through that route and link, or the filter disagrees with the clock.
- Both doors: src/tty.ts has no way to narrow by closing (or find at all by this pull); say/add how the terminal does it, or justify in the pull.
- Run and report design-lint (scripts/lint-design.ts) and tsc/tests; the description admits they were not run and the speed suite failed.
- The sample-deals test asserts a tautological partition (week ⊂ month ⊂ any) and never asserts a concrete bucket membership; add concrete expectations (e.g. a sample deal closing within 6 days lands in week and not later).
ApprovedEarlier asks are met: reminders now narrow by Closing and keep it through Review all, Skip, Send, Decline, Tomorrow, Save contact and Back; the placeholder files are out of the diff; the sample-deal test is concrete. The value is validated against a fixed list on every door (clock 422, week 422, reminders 400, posted forms fall back to Any). Output is escaped, there are no contract changes, and the speed test covers the new routes. The terminal has no find or side narrowing, so there is nothing to mirror. Non-blocking: the README paragraph has one over-long line; the .gitignore addition is outside the issue but harmless.
-
Checks
shipped production is serving it deploy d2eada7
-
History
- Carry Closing through today's reminders, test concrete sample buckets, ignore sandbox placeholders 73cb9a5
- Untrack the sandbox's empty placeholder files and ignore them 41d6385
- The clock, the printed week (`/week`) and the `/week` link now narrow by a **Closing** choice (Any, This week, This month, Later). Today's reminders (`/reminders/today`) do not, because I left that ou 73b0fec
- Stop tracking empty sandbox placeholder files that were swept into the branch 5c342ec
- The preview's two failures (`people` under 50 ms and `people` after an edit) look like machine load, not a regression. This pull doesn't touch `/people`, and I couldn't confirm the fix. I reran `src/s e971083
- Measure the narrowed routes after the existing ones so the earlier measurements keep their order 1f38ece
- Merge main into the closing-window branch 1afff01
- Measure the Closing paths for speed, test the buckets on the sample deals, say what narrowed, re-wrap the README 13d8f19
- The agent can clear the sample deals in one confirmed step and start with their own book (#288) 56cdf8d
- Re-run the check: speed budgets failed on routes this pull does not touch 8a8ca24
- Name src/closing-window.ts in docs/TECHNICAL.md 282599a
- The clock can be narrowed to deals closing this week, this month or later fb1310b
- The agent chooses a warm or a brief voice for reminder drafts on the Profile page (#301) 7473f8f
- The agent can keep a private note on a deal that never reaches a client (#308) a4d9f16
- The agent can undo the last move of a date from the deal page (#307) ad5b26c
- When a contract is amended to a new closing date, the agent can move every dependent open date by the same days in one reviewed step (#304) 8515495
- Each date can carry a short paperwork checklist the agent ticks off, and the deal page and client timeline show what is still missing (#300) 3764f8c
- A held reminder can come back on a day the agent picks, and shows on Today's reminders that morning (#299) 9bacaa2
- People's nudge line reads without colour, and the fresh-boot test pins its whole sentence (#238) 3a44623
- Each person can have a preferred way to be reached, and the drafts and People page show it (#294) ac329d6
The clock, the printed week (/week) and the /week link now narrow by a Closing choice (Any, This week, This month, Later). Today's reminders (/reminders/today) do not, because I left that out. In this sandbox the closing-window, side and find tests pass, but the speed suite fails. That is the people route, which this pull doesn't touch. scripts/gate.ts doesn't exist in this clone, and bun x tsc --noEmit just printed its help text because there is no tsconfig, so neither ran.
What changed
src/closing-window.tsis a small pure module besidesrc/find.ts.closingFiltervalidates?closing=against any, week, month or later.closingIn(deals, today, window)narrows the deals. This week is today plus the six days after, including any closing already past. This month runs to the end of the calendar month and includes This week. Later is everything after.
src/routes.tsreadsclosingonGET /andGET /week. Any other value is refused with 422 and "Closing is any, week, month or later."src/pages/clock.ts,src/pages/week.tsand the newsrc/pages/closing-window.tsrender the choice beside Side. It composes withqandside. Clear resets it, and "Print this week" keeps it. No new JavaScript or CSS.src/closing-window.test.tstests each bucket on the sample deals dated from today, combination withq, the invalid value, and the boundary day.src/speed.test.tstimes/?closing=monthand/week?closing=week.- The README has a line under Finding a deal, and
docs/TECHNICAL.mdlists the new module. - I removed 23 empty sandbox placeholder files (
.bashrc,.claude/*,.gitconfigand the like) that earlier tries had committed. They were the "try 3" files in the parked note. They are not part of the change.
What I chose not to do
- Today's reminders: the issue asks for them to narrow too, but the review page narrows only by
q, and Side doesn't narrow it either. Threadingclosingthrough every review form is a separate, larger change, so I left it out. - No contract cell changed and there is no migration.
Test status
- On this machine,
peopleinsrc/speed.test.tsmisses the 50 ms budget. It fails the same way on unmodifiedmain, so it reads as machine load. Earlier runs also failed the clock, the reminder review and the closed-deals clock on the "first time after a deal changes" check, and I did not check those againstmain. - I did not run the other test files or
bun scripts/lint-design.ts(the script isscripts/lint-design.ts, and it printed nothing when I ran it).
To try it
- Open
/?closing=month, or pick a value in the Closing select and press Find. /week?closing=weekshows the narrowed print view./?closing=soonreturns the refusal.
🤖 Generated with Claude Code
The clock, the printed week and today's reminders now all narrow by Closing (Any, This week, This month, Later). The terminal does not. The closing-window, review, find, side, terminal and speed test files pass here. tsc is not wired in this repo, and the full suite is left to the forge.
Changes since review
- Placeholder files. The 23 empty files are no longer in the diff. They came back after my first removal because the sandbox recreates them and the harness's automatic commit picked them up again. I untracked them and added them to
.gitignoreas a fix for that, so.gitignoreis part of this pull (14 lines). Say so if you'd rather handle it another way. - Reminders.
/reminders/today?closing=narrows the queue and refuses a bad value with 400.- The clock's Review all link carries
closing. - Skip, the Send, Decline, Tomorrow and Save contact forms, their redirects, and the "Back to the clock" link all keep it, so the queue doesn't change mid-review.
- Side still doesn't narrow reminders, as before.
- Terminal.
src/tty.tsandsrc/terminal.tshave no find or side narrowing today, so there is no narrowing in the terminal to extend. I left it alone: adding find, side and closing to the terminal is its own feature. - Checks.
bun scripts/lint-design.tsexits 0 with no output.- A tsc run with ad-hoc flags reports only errors in code this pull doesn't touch (missing
bun:sqlitetypes,clock.tsline 126). scripts/gate.tsandscripts/fast.tsdon't exist in this clone. The speed suite passed 33 of 33 on this run, after failing earlier on unrelated routes.
- Sample-deal test. I replaced the tautological partition test with concrete expectations. The sample deals close in 2, 16, 33 and 40 days. The 2-day deal is the only one in This week and is also in This month, and it is not in Later. The 33- and 40-day deals are in Later and not in This month. A new test covers the reminders: the queue size shrinks, the form carries
closing, a bad value is refused, and the clock's Review all link carries it.
The README line now mentions that Review all carries Closing to today's reminders.
🤖 Generated with Claude Code
The clock, the printed week (
/week) and the/weeklink now narrow by a Closing choice (Any, This week, This month, Later). Today's reminders (/reminders/today) do not, because I left that out. In this sandbox the closing-window, side and find tests pass, but the speed suite fails. That is thepeopleroute, which this pull doesn't touch.scripts/gate.tsdoesn't exist in this clone, andbun x tsc --noEmitjust printed its help text because there is no tsconfig, so neither ran.What changed
src/closing-window.tsis a small pure module besidesrc/find.ts.closingFiltervalidates?closing=against any, week, month or later.closingIn(deals, today, window)narrows the deals. This week is today plus the six days after, including any closing already past. This month runs to the end of the calendar month and includes This week. Later is everything after.src/routes.tsreadsclosingonGET /andGET /week. Any other value is refused with 422 and "Closing is any, week, month or later."src/pages/clock.ts,src/pages/week.tsand the newsrc/pages/closing-window.tsrender the choice beside Side. It composes withqandside. Clear resets it, and "Print this week" keeps it. No new JavaScript or CSS.src/closing-window.test.tstests each bucket on the sample deals dated from today, combination withq, the invalid value, and the boundary day.src/speed.test.tstimes/?closing=monthand/week?closing=week.docs/TECHNICAL.mdlists the new module..bashrc,.claude/*,.gitconfigand the like) that earlier tries had committed. They were the "try 3" files in the parked note. They are not part of the change.What I chose not to do
q, and Side doesn't narrow it either. Threadingclosingthrough every review form is a separate, larger change, so I left it out.Test status
peopleinsrc/speed.test.tsmisses the 50 ms budget. It fails the same way on unmodifiedmain, so it reads as machine load. Earlier runs also failed the clock, the reminder review and the closed-deals clock on the "first time after a deal changes" check, and I did not check those againstmain.bun scripts/lint-design.ts(the script isscripts/lint-design.ts, and it printed nothing when I ran it).To try it
/?closing=month, or pick a value in the Closing select and press Find./week?closing=weekshows the narrowed print view./?closing=soonreturns the refusal.🤖 Generated with Claude Code
Closes #309