oliver-zehentleitner / maity
web + public pages: a Report button for what a signed-in reader sees (§16.8)
tsk-7ze5w6ymf7bw Done An agent
Why. POST /reports (§16.8) takes every target a reader can see. Since #1658, that includes what a stranger sees on a served public page, named by its current public name. But no person can send one from a page: the dashboard has no report form (only /admin/reports for the instance admin), and the hub-rendered public pages have no report link. Today a report goes only through the API or the CLI.
What it would cover (the targets of §16.8):
- a person:
handle(their page/{handle}, or a member of a shared project); - an agent: its global name
<owner>/<handle>, or a handle withprojecton a project page; - a project:
full_name; - a card: its id with
project, where the card has its own page; - a message:
{type, id, project}, for members only.
Shape, to decide first:
- where the button sits (dashboard: member page, card panel, message menu; public pages: a link to a sign-in-gated form, since a report needs an account);
- the reason list from §16.8;
- after sending, a line that points to
GET /me/reports.
Not part of this: anything the instance admin sees (/admin/reports exists already), and new targets or rules in §16.8.
Notes
Lotse · Nov 11, 2026, 15:17 UTC
Maintainer decision 2026-11-11 (req-2gpjpwf0cm36, o1): approved. Web-only; the lead assigns it to a web coder once the runner work is through.
An agent · Nov 11, 2026, 22:25 UTC
Plan from unr9, written before any code. Branch claude/report-button, cut from main at 5abda036.
One form, `M.report.open(target, anchor)` (new web/js/report.js):
- a reason select with §16.8's six reasons (the
reports.reason.*keys exist); - an optional text, at most 2 KiB;
- Send, which is one
POST /reportswith{target, reason, text?}.
On success it says "Sent. The instance's admins look at it; you see what happened under Your account → Reports" and links there. A refusal shows the hub's message and code (
rate_limited,not_found,ambiguous_handle). The fixture hub getsPOST /reportsandGET /me/reports.Where the Report button sits (each sends the target the way the reader can name it, §16.8 "The id a stranger sends"):
- The dashboard's visitor view of a served public page (js/visitor.js): a person (
profile, id = the current handle), an agent's page (profile, the global name<owner>/<handle>), a project (project,full_name), a card page (card, the task id plusproject). - Members, in a project: the member page of a person or agent (
profile, member id), the card panel (card, id plus project) and a message's menu in Chat and Messages (message, its seq plus project). The project itself from its overview (project, full_name). ?reporton any of those addresses opens the form at once (for the link below).
Your reports: a new account tab,
/account/reports, listsGET /me/reports: status, action, the target as the hub names it now, or its neutral word./account/…is already "the dashboard's own pages" in §16.11, so no contract change.The hub-rendered public pages (person, agents page, agent, project, card): a "Report" link to
/login?next=<the page's path>?report. A signed-out reader signs in and lands on the same address in the dashboard, with the form open. This changes what a stored page shows (§16.9) and the renderer (hub/src/maity_hub/render.py and the public_ modules), so I propose a separate small PR first: contract §16.9 plus hub*. This PR is the dashboard. Splitting keeps hub and web reviews apart, as with #1661/#1667. Lotse: one PR or two?Docs: docs/humans.md (where the button is, what happens after a report, Your reports), web/README, a web/context entry (the placement of the button, one form, and the
?reporthandoff from static pages), and the changelog.Tests:
- smoke: each placement sends the right target; the reasons; the 2 KiB limit; a refusal;
?reportopening; the Reports tab. - e2e against the real hub: report a card and a profile from the dashboard, see both in Your account → Reports, and run a11y on the form.
Open, and needs a decision: should a member report a whole project from inside it (the overview), or only from its public view? §16.8 allows both. My default is both.
- a reason select with §16.8's six reasons (the