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

An outsider's report on a public app answers with a receipt: the issue number as a link and one sentence on what happens next #14132

Merged opened this

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

Merged

The page an outsider lands on after reporting now carries the same received sentence as the API, but no issue number appears on either route. That number can't exist yet, because a report is held until a person accepts it.

Notes

shipped production is serving it deploy 4adf612

opened this

The page an outsider lands on after reporting now carries the same received sentence as the API, but no issue number appears on either route. That number can't exist yet, because a report is held until a person accepts it.

  • Already held on the API: POST …/reports already answered with the report id, a link, the received sentence (REPORT_RECEIVED) and a next-step sentence. test/report-receipt.test.ts already covered the API, plain text and MCP.
  • Not held on the page: the page the outsider lands on after filing said only "Report sent" plus state rows. I added the same REPORT_RECEIVED sentence to src/web/pages/reports.ts, imported from src/actions/report_words.ts so the words are still typed once.
  • Issue number and link: once a person accepts the report, the page links "an issue" (/issues/N), and the API's issue field carries the number from then on. I did not turn a held report into an issue at filing, because that would widen what an outsider can do.
  • The sentence says "A person who maintains this repository will read it", not "the maintainers will see it". It is the existing sentence and I left its wording alone.
  • Next-step sentence: REPORT_NEXT_STEP ("open the url…") is not shown on the page, since the page is that url.
  • Limits: rate limits and same-origin checks are unchanged.
  • Test: I added one to test/report-receipt.test.ts. It files over the API and asserts the link's page and the API's message both carry REPORT_RECEIVED. It would fail without the page change.
  • Checks: tsc and the design lint are clean, and the three report test files pass (14 tests). I did not run the full suite.
  • Commits: the push hook required a "Try:" commit message, so the branch has an extra empty commit that gives one.

To try it, open a public repo's /report page signed out, send one, and read the sentence on the page it lands on.

Closes #14127

4 earlier comments · 2 events
commented

The page an outsider lands on after reporting now carries the same received sentence as the API, but no issue number appears on either route. That number can't exist yet, because a report is held until a person accepts it.

  • Already held on the API: POST …/reports already answered with the report id, a link, the received sentence (REPORT_RECEIVED) and a next-step sentence. test/report-receipt.test.ts already covered the API, plain text and MCP.
  • Not held on the page: the page the outsider lands on after filing said only "Report sent" plus state rows. I added the same REPORT_RECEIVED sentence to src/web/pages/reports.ts, imported from src/actions/report_words.ts so the words are still typed once.
  • Issue number and link: once a person accepts the report, the page links "an issue" (/issues/N), and the API's issue field carries the number from then on. I did not turn a held report into an issue at filing, because that would widen what an outsider can do.
  • The sentence says "A person who maintains this repository will read it", not "the maintainers will see it". It is the existing sentence and I left its wording alone.
  • Next-step sentence: REPORT_NEXT_STEP ("open the url…") is not shown on the page, since the page is that url.
  • Limits: rate limits and same-origin checks are unchanged.
  • Test: I added one to test/report-receipt.test.ts. It files over the API and asserts the link's page and the API's message both carry REPORT_RECEIVED. It would fail without the page change.
  • Checks: tsc and the design lint are clean, and the three report test files pass (14 tests). I did not run the full suite.
  • Commits: the push hook required a "Try:" commit message, so the branch has an extra empty commit that gives one.

To try it, open a public repo's /report page signed out, send one, and read the sentence on the page it lands on.

commented

<!-- look-pages f093e8042a8f --> Look pages for f093e80, from the gate:

  • look pages (none): this pull changes src/web/pages/reports.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

I pushed again with a "No door:" line in a new commit message, instead of adding a terminal change. I haven't seen the forge's check re-run on it yet.

The "both doors" rule wants a matching terminal change or a "No door:" line. The terminal has no screen that shows a signed-out report receipt, so there is nothing for it to mirror. src/tui/screens/report.ts covers a different flow. The edit adds one sentence to the report-sent page. If you'd rather have a terminal mirror than the exemption, that is a separate change.

The same commit message also carries "Looks:" and "No look:" lines for the look-pages notice, which was only a warning and didn't fail the check.

The code and tests are unchanged from the first push, so everything else from that pull description stands.

Changes requested — before the latest push

The page now carries the received sentence, and the test proves page and API match. That is useful, but the issue asks for a receipt with a number and a link, and the page shows neither. Fix first: put the receipt on the sent page the way the issue words it — see the comments. Also: no door was added (a terminal screen or a No door line was argued only in conversation; keep the No door line in the commit), and the sentence differs from the issue wording; decide it with the issue owner rather than silently.

  1. Page (src/web/pages/reports.ts:196): the sentence sits above a State row that says Not read yet. Principle 1/8: it says almost the same thing twice (REPORT_RECEIVED then the State row). Fold them: keep one sentence, drop the duplicate.
  2. The sent page shows no issue number or link while pending. Show the report id as the receipt with the link to this page, as the API does.
  3. Test: assert the page also contains the report id/link, not only the sentence.
commented

The sent page now shows the report id as a linked receipt and says the received sentence once. A person has to decide the open points below with the issue owner. The tests for this change pass, tsc and the design lint are clean, and the new commit is pushed.

  • Page: a new "Receipt" row on the sent page shows the report id, linked to the page itself, as the API does. It appears whenever the id matches a stored report.
  • Duplicate removed: I dropped the standalone sentence above the State row. While a report is unread, State now reads REPORT_RECEIVED in place of "Not read yet. Keep this link and look again." The wording has changed, so I updated the "Not read yet" assertions in test/reports.test.ts and test/report-receipt.test.ts to "Received.". Those two assertions were the only reason for the edit.
  • Issue link: once a person accepts the report, State links "an issue" (/issues/N), as before.
  • Test: the page assertion in test/report-receipt.test.ts now also requires the receipt row with the id and its link. It also requires the received sentence to appear exactly once.
  • No door: the "No door:", "Looks:" and "Try:" lines are in this commit's message, as you asked.

Open for the issue owner:

  • Issue number: at filing there is no issue yet, because reports are held until a person accepts them. The receipt is the report id, and the issue number and link appear only after acceptance. Opening an issue at filing would widen what an outsider can do, so I did not do it.
  • Wording: I kept the existing sentence, "A person who maintains this repository will read it…", rather than "the maintainers will see it". The same sentence is used on both routes. Changing it means editing REPORT_RECEIVED in src/actions/report_words.ts once.
Approved

Earlier asks: the duplicate sentence is gone (State carries REPORT_RECEIVED once), the receipt row is there, and the tests pin both. The page and the API now say the same words, and the new test fails without the page change. Reads fine without JavaScript. Two things I would do next: (1) Non-blocking: the Receipt link points at the page it is on; show the id as plain text or make it a copyable URL, since a screen reader announces a link to the current page as a dead end. (2) Ask the issue owner whether an outsider report should show an issue number at filing. It cannot today, because reports are held until a person accepts them, and the pull rightly does not widen that. The box wording (the maintainers will see it) differs from the existing sentence; that is one edit to REPORT_RECEIVED.

commented

Left #14127 open: 2 unticked items remain (Filing a report as a signed-out or outside visitor answers (page and API) with the issue number, its link and 'the maintainers will see it'.; If this already holds, a test proves it for the page and the API and nothing else changes.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs