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

People flags someone who owes a date in the next three days and has heard nothing from you in a week #226

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

/people now puts an amber line on anyone who owes an open date due today or within three days and has heard nothing from the agent for over a week. The terminal's People view (P) shows the same line. The people, lastsent, sample, owes, twocontacts and fell test files pass.

Notes

shipped production is serving it deploy d2eada7

opened this

/people now puts an amber line on anyone who owes an open date due today or within three days and has heard nothing from the agent for over a week. The terminal's People view (P) shows the same line.

The people, lastsent, sample, owes, twocontacts and fell test files pass. I did not run bun x tsc --noEmit, because the repo has no tsconfig.json. The repo has no scripts/design-lint.ts either, so I ran scripts/lint-design.ts instead, which printed nothing.

  • Rule: nudgeFor(owes, last_sent, on) in src/people.ts sits beside the last-heard logic. It takes the day as an argument and never reads the clock. It picks the soonest open date due 0–3 days out. It flags the person only when nothing was ever sent or the last sent message is more than 7 days old. Declined and held drafts still don't count as sent.
  • Wording: nudgeLine produces the text, for example "Owes Financing on 1418 Alder Lane in 2 days · nothing sent in 9 days", or "· nothing sent yet". The page escapes it.
  • Order: flagged people come first, soonest date first, with name as the tie-break. Everyone else keeps today's order.
  • Style: the new .person-nudge class reuses the .closing-clash amber and is documented in docs/design/areas/people.md.
  • Tests:

- Flagged: due in 3 days with last sent 8 days ago. - Not flagged: last sent 6 or 7 days ago, due in 4 days, overdue, done, or waived. - Ordering: flagged people sort first, soonest date first. - Sample data: a fresh boot flags at least one person on /people.

I chose not to flag overdue dates. They already show their own "how late" line on This week. I changed no contract cell and added no route.

Closes #223

5 earlier comments · 3 events
commented

/people now puts an amber line on anyone who owes an open date due today or within three days and has heard nothing from the agent for over a week. The terminal's People view (P) shows the same line.

The people, lastsent, sample, owes, twocontacts and fell test files pass. I did not run bun x tsc --noEmit, because the repo has no tsconfig.json. The repo has no scripts/design-lint.ts either, so I ran scripts/lint-design.ts instead, which printed nothing.

  • Rule: nudgeFor(owes, last_sent, on) in src/people.ts sits beside the last-heard logic. It takes the day as an argument and never reads the clock. It picks the soonest open date due 0–3 days out. It flags the person only when nothing was ever sent or the last sent message is more than 7 days old. Declined and held drafts still don't count as sent.
  • Wording: nudgeLine produces the text, for example "Owes Financing on 1418 Alder Lane in 2 days · nothing sent in 9 days", or "· nothing sent yet". The page escapes it.
  • Order: flagged people come first, soonest date first, with name as the tie-break. Everyone else keeps today's order.
  • Style: the new .person-nudge class reuses the .closing-clash amber and is documented in docs/design/areas/people.md.
  • Tests:

- Flagged: due in 3 days with last sent 8 days ago. - Not flagged: last sent 6 or 7 days ago, due in 4 days, overdue, done, or waived. - Ordering: flagged people sort first, soonest date first. - Sample data: a fresh boot flags at least one person on /people.

I chose not to flag overdue dates. They already show their own "how late" line on This week. I changed no contract cell and added no route.

commented

I fixed the four failing contact-link tests and pushed the fix. After the fix, src/partycontact.test.ts and src/people.test.ts pass locally. I did not rerun the full suite, so the forge's check on this push is the first full run since the fix.

src/partycontact.test.ts builds its Person by hand, without the new nudge field. The page then read p.nudge as undefined and called nudgeLine on it, which threw.

  • Fixture: it now sets last_sent: null, nudge: null, like a real Person.
  • Page: src/pages/people.ts now checks p.nudge == null, so a person without the field renders no nudge line instead of throwing.

The nudge rule and the terminal view are unchanged.

Changes requested — before the latest push

The nudge rule, ordering, terminal line and tests look right. One thing blocks this, plus two smaller fixes.

  1. Remove the 23 stray empty files (blocking). The diff adds zero-byte files that are not part of this change: .bash_profile, .bashrc, .profile, .zprofile, .zshrc, .gitconfig, .gitmodules, .idea, .vscode, .mcp.json, .ripgreprc, and under .claude/: agents, commands, hooks, launch.json, loop.md, output-styles, routines, scheduled_tasks.json, settings.json, settings.local.json, skills and workflows. They look like sandbox placeholders committed by accident. Shell-profile and .claude/settings* files in the repo are a risk and are not the realtor app. Run git rm on all of them and push. Check that git diff --stat origin/main then lists only the real files.
  1. Fix the indentation in src/people.ts. The new .map((p) => { ... return { name, contact, ... }; }) body is not indented to match the block. Indent it.
  1. Drop the p.nudge == null check in src/pages/people.ts and use === null. The == null check hides a bad fixture and is now unnecessary, since partycontact.test.ts sets nudge: null. The terminal already uses !== null.

Also, the PR description says tsc and design-lint were not run, because tsconfig.json and scripts/design-lint.ts are missing. Say plainly in the next description what was run. Box 6 asks for bun scripts/design-lint.ts to pass.

commented

People now shows an amber line on anyone who owes an open date due today or within three days and has had nothing sent in over seven days. The terminal's People view (P) shows the same line. I've pushed the three fixes from review.

Review fixes

  • Stray files: I ran git rm --cached on all 23 empty placeholder files: the shell profiles, .gitconfig, .gitmodules, .idea, .vscode, .mcp.json, .ripgreprc and everything under .claude/. git diff --stat origin/main now lists only the real files:

- docs/design/areas/people.md - src/lastsent.test.ts - src/pages/people.ts - src/partycontact.test.ts - src/people.test.ts - src/people.ts - src/terminal.ts - static/app.css

The placeholders still sit untracked in my working directory, so I left them there; they are not in the pull.

  • Indentation: the .map body in people() in src/people.ts is indented to match its block.
  • Nudge check: src/pages/people.ts uses p.nudge === null again, as the terminal does. partycontact.test.ts sets nudge: null.

What the pull does

  • Rule: nudgeFor in src/people.ts is a pure function that takes the agent's today as an argument and never reads the clock. It picks the soonest open date due 0–3 days out. It flags the person only when nothing was ever sent or the last sent message is more than 7 days old. Declined and held drafts still don't count as sent.
  • Wording: nudgeLine produces "Owes Financing on 1418 Alder Lane in 2 days · nothing sent in 9 days", or "· nothing sent yet". The page escapes it.
  • Order: flagged people come first, soonest date first. Everyone else keeps today's order.
  • Style: .person-nudge reuses the .closing-clash amber and is documented in docs/design/areas/people.md.
  • Not done: overdue dates are not flagged, because This week already shows how late they are. No contract cell, route or dependency changed.

What I ran

  • Tests: locally, src/people.test.ts, src/lastsent.test.ts and src/partycontact.test.ts pass. Earlier I also ran the terminal, sample, owes, twocontacts and fell files, which passed. I did not run the full suite here; the forge runs it on push.
  • Not run: tsc. bun x tsc --noEmit can't run because the repo has no tsconfig.json.
  • Not run: scripts/design-lint.ts. That file doesn't exist. I ran scripts/lint-design.ts instead, and it printed nothing. That is the only design check I could run, so box 6's bun scripts/design-lint.ts is not literally satisfied.
commented

I didn't change any code for this failure. I pushed an empty commit to re-run the check.

The failing test is "the clock answers within budget the first time after a deal changes", a 50 ms timing test in src/speed.test.ts. It requests /, the clock page, and nothing in my change is on that path. The clock page doesn't call people(), and the only other changes are a terminal line and one CSS rule. The same file passed 15 of 15 tests on each of three local runs. The deploy run took 39 s for the whole suite, and the clock test's own 328 ms is well over the 50 ms budget, so I take it to be load on the deploy machine.

If it fails again, I'll look at whether the clock's cold rebuild is genuinely near the budget.

Changes requested — before the latest push

The nudge itself is fine: the pure nudgeFor, nudgeLine, the ordering, the terminal line, the CSS class and its doc entry, and the tests all read correctly. One earlier ask is still unmet, so I am requesting changes.

Earlier ask: remove the 23 empty placeholder files (.bash_profile, .bashrc, .gitconfig, .gitmodules, .idea, .mcp.json, .vscode, .claude/* and others). Not met. The diff at this head still adds all of them as new empty files (mode 100644, blob e69de29). The earlier git rm --cached is not in the pushed head. Note that a tracked .gitmodules, .gitconfig, .mcp.json and .claude/settings.json are unsafe to ship: tools read them as config.

Fix first: remove them from the index and commit. git rm --cached each of those paths, confirm git diff --stat origin/main lists only the 8 real files, then push. Do not leave them untracked in the clone where git add -A could re-add them. Add them to .git/info/exclude instead.

Non-blocking: bun scripts/design-lint.ts was not run, so box 6 is only partly shown, and the clone has no tsconfig.json. Say so in the description.

commented

/people now shows an amber line on anyone who owes an open date due today or within three days and has had nothing sent in more than seven days. The terminal's People view (P) shows the same line. Flagged people are listed first, soonest date first; everyone else keeps today's order.

The 23 empty placeholder files are gone again. Commit faa1e01 had removed them from the index, but the next commit, 09f2cfd, added them all back from the untracked copies in the clone. 64bc1de removes them again. They are now listed in .git/info/exclude, so a git add -A can't add them back. git diff --stat origin/main...HEAD now lists only these 8 files:

  • docs/design/areas/people.md
  • src/lastsent.test.ts
  • src/pages/people.ts
  • src/partycontact.test.ts
  • src/people.test.ts
  • src/people.ts
  • src/terminal.ts
  • static/app.css

The change, file by file:

  • src/people.ts: nudgeFor(owes, last_sent, on) decides who is flagged. It takes the agent's today as an argument and never reads the clock. It picks the soonest open date due 0–3 days out and flags the person when nothing was ever sent or the last sent message is more than 7 days old. Declined and held drafts still don't count as sent. nudgeLine writes the text: "Owes Financing on 1418 Alder Lane in 2 days · nothing sent in 9 days", or "· nothing sent yet". The page escapes it.
  • Page and terminal: src/pages/people.ts and src/terminal.ts each add the line under the person's name, styled with the .closing-clash amber.
  • Style: the new class .person-nudge is documented in docs/design/areas/people.md.
  • Tests: src/people.test.ts checks the rule:

- due in 3 days with last sent 8 days ago is flagged; - last sent 6 or 7 days ago is not; - due in 4 days, overdue, done or waived is not; - flagged people sort first.

src/lastsent.test.ts checks that the sample data on a fresh boot flags someone on /people. src/partycontact.test.ts's hand-built person now sets nudge: null.

Not changed: overdue dates are not flagged, because This week already says how late they are. No contract cell, route or dependency changed.

Checks: src/people.test.ts, src/lastsent.test.ts, src/partycontact.test.ts, src/speed.test.ts, src/sample.test.ts, src/owes.test.ts, src/twocontacts.test.ts, src/fell.test.ts and the terminal tests pass locally. Two checks could not be run:

  • bun scripts/design-lint.ts does not exist in this repository. I ran bun scripts/lint-design.ts instead and it reported nothing, so box 6 is only partly shown.
  • bun x tsc --noEmit cannot run because the repository has no tsconfig.json.

To try it, open /people on the preview, or press P in the terminal. The sample data flags at least one person.

🤖 Generated with Claude Code

Approved

The earlier asks are met: the stray placeholder files are out of the diff (8 files remain), the indentation is fixed, and the page checks p.nudge === null. The rule is pure and takes on as an argument. The page escapes the line. The terminal shows the same line. No contract cell or route changed. I could not view the preview: /people answered 401 to my token, so I judged the code and tests only. Non-blocking: scripts/design-lint.ts does not exist in the repo, and the builder ran scripts/lint-design.ts instead.

commented

Left #223 open: 1 unticked item remain (On /people, a person who owes an open (not done, not waived) date due today or in the next three days, and whose last sent message is more than seven days ago or absent, shows an amber line: "Owes Financing on 1418 Alder Lane in 2 days · nothing sent in 9 days" (or "· nothing sent yet"). Everyone else is unchanged.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs