Skip to content

refactor(ssh): Update Terminal page to adapt new copy and paste logic#1054

Merged
GT-610 merged 5 commits intolollipopkit:mainfrom
GT-610:main
Feb 27, 2026
Merged

refactor(ssh): Update Terminal page to adapt new copy and paste logic#1054
GT-610 merged 5 commits intolollipopkit:mainfrom
GT-610:main

Conversation

@GT-610
Copy link
Collaborator

@GT-610 GT-610 commented Feb 25, 2026

  • Update submodules
  • Update dependency versions and remove the copy button from the terminal page, integrating clipboard functionality into the terminal controller
  • Update Dart SDK and Flutter version

Possibly related issue:
Resolve #984.

Summary by CodeRabbit

  • New Features

    • Terminal: added copy/paste/select-all actions with success feedback and clipboard fallback; keyboard clipboard action unified and selection cleared after copy.
    • UI: removed redundant copy button from the app bar.
  • Chores

    • Raised minimum Dart SDK to 3.11.0 and Flutter to 3.41.0.
    • Updated internal package references.
…unctionality Update dependency versions and remove the copy button from the terminal page, integrating clipboard functionality into the terminal controller.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 723a683 and 2b7b922.

📒 Files selected for processing (1)
  • lib/view/page/ssh/page/page.dart

📝 Walkthrough

Walkthrough

Removed the app-bar copy action and moved terminal clipboard interactions into TerminalView via new callbacks: onCopied, onSelectAll, and onPaste. Added private handlers that copy selected terminal text to the clipboard (showing a success snackbar and clearing selection), select all terminal text, and paste clipboard text into the terminal (clearing selection). VirtualKeyFunc.clipboard now delegates to a unified clipboard handler. Updated submodule pointers for packages/dartssh2 and packages/xterm. Tightened pubspec environment minimums to SDK >=3.11.0 and Flutter >=3.41.0.

Possibly related PRs

Suggested reviewers

  • lollipopkit
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive Changes to submodule versions (dartssh2, xterm) and SDK constraints (pubspec.yaml) support the clipboard functionality updates but may warrant separate validation. Clarify if SDK version bumps and submodule updates are necessary for the multi-line pasting fix or if they introduce unrelated scope creep.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main refactoring work: updating the Terminal page's copy and paste logic to adapt to new clipboard handling.
Linked Issues check ✅ Passed The pull request addresses the multi-line pasting bug by implementing async-aware clipboard operations that ensure proper handling of multi-line content without race conditions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@coderabbitai coderabbitai bot requested a review from lollipopkit February 25, 2026 14:52
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@GT-610 GT-610 mentioned this pull request Feb 26, 2026
Convert the _OnTerminalPaste method to an asynchronous implementation and remove duplicate _paste methods.
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
lib/view/page/ssh/page/page.dart (1)

368-386: Consider moving terminal action handlers into an actions extension.

_onTerminalCopied, _onTerminalSelectAll, and _onTerminalPaste are action handlers; moving them into a dedicated part extension would better preserve separation of concerns in this page.

As per coding guidelines "Split UI into build, actions, and utils; use extension on to separate concerns".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/view/page/ssh/page/page.dart` around lines 368 - 386, Extract the three handlers (_onTerminalCopied, _onTerminalSelectAll, _onTerminalPaste) out of the State class and place them into a dedicated extension (e.g., extension _SshPageStateActions on _SshPageState) or a separate part file (page_actions.dart) to follow the "build, actions, utils" split; keep the method signatures and usage intact, ensure the extension is declared on the same private state type (_SshPageState) so it still has access to _termKey, _terminalController, _terminal, context, mounted, and Clipboard, and add a part/part of directive if you move them into a new part file. 
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed. Nitpick comments: In `@lib/view/page/ssh/page/page.dart`: - Around line 368-386: Extract the three handlers (_onTerminalCopied, _onTerminalSelectAll, _onTerminalPaste) out of the State class and place them into a dedicated extension (e.g., extension _SshPageStateActions on _SshPageState) or a separate part file (page_actions.dart) to follow the "build, actions, utils" split; keep the method signatures and usage intact, ensure the extension is declared on the same private state type (_SshPageState) so it still has access to _termKey, _terminalController, _terminal, context, mounted, and Clipboard, and add a part/part of directive if you move them into a new part file. 

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fffdd52 and 1614dca.

📒 Files selected for processing (2)
  • lib/view/page/ssh/page/page.dart
  • lib/view/page/ssh/page/virt_key.dart
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/view/page/ssh/page/virt_key.dart
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 27, 2026
…onality Renamed _onTerminalPaste to _onClipboardAction and expanded its functionality Now supports copying selected text to the clipboard and performing paste operations when no text is selected
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 27, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 27, 2026
Prevented redundant _onTerminalPaste calls after terminal paste operations
@GT-610
Copy link
Collaborator Author

GT-610 commented Feb 27, 2026

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 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.

@GT-610 GT-610 merged commit 8b1326f into lollipopkit:main Feb 27, 2026
1 check passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants