Public: anyone can read this; the crew can change it.
An open deal nothing has touched in 14 days says so on the clock #317
Check · Review · Land · Live — Its check is red.
An open deal that nothing has touched in 14 days now shows a "Quiet N days" badge on its clock lane, and the deal page says when it was last touched. The speed-budget tests may still fail on the forge, and I can't tell from this machine.
38 files · +241 −20
stopped serving, but the check failed deploy 253f541
Check faileddeploy 253f541
Website spec: 3 findings, 3 the edge owns (report only)
- / no <link rel="canonical"> — canonical
- / missing og:image — open-graph
- / http://127.0.0.1:34221/tokens.css?v=2d14bc8d: a 2410-byte body was sent without br or gzip though Accept-Encoding: br, gzip — https://specification.website/ (the edge owns this)
- / http://127.0.0.1:34221/static/app.css?v=528a5d90: a 23698-byte body was sent without br or gzip though Accept-Encoding: br, gzip — https://specification.website/ (the edge owns this)
- / no Cross-Origin-Opener-Policy — coop (the edge owns this)
- / no ETag on the HTML — caching
Look
An open deal that nothing has touched in 14 days now shows a "Quiet N days" badge on its clock lane, and the deal page says when it was last touched. The speed-budget tests may still fail on the forge, and I can't tell from this machine.
- Speed-budget tests: Unmodified
mainfails 1–4 of the same speed-budget cases here, because the sandbox is under heavy load (load average 43–66). My branch fails 3 of them, so I can't separate its cost from the noise. The forge's check on a quieter machine is the real test. - Last touch is computed on demand: the last-touch day is now worked out only when a page reads
deal.touched, which is the clock and the deal page. The people page, the reminder review, the week view and the deal list no longer pay for it, so the earlier fix for the timing failures is stronger. One audit-trail query per list still runs on every load; I measured it at about 0.5 ms for 200 deals.
What changed
- Quiet rule:
src/quiet.tscalls an open deal quiet when 14 or more days have passed since its last touch. A deal with an open date due today or in the next 3 days is never quiet. Closed and fell-through deals never are. - Last touch: it is the latest of: the deal being opened, a date marked done or waived, a date moved, a message sent or declined, or any allowed change to the deal in the audit trail. That last one covers party and note edits.
- Display:
src/pages/quiet.tsdraws the badge and the "Last touched N days ago" line. The word is the signal, not colour, and the output is escaped. The.quiet-badgeclass is listed indocs/design/areas/clock.md. - Sample: 2210 Juniper Court boots 16 days quiet, with its dates pushed out so none is due soon, and stays quiet as the days pass. The README tour has one new sentence, mirrored in
src/tour.tsbecause a test requires the two to match. - Migration: I added one, an index on
audit (resource, target, at), at the end of the list, and updatedsrc/migrations.pin.json. The issue said to avoid a migration if possible, but without the index every clock read scanned the whole audit trail.src/migrations.test.tsexcludes it from its "before" schema.
Tests
- Covering the change:
src/quiet.test.ts, the sample tests, the migration and upgrade tests, the tour test and the OpenAPI test pass here. - Not run: this clone has no
scripts/gate.ts,scripts/fast.tsortsconfig.json, so I couldn't run the gate orbun x tsc --noEmit. - Design lint:
scripts/lint-design.tsprinted no complaints.
What I chose not to do: change any contract cell, or add a setting for the 14-day and 3-day thresholds.
To try it: open the preview and look for "Quiet 16 days" on 2210 Juniper Court, then open that deal to see its last-touched line. Mark one of its dates done and the badge goes away.
Changes needed:
- (first) The diff adds 23 empty stray files at the repo root: .bash_profile, .bashrc, .zshrc, .zprofile, .profile, .gitconfig, .gitmodules, .ripgreprc, .mcp.json, .idea, .vscode and .claude/* (agents, commands, hooks, settings.json, settings.local.json, skills and others). They are environment debris and have nothing to do with the issue. Several are config files that tools read (.gitconfig, .mcp.json, .claude/settings*.json). Remove all of them from the pull.
- src/deals.ts assemble(): the body of the touch closure is not indented, and the rest of the function is. Format it properly.
- The preview as a guest shows no deals, so I could not see the 'Quiet 16 days' badge on 2210 Juniper Court there. The builder should confirm it shows in the preview.
- The pull's text says the gate, tsc and the fast script were not run because the clone lacked them. Make sure the forge check is green after the cleanup.
The quiet rule, the tests, the escaping, the design doc entry, the migration pin and the README/tour sentence look right. No contract cell is changed. Because of the stray files I am not approving, so no boxes are ticked.
The 23 stray files are out of the pull and the closure is indented, but I haven't confirmed the badge on the preview (item 3) or that the forge check is green (item 4).
- Stray files: I removed
.bash_profile,.bashrc,.zshrc,.zprofile,.profile,.gitconfig,.gitmodules,.ripgreprc,.mcp.json,.idea,.vscodeand everything under.claude/from git's index only. The diff against main now has no dotfiles. They were never meant to be committed; an earliergit addswept them in. - Indentation: the body of the last-touch closure in
assemble()insrc/deals.tsis now indented like the rest of the function. The quiet, sample and migration tests still pass (27 of 27) after the edit. - Badge on the preview: a guest sees no real deals, so I can't show the badge there without signing in, and my shell can't do that. The sample test,
src/quiet.test.ts, checks that exactly one lane, 2210 Juniper Court, shows "Quiet 16 days" on a fresh boot and that closed deals show nothing. Please check it signed in on the preview. - Forge check: it will run on this push. The gate,
tscand fast scripts are absent from this clone, so I couldn't run them. The speed-budget tests were intermittently red here under heavy machine load, including on unmodifiedmain.
I found a real cause for the failed preview deploy and pushed a fix. I can't confirm the speed-budget tests now pass, because this machine is heavily loaded (load average about 50).
Cause: the log you sent stopped partway through src/terminal.test.ts, with no failing test shown. In my own runs, two terminal tests ("K keeps a private note…" and "U puts a date back…") took 5–6 s and hit the test timeout. The cause was that I had made the last-touch day lazy but still computed it for every deal. The list code copies each deal with { ...d } (in withClashes, in shown, and in the permit checks), and the spread read the touched getter every time. Every list, terminal keypress and page that handled deals therefore ran the audit and stamp work for all of them.
Fix (src/deals.ts):
- Not enumerable:
touchedno longer shows up in a spread, so the copies leave it behind. - Re-attached lazily: a small
lazyTouchedhelper puts it back on the copies that need it.withClashes(which feeds the clock) and the guest-redacted copy inshownuse it, so the clock and the deal page still read it, and only when they ask. - One batched query: the audit lookup runs once per list, the first time any deal's touch is read.
Tests:
- Passing:
src/quiet.test.ts, the sample, OpenAPI, terminal and contract tests pass (103 of 103). The sample boot still shows "Quiet 16 days" on 2210 Juniper Court and nowhere else. - Speed budget: the full
bun testhere still shows two or three speed-budget cases failing (reminder review, people) with times near 50 ms. Unmodifiedmainfails the same cases on this machine, so I can't separate noise from my change. The forge's check on a quieter machine is the real verdict.
I found nothing new to fix, so I pushed nothing this turn. The branch is still at 253f541, and I can't tell whether the failures you saw come from my change or from the forge's load.
- Terminal tests: the K test (7.3 s) and the earlier U test timed out at 5 s. Both also time out on unmodified
mainon this machine. The "n declines a reminder" test fails onmainas well, deterministically here, so it is unrelated to my change. - Speed-budget tests: on a loaded machine they are noisy. With my changes I saw 2–3 failures per run against 0–1 on
main, which points at a real cost. But when I stubbed the last-touch work out completely, the same file still failed 2–6 times per run, so I can't pin the difference on any one piece. - Measured cost: in-process benchmarks at 200 deals show the last touch adds about 2 ms to loading a clock (the audit lookup about 0.5 ms, the stamp loop and day conversion about 1 ms). Pages that don't show it pay nothing. Loading the deal list alone is unchanged (12.8 ms against 12.7 ms on
main).
That 2 ms on the clock could tip tests already sitting near 50 ms on a loaded forge. If the check stays red on the clock, the next step is to skip the day conversion for deals touched less than 13 days ago.
The "clock answers in under 50 ms with 200 deals" failure in your log is the one that fits that cost. Nothing in the repository is left modified.
An open deal that nothing has touched in 14 days now shows a "Quiet N days" badge on its clock lane, and the deal page says when it was last touched. The speed-budget tests may still fail on the forge, and I can't tell from this machine.
mainfails 1–4 of the same speed-budget cases here, because the sandbox is under heavy load (load average 43–66). My branch fails 3 of them, so I can't separate its cost from the noise. The forge's check on a quieter machine is the real test.deal.touched, which is the clock and the deal page. The people page, the reminder review, the week view and the deal list no longer pay for it, so the earlier fix for the timing failures is stronger. One audit-trail query per list still runs on every load; I measured it at about 0.5 ms for 200 deals.What changed
src/quiet.tscalls an open deal quiet when 14 or more days have passed since its last touch. A deal with an open date due today or in the next 3 days is never quiet. Closed and fell-through deals never are.src/pages/quiet.tsdraws the badge and the "Last touched N days ago" line. The word is the signal, not colour, and the output is escaped. The.quiet-badgeclass is listed indocs/design/areas/clock.md.src/tour.tsbecause a test requires the two to match.audit (resource, target, at), at the end of the list, and updatedsrc/migrations.pin.json. The issue said to avoid a migration if possible, but without the index every clock read scanned the whole audit trail.src/migrations.test.tsexcludes it from its "before" schema.Tests
src/quiet.test.ts, the sample tests, the migration and upgrade tests, the tour test and the OpenAPI test pass here.scripts/gate.ts,scripts/fast.tsortsconfig.json, so I couldn't run the gate orbun x tsc --noEmit.scripts/lint-design.tsprinted no complaints.What I chose not to do: change any contract cell, or add a setting for the 14-day and 3-day thresholds.
To try it: open the preview and look for "Quiet 16 days" on 2210 Juniper Court, then open that deal to see its last-touched line. Mark one of its dates done and the badge goes away.
Closes #310