Skip to content

[Agent Chat feedback] - Step 5: Report an error from the chat's More menu - #3616

Merged
zeroliu merged 5 commits into
masterfrom
zeroliu/chat-report-error
Oct 15, 2026
Merged

zeroliu merged 5 commits into
masterfrom
zeroliu/chat-report-error

Conversation

@zeroliu

@zeroliu zeroliu commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Relates to Brevilabs/obsidian-copilot-private#672

Why

When something goes wrong in an Agent Chat, a user who wants to tell us has two paths today. One is the feedback card, which appears only if the agent decides to raise it. The other is Settings → Advanced → Debugging & support → Report an issue, which means leaving the chat, finding the button, and writing up from memory which agent, model, and chat it was. Most users see the problem in the chat and give up before reaching Settings. The chat already has a More Actions (⋯) menu above the composer, so that is where a report should start.

What

More Actions gains a Report error item. It opens the same Report an issue dialog, set up for the chat it came from:

Settings → Report an issue More Actions → Report error
Description Empty Blank first line for the user, then Evidence: backend … · model … · session … · <time>
OpenCode backend log Unticked Ticked

The item appears once the chat has a message, since the More Actions bar is part of the conversation view; it stays available when the reply fails. Upload, redaction, and the report ID flow are unchanged.

Non goal

  • A second upload or storage pipeline; reports land where Report an issue reports land.
  • Sending anything before the user presses Upload & open issue.
  • A Report error entry in legacy Copilot Chat.
  • Attaching the chat's messages to the report; the session ID in the Evidence line finds them in the activity log.
  • Reporting a chat that has no message yet, such as a backend that fails to start; that belongs on the session error banner.

Screenshot

Before After
More Actions menu without Report error More Actions menu with Report error

Choosing Report error opens the dialog prefilled for this chat:

Report an issue opened from the chat menu

Risk

Medium

Criterion Status Reason
No behavior change, or a cosmetic/copy/docs/config change visible where it renders, or deterministic tests cover the changed behavior ❌ AgentChatControls, getReportEvidence and formatChatReportNote tests cover the menu item, the evidence and the note, but the click handler that opens the dialog from the chat cannot be covered by an automated test because AgentHome needs a live Obsidian workspace and agent session
A defect would fail CI or be obvious on first use ✅ A broken handler shows the first time anyone picks Report error
A revert fully restores prior state, including persisted data ✅ Nothing is persisted
No auth, permissions, secrets, or input-handling surface changes ✅ Reuses the existing report dialog and its redaction
No public API, plugin API, message, or on-disk contract changes ✅ Report bundle format is unchanged
No core-path concurrency, async-lifecycle, or state-machine changes ✅ A synchronous menu handler that opens a modal
No hot-path behavior lacks deterministic coverage ✅ Not on a hot path
No new dependency ✅ Dependency manifests are unchanged
Human-only behavior stays in one feature area and surfaces quickly ✅ Confined to the chat's More Actions menu and the report dialog

Review: read handleReportError in src/agentMode/ui/AgentHome.tsx and getReportEvidence in src/agentMode/session/AgentSession.ts, then run Verification steps 2-3.

Verification

  1. Install this build in a test vault with Agent Chat set up.
  2. Open an Agent Chat with a few messages, select More Actions (⋯) above the composer, and choose Report error. Report an issue opens without Settings. The description's first line is empty, followed by an Evidence: line naming this chat's agent, model, and session. Every attachment is ticked.
  3. Press Prepare report. The bundled screenshot shows the Obsidian window with this chat, not the dialog. Press Cancel; nothing is uploaded.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
obsidian-copilot-docs Ignored Ignored Oct 15, 2026 5:41pm UTC

Request Review

@zeroliu

zeroliu commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T17:41:38.221545Z 02905d1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8806c77669

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agentMode/session/feedback/feedbackOffer.ts
: undefined
}
onSetChatBookmarked={handleSetActiveChatBookmarked}
onReportError={handleReportError}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Expose Report error on the empty-chat landing

When the active session has no user-visible messages, isLanding is true and AgentHome skips AgentChatControls entirely, so this callback is not reachable until after the first message. That breaks the newly specified “even before any message” behavior and prevents reporting startup or empty-session failures from the chat menu; the current component test misses this because it renders the controls directly rather than through AgentHome. Render a reachable report action for the landing state as well.

AGENTS.md reference: AGENTS.md:L27-L27

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not changing this; it's intentional. Report error belongs to a chat that has messages, which is when the More Actions bar appears. A backend that fails before the first message shows the session error card at the top of the chat view, and that card should get its own report action. The test name and PR description no longer claim the item works before a message (02905d1).

Save chat as note
</DropdownMenuItem>
)}
{onReportError && (

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add issue provenance to the new report branch

This new conditional rendering branch and its corresponding it("reports an error…") case carry no originating GitHub issue URL. That leaves the reason and intended lifetime of the branch untraceable and violates the repository's landing requirement for every new behavioral branch; add the full issue URL to both a nearby why-comment and the test description.

AGENTS.md reference: AGENTS.md:L28-L28

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in b19fe31: the guard has a why-comment linking https://github.com/Brevilabs/obsidian-copilot-private/issues/672, and the test name carries the same URL.

@zeroliu
zeroliu force-pushed the zeroliu/loopback-server-helper branch from b823c86 to c078242 Compare October 14, 2026 21:50
@zeroliu
zeroliu force-pushed the zeroliu/chat-report-error branch 2 times, most recently from 46c1833 to f64e6d3 Compare October 14, 2026 22:11
@zeroliu
zeroliu force-pushed the zeroliu/loopback-server-helper branch 2 times, most recently from ae48e14 to 6064e81 Compare October 15, 2026 04:50
@zeroliu
zeroliu force-pushed the zeroliu/chat-report-error branch from f64e6d3 to 7c2c3bc Compare October 15, 2026 04:50
@zeroliu
zeroliu force-pushed the zeroliu/loopback-server-helper branch from e49660e to 2136f06 Compare October 15, 2026 16:22
An error occurred while trying to automatically change base from zeroliu/loopback-server-helper to zeroliu/grill-issue-672 October 15, 2026 16:41
@zeroliu
zeroliu added this pull request to stack #3624 October 15, 2026 16:42
zeroliu and others added 3 commits October 15, 2026 09:42
Report error opens Report an issue for the open chat without going
through Settings: it screenshots that chat's pane, ticks every
attachment, and ends the description with the chat's backend, model and
session. The evidence line now comes from one session helper shared
with the feedback card.

Relates to Brevilabs/obsidian-copilot-private#672

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeroliu
zeroliu force-pushed the zeroliu/chat-report-error branch from 7c2c3bc to 846cace Compare October 15, 2026 16:44
@github-actions github-actions Bot added size/XL and removed size/S labels Oct 15, 2026
@zeroliu zeroliu closed this Oct 15, 2026
@zeroliu
zeroliu removed this pull request from stack #3624 October 15, 2026 17:15
@zeroliu zeroliu reopened this Oct 15, 2026
@zeroliu
zeroliu changed the base branch from zeroliu/loopback-server-helper to master October 15, 2026 17:19
@github-actions github-actions Bot added size/S and removed size/XL labels Oct 15, 2026
The More Actions bar appears only once a chat has a message, so the
item is never reachable before one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeroliu
zeroliu marked this pull request as ready for review October 15, 2026 17:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeroliu
zeroliu merged commit 47c9a61 into master Oct 15, 2026
18 checks passed
@zeroliu
zeroliu deleted the zeroliu/chat-report-error branch October 15, 2026 17:52
@zeroliu zeroliu mentioned this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant