Commit Graph
8 Commits
Author SHA1 Message Date
Neil 92cbe9f74e feat(cloud): move team, billing and Enterprise admin UI to the web console
Owner decision: paid and admin settings do not belong in the open-source desktop app.
Deletes the Enterprise pane (SSO, domains, SCIM, MFA policy, audit log), the Plan & billing
section and plans dialog (checkout, usage history, plan-feature-copy), and Team management
(members, invites, roles, leave, delete, create), with their hooks, fixtures, tests, i18n keys
and the main/preload/IPC only they used.

Each removed section is now one "Manage in browser" row. Main asks auth for a single-use
console code (POST /v1/desktop/console/ticket {page, orgId?} -> {code}) and opens
<consoleOrigin>/console/<section>?code=... with shell.openExternal; on any failure it opens the
page without a code. Endpoint, field names and origin live in cloud-console-config.ts
(ORCA_CLOUD_CONSOLE_URL overrides the origin, default is the auth origin).

Kept: sign-in, account identity and own MFA row, the team MFA gate/banners, the team switcher,
the roster (presence, names), plan status badge and payment notice, in-context billing
blockers (now "Compare plans" opens the console and re-checks on focus), cloud setup.
2026-11-14 02:21:04 -08:00
Neil f23b6f1f6c fix(cloud): drop type assertions in ORG-TOKEN-STALE code and tests 2026-11-12 22:50:54 -08:00
NeilandClaude 8c27b84e76 fix(cloud): mint sandbox tokens for the shown team, verify the org claim, x-orca-org + re-mint once (ORG-TOKEN-STALE b)
- Mint body {orgId} (null for personal); fall back to {} on 400 from older auth.
- Decode the minted token's org claim; never cache a wrong-team token, re-mint once,
  then fail with "Couldn't switch to {team}. Sign out and back in."
- selectCloudOrg refreshes the session before publishing activeOrgId; refresh errors
  surface; the switch bumps a token epoch that drops cached sandbox tokens.
- The token epoch also bumps on any membership/role change in a saved session and on
  member role change/removal.
- Control-plane fetch wrapper (all desktop clients) sends x-orca-org: <orgId|user>; on
  409 org_mismatch or 401/403 stale_token it invalidates, re-mints once and retries once.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-12 22:50:53 -08:00
Neil 4e7a04c50a feat(cloud): ENTERPRISE-AUDIT (2/2) Settings > Enterprise with the team audit log; remove Recent activity 2026-11-12 20:36:13 -08:00
Neil 2892ba1f47 fix(cloud-integration): lint and typecheck green on HEAD; premerge gate script
- cloud-transfer-steps runs git through gitExecFileAsync (no direct child_process); VM replies parsed with zod.
- Casts replaced by types, guards and zod across hosted-sandbox, cloud-api, cloud-api settings and tests.
- Offline cache and message-queue store use node:fs/promises (main-sync-fs ratchet); the offline service's
  30 s setInterval becomes a backing-off beat that runs only while prompts are queued; renderer intervals use
  installWindowVisibilityInterval.
- Flaky-test gates: fixed timestamps, vi.waitFor, no sleeps in cloud-message-queue/cloud-transfer tests.
- shadcn restyles become primitive variants (Skeleton shape/motion, Button default-held, Textarea compact/bare,
  InlineError toast layout, Popover focusRing); exhaustive switch; derived pending state in the run-target hook.
- Localization: routine labels/placeholders and 'Orca Cloud is unavailable.' through t(); cloudSecrets plurals
  pass the singular as defaultValue_one.
- config/scripts/cloud-integration/premerge-check.sh: merge-into-integration gate (typecheck + full lint + tests).
2026-11-09 08:08:35 -08:00
Neil 30c5b84e64 fix(cloud): FE review round 2 — PATCH matches server (no nulls, 5–120 min), webhook URL from edits, team-aware token cache, approval busy guard, polls keep loaded pages, inert aria-disabled refresh, CSS.escape, lenient link parsing, Intl list formatting 2026-11-09 07:20:07 -08:00
Neil 2cee7bc17e feat(cloud): connected MCP apps on the API keys page; split routine row 2026-11-09 07:19:58 -08:00
Neil 2e76ad5592 feat(cloud): Orca Cloud API keys + routines settings (private builds)
Main-process /v1 client (zod-validated, token never leaves main, errors mapped
to stable codes), IPC + preload bridge, Settings → API Keys (create with scope
presets, one-time secret, revoke, MCP approve-an-app code, docs/MCP links,
vmCliEnabled org toggle, admin activity log) and Settings → Routines (list,
editor for schedule/GitHub/webhook triggers, run now, history, delete), gated
on a configured Orca Cloud control plane. Component fixtures + unit tests.
2026-11-09 07:19:57 -08:00