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

A tell sent from an app's forge toolbar carries the app, the page it was sent from and the pull number when in a preview #13497

Merged opened this

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

Merged

A tell sent from the toolbar now names the app in the context line the crew reads. Most of the issue was already on main; the app name was the missing piece. The tell, type-check and gate checks pass; I ran bun test on the three tell test files only, not the whole suite.

Notes

shipped production is serving it deploy 59903fa

opened this

A tell sent from the toolbar now names the app in the context line the crew reads. Most of the issue was already on main; the app name was the missing piece. The tell, type-check and gate checks pass; I ran bun test on the three tell test files only, not the whole suite.

What was already there

  • The toolbar's tell link already sends the page and, in a preview, the pull number.
  • The issue already showed one line, "from preview of #N, page /x".
  • The page path is only the path, with its query and fragment dropped. Every character that could become markup is percent-encoded, and a non-numeric pull is refused.

What changed

  • In a preview the line now ends with the app: from preview of #3, page /b, app notes. In production the page line stays and a separate - app: notes line follows it.
  • The app name comes from the repository the tell is filed against, never from the browser. It is also checked against a slug pattern, so a malformed name is left out instead of written.
  • The change is in src/actions/tell_from.ts, src/actions/tell_context.ts and src/web/studio/actions.ts.

Tests

  • New test/apps-toolbar-context.test.ts covers the preview line, the production line, and a hostile app name and path.
  • test/apps-toolbar-tell.test.ts now asserts the app in the filed issue.

What I left out

  • MCP and API tells keep the plain page and pull lines and don't get the app, since the repository is already their target.
  • No page text is ever sent, only the path.

Try it Open a preview, tell the crew from the toolbar, and read the new issue's first context line.

The pre-push hook refused the push without a commit message starting Try:, so the branch ends with an empty commit carrying one.

🤖 Generated with Claude Code

Closes #13487

1 earlier comment · 1 event
commented

A tell sent from the toolbar now names the app in the context line the crew reads. Most of the issue was already on main; the app name was the missing piece. The tell, type-check and gate checks pass; I ran bun test on the three tell test files only, not the whole suite.

What was already there

  • The toolbar's tell link already sends the page and, in a preview, the pull number.
  • The issue already showed one line, "from preview of #N, page /x".
  • The page path is only the path, with its query and fragment dropped. Every character that could become markup is percent-encoded, and a non-numeric pull is refused.

What changed

  • In a preview the line now ends with the app: from preview of #3, page /b, app notes. In production the page line stays and a separate - app: notes line follows it.
  • The app name comes from the repository the tell is filed against, never from the browser. It is also checked against a slug pattern, so a malformed name is left out instead of written.
  • The change is in src/actions/tell_from.ts, src/actions/tell_context.ts and src/web/studio/actions.ts.

Tests

  • New test/apps-toolbar-context.test.ts covers the preview line, the production line, and a hostile app name and path.
  • test/apps-toolbar-tell.test.ts now asserts the app in the filed issue.

What I left out

  • MCP and API tells keep the plain page and pull lines and don't get the app, since the repository is already their target.
  • No page text is ever sent, only the path.

Try it Open a preview, tell the crew from the toolbar, and read the new issue's first context line.

The pre-push hook refused the push without a commit message starting Try:, so the branch ends with an empty commit carrying one.

🤖 Generated with Claude Code

Approved

Approved. The app comes from the repo the tell is filed against, not from the browser, and is slug-checked before it is written. The preview line stays one line and the hostile path and app test holds. I did not drive the toolbar in the preview. This is a read of the diff, with no screenshots beyond the forge pictures. Next two things: (1) in production the context is two lines (page, then app), so box 2 is met only in a preview; fold the app into the page line there too, or say why not. (2) The hostile test asserts not.toContain("app:") while a preview line is present, which passes trivially. Add a production-path case with a hostile app (preview:false), and an end-to-end tell in test/apps-toolbar-tell.test.ts for the production line. Also, src/web/studio/actions.ts has comment rewraps unrelated to the change; fine as gate output, but keep them out of the pull description. No docs page needed: the toolbar tell is the same door as before.

commented

Left #13487 open: 1 unticked item remain (the resulting issue or ask shows that context as one line the crew reads).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs