feat: add 'Report this error' button to hard-error panels

Summary

  • Adds a "Report this error" button to both hard-error panels in src/main.jsx (the Bootstrap "Couldn't start" recovery and the top-level ErrorBoundary "Something broke"), refactored behind a shared <BootErrorPanel> component.
  • Clicking opens a new <ErrorReportModal/> (src/ui/error-report-modal.jsx) that auto-captures the timestamp, tool version + deploy target, error message + stack, user agent, and current URL, and lets the user add a free-text comment.
  • Two submission routes — neither requires new OAuth scopes (both are user-action window.open() to pre-filled URLs):
    1. Open Phabricator task — Maniphest create-task form with title and description pre-filled, project pinned to tool-upload-workbench.
    2. Post to User talk:Daanvr — Commons edit-section-new form with preloadtitle pre-filled, plus a "Copy text" button (MediaWiki's preload URL param loads a wiki-template page, not a literal string, so the body is copied to the clipboard for the user to paste).

Phabricator

  • T426408 — Add 'Report this error' button to hard-error panels

Test plan

  • Open the preview URL — confirm the app loads normally when there's no error.
  • In the DevTools console, throw an uncaught error (e.g. setTimeout(() => { throw new Error('test'); }, 0) from inside a React render path — or just navigate to a malformed URL the app can't parse) to surface the ErrorBoundary "Something broke" panel.
    • Confirm the new "Report this error" button appears next to Reload.
    • Click it — confirm the modal opens with the timestamp / version / error / URL filled in.
    • Type a comment — confirm the body textarea updates as the comment is typed (until the user hand-edits the body, then it freezes).
    • Click "Open Phabricator task" — confirm a new tab opens to the Maniphest create-task form with the title and description pre-filled.
    • Click "Post to User talk:Daanvr" — confirm a new tab opens to the talk-page edit form, and the report body is on the clipboard (paste anywhere to verify).
    • Click "Copy text" alone — confirm the clipboard receives the body.
    • Click "Cancel" / press Esc — confirm the modal dismisses without doing anything.
  • Confirm the "Couldn't start" panel (Bootstrap failure path) renders the same way — easiest to trigger by setting VITE_OWNER_ACCESS_TOKEN=invalid locally and reloading, or revoking the token mid-session.
  • npm run build passes (including the undefined-identifier scanner).

Generated with Claude Code

Merge request reports

Loading