Commit Graph
2146 Commits
Author SHA1 Message Date
Neil 51ace4d05f feat(billing): one-time Orca Cloud trial (N11) and its desktop surfaces (T1)
Billing Worker:
- trials + trial_claims (migration 0005): 2 sandbox hours per new team, no card, no Stripe.
- POST /v1/billing/trial grants it (idempotent, any member); grantTrial/trialOffer exported for
  the setup session. offers.trial on GET entitlements only when this caller could still claim it.
- Abuse limits: once per team, Orca user, normalized verified email, GitHub user (token claim)
  and GitHub owner (POST /v1/internal/trial/github from the binding; a reused identity revokes),
  disposable-domain blocklist, 3 grants per IP per day. Keys stored as SHA-256 hashes.
- Entitlement trial {includedSeconds, usedSeconds, remainingSeconds, exhausted}; metered from
  usage_events, concurrency 1, never overage; trial_used_up (suspendRunning) / trial_unavailable.
- Any subscription ends the trial; unused trial hours lapse.
- e2e: trial path (grant, no Stripe customer, concurrency, metering to used up, once per user,
  plan ends it) with cleanup of the run's abuse keys.

Desktop: trial_used_up / trial_unavailable classify as 'plan'; copy in billing, phone and CLI;
"Trial" badge, TrialPlanSummary in Plan & billing and the plans page strip, account menu row
"Trial · {{count}} sandbox hours left" (Choose plan for owners/admins); billingClaimTrial IPC
and claimOrcaCloudTrial() for the composer.
2026-11-10 06:20:22 -08:00
Neil 86c1726454 fix(w8): DS-27 polish: share-link sign-in uses the centred state layout (Cloud, title, sentence, Sign in button); asleep host uses Cloud + hollow asleep dot instead of Moon (DS-38 parity) (#258) 2026-11-10 05:41:34 -08:00
Neil 19eaee7019 fix(w8): no-desktop Home explains Orca Cloud workspaces appear once a desktop is paired (#251)
* fix(w8): no-desktop Home says Orca Cloud workspaces show up once a desktop is paired (W9 finding; design-squad copy)

* test(w8): empty-state test without an any-typed renderer union
2026-11-10 05:17:01 -08:00
Neil 4ca180d5ae fix(w8): cloud-icon rule on the phone (paired desktop cloud rows, home label, nav glyph) (#245)
* fix(w8): cloud-icon rule on the phone: a paired desktop's Orca Cloud workspaces lead with the Cloud glyph + state dot (worktree.ps carries orcaCloud.status), home cloud rows read 'Cloud workspace, …', muted Cloud before the cloud workspace title

* fix(w8): cloud-icon review: glyph label merges into the row (no own focus stop), no filled ring behind the dot (pressed/active fills), newest VM record speaks for a workspace

* fix(w8): cloud-icon review 2: a cleaned-only workspace stays cloud (as on the desktop) with no dot, a live VM beats a cleaned one, cleanup_failed draws no forever-pulsing dot; store-order test

* test(w8): cloud-icon ps status test without a cast

* fix(w8): cloud-icon dot sits mostly outside the glyph's bottom-right (design-squad), clear of the title
2026-11-10 04:53:44 -08:00
Neil dd34314dc0 feat(billing): bill overage by the minute, put sandboxes to sleep at the cap (U22, U24)
- Overage stays $1.00 per sandbox hour (ORCA_CLOUD_OVERAGE_CENTS_PER_HOUR) and is now billed by
  the minute: a per-minute metered TEST price (unit_amount_decimal = rate / 60 to 12 decimals,
  transform_quantity divide_by 60, round up), created the same way by stripe-test-setup.ts.
  capSeconds rounds the cap down to whole minutes and spentCents mirrors the invoice, so the
  cap math matches Stripe. The meter still counts seconds.
- Opting in re-prices an overage item still on an older price (e.g. $0.75 / h) instead of adding
  a second item on the same meter, and removes any extra stale one.
- Alerts at 75%, 90% and 100% of included hours (warnAtPercent).
- New top-level entitlement.suspendRunning: payment grace expired, or at the limit (out of hours
  with overage off, or at the spend cap). The start check and usage answers carry it, so the
  control plane puts running sandboxes to sleep (snapshot kept, never deleted). Payment fields and
  /v1/internal/suspensions stay payment-only, so no data-retention clock starts at a cap.
- Copy (desktop billing panel, plan card, build sheet, phone, CLI): "billed by the minute" after
  the rate; at the limit "Running sandboxes go to sleep and new ones can't start. Nothing is
  deleted, and your files are safe."
2026-11-10 04:33:07 -08:00
Neil c12d99f08e fix(w8): DS-41 phone polish (grouped backdrop, amber contrast, access row labels) (#232)
* fix(w8): DS-41 phone polish: grey backdrop behind white groups in light, light amber at 3:1+, access rows read '{device}, last used {date}' with a 'Removes this phone's access' hint

* fix(w8): DS-41 review: white text on light amber badges (onStatusAmber, 5:1), grey backdrop only behind grouped lists (card screens keep white), 'connected {date}' label when a phone was never used
2026-11-10 04:05:52 -08:00
Neil 2d99d9b591 fix(w8): DS-28 new cloud workspace repo picker + idle-sleep line (#231)
* feat(w8): DS-28 new cloud workspace: pick the repository from this phone's recents and the team's projects ('Other repository…' for any other), and say 'Sleeps after N minutes idle' (new screen, empty Home)

* copy(w8): DS-28 with the picker, the note says 'Pick none for a blank project'

* fix(w8): DS-28 review: explicit 'No repository (blank project)' row, the field stays while typing an unlisted repo, choosing 'Other repository…' again keeps the text

* fix(w8): DS-28 nit: typing in the field selects 'Other repository…'
2026-11-10 04:03:15 -08:00
Neil a7989dfd1e fix(w8): DS-27 phone cloud states: sign in when not connected (returns to the link), 'Couldn't reach Orca Cloud' on errors, Not responding + owner Restart, Deleting, glossary-only headline, asleep cloud host gate (Wake), banner 'Try again'; state logic tested (#227) 2026-11-10 04:00:07 -08:00
Neil be26e2f832 copy(w8): DS-04 phone status reads "N sandbox hours so far. Uses sandbox hours while running." / "…Uses no sandbox hours while asleep." (no dollars) (#217) 2026-11-10 03:09:39 -08:00
Neil 49ce098274 Merge remote-tracking branch 'private/cloud/integration' into cloud/sleeping-read-snapshot
# Conflicts:
#	src/renderer/src/components/cloud-workspaces/CloudWorkspacesHome.fixture.tsx
#	src/renderer/src/i18n/locales/en.json
2026-11-10 02:39:02 -08:00
Neil 9dcda9941c chore(cloud): mobile switch exhaustiveness; extract the read-panel hook 2026-11-10 02:32:17 -08:00
Neil 6fb8497a1a Merge remote-tracking branch 'private/cloud/integration' into cloud/sleeping-read-snapshot
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	mobile/src/cloud/cloud-control-plane-client.ts
#	mobile/src/i18n/en-runtime-required.json
#	mobile/src/i18n/locales/en.json
#	src/renderer/src/components/cloud-workspaces/CloudWorkspaceRow.tsx
#	src/renderer/src/components/cloud-workspaces/CloudWorkspacesHome.tsx
2026-11-10 02:21:17 -08:00
Neil 92142679a5 refactor(cloud): one classifyEntitlementDenial in src/shared/orca-billing.ts (DS-23); run-on access, build failure, build log, workspace errors and the phone keep their own wording 2026-11-10 02:17:30 -08:00
Neil d4653c15d3 feat(cloud): one overage constant (ORCA_CLOUD_OVERAGE_CENTS_PER_HOUR, $1) for billing and the control plane; workspaces show sandbox hours, not per-workspace dollars (desktop list, phone status) 2026-11-10 01:52:05 -08:00
Neil 7f4ff74bde Merge pull request #188 from nwparker/cloud/agents-picker
Orca Cloud agent pickers list only the agents the image ships
2026-11-10 01:28:09 -08:00
Neil ff12245a82 feat(cloud): one sandbox size (8 vCPU · 16 GB, 1×) — billing counts every size 1×, plans/usage/run-on/env/CLI/phone copy from ORCA_CLOUD_SANDBOX_SPEC, size pickers removed 2026-11-10 00:54:28 -08:00
Neil 0559156ce2 chore(cloud): read snapshot lint/quality gates (no casts, async key store, split parser, l10n) 2026-11-10 00:49:53 -08:00
Neil 3dd921f320 fix(cloud): W10 review of the read view: waking state, Wake to continue everywhere, plainer copy, agent display names 2026-11-10 00:42:30 -08:00
Neil f3510092e2 feat(cloud): Orca Cloud agent pickers list only the agents the image ships
Desktop composer with Orca Cloud selected: the picker is enabled and lists the
image agents (minus disabled ones) as terminal rows, defaulting to the user's
default when the image ships it, else claude; a local-only pick is repaired.
Phone cloud picker and composer read the same shared list and default.
2026-11-10 00:33:19 -08:00
Neil 691e428269 fix(cloud): rollback pin, reader-key revoke on sign-out, no re-register on not_sealed_for_key; read view polish 2026-11-10 00:27:19 -08:00
Neil 86aafd99c6 feat(cloud): read a sleeping workspace from an E2EE snapshot (desktop + phone clients) 2026-11-10 00:05:33 -08:00
Neil 4a1e476b38 fix(w8): long-wake note hands over to the plain note in place: no blink, announced once (iOS once; Android live region off after first) (#182) 2026-11-09 23:18:03 -08:00
Neil b6b6902f57 W8: reassure on the phone when a wake runs long (files are safe; queued prompt sends once awake) (#180)
* feat(w8): reassure after 10 s of waking (files are safe; a queued prompt sends once awake), under the steps with the timer still running

* fix(w8): wake-slow note: iOS-only announce, prompt sentence only while waking, whole-run reassurance from 20 s, fresh per run
2026-11-09 23:14:10 -08:00
Neil 850f1b8167 copy(mobile): W10 — registry-unreachable fallback without the parenthetical hedge 2026-11-09 20:16:18 -08:00
Neil 062747a768 copy(mobile): at-cap on wake names the owner's seat from the team registry (Alex is at their limit… / You're at your limit…); generic only when the owner is unknown 2026-11-09 20:14:58 -08:00
Neil 52f1ba7796 docs+copy(cloud): the per-seat running cap counts the workspace owner's seat; at-cap errors a teammate sees name the owner 2026-11-09 20:11:19 -08:00
Neil 6bc1fffc67 W8: teammates wake a team workspace from the phone (team-route wake; owner route not widened) (#155)
* feat(w8): teammates wake a team workspace from the phone (team route long-poll wake, same access/billing/cap; owner route stays the fallback)

* test(w8): team wake refuses an admin on a private row, never returns the endpoint; phone never falls back on 401/403
2026-11-09 19:59:10 -08:00
Neil 5e9fdffc41 W8: phone forgets cloud workspaces that are gone (confirmed by the registry), never on transient errors (#154)
* fix(w8): phone forgets cloud workspaces that are gone (missing from the complete registry list, or wake says not_found); never on transient errors

* fix(w8): prune only on the registry's own not_found for that workspace (lists are capped and skip hidden rows; status 404s are owner-only); restore a link whose host removal failed

* perf(w8): host prune is single-flight and remembers a confirmed-present workspace for 5 minutes
2026-11-09 19:52:06 -08:00
Neil 550a35c374 fix(mobile): subscribe to window focus/blur AppState events on Android only (iOS rejects them with a red screen in development) (#150) 2026-11-09 19:36:12 -08:00
Neil 5adc8fbf32 Merge pull request #142 from nwparker/cloud/w6-agent-firstrun
W6: agents work from the phone — pre-answer Claude/Codex first-run screens; Open terminal opens the terminal
2026-11-09 18:49:54 -08:00
Neil 0ac8bb1e79 Merge remote-tracking branch 'private/cloud/integration' into cloud-sync
# Conflicts:
#	src/renderer/src/lib/browser/navigation/remote-oauth-callback-relay.ts
2026-11-09 18:42:43 -08:00
Neil d98b730df9 fix(cloud): agents start working from the phone/API — Claude Code first-run screens and Codex trust/sandbox pre-answered in the sandbox, no self-update mid-session; 'Open terminal to sign in' opens the terminal (paneView rides with paneKey) 2026-11-09 18:42:25 -08:00
Neil cdaa328407 fix(w8): cloud row says "Created just now" (not "just now ago") and drops the repeated activity time (#139) 2026-11-09 18:27:00 -08:00
Neil e998a5ce96 W8 follow-ups: removal and role loss reach phones; role-aware plan-denial copy (#135)
* fix(w8): removing a member revokes their phones; role changes move phones too; a phone's stored role never re-syncs keys

* fix(w8): one removal path revokes keys, phones, grants and routines; stale desktop tokens can't re-sync roles or vouch phones; a grant revoked mid-issue stays revoked

* fix(w8): a removed member's unexpired desktop tokens stop working; changes count from auth's time; desktop re-mints and retries enroll on stale_token

* feat(w8): role-aware plan-denial copy on the phone (owners and admins get the fix, members who to ask)

* fix(w8): W10 copy (per-seat team limit, choose a plan) and FE review (3 s abortable role read, Android live region, more copy cases); no casts
2026-11-09 18:02:56 -08:00
Neil f7e5c8aae5 Merge stably/main into cloud/integration
# Conflicts:
#	src/renderer/src/components/native-chat-recovery/NativeChatResumeRuntimeModal.tsx
#	src/renderer/src/components/settings/page/settings-page-renderer.tsx
#	src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.tsx
#	src/renderer/src/i18n/locales/en.json
2026-11-09 18:02:21 -08:00
Neil 9288e84d7a Merge remote-tracking branch 'private/cloud/integration' into cloud-sync
# Conflicts:
#	src/renderer/src/i18n/locales/en.json
2026-11-09 18:01:10 -08:00
OrcaWinandOrcaWin 894dbbd0ec test: remove low-value mobile generation and cache cases (#40571)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-09 17:30:34 -08:00
Neil e74d775884 feat(cloud): Orca Cloud workspaces on the phone (W8) (#113)
* feat(cloud): Orca Cloud workspaces on the phone (W8)

Home gets a Cloud section that lists the team's cloud workspaces straight from
the control plane (phone-signed device-session tokens; no desktop in the path).
A workspace screen wakes the sandbox (W2 long-poll wake), gets this phone its
own revocable orcad device through a W4 sealed grant (opened with the shared
opener on pure-JS primitives for Hermes), pairs directly over E2EE to the stable
sandbox endpoint, and delivers prompts queued on the phone while it was asleep
(agent.launchReplay, deduped by operation id). Create a workspace from the
phone (repo, branch, agent, first prompt, sandbox size), sleep, archive, live
status and spend, per-phone access management with revoke and disconnect, and
team share links (orca://cloud/w/<id>) open on the phone. Copy follows the
Orca Cloud glossary; dark/light, Reduce Motion, VoiceOver announcements.

* fix(w8): design round 2 (honest spend, can't-connect state, queue states, distinct titles, neutral archive, hairline groups)

* fix(w8): FE + W10 round 2 (retry ids, pairing give-up, create idempotency, neutral dots, waking composer, a11y values, salvage storage)

* fix(w8): tell same-named cloud workspaces apart by when they were made

* fix(w8): agent names from the shared table; localized repo placeholder

* fix(w8): round 3 (agent-started card with terminal sign-in path, transport-safe retries, open waits for the connection, single wake timer, created-ago rows)

* fix(w8): FE round 4 (open never blocked on worktree lookup, one connect deadline per run, mid-delivery prompts never stranded, no blank terminal on open session)

* fix(w8): prompts interrupted mid-delivery count as waiting (Open and retry resume them)
2026-11-09 17:29:05 -08:00
Brennan Benson 8573f7ce86 Create a worktree per repository from an empty folder workspace on the phone (#40139)
* feat(mobile): create a worktree per repository from an empty folder workspace

A folder workspace with no attached worktrees lists one card per
repository in its project group, as desktop's empty state does. Tapping
one creates a worktree named after the folder, attached to it, in place;
a taken name or a setup choice opens the new-workspace composer with the
repo, the name and the folder parent filled in. Shown only when the host
creating it supports exact-name creation.

* chore(mobile): merge the folder repo read's execution-host imports

* fix(mobile): folder creates keep their repository until the folder shows them

Every create from a folder's empty state, direct or through the
composer, holds its repository from admission until the folder lists
the new worktree, so a lost reply, a remount or a reopened form can't
start a second one. The composer and toasts belong to the folder
screen, stay on the folder's host, and say nothing once it's left. A
relayed server's repository read holds no desktop event stream, and a
failed read can be retried.

* test(mobile): a folder create resent after a lost reply carries the same mutation id

* fix(mobile): folder creates keep their name, and a left or replaced form shows and holds nothing

* fix(mobile): pause folder rows under the create form; a lost folder create is checked, never resent as another

* fix(mobile): a folder card never resends a form's create, and one form owns the folder screen at a time

* fix(mobile): a folder setup choice resends only its own unconfirmed create, and the newest form silences older ones

* test(mobile): declare the submit hook's folder launch in its recording fixture

* fix(mobile): a create refused on a resend after a lost reply tries no other name and stays unconfirmed

* fix(mobile): a replayed refusal after an agent-launch fallback stops the retry, and the composer says it may have been created

* test(mobile): type the replayed refusal reply in the retry test

* ci: retrigger checks

* fix(mobile): localize the folder and uncertain-create messages in the workspace composer
2026-11-09 17:18:33 -08:00
Kelvin Amoaba 258d3b375a perf(mobile): brotli-compress the page build (#40532) 2026-11-10 00:03:30 +00:00
Kelvin Amoaba 2ee151827a perf(mobile): load the terminal engine and the session dock only when needed (#40515)
* perf(mobile): load the terminal engine and the session dock only when needed

Opening a session parsed xterm (with its WebGL addon) and the wide-layout
dock's Source Control and Files panels, even for chat sessions on phones.
The page's terminal now imports its engine when the first terminal mounts,
and the dock lazy-loads its panels behind a frame that paints at once.

The page build anchors lazy modules that share boot code the way it already
anchors routes, so the new lazy chunks don't split the boot chunks.

* fix(mobile): show the terminal start error when replaying queued commands throws
2026-11-09 23:46:50 +00:00
Neil c0d7a90729 refactor: break runtime import cycles; check import/no-cycle at full depth (#39732)
Extract shared state/helpers into leaf modules (pure moves, re-exports kept)
so import/no-cycle can run at full depth with type-only imports ignored.
120 src + 8 mobile cycles -> 0. 10 suppressions remain on the browserManager
singleton hub, which needs DI to break.
2026-11-09 15:45:32 -08:00
Kelvin Amoaba 3667cc1300 fix(mobile): read a generic kept dictation failure without saying "Dictation stopped" twice (#40529) 2026-11-09 23:42:42 +00:00
Kelvin Amoaba a4291dbc4a fix(mobile): keep page builds where the OS doesn't purge them (#40524)
iOS emptied Library/Caches under storage pressure, and Android's cacheDir is
cleared by Clear cache, cleaner apps and low storage. Each purge cost a full
foreground download of the page build on the next open. Builds now live in
Application Support (excluded from backup) on iOS and filesDir on Android
(kept off device transfers), and the old cache folder moves over once.
2026-11-09 23:35:43 +00:00
Jinjing 6df5a57077 Guide agent installation and sign-in from chat (#40208)
* wip

* add treanslation

* wip

* fix the renderer import

* fix static analysis

* wip

* wip
2026-11-09 23:33:19 +00:00
Kelvin AmoabaandWenhao 2783f8e461 fix(mobile): keep a finished agent tab's icon when its name mentions another agent (#40513)
* fix(mobile): stop reading a tab's name as its agent's terminal title

The host publishes a terminal tab's name (custom name, quick-command
label or agent session name) in place of its live title. Mobile fed
that name to the shared tab-agent resolver as title evidence, so a
finished Claude tab named "Agy status bar item" was read as a reused
Antigravity pane. Desktop resolves from the raw title and shows Claude.

Fixes #40084

Co-authored-by: Wenhao <4804785+Manho@users.noreply.github.com>

* fix(mobile): re-render a terminal tab when only its name changes

---------

Co-authored-by: Wenhao <4804785+Manho@users.noreply.github.com>
2026-11-09 23:10:07 +00:00
Kelvin Amoaba f0733cc86e fix(mobile): keep unchanged lines in diffs of large files (#40511)
Files past the LCS cell budget fell back to prefix/suffix diffing, so two
edits at the ends of a 450-line file showed every line as rewritten. Use
jsdiff's Myers diff bounded by edit count for those files, keeping the
prefix/suffix fallback for mass rewrites.
2026-11-09 23:03:00 +00:00
Kelvin AmoabaandEng. Mahmoud Bek ElNemer bd8138b231 fix(mobile): keep the selected GitHub project when switching projects (#39964)
* fix(mobile): keep the selected GitHub project when switching projects

Picking another GitHub Project on the phone snapped back to the first one.
A remembered desktop Board view made the pick throw before it committed,
and a committed pick wrote picker rows (title, summary) into settings,
which the host's strict schema refused, so the next hydration restored
the old project.

Commit only identity fields, ask for a view when the remembered one is
not a table, keep the candidate project's views out of the active list
until it commits, drop late view replies from an earlier pick, and key
Browse rows by project identity.

Co-authored-by: Eng. Mahmoud Bek ElNemer <tt21913@gmail.com>

* fix(mobile): keep github.com implicit in project refs and error on projects with no table view

---------

Co-authored-by: Eng. Mahmoud Bek ElNemer <tt21913@gmail.com>
2026-11-09 22:53:54 +00:00
Kelvin Amoaba a5dbd1cb2f feat(mobile): read dictation progress to VoiceOver and TalkBack (#40504)
* feat(mobile): announce dictation to VoiceOver through the shell

* feat(mobile): speak dictation from the host, so leaving the session and the pill's toasts are announced too

* fix(mobile): say dictation outcomes where they are known, and re-read a repeated live message

* fix(mobile): leave a setup refusal to its setup sheet instead of reading the raw code

* fix(mobile): say cancelled when a kept recording is discarded
2026-11-09 22:52:59 +00:00
Brennan BensonandClaude Opus 5.5 b7ac7e5178 perf(native-chat): keep streaming chats from re-projecting their whole transcript (#40251)
* perf(native-chat): keep streaming chats from re-projecting their whole transcript

Each stage of the streaming transcript pipeline (reducer merge, question
pass and receipts, message projection, desktop list fold) keeps its
previous input and output and re-derives only revised or appended rows,
falling back to the existing full projection whenever another row could
change. Desktop folds through the phone's fold units, now shared, and live
trims batch by a bounded slack so appends keep row positions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* perf(native-chat): reuse appended subagent rows and batched revisions

Appended rows in chats with subagent rows extend their turn chunk when
earlier turn inputs are unchanged; batch merges and multi-row revisions
do one pass each; rows without journal positions keep in-place reuse.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* perf(native-chat): look up subagent chunks once per appended batch

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(native-chat): pin the live trim slack

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-09 13:46:36 -08:00