Repository navigation
Make desktop Models Autopilot-first; polish sign-in, cooling and notifications - #1
Merged
kydo-researcher merged 1 commit intoOct 7, 2026
Conversation
…g and notifications
0xkydo
approved these changes
Oct 7, 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
Make the desktop app Autopilot-first, give account sign-in an explicit connection-code dialog and verified email identity, and use one consistent bottom notification across every page. This update is stacked directly on
codex/desktop-live-data-and-shared-cli, the contributor branch of Layr-Labs/d-inference#1354.Merge order: merge this PR into that branch to update Layr-Labs#1354, then review/merge Layr-Labs#1354 into its existing base. The shared Swift
darkbloomCLI remains the backend for Electron. This PR contains only the subsequent app improvements; it does not duplicate Layr-Labs#1354's initial usage-accounting and dashboard integration.What changes for users
Autopilot-first Models and onboarding
start --autopilot --model <saved startup models>, preserving the local endpoint's port, bind and auth choices. Keep removal blocked for resident, advertised or pinned models.null; leave unknown estimates unavailable and retain the download-size fallback for preliminary pin checks.Account sign-in and identity
emailto the existing unwindowed account-earnings response. Swift reads it through the shared cached ledger request, checks coordinator/token identity, persists it with the account credential, and exposes only email/status to Electron. Hydrate existing logins even when local serving is stopped; clear identity on sign-out.Home cooling and clearer status
Consistent notifications
OperationFeedfor Home, My Macs, Leaderboard and Updates; remove My Macs' top/inline operation display and separate immediate-action error notices.OperationToastintodocument.body, so route containers cannot change the bottom placement.Shared backend and interfaces
GET /v1/statswith optionalmodel_earnings: rolling7d,since,as_of, and ranked{id, earnings_micro_usd}rows. Reuse the stats refresh/cache; no new endpoint.nullwhile other stats remain available.GET /v1/provider/account-earningswith optional authenticated-owneremail; query parameters cannot select another owner. Reuse the ledger cache instead of a separate identity endpoint.No database migration, coordinator WebSocket protocol change, release-version bump, installer change, new telemetry field or billing mutation is introduced.
Before
flowchart TB subgraph UI["Electron: prior desktop PR"] M["Models: full catalog and pool controls"] --> P["Manual-first setup; pins harder to find"] S["AccountControl: inline sign-in"] --> B["Browser opens immediately"] H["HealthBar reads event reason"] --> E["Historical backend text shown as readiness"] N["App + Machines operation feeds"] --> T["Bottom on Home; inline on My Macs"] end subgraph Native["Shared Swift backend"] B --> D["DeviceAuth: scoped grant required"] D --> F["Older coordinator rejects desktop sign-in"] A["DesktopAccountEarningsCache"] --> L["Account ledger: no email field"] L --> G["Generic Account label after approval"] end classDef ui fill:#dbeafe,stroke:#2563eb,color:#172554 classDef native fill:#dcfce7,stroke:#16a34a,color:#14532d classDef issue fill:#fee2e2,stroke:#dc2626,color:#7f1d1d class M,S,H,N ui class D,A,L native class P,B,E,T,F,G issueAfter
flowchart TB subgraph UI["Electron: explicit choices and observed status"] M["AutopilotModels + RecommendedModels"] --> R["Top three; expandable list; direct memory controls"] S["AccountControl + AccountSignInProgress"] --> B["Code; user clicks Continue in browser"] H["HealthBar + FanStatus"] --> V["Current readiness; Cooling shortcut"] N["App mounts one OperationFeed"] --> T["Portal toast at bottom on every page"] T --> O["Success: 10 seconds; failure: until Close"] end subgraph Native["Same Swift darkbloom CLI"] R --> A["DesktopAutopilot: download, verify, start, pin"] B --> D["DeviceLoginClient + negotiated grant scope"] D --> C["Separate DesktopAccountCredential"] C --> I["AccountEarningsCache + AccountIdentity"] end subgraph API["Existing coordinator reads"] W["stats: seven-day model payout aggregate"] --> M L["account-earnings: owner email"] --> I I --> G["Sidebar email + Signed in"] end classDef ui fill:#dbeafe,stroke:#2563eb,color:#172554 classDef native fill:#dcfce7,stroke:#16a34a,color:#14532d classDef api fill:#fef3c7,stroke:#d97706,color:#78350f classDef outcome fill:#ede9fe,stroke:#7c3aed,color:#4c1d95 class M,S,H,N ui class A,D,C,I native class W,L api class R,B,V,T,O,G outcomeBlue: Electron components; green: native CLI; amber: existing coordinator APIs; purple: observable outcomes; red: previous friction/failure paths.
Visual verification
The screenshot is from the rebuilt local app against the current, older coordinator. Network rankings correctly say unavailable until the coordinator addition is deployed; the generic Account label likewise remains until authenticated email is supplied.
Test plan
make desktop-test: 420 tests across 64 files.make desktop-buildandnpm --prefix desktop-app run lint: production build/typecheck and formatting pass.swift test --filter 'Desktop|DeviceCodeLogin|DeviceAuth': 74 tests across 17 suites; native CLI builds successfully.make desktop-api-test: real isolated native HTTP checks, including account email hydration/persistence, token isolation, sign-out without provider unlinking, exact counters, resource caching, cancellation and executable replacement.make coordinator-test: complete coordinator suite passes, including 1,797 API tests;make coordinator-buildpasses.go test -race ./api ./store -run 'TestAccountEarningsEmail|TestStatsIncludesPublicSevenDayModelEarnings|TestStatsModelEarningsFailure|TestNetworkModelEarnings' -count=1: focused identity and public aggregate checks pass.make docs-impact-check BASE=review-fork/codex/desktop-live-data-and-shared-cli,make docs-check, andgit diff --check: pass.The PostgreSQL aggregate contract is included alongside the memory-store test, but local database-backed cases skip without a disposable
DATABASE_URL. The complete Swift provider suite is not claimed here: the prior PR records missing MiMo fixture requirements in this environment; focused desktop/auth coverage passed.Published checks: the commit is GitHub-verified and both Mermaid figures and the screenshot were inspected in the GitHub-rendered PR. This contributor fork has no registered Actions workflows, so no hosted CI or automated review results are claimed; the local validation above is complete.
Components touched
Documentation impact
Rollout and limits