Skip to content

feat(fleet): integrate Fleet enrollment and live runner UI in Desktop - #281

Closed
KafuChino123 wants to merge 22 commits into
masterfrom
feat/run-9-runner-section
Closed

feat(fleet): integrate Fleet enrollment and live runner UI in Desktop#281
KafuChino123 wants to merge 22 commits into
masterfrom
feat/run-9-runner-section

Conversation

@KafuChino123

Copy link
Copy Markdown
Member

Summary

  • add a Swift Fleet control client for the local Fleet Agent Unix socket
  • add the authenticated Platform REST client for workspace discovery and enrollment-token issuance
  • orchestrate OIDC -> Platform token -> local Agent enrollment without managing the Agent process
  • replace the RUN-9 sample-data UI with live Fleet Agent snapshots, enrollment recovery, drain/resume, and unenroll flows
  • add RUN-31 macOS runner VM settings, image preparation progress, and capability gating
  • restore auth sessions off the main actor and cover the new state machines with tests

Architecture boundary

ArcBox Desktop owns OIDC, Platform REST requests, enrollment orchestration, local gRPC transport, and UI state. It does not install, create, launch, stop, or update the Fleet Agent. Runner VM lifecycle remains Fleet Agent -> arcbox-daemon.

On application termination, Desktop waits briefly for enrollment reconciliation and closes only its Fleet gRPC transport. The existing core arcbox-daemon shutdown behavior is unchanged pending a separate team decision.

Validation

  • make verify-arcbox-protobuf
  • swift-format lint -r --strict ArcBox/ Packages/
  • swiftlint lint --strict --config .swiftlint.yml — 263 files, 0 violations
  • xcodegen generate with no tracked project diff
  • full macOS test suite — 135 passed, 0 failed, 0 skipped
  • Release build with SKIP_RUST_BUILD=1 CODE_SIGN_IDENTITY=-

Why this is a draft

  • the production Platform -> Fleet Agent -> gateway enrollment path still needs end-to-end validation
  • RUN-31 still needs a real Darwin job to validate VM creation, execution, and teardown through the Agent and arcbox-daemon
  • signed/notarized clean-machine validation remains outstanding

Known non-blocking warnings

  • generated gRPC Swift code and the current transport wrapper use APIs deprecated by the latest local gRPC Swift toolchain
  • existing LocalRootFSOutlineCoordinator actor-isolation warnings remain unchanged

KafuChino123 and others added 22 commits July 16, 2026 00:23
Add a FleetControlClient Swift package with generated protobuf and gRPC stubs for the fleet agent local control API.

Wire the local package into the ArcBox app target so phase 1 desktop integration can import the generated client types.
Wrap the generated fleet control stubs in a high-level client for lifecycle, state watch, and settings RPCs.

Map proto responses into desktop-facing models while preserving optional settings update presence semantics, and cover the mapping behavior with tests.
Add the local fleet control client to SwiftUI environment values and app scene injection.

Start the fleet control transport outside daemon startup, log through the fleet category, and close it during app termination.
Drive fleet agent state from the local control watch stream.

Add lifecycle actions, settings updates, reconnect backoff, and user-readable error handling for the runners dashboard.
Consume the signed-in OIDC session to list Platform workspaces and issue workspace-scoped Fleet enrollment tokens.

Wire token issuance into local Fleet Agent enrollment and configure the Platform endpoint for app and CI builds.
Replace RUN-9 sample data and stub actions with FleetViewModel watch snapshots, workspace enrollment, and local drain/resume controls.

Expose the runner section in release builds and cover the presentation-state mapping.
Let ArcBoxTests consume FleetControlClient through the hosted ArcBox target, avoiding Xcode’s duplicate dynamic gRPC package graph.

Handle runner item-selection deep links explicitly so navigation remains exhaustive.
- coordinate authenticated token handoff with local Agent state
- keep Fleet watch and client transport app-scoped
- reconcile unknown outcomes and graceful termination
On macOS 26, any state change inside a fixedSize(vertical: true)
subtree triggers a window-sizing pass that resizes the window — or the
NavigationSplitView content when the window cannot grow — to the
screen's visible-frame height, sliding the sidebar under the title bar
and pushing the account button off-screen. Drop the modifier from the
dynamic error label (it wraps identically without it) and document the
pitfall in AGENTS.md.
@linear-code

linear-code Bot commented Jul 15, 2026

Copy link
Copy Markdown

RUN-9

ABXD-100

@KafuChino123

Copy link
Copy Markdown
Member Author

Superseded by #320, which carries the RUN-9 integration forward with the Better Auth device-authorization flow, Fleet Platform enrollment, and the latest master history.

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.

2 participants