Skip to content

feat: added ability to copy logs in android#255

Merged
therealaleph merged 1 commit intotherealaleph:mainfrom
dazzling-no-more:feature/copy-log
Apr 26, 2026
Merged

feat: added ability to copy logs in android#255
therealaleph merged 1 commit intotherealaleph:mainfrom
dazzling-no-more:feature/copy-log

Conversation

@dazzling-no-more
Copy link
Copy Markdown
Contributor

Summary

Adds a Copy button to the live log pane on Android and makes the log lines selectable. Until now, getting logs off the device required tethering with adb logcat — the on-screen text wasn't selectable and there was no copy affordance, so users couldn't share a snippet from the app itself.

Changes

  • Copy button next to "Clear" in the live log header. Joins the buffered lines (capped at 500 by the existing ring) with \n, writes them to the system clipboard via LocalClipboardManager, and shows a Toast confirming the copy. Disabled when the buffer is empty so we don't push an empty string onto the clipboard.
  • Selectable text: the log LazyColumn is wrapped in a SelectionContainer, so users can long-press to grab a partial range. Cross-line selection works within the rendered window — for "copy everything" the new button is the reliable path, which is why both exist.
  • Replaced the hardcoded "Clear" button label with stringResource(R.string.btn_clear) so the new Copy/Clear pair stay locale-consistent (Persian was already defined for btn_clear).
  • New strings btn_copy and snack_logs_copied in both values/strings.xml and values-fa/strings.xml.

Files touched

  • android/app/src/main/java/com/therealaleph/mhrv/ui/HomeScreen.ktLiveLogPane button + SelectionContainer
  • android/app/src/main/res/values/strings.xml, android/app/src/main/res/values-fa/strings.xml — new strings

@therealaleph therealaleph merged commit b963851 into therealaleph:main Apr 26, 2026
@dazzling-no-more dazzling-no-more deleted the feature/copy-log branch April 26, 2026 13:55
therealaleph added a commit that referenced this pull request Apr 26, 2026
- #245 (@Parsa307): match twitter.com in X.com URL normalization
- #255 (@dazzling-no-more): copy-logs button + selectable log lines on Android
- #257 (@dazzling-no-more): bulk paste of multiple deployment IDs on Android
- #256 (@dazzling-no-more): plain HTTP proxy passthrough in google_only mode
  (used to return 502; now falls through to direct TCP / upstream_socks5,
  matching the existing CONNECT behavior)

No protocol or wire-format changes; existing config and Apps Script
deployments work unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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