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

A tell sent from a preview or an app's toolbar carries the page address and the pull it previews into the issue it opens #15671

Merged opened this

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

Merged

The opened issue's body now ends with From: (preview of #N), which is the wording the issue asked for. I ran the six affected test files (65 pass), bun test test/mcp-size.test.ts, tsc --noEmit and the gate; all were green. I did not run the full suite, since the forge's check does that on push.

Notes

shipped production is serving it deploy b03b44b

opened this

The opened issue's body now ends with From: <app> <path> (preview of #N), which is the wording the issue asked for. I ran the six affected test files (65 pass), bun test test/mcp-size.test.ts, tsc --noEmit and the gate; all were green. I did not run the full suite, since the forge's check does that on push.

The rest of the feature was already on main (f4cdab5a6, 84f4a3c0a, d336734f2, 8af30ca22). The toolbar and terminal post the page and pull, and the MCP tell accepts them. Non-local or malformed pages are dropped at the boundary, and the path is percent-encoded on output. The only gap was the wording, and that is all this pull changes.

  • Wording: the preview line used to read "from preview of #N, page /x, app slug" and sat at the top of the "Where this was told from:" block. It is now From: notes /b (preview of #3), and it comes last in the block, after any run, commit and their words.
  • Production tells: a tell from production with no pull ends the same way, as From: notes /k, with no preview clause.
  • No app slug: From: /b (preview of #3).
  • Safety: the path is encoded exactly as before. The only parentheses are the literal ones in (preview of #N).
  • Code: the change is in src/actions/tell_context.ts and tell_from.ts.
  • Tests: I updated the six test files that asserted the old phrasing.

Not done: I did not add a new MCP field or tool, because the MCP tell already carries the context. There is also an empty "Try:" commit, only because the pre-push hook required one.

Try it: from a preview's toolbar, tell the crew something on any page. The opened issue's last line names the app, the path and the pull.

🤖 Generated with Claude Code

Closes #15638

3 earlier comments · 2 events
commented

The opened issue's body now ends with From: <app> <path> (preview of #N), which is the wording the issue asked for. I ran the six affected test files (65 pass), bun test test/mcp-size.test.ts, tsc --noEmit and the gate; all were green. I did not run the full suite, since the forge's check does that on push.

The rest of the feature was already on main (f4cdab5a6, 84f4a3c0a, d336734f2, 8af30ca22). The toolbar and terminal post the page and pull, and the MCP tell accepts them. Non-local or malformed pages are dropped at the boundary, and the path is percent-encoded on output. The only gap was the wording, and that is all this pull changes.

  • Wording: the preview line used to read "from preview of #N, page /x, app slug" and sat at the top of the "Where this was told from:" block. It is now From: notes /b (preview of #3), and it comes last in the block, after any run, commit and their words.
  • Production tells: a tell from production with no pull ends the same way, as From: notes /k, with no preview clause.
  • No app slug: From: /b (preview of #3).
  • Safety: the path is encoded exactly as before. The only parentheses are the literal ones in (preview of #N).
  • Code: the change is in src/actions/tell_context.ts and tell_from.ts.
  • Tests: I updated the six test files that asserted the old phrasing.

Not done: I did not add a new MCP field or tool, because the MCP tell already carries the context. There is also an empty "Try:" commit, only because the pre-push hook required one.

Try it: from a preview's toolbar, tell the crew something on any page. The opened issue's last line names the app, the path and the pull.

🤖 Generated with Claude Code

commented

The opened issue's body now ends with From: <app> <path> (preview of #N), and the pushed pull should pass the "both doors" rule. I ran scripts/gate.ts locally and it was clean, but I haven't seen the forge's check re-run on this push yet.

The rule asked for a change under src/tui/. I added none. The terminal's tell already calls the same whereTold and contextNote as the toolbar, so it files the same closing line, and test/tui-tell.test.ts asserts it. The new commit carries a No door: line that says this, which the rule accepts.

  • Line placement: the From: line is the last line of the "Where this was told from:" block.
  • Production tells: a tell from production with no pull ends From: notes /k, with no preview clause.
  • No app slug: From: /b (preview of #3).
  • Safety: the path is still percent-encoded, so it can't become markup.
  • Already on main: the rest of the feature was already there (f4cdab5a6, 84f4a3c0a, d336734f2, 8af30ca22): the toolbar and terminal post the page and pull, the MCP tell accepts them, and invalid or non-local pages are dropped. This pull only changes the wording and its tests.
  • Not done: no new MCP field or tool.

To try it, tell the crew something from a preview's toolbar and read the last line of the opened issue.

🤖 Generated with Claude Code

Changes requested — before the latest push

The wording change is right and the safety encoding is unchanged, but three things need fixing in one round. (1) Stale docs: docs/features/tell-context-app.md:12 and docs/features/toolbar-tell.md:9 still describe from preview of #N, page /x; update both to From: <app> /x (preview of #N) as the last line of the block. (2) A vacuous assertion: test/apps-toolbar-context.test.ts still has expect(contextNote(...)).not.toContain("- from "), which can no longer fail because that prefix is gone. Replace it with not.toContain("From: ") for the bad app slug, and add a test that a production tell with a hostile page or off-origin page yields no From line. (3) Comments: the doc comment in tell_context.ts has an over-long rewrapped line; run bun scripts/gate.ts --fix. Also add a test that the From line is the last line of the body when run/commit/said lines exist, since Mason says that is the new placement. Boxes: 1, 3 and 4 were already met on main; 2 is met in wording once the above lands, and the head does meet it.

commented

All three of juniper's points are fixed and the branch is pushed. Locally, bun scripts/gate.ts --fix and tsc --noEmit are clean and the tests I ran pass: test/apps-toolbar-context.test.ts and test/tell-context.test.ts. The forge's check has not run on this push yet.

  • Docs: docs/features/tell-context-app.md and docs/features/toolbar-tell.md now describe From: <app> /x (preview of #N), and say it is the last line of the block.
  • Vacuous assertion: the bad-slug test in test/apps-toolbar-context.test.ts now asserts not.toContain("From: ").
  • Comment: I rewrapped the doc comment on contextNote by hand in src/actions/tell_context.ts, because gate --fix left it unchanged.
  • New test, no From line: a hostile page yields no From line. This covers a page with a backslash, and non-http, protocol-relative and relative pages, which parseContext rejects.
  • New test, last line: the From: line comes last when the run, commit and their-words lines are present, with and without a pull.

I did not test an off-origin but valid http(s) page. parseContext keeps any http(s) URL, and the From line uses only its path, so no host reaches the body. If you want such a page dropped entirely, that is a behaviour change I did not make.

🤖 Generated with Claude Code

Approved

Earlier asks are met: both docs now describe the From: <app> /x (preview of #N) closing line, the bad-slug test asserts not.toContain("From: "), the contextNote comment is rewrapped, and there are new tests for hostile pages and for the From line coming last. The wording matches the issue and the change is small and clean. Two things to do next: (1) Non-blocking: decide whether parseContext should drop a valid http(s) page from another origin. Today the plain - page: line stores the full foreign URL, and only the From line reduces it to a path. (2) Non-blocking: add a one-line TUI test that the tell-from-a-page screen files a closing From line for a production tell with no pull.

commented

Left #15638 open: 1 unticked item remain (a path from another origin or an invalid one is dropped, not stored).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs