logancyang_obsidian-copilot/docs
Logan Yang f75c2ebbee
feat(agent-mode): one-click "Report an Issue" flow with screenshot + frame log (#2614)
* feat(agent-mode): one-click "Report an Issue" flow with screenshot + frame log

Reporting an Agent Mode bug was high-friction: the diagnostic frame log
defaulted off (so it usually wasn't capturing when a problem hit), and there
was no in-product path to assemble a report.

- Default `agentMode.debugFullFrames` to ON for new installs so the frame log
  is already capturing when a bug occurs. The existing sanitize migration
  preserves an explicit prior choice (a user who turned it off stays off).
- Add a "Report an Issue" button to the Agent Mode control bar. It opens a
  modal for a note, captures a screenshot of the chat surface (Electron
  capturePage, popout-aware, degrades gracefully), bundles it with the current
  frame log into a timestamped folder, reveals the folder, and opens a
  prefilled GitHub issue.
- Optionally include the OpenCode log when that backend is active, and show an
  in-flow privacy disclosure shown only when the user chooses to share.

Desktop-only; mobile and capture failures degrade to a report without a
screenshot. Adds unit tests for the new default, the preserve-explicit-choice
migration, the bundle assembler, and the opencode-log locator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): make opencode log attachment opt-in by default

The Report-issue flow bundles opencode's newest *global* log, which may
belong to an unrelated CLI/Desktop session for another project. Defaulting
the checkbox to checked could silently attach that log, exposing unrelated
prompts and tool output. Default it to unchecked so the user opts in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): cap report issue URL length and document the flow

- buildReportIssueUrl: truncate the prefilled body so the assembled URL
  stays under Electron's ~2081-char openExternal limit on Windows. Without
  this, a long note made openExternal reject silently while the success
  notice still claimed the issue page opened. The full report is preserved
  in report.md on disk, and the truncated body points the user there.
- Document the Report an Issue flow (bundle contents, drag-drop attach,
  privacy note, opt-in OpenCode log) in docs/agent-mode-and-tools.md per
  DOCS_GUIDE.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): skip frame log in report when logging is disabled

If a user turns off "Log Full Agent Mode Frames" but a stale
acp-frames.ndjson still exists in the temp dir, the report assembler would
copy that old file into the bundle, leaking plaintext prompts/tool output
despite logging being opted out. Only bundle the frame log when
debugFullFrames is currently enabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): file reports to public repo; clarify report UX and settings

Addresses review feedback on the Report an Issue flow:

- File user reports to the PUBLIC logancyang/obsidian-copilot repo (label
  "bug"), never the private preview repo, which users can't see.
- Report modal: state plainly that the screenshot is of the Agent Mode chat
  pane (not the whole screen), spell out what "Prepare report" does (save
  files to a folder, open it, open a prefilled GitHub issue to attach them),
  and replace the obscure muted disclaimer with a prominent warning callout.
- Advanced settings: split Agent Mode logging into its own "Agent Mode
  debugging" section with plain-language copy (renamed to "Keep an Agent Mode
  activity log" / "Agent Mode activity log file"), and clarify that the legacy
  Debug Mode / Create Log File tools are for the regular chat, not Agent Mode.
- Update docs to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(agent-mode): move Report an Issue to the Advanced settings section

Per UX feedback, the entry point moves out of the agent chat control bar into
Settings → Advanced → Agent Mode debugging, alongside the activity-log
controls it relates to.

- Remove the bug-icon button and its wiring from AgentChatControls/AgentHome.
- Add a "Report an Issue" button to the Agent Mode debugging settings section.
- ReportIssueModal now resolves its screenshot target lazily via
  resolveCaptureTarget(): the settings caller closes the Settings window and
  reveals the agent pane first, so the screenshot is still the chat surface
  (not the dialog). No agent pane open -> screenshot is skipped gracefully.
- Export ReportIssueModal from the agentMode barrel so host code can reach it
  without crossing the ui boundary.
- Update docs to point at the new location.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): honor opencode env overrides when finding its log

OpencodeBackend spawns opencode with `{ ...process.env, ...envOverrides }`, so a
user who relocates opencode's data dir via XDG_DATA_HOME/HOME overrides has its
logs written there. The report's opencode-log lookup only consulted ambient
process.env/homedir, so it could attach an unrelated global log or miss the
active session's. Resolve the log path from the same merged env + HOME override.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): report uses active session backend; gate import on desktop

Two review fixes for the settings-based Report an Issue button:

- Read the backend from the active Agent Mode session, not the persisted
  default. Switching tabs across backends changes the active session without
  touching settings.agentMode.activeBackend, so the modal could hide/show the
  OpenCode-log option for the wrong tab and name the wrong backend in the env
  block.
- Check isDesktopRuntime() before importing the @/agentMode barrel. On mobile
  the barrel evaluates Node-only modules; importing before the modal's own
  desktop guard could reject during module load instead of showing the
  desktop-only notice. Mirrors the existing frame-log buttons.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 16:43:26 -07:00
..
agent-mode-and-tools.md feat(agent-mode): one-click "Report an Issue" flow with screenshot + frame log (#2614) 2026-06-15 16:43:26 -07:00
agent-mode-windows-setup.md docs: Windows setup guide for Claude and Codex Agent Mode (#2542) 2026-05-31 20:53:56 -07:00
chat-interface.md feat(relevant-notes): dedicated pane with redesigned populated view (#2559) 2026-06-05 06:54:12 +08:00
context-and-mentions.md docs: add user-facing documentation (#2254) 2026-03-03 17:39:00 -08:00
copilot-plus-and-self-host.md docs: add user-facing documentation (#2254) 2026-03-03 17:39:00 -08:00
custom-commands.md docs: add user-facing documentation (#2254) 2026-03-03 17:39:00 -08:00
getting-started.md feat(chat): power legacy chat from the model-management chat backend (#2556) 2026-06-06 14:52:50 -07:00
index.md docs: Windows setup guide for Claude and Codex Agent Mode (#2542) 2026-05-31 20:53:56 -07:00
install-claude-agent-mode-windows.ps1 docs: Windows setup guide for Claude and Codex Agent Mode (#2542) 2026-05-31 20:53:56 -07:00
install-codex-agent-mode-windows.ps1 docs: Windows setup guide for Claude and Codex Agent Mode (#2542) 2026-05-31 20:53:56 -07:00
llm-providers.md feat(chat): power legacy chat from the model-management chat backend (#2556) 2026-06-06 14:52:50 -07:00
miyo-api.md Refactor Miyo integration for folder API (#2331) 2026-03-30 09:05:34 +09:00
models-and-parameters.md feat(chat): power legacy chat from the model-management chat backend (#2556) 2026-06-06 14:52:50 -07:00
projects.md feat(chat): power legacy chat from the model-management chat backend (#2556) 2026-06-06 14:52:50 -07:00
system-prompts.md docs: add user-facing documentation (#2254) 2026-03-03 17:39:00 -08:00
troubleshooting-and-faq.md feat(keychain): migrate API key storage to Obsidian Keychain (#2364) 2026-05-14 13:57:21 -07:00
vault-search-and-indexing.md docs: add user-facing documentation (#2254) 2026-03-03 17:39:00 -08:00