Public: anyone can read this; the crew can change it.
People can be narrowed by typing a name, phone or address, like the clock's Find #249
Check · Review · Land · Live done — Landed and live in production.
/people now takes a q and keeps only the people it matches. The new tests and src/speed.test.ts pass, but I did not run bun x tsc --noEmit or bun scripts/gate.ts. tsc printed its usage text instead of checking, and there is no scripts/gate.ts in this clone.
shipped production is serving it deploy d2eada7
1 earlier comment · 1 event
/people now takes a q and keeps only the people it matches. The new tests and src/speed.test.ts pass, but I did not run bun x tsc --noEmit or bun scripts/gate.ts. tsc printed its usage text instead of checking, and there is no scripts/gate.ts in this clone. scripts/lint-design.ts ran with no output, and I left src/web/ alone.
What changed
- Filter:
narrowPeopleinsrc/people.tskeeps people whose name, email, phone, contact or an owed address contains the query, case-insensitively. An empty query keeps everyone. - Nudge flags: they are computed before the filter runs, so they are unchanged.
- Matching: the route uses
query()andFIND_REFUSALfromsrc/find.ts, so the 100-character limit and the control-character rule are the same as the clock's Find. A query that breaks either rule gets a 400 page; any other characters just match nothing. - Page:
src/pages/people.tshas a plain GET "Find a person" form, filled in with the query and escaped, no JavaScript. With no matches it says "No one matches “…”" and links to/peopleto clear. - README: tour step 9 now mentions the box.
- Tests:
src/people.test.tscovers the matching across name, email, address, case and padding, untouched nudge flags, and the page's form, escaping and clear link. These fail without the change.
I did not touch contract.json, and the API and MCP people lists are unfiltered.
To try: open /people?q=priya, then follow Clear.
🤖 Generated with Claude Code
Web side is sound: q goes through the shared query()/FIND_REFUSAL (100 chars, no control chars), output is escaped, the form is a plain GET, no contract cell touched. Changes needed:
- FIRST: the terminal door lacks it. src/terminal.ts handles
/find only for dates, week and reminders (line ~636,view === "dates" || ...); the People view (P) cannot be narrowed. What a person does on the page they must be able to do in the terminal. Extend the/handler to the people view, apply narrowPeople topeople(listed.value, day)(~line 820), show the 'Finding “…”' line, and add a terminal.test.ts case. Update the README step 9 to say '/ in the terminal'. - Dead parameter: peoplePage takes
totaland routes.ts passes it, but nothing reads it. Remove it (or use it, e.g. 'x of y'). - README step 9: the added sentences are on very long lines; rewrap like the surrounding text.
- No test covers the route: add one asserting /people?q=priya returns only matches and an over-long or control-character q returns 400 (box 3, 'never errors' / limited). Currently only narrowPeople and the page renderer are tested.
I could not view the preview (it answered 401 to my token), so the page was judged from the diff.
I've addressed all four review points and pushed them to the same branch.
- Terminal People view:
/now works in the People view (press P, then/). It uses the same find state as the other views. The prompt reads "Find a person (name, phone, email or address; enter alone clears)". The "Finding “…”" line shows while a find is active, and a find with no match prints "No one matches “…”." The newterminal.test.tscase narrows the list, checks the no-match line, and checks that/then enter clears it. As with deals, the find text is shared, so a find typed in People also narrows the dates, week and reminders views. - Dead parameter: I removed
totalfrompeoplePageand from the call inroutes.ts. - README step 9: I rewrapped it like the surrounding text and added the terminal
/for People. - Route test:
src/peopleroute.test.tsasserts that/people?q=priyareturns only matching people and fewer than the full list. It also asserts that a 101-characterqand aqcontaining a control character both return 400.
Tests: bun test on peopleroute, terminal, people and partycontact passes (69 tests).
bun scripts/gate.ts doesn't exist in this clone, so I didn't run it. bun x tsc --noEmit can't run either, because the repo has no tsconfig.json; it just prints the help text.
I didn't change any contract cell.
Earlier asks are met: the terminal People view has / find with the same gating as the page, the dead total parameter is gone, README step 9 is rewrapped and mentions the terminal, and src/peopleroute.test.ts covers the route. q goes through query()/FIND_REFUSAL (100 characters, no control characters) and is escaped. No contract cell is touched. I could not read the preview itself because it answers 401 without a signed identity, so I judged from the diff and tests. Non-blocking: the find text is shared across terminal views, so a person search also narrows dates, week and reminders.
/peoplenow takes aqand keeps only the people it matches. The new tests andsrc/speed.test.tspass, but I did not runbun x tsc --noEmitorbun scripts/gate.ts.tscprinted its usage text instead of checking, and there is noscripts/gate.tsin this clone.scripts/lint-design.tsran with no output, and I leftsrc/web/alone.What changed
narrowPeopleinsrc/people.tskeeps people whose name, email, phone, contact or an owed address contains the query, case-insensitively. An empty query keeps everyone.query()andFIND_REFUSALfromsrc/find.ts, so the 100-character limit and the control-character rule are the same as the clock's Find. A query that breaks either rule gets a 400 page; any other characters just match nothing.src/pages/people.tshas a plain GET "Find a person" form, filled in with the query and escaped, no JavaScript. With no matches it says "No one matches “…”" and links to/peopleto clear.src/people.test.tscovers the matching across name, email, address, case and padding, untouched nudge flags, and the page's form, escaping and clear link. These fail without the change.I did not touch
contract.json, and the API and MCP people lists are unfiltered.To try: open
/people?q=priya, then follow Clear.🤖 Generated with Claude Code
Closes #247