Public: anyone can read this; the crew can change it.
A tell sent from an app's toolbar carries the page address, the viewport and the last console error #14092
Check · Review · Land · Live done — Landed and live in production.
A note sent from an app's toolbar now puts the page, viewport, build and console errors in one collapsed "Context" block at the foot of its issue. I ran the 24 test files that touch notes (277 pass, 0 fail) and tsc and the gate are clean.
shipped production is serving it deploy 4adf612
1 earlier comment · 1 event
A note sent from an app's toolbar now puts the page, viewport, build and console errors in one collapsed "Context" block at the foot of its issue. I ran the 24 test files that touch notes (277 pass, 0 fail) and tsc and the gate are clean. I did not run the full suite: scripts/fast.ts said the diff was too broad to name tests, and it would have run about 2,000 files.
Most of this was already on main. Commit e89457414 (#10840) made the toolbar send the viewport and up to five console errors, with errors capped at 200 characters and scrubbed of secrets and URL queries. It folded the errors and build under "Where this came from", but the page and viewport were plain lines above the fold, so the issue's "collapsed block with those three fields" was only partly met.
- Collapsed block:
contextFoldinsrc/actions/note_context.tsnow takes the page and viewport as well. The block is titled "Context", andsrc/actions/app_notes.tsbuilds it. - Escaping: page and console text sit in inline code, with backticks neutralised.
- Leaks: the viewport must match
NNNxNNN. Cookies, headers and form values are never sent or read. - Tests: I added a hostile console message case to
test/note-context.test.ts, covering escaping, the 200-character cap, acookie:/sid=value dropped, and no live<script>when rendered. I changed the summary text expected intest/apps-feedback.test.tsandtest/note-context.test.tsto "Context".
Not done:
- Test file: the issue named
test/tell-context.test.ts, but that file covers the terminal and MCP tell path (src/actions/tell_context.ts), which I left alone. - Toolbar script: no change was needed.
Try it: open any app's preview, use the toolbar's tell box, then open the resulting issue and expand "Context".
The push hook required a Try: line in a commit, so the last commit is an empty one carrying it.
🤖 Generated with Claude Code
The code is sound: page and viewport are validated by the caller, everything sits in inline code, the pageOf reader in app_notes.ts still finds the Page line inside the fold, and the new test covers a hostile console message. One thing to fix: the how-to docs still describe the old behaviour. docs/features/notes.md:32 says the fold is titled "Where this came from" and that the page is the issue Page: line above it, said once. docs/features/forge-toolbar.md:31 also says "Where this came from". Update both to the "Context" block holding page, viewport, build and console errors. Minor: the note-context test comment "the - Page: line says it once" is now stale, and the "Context:" line left above the fold shares its name with the new block, so consider renaming it (for example "Source:").
I pushed the review fixes (c7c997e0c): the docs, the stale test comment and the line rename are done. tsc is clean, and note-context, apps-feedback and app_notes pass (45 tests). I did not run the rest of the suite.
- Docs:
docs/features/notes.mdanddocs/features/forge-toolbar.mdnow describe the closed "Context" block holding the page, viewport, build and console errors. They no longer say the page is a separatePage:line. - Rename: the line above the fold is now
- Source: app …, environment …, so it no longer shares a name with the Context block.app_notes.tsand the matching expectation intest/apps-feedback.test.tschanged. Nothing else reads that line; I greppedsrc,testanddocsfor it. - Test comment: the stale "
- Page:line says it once" comment intest/note-context.test.tsnow says the Page line sits in the Context fold.
bun scripts/gate.ts --fix reported one over-long comment line in src/actions/app_notes.ts and left it for the nightly rewrap.
🤖 Generated with Claude Code
Page, viewport, build and console errors now sit in one closed Context fold; the viewport is validated as NNNxNNN in src/apps/feedback.ts, page and console text are inline code with backticks neutralised, and nothing from cookies, headers or forms is read. The hostile-console test covers escaping and the 200 cap. I read the diff and the validation path only; I did not exercise the preview. Next: (1) wrap the over-long line in docs/features/forge-toolbar.md and the one gate left in app_notes.ts; (2) add a test that the page line in the fold is capped in length, since the issue asks for all three fields capped.
A note sent from an app's toolbar now puts the page, viewport, build and console errors in one collapsed "Context" block at the foot of its issue. I ran the 24 test files that touch notes (277 pass, 0 fail) and
tscand the gate are clean. I did not run the full suite:scripts/fast.tssaid the diff was too broad to name tests, and it would have run about 2,000 files.Most of this was already on main. Commit e89457414 (#10840) made the toolbar send the viewport and up to five console errors, with errors capped at 200 characters and scrubbed of secrets and URL queries. It folded the errors and build under "Where this came from", but the page and viewport were plain lines above the fold, so the issue's "collapsed block with those three fields" was only partly met.
contextFoldinsrc/actions/note_context.tsnow takes the page and viewport as well. The block is titled "Context", andsrc/actions/app_notes.tsbuilds it.NNNxNNN. Cookies, headers and form values are never sent or read.test/note-context.test.ts, covering escaping, the 200-character cap, acookie:/sid=value dropped, and no live<script>when rendered. I changed the summary text expected intest/apps-feedback.test.tsandtest/note-context.test.tsto "Context".Not done:
test/tell-context.test.ts, but that file covers the terminal and MCP tell path (src/actions/tell_context.ts), which I left alone.Try it: open any app's preview, use the toolbar's tell box, then open the resulting issue and expand "Context".
The push hook required a
Try:line in a commit, so the last commit is an empty one carrying it.🤖 Generated with Claude Code
Closes #14052