Show TUI connection status - #273
Open
robzolkos wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds resilient, app-wide TUI connection status and Action Cable reconnection handling.
Changes:
- Shows persistent offline/reconnecting status across all TUI sections.
- Adds bounded retries, reconnection catch-up, and shared cable ownership.
- Prioritizes connection events and expands lifecycle/error tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents automatic reconnection and status display. |
AGENTS.md |
Updates TUI live-update architecture guidance. |
internal/tui/tui.go |
Integrates global connection state and catch-up handling. |
internal/tui/mail.go |
Removes mail-only connection notices. |
internal/tui/live.go |
Defines events, statuses, and retry behavior. |
internal/tui/errors.go |
Preserves classified API errors. |
internal/tui/live_test.go |
Tests status, retry, and watcher behavior. |
internal/tui/screener_test.go |
Tests classified error messages. |
internal/cmd/tui_watch.go |
Relays connection events and manages shared cable clients. |
internal/cmd/tui_watch_test.go |
Tests event priority and client replacement. |
internal/cable/cable.go |
Closes failed dial clients. |
internal/cable/cable_test.go |
Verifies failed dials stop retrying. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
monorkin
approved these changes
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
GOWORK=off make checkGOWORK=off make race-testGOWORK=off make coverage— 82.7% repository coverageGOWORK=off make test-e2e— 177 checks passedgovulncheck ./...— no called vulnerabilitiesgitleaks detect --source . --verbose --redact— no leaksDemo
Basecamp: https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10225695892
Summary by cubic
Show a standing TUI connection status and make live updates resilient across sections. Previously only Mail showed “Not live” after disconnect; now the app shows Offline/Reconnecting globally, retries on network failures, and catches up the visible box on reconnect.
tui.AnyBoxChanged.tui.MailWatchEvent(box or connection). Prioritize connection transitions over box doorbells; coalesce a full backlog into a single catch-up; drain stale doorbells; ignore stale retry timers once connected.tuiCableDialTimeout= 5s). Ensurecable.Dialcloses clients on connect failure to stop background retries.actioncable.Clientacross subscriptions and replace it when stopped (actioncable.ErrClosedor terminalDisconnectError{Reconnect:false}). Give Screener subscriptions a short-lived context so replacing a signed stream unsubscribes without closing Mail’s shared connection.Required updates
tui.MailWatchernow returns<-chan tui.MailWatchEventinstead of box IDs.tui.ScreenerWatchernow takes two contexts:(ctx, connectionCtx context.Context, signedStreamName string).Written for commit 0309b80. Summary will update on new commits.