Skip to content

ADFA-2553 Switch from incorrect LongPress interception to Sora LongPress handler#878

Merged
hal-eisen-adfa merged 4 commits intostagefrom
ADFA-2553-text-selection-problem-in-logs
Jan 26, 2026
Merged

ADFA-2553 Switch from incorrect LongPress interception to Sora LongPress handler#878
hal-eisen-adfa merged 4 commits intostagefrom
ADFA-2553-text-selection-problem-in-logs

Conversation

@hal-eisen-adfa
Copy link
Collaborator

@hal-eisen-adfa hal-eisen-adfa commented Jan 24, 2026

To correctly select text the user intended for copy/paste from Build Output and IDE Logs

Might also fix ADFA-2536

The real bug was in copyTextToClipboard - it was prepending build info to the entire buffer then extracting with original indices, causing wrong text to be copied
Fixed by extracting selected text first, then prepending build info only when needed
Removed includeDebugInfoOnCopy = true from log views so normal copy works correctly
Share/feedback still uses getShareableContent() which includes build info

…r to correctly select text the user intended
@hal-eisen-adfa hal-eisen-adfa marked this pull request as draft January 24, 2026 00:35
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

Removed EventBus-based long-press event plumbing and an EditorLongPressEvent type; also changed copy behavior so editors no longer include debug info by default (some code paths stop setting includeDebugInfoOnCopy).

Changes

Cohort / File(s) Summary
EventBus long-press removal
app/src/main/java/com/itsaky/androidide/fragments/EmptyStateFragment.kt, editor/src/main/java/com/itsaky/androidide/editor/ui/EditorLongPressEvent.kt, editor/src/main/java/com/itsaky/androidide/editor/ui/IDEEditor.kt
Deleted EventBus imports, lifecycle register/unregister calls, and the onEditorLongPressed handler; removed the EditorLongPressEvent data class; IDEEditor long-press forwarding/posts removed.
Copy debug-info behavior changes
editor/src/main/java/com/itsaky/androidide/editor/ui/IDEEditor.kt, app/src/main/java/com/itsaky/androidide/fragments/output/BuildOutputFragment.kt, app/src/main/java/com/itsaky/androidide/fragments/output/LogViewFragment.kt
Adjusted copy-to-clipboard logic in IDEEditor to include debug info only when includeDebugInfoOnCopy is true and to prepend debug info only to the selected text; removed code that enabled includeDebugInfoOnCopy in BuildOutputFragment and LogViewFragment.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • dara-abijo-adfa
  • Daniel-ADFA

Poem

🐰 I hopped through code with nimble feet,
Snipped the bus that sent long-presses fleet.
Copies now carry only what you choose,
No extra traces left to bruise.
A quiet patch, a tidy feat. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: removing EventBus-based LongPress interception and related event handling from multiple files.
Description check ✅ Passed The PR description clearly relates to the changeset, explaining the bug fix for text selection in copy/paste from Build Output and IDE Logs, and how it was resolved by fixing copyTextToClipboard() and removing incorrect LongPress interception.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…rated normal copy/paste (without buildInfo) from feedback copy/paste (with buildInfo)
@hal-eisen-adfa
Copy link
Collaborator Author

@coderabbitai review

@hal-eisen-adfa hal-eisen-adfa marked this pull request as ready for review January 24, 2026 10:00
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hal-eisen-adfa hal-eisen-adfa requested a review from a team January 24, 2026 10:07
Copy link
Contributor

@dara-abijo-adfa dara-abijo-adfa left a comment

Choose a reason for hiding this comment

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

LGTM

@hal-eisen-adfa hal-eisen-adfa merged commit 458fb27 into stage Jan 26, 2026
2 checks passed
@hal-eisen-adfa hal-eisen-adfa deleted the ADFA-2553-text-selection-problem-in-logs branch January 26, 2026 15:25
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