Public: anyone can read this; the crew can change it.
Under the clock, a This week list gives every open date in the next seven days, day by day, readable on a phone without scrolling sideways #27
Check · Review · Land · Live done — Landed and live in production.
The clock page now has a This week card between the clock and Reminders for today. It lists every open date that is overdue or due within seven days, grouped under Overdue, Today, then each day ("Tue, Nov 3"). I haven't looked at it at 360px or tried keyboard access, since I only ran tests here.
shipped production is serving it deploy d2eada7
3 earlier comments · 1 event
The clock page now has a This week card between the clock and Reminders for today. It lists every open date that is overdue or due within seven days, grouped under Overdue, Today, then each day ("Tue, Nov 3"). I haven't looked at it at 360px or tried keyboard access, since I only ran tests here. The type check also didn't run (details below).
- Rows: each row shows the date's label, the deal's address, who owes it by name (the role if the deal has no one in that role) and the urgency badge. Tapping a row opens the same sheet the clock opens, using
popovertargetwith no script. - Live updates: the card carries
data-live="deal.changed", so a date marked done elsewhere should drop off without a reload. I did not check this live, and no test covers it. - Empty state: with nothing in the window the card reads "Nothing due in the next seven days." The card is left out when there are no deals at all.
- Window logic:
src/week.tsholds a pure function,thisWeek(deals, on). It drops done dates, keeps anything due on or before day 7 (day 8 is out), and sorts by due date then address, so overdue dates come first.src/week.test.tscovers those cases on plain data. - Server test:
src/server.test.tschecks that the sample data's overdue inspection (77 Harbor View Dr) and this week's closing (1418 Alder Lane) appear inside the card. - Styling and docs:
static/app.cssadds the row styles using tokens only. Rows are full-width tap targets that wrap long addresses. The README's clock paragraph now mentions This week. - Reminders card: I left the Reminders for today card untouched, to avoid colliding with #5.
Checks: bun run lint:design passes. week.test.ts, server.test.ts and design.test.ts pass (39 tests). bun x tsc --noEmit could not run because the repo has no tsconfig.json, so I did not type-check. The repo also has no scripts/gate.ts or scripts/fast.ts, so I ran those test files by hand.
I added no dependencies and did not change contract.json or any permission.
To try it, sign in on the preview and open /. The card sits under the clock, with Inspection period ends (Harbor View) under Overdue and the Alder Lane closing under its day.
🤖 Generated with Claude Code
The page card is sound: output escaped, no role checks, no contract change, no new dependency. It misses two items on the list, so these are changes.
- Terminal door. The terminal (src/terminal.ts, views dates/reminders/deal) has no This week view. Anything a person can do on the page they must be able to do in the terminal, gated as the page is. Add a view over thisWeek() and test it in src/terminal.test.ts.
- MCP door. Done means an agent reaches it through the MCP, and there is no tool for this. Add a read tool (e.g. this_week) in src/mcp.ts that returns thisWeek() output, gated by permit like list_deals. Add its row to src/contract.test.ts if the repo requires one for new doors, plus a test.
- Live update is claimed but untested. Add a test, or drop the claim from the pull description. The server test only checks that the data-live attribute is present.
- Duplicated logic: the card builds the owner name by hand, but owedBy() in src/pages/sheet.ts already does this. Reuse it, or share one helper, so the page and terminal word it the same way.
- README: say how to use This week in the terminal and over MCP once those exist. The current paragraph covers only the page.
I've pushed changes for all five points to the same branch. The affected test files pass (56 tests across five files), and bun run lint:design passes. I did not run tsc (the repo has no tsconfig.json), and I did not try the terminal in a real session.
- Terminal door: pressing
wshows the list: open dates overdue or due within seven days, under Overdue, Today and day headings. Each row shows the label, the address and who owes it.x,u,mandowork on the rows as in the dates view. It reads deals throughlistDeals, so a guest sees "Sign in to see deals." Tests are insrc/terminal.test.ts. - MCP door: the new read tool
this_weekinsrc/mcp.tsgoes throughlistDeals, so it is gated bypermitlikelist_deals, and a guest gets an error. It returnsdeal_id,address,ownerand the date. No row was needed incontract.test.ts, since there is no new resource or verb. The tool-list assertion and a new test insrc/server.test.tscover it. - Live update: I couldn't test the browser swap itself, so the claim is narrower now. The new test marks a date done over MCP, then fetches
/and checks the date's row has left the#weeksection. That is the contentdata-liverefetches.src/live.test.tsalready covers the server event. - Owner name:
owner()insrc/week.tsnow holds the lookup.owedBy()insrc/pages/sheet.tsand the terminal and MCP use it. The card callsowedBy()directly, so the page words it exactly like the sheet: bold name, then the role in grey. - README: the This week paragraph now covers
win the terminal andthis_weekover MCP.docs/TECHNICAL.mdlists both.
The week card on the page now shows the role in grey after the owner's name, because it reuses owedBy().
I did not change contract.json or any permission, and I added no dependencies.
🤖 Generated with Claude Code
I've fixed the failing preview deploy and pushed the fix. The full bun test now passes here (105 tests across 14 files); I haven't seen the preview redeploy.
The one failure was audit.test.ts getting a 429 where it expected 403. The write rate limit is kept per account and shared by every test file in a single run. The this_week test I added in src/server.test.ts made extra writes as alice (u1), which pushed u1 over its limit before the audit test ran. That test now uses its own account (u-week). Only the test changed, not the app code.
I had only run the affected test files before, so I missed this cross-file effect.
🤖 Generated with Claude Code
I merged main into the branch and pushed it; the merge is clean now. The full bun test passes (109 tests across 14 files).
Both conflicts were in src/terminal.ts and src/terminal.test.ts, where main had added the Messages view (s on a deal).
- Terminal views: the view type, the screen branches and the key hints keep both the new
wweek view and the Messages view. - Terminal tests: the week-view tests and the Messages test both stay.
- Other files: nothing else needed resolving; the README and
docs/TECHNICAL.mdmerged on their own.
I didn't run tsc, because the repo has no tsconfig.json.
🤖 Generated with Claude Code
Earlier asks are met. The terminal door is w, it reads through listDeals, and a guest sees "Sign in to see deals." The MCP this_week tool is gated like list_deals. The owner lookup is shared in owner(). The README and TECHNICAL.md cover both doors. Tests cover the window logic, the page card, MCP (including that a date marked done leaves the card) and the terminal. contract.json is unchanged and nothing compares roles by hand. Output is escaped. I could not diff against db9f760 because the clone lacks that commit, so I read the whole change. The preview answers 200, but the Bearer token is anonymous there and the card is hidden for it, so I did not see the card render. Non-blocking: no tsconfig.json exists, so tsc was not run.
The clock page now has a This week card between the clock and Reminders for today. It lists every open date that is overdue or due within seven days, grouped under Overdue, Today, then each day ("Tue, Nov 3"). I haven't looked at it at 360px or tried keyboard access, since I only ran tests here. The type check also didn't run (details below).
popovertargetwith no script.data-live="deal.changed", so a date marked done elsewhere should drop off without a reload. I did not check this live, and no test covers it.src/week.tsholds a pure function,thisWeek(deals, on). It drops done dates, keeps anything due on or before day 7 (day 8 is out), and sorts by due date then address, so overdue dates come first.src/week.test.tscovers those cases on plain data.src/server.test.tschecks that the sample data's overdue inspection (77 Harbor View Dr) and this week's closing (1418 Alder Lane) appear inside the card.static/app.cssadds the row styles using tokens only. Rows are full-width tap targets that wrap long addresses. The README's clock paragraph now mentions This week.Checks:
bun run lint:designpasses.week.test.ts,server.test.tsanddesign.test.tspass (39 tests).bun x tsc --noEmitcould not run because the repo has notsconfig.json, so I did not type-check. The repo also has noscripts/gate.tsorscripts/fast.ts, so I ran those test files by hand.I added no dependencies and did not change
contract.jsonor any permission.To try it, sign in on the preview and open
/. The card sits under the clock, with Inspection period ends (Harbor View) under Overdue and the Alder Lane closing under its day.🤖 Generated with Claude Code
Closes #13