Skip to content

Add sidebar Feedback report flow#2348

Open
areycruzer wants to merge 4 commits into
mainfrom
feat/sidebar-feedback-report-flow
Open

Add sidebar Feedback report flow#2348
areycruzer wants to merge 4 commits into
mainfrom
feat/sidebar-feedback-report-flow

Conversation

@areycruzer

@areycruzer areycruzer commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Refs #2331

Adds a first, copy-first feedback/reporting flow in the sidebar footer:

  • places a dedicated Feedback action directly above Settings in expanded and collapsed sidebar modes
  • opens an in-place review-before-copy report dialog for bug reports, feature requests, general feedback, and setup questions
  • generates GitHub issue, Discord summary, and email draft text locally in the renderer
  • after a successful clipboard copy, opens the matching destination to reduce reporting friction:
    • GitHub opens a new issue URL with the title/body prefilled
    • Discord opens the project community invite
    • Email opens a mailto: compose draft with subject/body
  • includes safe diagnostics by default: AO version, daemon state, route surface, build mode, platform, and generated timestamp
  • redacts local paths, local URLs, and obvious token/key/password values before preview, clipboard copy, or handoff URL generation

This 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

  • direct upload / send flow
  • JSON or zip diagnostic export
  • raw crash metadata attachment
  • daemon-side diagnostic bundle endpoint
  • richer destination configuration for maintainers

Local verification

  • npm --prefix frontend run typecheck
  • npm --prefix frontend test (41 files, 382 tests)
  • npm --prefix frontend test -- Sidebar.test.tsx report-problem.test.ts (2 files, 18 tests)
  • Real Electron smoke with isolated state under /tmp/ao-feedback-pr-open:
    • Feedback appears above Settings
    • dialog opens in place without route navigation
    • safe diagnostics populate from the app/daemon bridge
    • handoff buttons render as Copy and open GitHub, Copy and open Discord, and Copy and open email
    • smoke screenshot captured locally at /tmp/ao-feedback-pr-open/feedback-dialog-copy-open.png

Copilot AI review requested due to automatic review settings July 2, 2026 13:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-problem library to sanitize/redact user text and format copyable drafts, plus diagnostics collection from the renderer bridge.
  • Added ReportProblemDialog UI to preview drafts and copy them via the clipboard bridge.
  • Updated Sidebar footer (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)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants