Skip to content

Add git-credential management to the dashboard TUI#103

Merged
gmpassos merged 3 commits into
masterfrom
feat/dashboard-git-credentials
Jul 2, 2026
Merged

Add git-credential management to the dashboard TUI#103
gmpassos merged 3 commits into
masterfrom
feat/dashboard-git-credentials

Conversation

@gmpassos

@gmpassos gmpassos commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Surfaces the remote drive credential feature 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 c to open a git-credential view for that node:

  • list your own credentials on the node (secrets masked);
  • a add via a modal form (host + PAT, or username/password);
  • x remove the selected credential (with confirmation);
  • r refresh, Esc back.

Design

  • Extends the DashboardBackend port with listGitCredentials / addGitCredential / removeGitCredential, delegating to ClientRuntime.driveCredential*. The TUI stays dart:io-free and testable.
  • The adapter builds the GitPat/GitUserPass credential and calls the RPC; the app and port never touch omnydrive JSON — they pass pat/username/password. HTTPS only, matching the remote CLI.
  • Credentials remain scoped to the connected principal (hub-stamped) and never leave the node.
  • New _Screen.nodeCredentials with its own key handler + render arm; add uses the existing modal _Form, remove uses the existing _Confirm dialog.

Test plan

  • dart analyze + dart format --set-exit-if-changed . — clean.
  • FakeDashboardBackend extended; two new dashboard tests: c opens the view and lists (masked), the add-form dispatches addGitCredential, and remove asks to confirm then dispatches removeGitCredential.
  • Full suite green (664 unit + integration). Bumps to 1.52.0. No omnydrive change.

🤖 Generated with Claude Code

gmpassos and others added 3 commits July 1, 2026 23:40
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>
@gmpassos gmpassos merged commit d1392b7 into master Jul 2, 2026
5 checks passed
@gmpassos gmpassos deleted the feat/dashboard-git-credentials branch July 2, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant