Add sidebar Feedback report flow#2348
Open
areycruzer wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new sidebar “Feedback” entry point that opens an in-place “Report a problem” dialog, generating copy-only (GitHub/Discord/email) drafts with safe diagnostics and client-side redaction in the renderer.
Changes:
- Added
report-problemlibrary to sanitize/redact user text and format copyable drafts, plus diagnostics collection from the renderer bridge. - Added
ReportProblemDialogUI to preview drafts and copy them via the clipboard bridge. - Updated
Sidebarfooter (expanded + collapsed modes) to expose “Feedback” above Settings, and extended sidebar tests to cover the flow.
Reviewed changes
Copilot reviewed 5 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/renderer/lib/report-problem.ts | Implements draft formatting, diagnostics collection, and redaction rules for report text. |
| frontend/src/renderer/lib/report-problem.test.ts | Unit tests for formatting and redaction behavior. |
| frontend/src/renderer/lib/agent-options.ts | Formatting-only adjustment (line numbering/indent). |
| frontend/src/renderer/components/Sidebar.tsx | Adds “Feedback” action in footer and wires dialog open state. |
| frontend/src/renderer/components/Sidebar.test.tsx | Adds integration-style tests for opening/copying redacted drafts. |
| frontend/src/renderer/components/ReportProblemDialog.tsx | New dialog UI for report type + preview-before-copy flow. |
| frontend/src/renderer/components/ProjectSettingsForm.tsx | Formatting-only adjustment (line numbering/indent). |
| frontend/src/renderer/components/ProjectSettingsForm.test.tsx | Formatting-only adjustment (line numbering/indent). |
| frontend/src/renderer/components/CreateProjectAgentSheet.tsx | Formatting-only adjustment (line numbering/indent). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /([?&](?:api[_-]?key|token|secret|password|access[_-]?token|refresh[_-]?token|auth)=)[^&\s)]+/gi; | ||
| const ASSIGNMENT_SECRET_PATTERN = | ||
| /(\b[A-Z0-9_]*(?:API[_-]?KEY|TOKEN|SECRET|PASSWORD|ACCESS[_-]?TOKEN|REFRESH[_-]?TOKEN|AUTH)[A-Z0-9_]*\s*[:=]\s*)(["']?)[^\s"',)]+/gi; | ||
| const BEARER_SECRET_PATTERN = /\b(Bearer\s+)[A-Za-z0-9._~+/-]+/gi; |
Comment on lines
+200
to
+201
| type="button" | ||
| onClick={() => setPreviewOutput(output)} |
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
Refs #2331
Adds a first, copy-first feedback/reporting flow in the sidebar footer:
mailto:compose draft with subject/bodyThis intentionally does not auto-submit anything, upload anything, or collect raw logs, prompts, terminal transcript, repo contents, issue/PR bodies, env vars, crash dumps, or SQLite data. The user still reviews the draft before sending it anywhere.
Follow-ups intentionally left out
Local verification
npm --prefix frontend run typechecknpm --prefix frontend test(41 files, 382 tests)npm --prefix frontend test -- Sidebar.test.tsx report-problem.test.ts(2 files, 18 tests)/tmp/ao-feedback-pr-open:Copy and open GitHub,Copy and open Discord, andCopy and open email/tmp/ao-feedback-pr-open/feedback-dialog-copy-open.png