-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add delayed relay error handling and integrate with chat list s… #668
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
feat: add delayed relay error handling and integrate with chat list s… #668
Conversation
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.dart📄 CodeRabbit inference engine (.cursor/rules/flutter.mdc)
Files:
**/*.md📄 CodeRabbit inference engine (.cursor/rules/whitenoise.mdc)
Files:
🧠 Learnings (2)📚 Learning: 2025-09-08T17:39:13.711ZApplied to files:
📚 Learning: 2025-09-07T02:15:31.931ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (18)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
| void _handleConnectionStatusChange(bool isConnected) { | ||
| _logger.info('Relay connection status changed: $isConnected (was: $_lastConnectionStatus)'); | ||
|
|
||
| if (isConnected && !_lastConnectionStatus) { |
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.
Just to make sure I'm understanding this:
- Any time we get a change in connection status, this
_handleConnectionStatusChangemethod is called. - If we're entering a not connected state then we show the banner and start the timer to check in 30 seconds.
- If we're entering a connected state then we hide the banner and cancel the timer?
How we we hear about these changes in connection status?
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.
if we enter a not connected state we delay for 30 seconds, and if after that 30 seconds connection is not back we show the banner
Quwaysim
left a comment
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.
LFGTM 🚀
…creen
Description
Optimize Relay Error Message Banner
Display
Summary
Improved the relay connection error
banner UX by adding intelligent delay
logic and automatic updates, making it
less aggressive while maintaining
important connectivity feedback.
Changes Made
implements a 30-second delay before
showing the error banner
temporary connection hiccups
connection is restored, canceling any
pending delay
delayed banner logic
connection issues (30+ seconds)
reconnect - no more manual refresh
needed
checking for "New Chat" button
functionality
existing polling infrastructure
ensure banner state stays current
connection changes
dark theme for better contrast
#E5E5E5) to appropriate dark grays
(#404040, #2A2A2A)
Technical Details
with proper state management
automatic cleanup
existing relay status checking
(loading states, connection errors)
Impact
premature error notifications
connectivity is restored
skeleton states
without being overly aggressive
Type of Change
Checklist
just precommitto ensure that formatting and linting are correctjust check-flutter-coverageto ensure that flutter coverage rules are passingCHANGELOG.mdfile with your changes (if they affect the user experience)Summary by CodeRabbit