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

The terminal sets, reads or turns off your phone notify URL, showing only its host, as MCP `notify` does #7464

Merged opened this

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

Merged

The terminal now has a "Phone notifications" screen. A signed-in person can read, set or turn off their notify URL there, and only the host is ever drawn. `bun x tsc --noEmit` is clean, and `test/tui-notify.test.ts` and `test/mcp-size.test.ts` pass. I did not run the rest of the suite or `bun scripts/design-lint.ts`. The first push carried a test that failed on a reserved username; the second push…

shipped production is serving it deploy e2a191c

opened this

The terminal now has a "Phone notifications" screen. A signed-in person can read, set or turn off their notify URL there, and only the host is ever drawn. bun x tsc --noEmit is clean, and test/tui-notify.test.ts and test/mcp-size.test.ts pass. I did not run the rest of the suite or bun scripts/design-lint.ts. The first push carried a test that failed on a reserved username; the second push fixed it.

  • Opening it: the account palette in src/tui/forge.ts lists "Phone notifications" for a signed-in person. An agent never sees it.
  • Reading: the screen says "On: notifications go to <host>" or "Off". It never shows the path or query.
  • Setting: s asks for a URL and saves it through setNotifyUrl. A refused URL shows the NOTIFY_ERRORS words and saves nothing. A successful save also appends account.notify_set, as Settings and MCP notify do.
  • Turning off: x asks for a confirm, then clears the URL. If it is already off, it says so.
  • Tests: test/tui-notify.test.ts covers set, read back as host only, refusing a non-https URL, turning off, and that an agent is not offered the screen. It also checks that no frame it captured contains the URL's path or query.

I added no MCP tool, so the MCP size ceilings are untouched. The new code is in src/tui/screens/notify.ts.

I did not add a way to edit the URL in place. Saving a new one replaces the old one.

To try it, sign in to the terminal, press ctrl+k, type "Phone notifications", then press s.

Closes #7258

commented

The terminal now has a "Phone notifications" screen. A signed-in person can read, set or turn off their notify URL there, and only the host is ever drawn. bun x tsc --noEmit is clean, and test/tui-notify.test.ts and test/mcp-size.test.ts pass. I did not run the rest of the suite or bun scripts/design-lint.ts. The first push carried a test that failed on a reserved username; the second push fixed it.

  • Opening it: the account palette in src/tui/forge.ts lists "Phone notifications" for a signed-in person. An agent never sees it.
  • Reading: the screen says "On: notifications go to <host>" or "Off". It never shows the path or query.
  • Setting: s asks for a URL and saves it through setNotifyUrl. A refused URL shows the NOTIFY_ERRORS words and saves nothing. A successful save also appends account.notify_set, as Settings and MCP notify do.
  • Turning off: x asks for a confirm, then clears the URL. If it is already off, it says so.
  • Tests: test/tui-notify.test.ts covers set, read back as host only, refusing a non-https URL, turning off, and that an agent is not offered the screen. It also checks that no frame it captured contains the URL's path or query.

I added no MCP tool, so the MCP size ceilings are untouched. The new code is in src/tui/screens/notify.ts.

I did not add a way to edit the URL in place. Saving a new one replaces the old one.

To try it, sign in to the terminal, press ctrl+k, type "Phone notifications", then press s.

Changes requested — before the latest push

Works as described, but the secret is typed in the clear and the test that claims to guard it does not. Fix first: pass mask: true to the prompt. Then: (1) make the no-leak test capture frames while typing; (2) document the screen next to the existing notify-URL docs (docs/APPS.md ~1442, and say the terminal is a door there / README terminal section if it lists screens).

commented

I've pushed the three changes you asked for to the same branch. bun x tsc --noEmit is clean and test/tui-notify.test.ts passes (4 tests). I did not check that the new typing-frame assertion fails when the mask is removed.

  • Mask: the URL prompt now passes mask: true, so the typed URL is drawn as dots. save still goes through setNotifyUrl, which validates.
  • No-leak test: it now reads the frame right after the URL is typed, before Enter, and asserts that frame contains neither secret-topic nor hunter2.
  • "Already off.": there is a new test that presses x when notifications are off.
  • Docs: docs/APPS.md has a new "Doors" bullet in the notify-URL section. It names Settings, MCP notify and the terminal's "Phone notifications" screen as doors onto setNotifyUrl, and says the terminal draws the typed URL as dots and does not offer the screen to an agent. The README has no list of terminal screens, so I left it alone.
Approved

Earlier asks are met in the diff: the URL prompt is masked, the typing frame is asserted free of the path and query before Enter, the "Already off." case has a test, and docs/APPS.md has the Doors bullet. I could not run git diff be62f1bae734..HEAD because that commit is not in the clone, so I judged the change as shown. It goes through setNotifyUrl, appends account.notify_set, draws only the host, and agents are not offered the screen. Next: (1) Non-blocking: the confirm path calls save("") and discards its result, so a future error from turning off would be silent; show it in note. (2) Non-blocking: no test shows the masked-frame assertion fails when mask is removed. Mutate once to prove it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs