Skip to content

fix(settings): adjust log path copy#1627

Merged
samuv merged 3 commits intomainfrom
fix-copy-log
Feb 12, 2026
Merged

fix(settings): adjust log path copy#1627
samuv merged 3 commits intomainfrom
fix-copy-log

Conversation

@samuv
Copy link
Copy Markdown
Collaborator

@samuv samuv commented Feb 12, 2026

  • Fixes a bug where getMainLogContent() (the full log file content) was being fetched and stored in logPath state. The old useEffect called getMainLogContent() and set the result as logPath, so when a user clicked "copy", they'd copy the entire log file content instead of the file path. The displayed text showed the correct path (LOG_PATHS[platform]), but the clipboard got the wrong value.
  • Reuses CodeBlockWithCopy instead of the inline copy button implementation, which also brings better UX (timeout ref cleanup, consistent styling).

related issue

@samuv samuv self-assigned this Feb 12, 2026
Copilot AI review requested due to automatic review settings February 12, 2026 10:00
@samuv samuv linked an issue Feb 12, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where clicking the copy button in Settings → Logs copied the entire log file contents instead of the file path. The root cause was that the code called getMainLogContent() (which returns log contents) and stored the result in logPath state, while displaying the correct path from LOG_PATHS constant.

Changes:

  • Removes incorrect async state management that fetched log contents into logPath
  • Simplifies to directly use LOG_PATHS constant based on platform
  • Refactors to use existing CodeBlockWithCopy component instead of custom copy implementation

Comment thread renderer/src/common/components/settings/tabs/logs-tab.tsx Outdated
Comment thread renderer/src/common/components/settings/tabs/logs-tab.tsx Outdated
Comment thread renderer/src/common/components/settings/tabs/logs-tab.tsx Outdated
@samuv samuv merged commit 9aca4d1 into main Feb 12, 2026
17 checks passed
@samuv samuv deleted the fix-copy-log branch February 12, 2026 13:21
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.

[Bug] Application Logs copy button copies all logs instead of path

3 participants