Add git-credential management to the dashboard TUI#103
Merged
Conversation
Surface the remote (`drive credential --node`) feature in the dashboard: from a node's detail screen press `c` to open a git-credential view scoped to the connected principal — list your own credentials (masked), `a` to add via a form (host + PAT or username/password), `x` to remove (with confirmation). Extends the DashboardBackend port with listGitCredentials/addGitCredential/ removeGitCredential (delegating to ClientRuntime.driveCredential*), so the TUI stays dart:io-free. The adapter builds the GitPat/GitUserPass credential; the app and port never touch omnydrive JSON (they pass pat/username/password). HTTPS only, matching the remote CLI. Tests: FakeDashboardBackend extended; dashboard tests cover opening the view, add-form dispatch, and remove-with-confirm. Bumps to 1.52.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dashboard blocked its input loop awaiting the git-credential RPC, so an unreachable or out-of-date node left the view stuck on "Loading credentials…" with no way to interact. - Dashboard: load credentials in the background (open + refresh) so the input loop stays responsive; re-render when it settles. - Client: time-box the git-credential RPCs (20s) so a node that never replies surfaces an error instead of hanging. - Both the dashboard and IDE now wrap per-key handling in try/catch and show any exception in the status bar instead of freezing or exiting. Test: dashboard now asserts a backend error on the credentials load is shown and the TUI stays interactive (Esc returns to node detail). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extend the credential-RPC fix to every request/response Hub/node RPC in ClientRuntime via a shared _rpcTimeout helper: listNodes, ping, listSessions, peekSession, killSession, detachActiveSession, listTunnels, openTunnel, closeTunnel, fetchHubAiConfig, proxyHttp (120s for the LLM call), and the git-credential ops. A connected-but-silent peer (offline/old node) now surfaces a TimeoutException — caught by the TUI input loops and shown in the status bar — instead of freezing the UI. Dropped connections still fail pending RPCs immediately via the existing disconnect handler. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Surfaces the remote
drive credentialfeature in the dashboard TUI. Since the dashboard is a client that connects to the hub as a principal, it maps to the remote, caller-scoped mode (HTTPS only).From a node's detail screen (Nodes → Enter), press
cto open a git-credential view for that node:aadd via a modal form (host + PAT, or username/password);xremove the selected credential (with confirmation);rrefresh, Esc back.Design
DashboardBackendport withlistGitCredentials/addGitCredential/removeGitCredential, delegating toClientRuntime.driveCredential*. The TUI staysdart:io-free and testable.GitPat/GitUserPasscredential and calls the RPC; the app and port never touch omnydrive JSON — they passpat/username/password. HTTPS only, matching the remote CLI._Screen.nodeCredentialswith its own key handler + render arm; add uses the existing modal_Form, remove uses the existing_Confirmdialog.Test plan
dart analyze+dart format --set-exit-if-changed .— clean.FakeDashboardBackendextended; two new dashboard tests:copens the view and lists (masked), the add-form dispatchesaddGitCredential, and remove asks to confirm then dispatchesremoveGitCredential.🤖 Generated with Claude Code