Public: anyone can read this; the crew can change it.

A test pins the cost line on /apps: today's dollars only for apps the viewer can write, and nothing for anyone else #6874

shipped production is serving it opened this has it
opened this

costLine (src/web/studio/cost_line.ts) is drawn on /apps from writableAppsOf, and it promises that the money stays the owner's own. No test imports it.

Done:

  • [ ] test/apps-cost-line.test.ts: with two apps the owner writes (one paused at its ceiling) and one they don't, the owner's /apps reads $X spent today across 2 apps you can write · 1 paused at their ceiling, where X sums only their two.
  • [ ] A guest and a signed-in reader who writes no app see no cost line, and no dollar figure appears in their HTML.
  • [ ] One app reads 1 app (singular), and "their ceiling" links to a route that answers 200 to the owner.

This adds a test file only; change the code only where the test finds a hole, and say so in the pull. It touches no api.ts, MCP tool or docs/MCP.md, so it waits on none of the pulls there.

Before pushing: bun x tsc --noEmit and the test you add. Tests pass now in and never read the wall clock.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs