-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding clipboard support #457
Conversation
✅ Deploy Preview for dazzling-kringle-090742 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Warning Rate Limit Exceeded@daonb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 28 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThis update brings a variety of improvements and fixes across different aspects of the application. It includes support for new webexec clipboard commands, enhanced logging capabilities, UI enhancements for Terminal7, and the addition of a PWA installation offer for first-time users. Additionally, there are updates such as custom SSH port options, troubleshooting documentation on the dev site, and various fixes addressing reconnect failures, display issues, and performance optimizations. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
✅ Deploy Preview for terminal7 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 15
Review Status
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
ios/App/Podfile.lock
is excluded by!**/*.lock
Files selected for processing (10)
- CHANGELOG.md (1 hunks)
- index.html (1 hunks)
- package.json (2 hunks)
- src/commands.ts (3 hunks)
- src/gate.ts (4 hunks)
- src/peerbook.ts (7 hunks)
- src/session.ts (4 hunks)
- src/ssh_session.ts (2 hunks)
- src/webrtc_session.ts (10 hunks)
- tsconfig.json (1 hunks)
Files skipped from review as they are similar to previous changes (8)
- index.html
- package.json
- src/commands.ts
- src/gate.ts
- src/peerbook.ts
- src/session.ts
- src/ssh_session.ts
- tsconfig.json
Additional comments not posted (2)
src/webrtc_session.ts (2)
9-28
: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [25-51]
The updates to the
WebRTCChannel
class, including the nullabledataChannel
property and the refactoredresize
method, are correctly implemented and align with the newControlMessage
usage.
400-407
: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [403-430]
The updates to the
PeerbookSession
class, including improved logging and error handling, as well as the use ofControlMessage
objects, are correctly implemented and enhance the class's functionality.
|
||
### Added | ||
|
||
- support for webexec clipboard commands, e.g. use `webexec copy < file.txt` to copy a file to the client's clipboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider rephrasing the description of the webexec clipboard commands for clarity.
- - support for webexec clipboard commands, e.g. use `webexec copy < file.txt` to copy a file to the client's clipboard
+ - Added support for webexec clipboard commands. For example, `webexec copy < file.txt` copies the content of `file.txt` to the client's clipboard.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
- support for webexec clipboard commands, e.g. use `webexec copy < file.txt` to copy a file to the client's clipboard | |
- Added support for webexec clipboard commands. For example, `webexec copy < file.txt` copies the content of `file.txt` to the client's clipboard. |
src/webrtc_session.ts
Outdated
import { CapacitorHttp, HttpHeaders } from '@capacitor/core' | ||
import { BaseChannel, BaseSession, Channel, ChannelID, Failure, Marker } from './session' | ||
import { IceServers } from "./terminal7" | ||
import { ServerPayload } from "./gate" | ||
|
||
type ChannelOpenedCB = (channel: Channel, id: ChannelID) => void | ||
type RTCStats = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [497-497]
Add error handling in the sendOffer
and sendCandidate
methods of the HTTPWebRTCSession
class to ensure robustness in case of failures during the offer or candidate sending process.
+ try {
CapacitorHttp.post({
url: this.address,
headers: headers,
readTimeout: 3000,
connectTimeout: 3000,
data: offer.sdp,
}).then(response => {
// Existing code...
}).catch(error => {
terminal7.log(`FAILED: POST to ${this.address} with ${JSON.stringify(this.headers)}`, error)
if (error.message == 'unauthorized')
this.fail(Failure.Unauthorized)
else
this.fail(Failure.NotSupported)
})
+ } catch (e) {
+ terminal7.log(`Exception during sendOffer: ${e}`);
+ }
Summary by CodeRabbit