feat(diagnostics): Help → Report Issue with snapshot-based body - #163
Open
YakiHugo wants to merge 2 commits into
Open
feat(diagnostics): Help → Report Issue with snapshot-based body#163YakiHugo wants to merge 2 commits into
YakiHugo wants to merge 2 commits into
Conversation
Adds a `Help → Report Issue...` menu item that captures a fixed-shape snapshot of app/Electron/Chromium versions, GPU feature status, displays, window visibility, and per-terminal render state, formats it into a markdown body, and opens a pre-filled GitHub `issues/new` URL in the default browser. Falls back to copying the body to the clipboard if the URL exceeds 6000 chars (mirrors VS Code's `MAX_URL_LENGTH` cutoff). The schema is a closed allowlist — enums, booleans, numbers, internal UUIDs, version strings, GPU feature names. Window titles, terminal labels, cwd / worktree paths, and PTY content are excluded by design, not by discipline. The "why snapshot, not ring buffer" decision is documented in the schema file's header for future readers. Logs continue to write to the existing rolling JSONL file; they are not auto-attached. Users who want to share log content paste it manually, matching VS Code's separation of Issue Reporter (snapshot) from `Developer: Show Logs...` (raw logs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Two follow-ups for PR #163 review feedback: - Add a frozen field allowlist test plus a privacy-pattern guard. Adding any field to the snapshot tree now requires deliberately updating the list, and forbidden-shape names (title/label/cwd/path/...) trigger an explicit review of PRIVACY_EXCEPTIONS. - Surface `renderDiagnosticsEnabled` in `RendererSnapshot`. When the rolling event log is disabled, the issue body now says so and points the user at the localStorage / env flag to flip and reproduce — instead of silently linking to an empty file. Default stays opt-in: focus/navigation hot paths can emit several events per shortcut, and we don't have evidence yet that the IPC + disk cost is free under load. Surfacing the state lets bug reporters self-serve. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Help → Report Issue...that captures a fixed-shape diagnostics snapshot and pre-fills a GitHubissues/newURL in the user's browser.MAX_URL_LENGTHcutoff).This is slice 2 of the render-recovery v2 plan. Slice 1 was #162.
Snapshot field allowlist
Reviewable in one place —
shared/diagnostics-snapshot.ts:appgpuFeatureStatusapp.getGPUInfo('basic')displays[]windowrendererterminals[]webglPoolForbidden by design: window titles, terminal labels, cwd / worktree paths, file names, ANSI / PTY content, command lines, URLs the user is visiting. The collectors (
getTerminalDiagnosticSnapshots,getWebGLPoolDiagnosticSnapshot,collectMainSnapshot) only return the shapes above — adding a field requires touching the schema, which is the single audit point.Why snapshot, not breadcrumb / ring buffer
Documented in the header of `shared/diagnostics-snapshot.ts`. Short version: an open event log requires per-event privacy review forever, while a fixed snapshot schema makes "no labels / no paths / no PTY content" a property of the schema, not contributor discipline. Mirrors VS Code's `baseIssueReporterService.ts` (which submits snapshots, not its rotating logs).
Submission tiers
Same shape as VS Code's reporter, minus the GitHub OAuth tier:
Logs are NOT auto-attached
The rolling JSONL log written by PR 1's `render-diagnostics.ts` is referenced by path in the issue body (so reviewers know where to look), but its content is not bundled. Users who want to share it paste it manually. This matches VS Code's separation of Issue Reporter (snapshot) from `Developer: Show Logs...` (raw logs).
Test plan
Out of scope (intentional)
🤖 Generated with Claude Code