Skip to content

Overhaul accounts & connections UX around a four-concept model#834

Merged
arul28 merged 4 commits into
mainfrom
ade/accounts-fixes-8ac17dba
Jul 16, 2026
Merged

Overhaul accounts & connections UX around a four-concept model#834
arul28 merged 4 commits into
mainfrom
ade/accounts-fixes-8ac17dba

Conversation

@arul28

@arul28 arul28 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Reduces every account/connection surface to four beginner-facing concepts — ADE account, pairing code, QR code, and SSH (advanced) — and removes everything else.

  • Relay kill-switch removed entirely: relay is active whenever the machine is signed in. Store enabled/enabledSetByUser fields, ade sync relay command, and sync.setCloudRelayEnabled IPC deleted; legacy store files are migrated by dropping the dead fields. Route priority (LAN → Tailscale → Relay) and same-account relay proof unchanged. Machines that previously disabled relay are re-enabled (CHANGELOG).
  • Pairing link removed as a user-facing concept on desktop, iOS, and web; the smart pair URL survives only as the internal QR wire encoding (system camera / App Clip).
  • Manual address+PIN entry removed (desktop + iOS). Remaining paths: same account / Nearby+PIN / SSH.
  • Web client is sign-in only: hosted /pair route and PIN pairing deleted; existing paired environments keep working; localhost dev keeps direct ws://.
  • Account page rebuilt: responsive, Back button, identity header with real Clerk avatar (userinfo enrichment), Your Macs list with This-Mac pinning + Remove-from-account, one Manage-connections button, confirmed honest sign-out.
  • Connections panel restructured: state-first header, persistent This-Mac card owning the pairing-code manager + QR-only phone disclosure, Machines/Phone/Web tabs with revoke confirmations, account rows self-filtered by local machine identity (with a named regression test).
  • Backend: Clerk userinfo profile in account status, local machine identity IPC, account-directory machine deletion wired end to end and CTO-gated.
  • iOS parity: sign-in-first connect flow, QR/Nearby+PIN, link/manual entry/web-pairing removed, sign-out copy parity.
  • Docs + CHANGELOG updated; relay E2E encryption recorded as planned security work.

Testing

  • /quality dual-review: 0 Blocker / 0 High; safe fixes applied and re-verified.
  • /test: named self-filter regression added; affected suites green (104 + 18 + 128 tests), CI-style shard 1/8 green (1046 tests), ade-cli + desktop tsc clean, webclient build green, iOS xcodebuild green.

🤖 Generated with Claude Code

Greptile Summary

This PR simplifies account and connection flows around ADE account sign-in. The main changes are:

  • Removes the user-facing ADE Relay toggle and makes relay availability follow account sign-in.
  • Removes legacy pairing link, manual address/PIN, and hosted web PIN-pairing flows.
  • Rebuilds desktop account and connections UI around ADE account, pairing code, QR code, and SSH.
  • Adds account-directory machine removal and local machine identity handling for “This Mac” filtering.
  • Aligns CLI, desktop web client, iOS settings, tests, docs, and changelog with the new model.

Confidence Score: 5/5

Safe to merge with low risk.

No blocking correctness or security issues were identified in the reviewed account, relay, IPC, and connection changes.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • The before-server Vite startup was attempted, but no visual before/after artifacts were emitted.
  • The UI Vite current-server run reached a ready state on the redacted internal URL before being killed during capture.
  • The simplified UX Vitest run completed and showed the real changed component test subset passed: 3 files, 28 tests.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ade-cli/src/services/account/accountAuthService.ts Adds bounded Clerk userinfo enrichment and carries provider/image metadata through account status without exposing tokens.
apps/ade-cli/src/services/account/accountMachineDirectoryService.ts Adds authenticated machine deletion and keeps account-directory bearer requests restricted to trusted directory origins.
apps/ade-cli/src/services/sync/syncTunnelClientService.ts Gates relay control/tunnel connections on account sign-in and lease validity after removing the user toggle.
apps/ade-cli/src/services/sync/syncService.ts Updates pairing/connect info and relay status to expose relay routes only when account relay eligibility is valid.
apps/desktop/src/main/services/account/accountBridge.ts Extends the token-free account bridge with profile metadata and machine removal while keeping bearer handling in main.
apps/desktop/src/main/services/ipc/runtimeBridge.ts Adds local account machine identity IPC support using persisted sync device and relay machine identifiers.
apps/desktop/src/renderer/components/account/AccountPage.tsx Rebuilds the account page with profile display, machine list, self-identification, removal confirmation, and sign-out confirmation.
apps/desktop/src/renderer/components/remoteTargets/RemoteTargetList.tsx Filters out the local machine from account-machine rows and routes account-machine connections through the account bridge.
apps/desktop/src/renderer/components/settings/SyncDevicesSection.tsx Simplifies sync device settings by removing relay toggle/manual pairing UX and retaining supported pairing paths.
apps/desktop/src/renderer/webclient/shell/WebClientRoot.tsx Simplifies hosted web-client startup toward sign-in/account-machine selection instead of hosted PIN pairing.
apps/ios/ADE/Views/Settings/SettingsPairingSection.swift Removes deprecated link/manual/web pairing UI paths and keeps QR/Nearby+PIN/SSH-oriented settings UX.
CHANGELOG.md Documents that ADE Relay now follows account sign-in and previous relay disables are re-enabled.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant DesktopUI as Desktop Account/Connections UI
participant MainIPC as Electron main IPC
participant AccountBridge as AccountBridge
participant Auth as AccountAuthService
participant Directory as Account Directory Worker
participant Runtime as Remote Runtime Service
participant Relay as ADE Relay

User->>DesktopUI: Sign in / view Macs / connect
DesktopUI->>MainIPC: account.status/listMachines/getLocalMachineIdentity
MainIPC->>AccountBridge: token-free account APIs
AccountBridge->>Auth: getStatus/getAccessToken (main only)
AccountBridge->>Directory: GET /account/machines with bearer
Directory-->>AccountBridge: machine list
AccountBridge-->>DesktopUI: token-free machines/status
DesktopUI->>DesktopUI: Pin/filter local machine by machineKey/deviceId
User->>DesktopUI: Connect account machine
DesktopUI->>MainIPC: account.pairMachine(machineKey)
MainIPC->>AccountBridge: pairMachine
AccountBridge->>Directory: resolve selected account machine
AccountBridge->>Runtime: save paired target credentials
Runtime->>Relay: Use relay route only while ADE account lease is valid
Runtime-->>DesktopUI: connected target result
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant DesktopUI as Desktop Account/Connections UI
participant MainIPC as Electron main IPC
participant AccountBridge as AccountBridge
participant Auth as AccountAuthService
participant Directory as Account Directory Worker
participant Runtime as Remote Runtime Service
participant Relay as ADE Relay

User->>DesktopUI: Sign in / view Macs / connect
DesktopUI->>MainIPC: account.status/listMachines/getLocalMachineIdentity
MainIPC->>AccountBridge: token-free account APIs
AccountBridge->>Auth: getStatus/getAccessToken (main only)
AccountBridge->>Directory: GET /account/machines with bearer
Directory-->>AccountBridge: machine list
AccountBridge-->>DesktopUI: token-free machines/status
DesktopUI->>DesktopUI: Pin/filter local machine by machineKey/deviceId
User->>DesktopUI: Connect account machine
DesktopUI->>MainIPC: account.pairMachine(machineKey)
MainIPC->>AccountBridge: pairMachine
AccountBridge->>Directory: resolve selected account machine
AccountBridge->>Runtime: save paired target credentials
Runtime->>Relay: Use relay route only while ADE account lease is valid
Runtime-->>DesktopUI: connected target result
Loading

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

arul28 and others added 3 commits July 16, 2026 04:17
Beginner-facing model is now exactly: ADE account, pairing code, QR code,
and SSH (advanced). Everything else became invisible or was removed.

- Relay: remove the kill-switch entirely (store enabled/enabledSetByUser
  fields, `ade sync relay` command, sync.setCloudRelayEnabled IPC). Relay is
  active whenever the machine is signed in; LAN → Tailscale → Relay priority
  and same-account relay proof are unchanged. Machines that previously
  disabled relay are re-enabled (see CHANGELOG).
- Pairing links: no user-facing link UI anywhere (desktop, iOS, web). The
  smart pair URL remains only as the internal QR wire encoding.
- Manual address+PIN entry removed on desktop and iOS; Nearby + PIN, same
  account, or SSH cover all paths.
- Web client: account sign-in only. /pair route and PIN pairing removed from
  the hosted client; existing paired environments keep working; localhost dev
  retains direct ws://.
- Account page: responsive rebuild with Back button, identity header (real
  Clerk avatar via userinfo), Your Macs list with This-Mac pinning and
  Remove-from-account, one Manage-connections button, confirmed sign-out
  with honest copy.
- Connections panel: state-first header, persistent This-Mac card owning the
  pairing-code manager (moved from the Mobile tab) and a QR-only phone
  disclosure; Machines/Phone/Web tabs with revoke confirmations; Share card,
  cloud-account badge, and relay toggle deleted; account rows self-filtered
  by local machine identity.
- Backend: Clerk userinfo enrichment (imageUrl/provider) in account status,
  local machine identity IPC, and account-directory machine deletion wired
  ("Remove from account").
- iOS: sign-in-first connect flow, QR/Nearby + PIN, link and manual entry
  removed, web-client pairing feature deleted, confirmed sign-out copy parity.
- Docs + CHANGELOG updated; relay E2E encryption noted as planned security
  work.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Consolidate the new account IPC channels into the shared IPC registry
  (identical channel strings; drops the one-off consts in types/account.ts).
- Hoist relative-last-seen bucket math and endpoint labeling into
  remoteMachineModel so AccountPage and AccountMachineRow share one
  implementation while keeping their surface-specific framing.
- Remove the stale sync.setCloudRelayEnabled / `ade sync relay` entries from
  the ade-cli README (missed by the docs sweep).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add a named regression test: this Mac never appears in its own account
  machine list (matched by machineKey or stale-deviceId reinstall row).
- Gate account.deleteMachine behind the CTO-only action list alongside
  listMachines/pairMachine (defense-in-depth; not reachable via the generic
  bridge today).
- Fix the onboarding-and-settings source map for the restructured
  Connections panel (Phone/Web tabs, This-Mac card, no web pairing).
- Tidy a stale iOS comment referencing the removed relay kill-switch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jul 16, 2026 9:23am

@arul28 arul28 changed the title accounts fixes -> Primary Overhaul accounts & connections UX around a four-concept model Jul 16, 2026
@arul28

arul28 commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 65 files, which is 15 over the limit of 50.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c366fa91-700d-4784-930a-1ecbd4304bd6

📥 Commits

Reviewing files that changed from the base of the PR and between 46098b8 and 5270dec.

⛔ Files ignored due to path filters (10)
  • CHANGELOG.md is excluded by !*.md
  • apps/ios/ADE.xcodeproj/project.pbxproj is excluded by !**/*.xcodeproj/project.pbxproj
  • docs/ARCHITECTURE.md is excluded by !docs/**
  • docs/PRD.md is excluded by !docs/**
  • docs/features/onboarding-and-settings/README.md is excluded by !docs/**
  • docs/features/remote-runtime/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/ios-companion.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/remote-commands.md is excluded by !docs/**
  • docs/features/web-client/README.md is excluded by !docs/**
📒 Files selected for processing (70)
  • apps/ade-cli/README.md
  • apps/ade-cli/src/bootstrap.ts
  • apps/ade-cli/src/cli.test.ts
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/multiProjectRpcServer.ts
  • apps/ade-cli/src/services/account/accountAuthService.test.ts
  • apps/ade-cli/src/services/account/accountAuthService.ts
  • apps/ade-cli/src/services/account/accountMachineDirectoryService.test.ts
  • apps/ade-cli/src/services/account/accountMachineDirectoryService.ts
  • apps/ade-cli/src/services/account/accountMachinePublisherService.ts
  • apps/ade-cli/src/services/sync/syncCloudRelayStore.test.ts
  • apps/ade-cli/src/services/sync/syncCloudRelayStore.ts
  • apps/ade-cli/src/services/sync/syncHostService.ts
  • apps/ade-cli/src/services/sync/syncLoopbackCollision.test.ts
  • apps/ade-cli/src/services/sync/syncRemoteCommandService.ts
  • apps/ade-cli/src/services/sync/syncService.ts
  • apps/ade-cli/src/services/sync/syncTunnelClientService.test.ts
  • apps/ade-cli/src/services/sync/syncTunnelClientService.ts
  • apps/desktop/src/main/services/account/accountBridge.trust.test.ts
  • apps/desktop/src/main/services/account/accountBridge.ts
  • apps/desktop/src/main/services/adeActions/registry.ts
  • apps/desktop/src/main/services/ipc/registerIpc.ts
  • apps/desktop/src/main/services/ipc/runtimeBridge.test.ts
  • apps/desktop/src/main/services/ipc/runtimeBridge.ts
  • apps/desktop/src/main/services/localRuntime/localRuntimeConnectionPool.ts
  • apps/desktop/src/preload/global.d.ts
  • apps/desktop/src/preload/preload.test.ts
  • apps/desktop/src/preload/preload.ts
  • apps/desktop/src/renderer/components/account/AccountPage.test.tsx
  • apps/desktop/src/renderer/components/account/AccountPage.tsx
  • apps/desktop/src/renderer/components/app/ConnectionsPanel.tsx
  • apps/desktop/src/renderer/components/app/TopBar.test.tsx
  • apps/desktop/src/renderer/components/remoteTargets/AccountMachineRow.tsx
  • apps/desktop/src/renderer/components/remoteTargets/PairMachineForm.tsx
  • apps/desktop/src/renderer/components/remoteTargets/RemoteTargetList.test.tsx
  • apps/desktop/src/renderer/components/remoteTargets/RemoteTargetList.tsx
  • apps/desktop/src/renderer/components/remoteTargets/ShareMachineCard.tsx
  • apps/desktop/src/renderer/components/remoteTargets/remoteMachineModel.ts
  • apps/desktop/src/renderer/components/settings/SyncDevicesSection.test.tsx
  • apps/desktop/src/renderer/components/settings/SyncDevicesSection.tsx
  • apps/desktop/src/renderer/webclient/account/client.ts
  • apps/desktop/src/renderer/webclient/adapter/misc.ts
  • apps/desktop/src/renderer/webclient/shell/MachinePicker.tsx
  • apps/desktop/src/renderer/webclient/shell/PairFlow.tsx
  • apps/desktop/src/renderer/webclient/shell/PinInput.tsx
  • apps/desktop/src/renderer/webclient/shell/ScreenShell.tsx
  • apps/desktop/src/renderer/webclient/shell/WebClientRoot.tsx
  • apps/desktop/src/renderer/webclient/shell/WebShell.tsx
  • apps/desktop/src/renderer/webclient/shell/__tests__/MachinePicker.test.tsx
  • apps/desktop/src/renderer/webclient/shell/__tests__/PairFlow.test.tsx
  • apps/desktop/src/renderer/webclient/shell/__tests__/WebClientRoot.test.tsx
  • apps/desktop/src/renderer/webclient/shell/shellTokens.ts
  • apps/desktop/src/renderer/webclient/sync/__tests__/sync.test.ts
  • apps/desktop/src/renderer/webclient/sync/client.ts
  • apps/desktop/src/renderer/webclient/sync/connection.ts
  • apps/desktop/src/renderer/webclient/sync/relayPolicy.test.ts
  • apps/desktop/src/renderer/webclient/sync/relayPolicy.ts
  • apps/desktop/src/shared/ipc.ts
  • apps/desktop/src/shared/types/account.ts
  • apps/desktop/src/shared/types/sync.ts
  • apps/desktop/src/shared/webClientUrl.test.ts
  • apps/desktop/src/shared/webClientUrl.ts
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/Account/AccountConnectionsSection.swift
  • apps/ios/ADE/Views/Settings/ConnectionSettingsView.swift
  • apps/ios/ADE/Views/Settings/SettingsPairingSection.swift
  • apps/ios/ADE/Views/Settings/SettingsPinSheet.swift
  • apps/ios/ADE/Views/Settings/SettingsSupportTypes.swift
  • apps/ios/ADE/Views/Settings/SettingsWebClientPairSheet.swift
  • apps/ios/ADETests/ADETests.swift

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/accounts-fixes-8ac17dba

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…c17dba

# Conflicts:
#	apps/desktop/src/renderer/components/account/AccountPage.tsx
@arul28
arul28 merged commit 3e26181 into main Jul 16, 2026
35 checks passed
@arul28
arul28 deleted the ade/accounts-fixes-8ac17dba branch July 16, 2026 09:54
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