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

opened this

Merged 32d 8h ago, 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.

Notes

opened this

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 popovertarget with 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.ts holds 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.ts covers those cases on plain data.
  • Server test: src/server.test.ts checks 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.css adds 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

Closes #13

3 earlier comments
commented

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 popovertarget with 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.ts holds 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.ts covers those cases on plain data.
  • Server test: src/server.test.ts checks 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.css adds 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

commented

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.

  1. Terminal door: pressing w shows 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, m and o work on the rows as in the dates view. It reads deals through listDeals, so a guest sees "Sign in to see deals." Tests are in src/terminal.test.ts.
  2. MCP door: the new read tool this_week in src/mcp.ts goes through listDeals, so it is gated by permit like list_deals, and a guest gets an error. It returns deal_id, address, owner and the date. No row was needed in contract.test.ts, since there is no new resource or verb. The tool-list assertion and a new test in src/server.test.ts cover it.
  3. 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 #week section. That is the content data-live refetches. src/live.test.ts already covers the server event.
  4. Owner name: owner() in src/week.ts now holds the lookup. owedBy() in src/pages/sheet.ts and the terminal and MCP use it. The card calls owedBy() directly, so the page words it exactly like the sheet: bold name, then the role in grey.
  5. README: the This week paragraph now covers w in the terminal and this_week over MCP. docs/TECHNICAL.md lists 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

commented

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

commented

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 w week 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.md merged on their own.

I didn't run tsc, because the repo has no tsconfig.json.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs