Skip to content

feat: usage compares local and sandbox chats week by week - #46

Merged
OmarAlex24 merged 4 commits into
feat/celesto-parityfrom
feat/sandbox-usage-compare
Nov 13, 2026
Merged

OmarAlex24 merged 4 commits into
feat/celesto-parityfrom
feat/sandbox-usage-compare

Conversation

@OmarAlex24

@OmarAlex24 OmarAlex24 commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Problem

The fork owner is moving work from local chats to Boat and Celesto sandboxes bit by bit and had no way to see how far along that migration is.

Change

A "Local vs sandboxes" section on the Usage page (web and mobile) shows this week's share of turns that ran on sandboxes, the change from last week, chats and turns per side, and the share for each of the last 8 weeks.

  • Server: UsageSandboxShare aggregates from the host's run and thread projections plus its sandbox records. A turn is a run that started; it is Sandbox when it ran through the sandboxes bridge. A sandbox chat's host mirror and its own thread share an id, so a chat counts once; subagents and side chats count with their parent. Weeks start on Monday in the client's time zone.
  • RPC: server.getUsageSandboxShare({ timeZone }) returns 8 weeks of counts (about 0.8 KB), with the diagnostics:read scope that server.getUsageSummary uses. The query took about 4 ms on a copy of real data.
  • Clients: web shows it above Breakdown in the Cost and Tokens views; mobile shows it after Cost. Both use one derivation in client-runtime. The section appears once there is a sandbox chat in the 8 weeks.
  • Docs: a short section in docs/user/usage.md.

Tokens and cost per side are not included: usage tokens come from provider history files with no thread attached, and a sandbox's tokens live on the sandbox.

Scope and approval

Requested by the fork owner in a T3 Code session. Part of stack pingdotgg#43 on feat/sandbox-environments.

Verification

  • Server tests for the weekly counting (empty weeks, a mirrored chat counted once, a chat that moved to a sandbox, an unmirrored chat, time-zone week edges) and a service test on in-memory SQLite, all written failing first
  • Client-runtime tests for the share, the change from last week and rounding
  • vp run check:changed against fix(sandbox): Celesto maps every status and warns before dropping a stopped disk #45's branch passes format, lint, knip, typecheck (42 packages), tests and react compiler
  • Rendered in a dev server with a dev-only fixture (48 deleted fixture chats over 8 weeks, 20 on sandboxes), in light and dark:

Local vs sandboxes, light

Local vs sandboxes, dark

The numbers above are fixture data. Not yet checked on a phone.

Model and harness: Claude Opus 5.5 (implementation subagent at high effort, coordinated by Claude Opus 5.5) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

OmarAlex24 and others added 4 commits November 13, 2026 05:09
The host counts its chats by week over the last eight weeks: chats with a
started turn and turns started, split by whether they ran on this computer
or through the sandbox bridge. A sandbox chat's mirror and its sandbox
thread share an id, so each chat counts once. Served by
server.getUsageSandboxShare under diagnostics:read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "Local vs sandboxes" section on the Usage page reads the host's weekly
split: this week's share of turns on sandboxes, the change from last week,
each side's chats and turns, and eight weekly columns. It shows only when
the sandbox host is selected and has had a sandbox chat in those weeks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mobile Usage tab shows the same weekly split as the web page, for each
selected environment that has had a sandbox chat in the last eight weeks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OmarAlex24
OmarAlex24 added this pull request to stack #43 November 13, 2026 05:19
@OmarAlex24 OmarAlex24 changed the title feat/sandbox usage compare feat: usage compares local and sandbox chats week by week Nov 13, 2026
@OmarAlex24
OmarAlex24 marked this pull request as ready for review November 13, 2026 13:41
@OmarAlex24
OmarAlex24 merged commit b4bd279 into feat/sandbox-environments Nov 13, 2026
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