Repository navigation
SDK Dashboard TUI Example App [Spec + Impl] - #27
Conversation
|
Warning Review limit reached
Next review available in: 26 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (30)
📝 WalkthroughWalkthroughThis PR adds a standalone ChangesSDK Dashboard TUI implementation
Estimated code review effort: 4 (Complex) | ~75 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
=======================================
Coverage 88.63% 88.63%
=======================================
Files 70 70
Lines 4161 4163 +2
=======================================
+ Hits 3688 3690 +2
Misses 325 325
Partials 148 148 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Applied fixes from bot review comments: - Comment #3517851914: add reconnectTickMsg handler (Devin, bug) - Comment #3517851980: fix watcher data race via message pattern (Devin+Copilot) - Comment #3517852068: wire gateway name to status bar (Devin) - Comment #3517855498: route keys to log panel when focused (Copilot) - Comment #3517855534: remove URL from log output (Copilot, secrets) - Comment #3517855551,#3517855567: clamp service table height (Copilot) - Comment #3517855582,#3517855597: clamp provider table height (Copilot) Assisted-By: 🤖 Claude Code
Applied fixes from bot review comments: - Comment #3517851914: add reconnectTickMsg handler (Devin, bug) - Comment #3517851980: fix watcher data race via message pattern (Devin+Copilot) - Comment #3517852068: wire gateway name to status bar (Devin) - Comment #3517855498: route keys to log panel when focused (Copilot) - Comment #3517855534: remove URL from log output (Copilot, secrets) - Comment #3517855551,#3517855567: clamp service table height (Copilot) - Comment #3517855582,#3517855597: clamp provider table height (Copilot) Assisted-By: 🤖 Claude Code
e2f8466 to
15ada4a
Compare
Applied fixes from 5 Devin review comments: - Comment #3517936965: route scroll keys to log panel when focused - Comment #3517937018: propagate program field to child loggers - Comment #3517937097: Enabled() always returns true for ring buffer - Comment #3517937192: document demo mode watch limitation (deferred) - Comment #3517972417: ANSI-aware log line truncation Assisted-By: 🤖 Claude Code
OIDCLogin now takes a context tied to the dashboard's lifetime, with a 2-minute timeout. Prevents orphaned goroutines and lingering callback listeners if the dashboard shuts down mid-login flow. Assisted-By: 🤖 Claude Code
Applied fixes from 3 Devin review comments: - Comment #3518019252: gate global shortcuts when tab captures input - Comment #3518019326: adjust detail pane index on sandbox deletion - Comment #3518019413: route sandbox list errors to connection manager Assisted-By: 🤖 Claude Code
Applied fixes from review comments: - main.go: cleanup runs unconditionally after p.Run() (CR, critical) - model.go: forward non-key messages to ALL tabs (Devin, health ticker) - tab_sandbox.go: stop existing watcher before starting new on Refresh (CR) - tab_sandbox.go: add 5s backoff on watch reconnection (CR) - tab_exec.go: add Sandbox field to ExecEntry (CR) - tab_health.go: sort settings keys for deterministic display (CR) Assisted-By: 🤖 Claude Code
Applied fix from bot review comment: - Comment #3518574788: add missing d.keys.Retry handler in handleKeyPress Assisted-By: 🤖 Claude Code
Applied fix from bot review comment: - Comment #3518574836: remove unreachable v==0 branch in sparkline rendering Assisted-By: 🤖 Claude Code
| func (st *SandboxTab) execScrollUp(n int) { | ||
| st.execScrollOffset -= n | ||
| } |
There was a problem hiding this comment.
🟡 Scrolling up in the command history panel accumulates unbounded offset, requiring excessive scrolling down to return
The scroll-up handler decrements the offset without any lower bound (execScrollUp at examples/oshell/tab_sandbox.go:1052), so the offset can grow arbitrarily negative even though the rendering clamps the visible start position to zero.
Impact: After scrolling up many times past the top of the command history, the user must scroll down the same excessive number of times before the view starts moving again.
Unbounded negative offset in execScrollUp
execScrollOffset is always <= 0 (clamped in execScrollDown at line 1057). execScrollUp subtracts n without checking a lower bound. The rendering code at examples/oshell/tab_sandbox.go:1167-1173 computes start = total - viewportHeight + st.execScrollOffset and clamps start >= 0, so the display is correct. However, the offset itself keeps accumulating. For example, if the user scrolls up 100 times with 3 lines of history, execScrollOffset becomes -300. They then need to scroll down 300/n times before the offset reaches 0 and auto-scroll resumes. The fix is to clamp execScrollOffset so it never goes below -(total - viewportHeight) (or 0 if total <= viewportHeight).
Prompt for agents
In examples/oshell/tab_sandbox.go, the execScrollUp method at line 1051-1053 decrements execScrollOffset without a lower bound. The offset should be clamped so it never goes below the negative of (totalHistoryLines - viewportHeight). However, execScrollUp doesn't have access to the total line count or viewport height. Consider either: (1) passing the current history line count and viewport height into execScrollUp so it can clamp, (2) clamping the offset in renderExecPopup after computing total and viewportHeight (around line 1167), or (3) storing the last-known total/viewport and clamping in execScrollUp against those cached values.
Was this helpful? React with 👍 or 👎 to provide feedback.
Implement a full-screen Bubble Tea TUI that demonstrates the OpenShell SDK for Go. Four tabbed views (Sandboxes, Providers, Services, Gateway) exercise 10+ SDK sub-client methods including Watch, Exec, and Health. Key features: - Live sandbox table with Watch API, create/delete dialogs, and integrated exec popup for running commands in sandboxes - OIDC lazy authentication with browser-based login flow - Gateway health tab with latency sparkline (30 measurements) - Structured logging via custom slog.Handler (ring buffer + file) - Demo mode using the SDK's fake client for zero-dependency demos - Connection management with exponential backoff and manual retry Assisted-By: 🤖 Claude Code
dad4d2f to
c75144b
Compare
Summary
Full-screen Bubble Tea dashboard TUI (
oshell) showcasing the Go SDK.Tabs: Sandboxes (live Watch, CRUD), Providers, Services, Health (sparkline), Exec
Auth: Lazy OIDC flow (stub pending oidc package)
Logging: Custom slog tee handler (TUI panel + JSON file)
Demo:
--demomode using SDK fake client with simulated dataSelf-contained Go module in
examples/oshell/for future repo extraction.Artifacts
specs/018-sdk-dashboard-tui/spec.mdspecs/018-sdk-dashboard-tui/plan.mdspecs/018-sdk-dashboard-tui/tasks.mdspecs/018-sdk-dashboard-tui/REVIEW-CODE.mdTest plan
cd examples/oshell && go build ./...compiles cleanlygo vet ./...passes with no warningsgo run . --demolaunches the dashboard with simulated dataAssisted-By: 🤖 Claude Code
Summary by CodeRabbit
New Features
Documentation