Repository navigation
Conversation
- Add "Restart daemon" section in terminal settings page - Spawn daemon immediately when terminal persistence is enabled - Refactor restart daemon logic into shared helper function - Handle "Connection lost" error in shutdownIfRunning (expected when daemon shuts down) - Invalidate daemon sessions query after toggling terminal persistence
|
Warning Rate limit exceeded
⌛ 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. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a daemon restart feature to terminal settings, making the Changes
Sequence DiagramsequenceDiagram
participant User
participant SettingsUI as Settings UI
participant Router as TRPC Router
participant HostClient as TerminalHostClient
participant Daemon as Terminal Daemon
User->>SettingsUI: Click "Restart Daemon"
SettingsUI->>SettingsUI: Show confirmation dialog
User->>SettingsUI: Confirm restart
SettingsUI->>SettingsUI: Optimistic update (daemonEnabled: true, sessions: [])
SettingsUI->>Router: Call restartDaemon mutation
Router->>HostClient: restartDaemon()
HostClient->>Daemon: shutdownIfRunning(killSessions: true)
alt Daemon responds
Daemon-->>HostClient: Connection lost (expected)
HostClient->>HostClient: Handle gracefully
else Connection error
HostClient->>HostClient: Log error
end
HostClient-->>Router: Return success/failure
Router-->>SettingsUI: Mutation complete
SettingsUI->>SettingsUI: Show toast + refresh sessions
SettingsUI->>User: Display updated state
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
Summary
Changes
restartDaemonmutationrestartDaemon()helper, handle expected "Connection lost" error inshutdownIfRunningrestartDaemon()helperTest plan
Summary by CodeRabbit
Release Notes
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.