Commit Graph

8067 Commits

Author SHA1 Message Date
Katia Bulatova 9b4e4734a1 perf(dashboard-agent): share one 1h-TTL prompt cache between head start and the agent
Head start passed `system` as a bare string, so Anthropic neither wrote nor read
the cache: the ~18.4k-token prefix was billed in full and the agent's step 2 then
paid for a fresh write. Both breakpoints now carry a 1-hour TTL.

The two prefixes were also not identical — `get_run` sat in a different position in
the agent's tool set than in the canonical schema-only one, so they could never have
shared a cache. Reordered, and a fingerprint over system text + tool definitions is
logged per model call alongside the provider's cache-write, cache-read and uncached
input token counts, so a future drift is visible instead of silent.
2026-08-05 22:16:30 +00:00
Katia Bulatova 893b9e866c chore(dashboard-agent): oxfmt 2026-08-05 22:16:29 +00:00
Katia Bulatova e8d35fab8c perf(dashboard-agent): cap read_file at 48KB / 1500 lines
A single read could put ~65k tokens in the transcript, paid for on every later
turn. The truncation notice points at the line range, and the range is now applied
before the cap so a read past the ceiling returns the lines asked for.
2026-08-05 22:16:29 +00:00
Katia Bulatova 7850289107 perf(dashboard-agent): stop echoing the panel's view model back to the model
render_view and get_report both return the panel's view model. Their toModelOutput
now gives the model an acknowledgement and the graded summary respectively, while
the client still receives the blocks and the full report. Errors pass through
verbatim, so the fix-and-render-again loop is unchanged.
2026-08-05 22:16:28 +00:00
Katia Bulatova dd1f309bae perf(dashboard-agent): cap the judge's tool payload and stop pretty-printing it
Each tool output is capped at 1500 characters with a truncation marker, and the
prompt no longer indents the whole turn of tool traffic.
2026-08-05 22:16:27 +00:00
Katia Bulatova 02debc62d9 perf(dashboard-agent): sample a tenth of turns for the judge by default
The per-turn LLM judge was billing every turn, and an unparseable
DASHBOARD_AGENT_EVAL_SAMPLE_RATE fell back to full rate too. Nothing reads
chat_turn_evals yet, so 10% loses no signal we consume.
2026-08-05 22:16:27 +00:00
Katia Bulatova 6a6fa1f4fd chore: keep the release notes as one 2026-08-05 22:13:07 +00:00
Katia Bulatova d4f0357ac1 chore(webapp): move the gallery's transcripts into the storybook fixtures and drop demo-chats 2026-08-05 22:12:44 +00:00
Katia Bulatova a7a29f368f chore: add a server-changes note for the report card fixes 2026-08-05 22:12:43 +00:00
Katia Bulatova 0760f1b55d refactor(webapp): give the agent cards one card primitive 2026-08-05 22:12:42 +00:00
Katia Bulatova 3f85acc2a7 fix(webapp): give the diagnosis card links a focus ring via a TextLink variant 2026-08-05 22:12:41 +00:00
Katia Bulatova 5a80876b16 fix(webapp): ring the unread dot against the navbar surface 2026-08-05 22:12:40 +00:00
Katia Bulatova 9b32bfda66 fix(webapp): let agent chips follow the interface-contrast control 2026-08-05 22:12:39 +00:00
Katia Bulatova fd83288906 fix(webapp): drop the metric sparkline to its own line on a narrow panel 2026-08-05 22:12:38 +00:00
Katia Bulatova 3773f31d22 fix(webapp): route the report's stale-data badge through AgentBadge 2026-08-05 22:12:37 +00:00
Katia Bulatova 5800e8929d chore: drop the unrendered demo cards and fold the release notes back into one 2026-08-05 21:49:37 +00:00
Katia Bulatova 8d3676a874 chore: oxfmt the lines the removed comments let collapse 2026-08-05 21:38:32 +00:00
Katia Bulatova f9eb9c0896 chore(dashboard-agent-db,contracts): cut the query and wire-contract comments 2026-08-05 21:38:25 +00:00
Katia Bulatova 9270caf715 chore(webapp): cut the watch service and route comments to their invariants 2026-08-05 21:38:24 +00:00
Katia Bulatova 42749c9772 chore(dashboard-agent): cut the agent, tool and watch-tick comments to their invariants 2026-08-05 21:38:23 +00:00
Katia Bulatova 5153cca045 chore: restore the comments an off-by-one over-trimmed 2026-08-05 21:38:13 +00:00
Katia Bulatova 9b7ca8c1de chore: bring the last three-line comments down to two 2026-08-05 21:37:46 +00:00
Katia Bulatova e6ec1d2d11 chore(webapp): delete the agent panel and view rationale comments 2026-08-05 21:37:45 +00:00
Katia Bulatova a4f8ed1906 chore(webapp): trim the seed-script narration 2026-08-05 21:37:09 +00:00
Katia Bulatova 0739337c24 chore: cut the report, waiting-run and package comments to their facts 2026-08-05 21:37:08 +00:00
Katia Bulatova 93bc6c158d chore(webapp): clear the demo fixture and storybook commentary 2026-08-05 21:36:19 +00:00
Katia Bulatova 0d415c04ef chore(webapp): strip the step narration from the agent and report tests 2026-08-05 21:35:59 +00:00
Katia Bulatova cb70b83059 chore(webapp): drop the prose from the chat markdown css rules 2026-08-05 21:35:24 +00:00
Katia Bulatova bd6835f9d9 chore(webapp): drop the page-context notes from the route files 2026-08-05 21:35:23 +00:00
Katia Bulatova 17e11c771f chore(webapp): cut the chat-layout header and stop the test asserting on it 2026-08-05 21:35:22 +00:00
Katia Bulatova f3237decb7 chore(webapp): drop the unused demo report card 2026-08-05 21:21:52 +00:00
Katia Bulatova b062490cbf chore: add a server-changes note for the report layout parity 2026-08-05 21:17:34 +00:00
Katia Bulatova 78aea57480 test(webapp): assert the card and the text report stay one report
Landmarks derived from the layout spec must appear in the same order in the server-rendered card
and in the markdown, over healthy, degraded, untrustworthy and empty reports.
2026-08-05 21:17:33 +00:00
Katia Bulatova 880d94ae3a feat(webapp): build the report card from the shared layout
The card no longer formats values, resolves codes or classifies footer codes of its own, and a
genuinely-unknown state now gets a neutral icon instead of a green tick.
2026-08-05 21:17:33 +00:00
Katia Bulatova f6865d581a feat(webapp): render the markdown and ANSI report from the shared layout
The text surfaces gain the card's structure (headline, hero evidence, why: block, aggregated
read:, trust flag) and keep their alignment: fixed sparkline column, aligned notes.
2026-08-05 21:17:32 +00:00
Katia Bulatova 547ec711d8 feat(webapp): declare the report layout once, shared by the card and the text surfaces
Section order, section labels, the tone -> glyph vocabulary, the footer styles and every
string a renderer places now live in report-layout.ts. Renderers decide typography only.
2026-08-05 21:17:32 +00:00
Katia Bulatova 5aef047d87 fix(webapp): cap the query API's scope at the credential's environment
/api/v1/query took its tenant scope from the request body, so a public access
token minted for one environment could read the whole organization by asking for
organization scope. The credential is now the ceiling and a wider ask is refused;
secret keys and the membership-authorized Query page are unchanged.
2026-08-05 21:13:40 +00:00
Katia Bulatova 1af895bb47 fix(dashboard-agent): keep a failed turn in the conversation
A turn that ends in an error was only a stream event, so reloading history showed
a turn that just stops. It is now appended to the transcript through the same
id-deduped path a wake uses, in the same wording the live stream shows, and the
panel drops its live callout once that record is the last message.
2026-08-05 21:13:39 +00:00
Katia Bulatova a303cb0648 refactor(webapp): one presenter for all watch and view-block wording
Every watch sentence (card, banner, toast, email, Slack, webhook) now comes from
app/presenters/v3/dashboardAgent. The condition is written once per kind in four
registers instead of in four switches across three files, and a plain-text block
renderer lets the non-React surfaces say what the card says.
2026-08-05 21:13:39 +00:00
Katia Bulatova 04687767c9 chore: oxfmt the blank lines left by the removed comments 2026-08-05 16:21:32 +00:00
Katia Bulatova d70bcfc7df chore(dashboard-agent): shorten the agent and tool-layer comments 2026-08-05 16:21:31 +00:00
Katia Bulatova c331843dfc chore(webapp): shorten the watch service and test comments 2026-08-05 16:21:30 +00:00
Katia Bulatova a5dd3f13b6 chore(webapp): shorten the report, waiting-run and agent route comments 2026-08-05 16:21:30 +00:00
Katia Bulatova 6ac42141e6 chore(webapp): shorten the suggested-prompt and demo-fixture comments 2026-08-05 16:21:29 +00:00
Katia Bulatova d1fff9c45b chore(webapp): shorten the agent panel and view comments 2026-08-05 16:21:28 +00:00
Katia Bulatova 0357d7926a chore(dashboard-agent-contracts): cut the wire-contract comments to their rules 2026-08-05 16:21:27 +00:00
Katia Bulatova 398e8c56ea chore(dashboard-agent): shorten the watch-tick comments to their invariants 2026-08-05 16:21:27 +00:00
Katia Bulatova 5247a008f0 chore(dashboard-agent-db): shorten the query-layer and schema comments 2026-08-05 16:21:26 +00:00
Katia Bulatova 16682d565c chore(webapp): the page-context comments say only what the handle doesn't 2026-08-05 16:21:25 +00:00
Katia Bulatova 27a9263f5e chore(webapp): tighten the chat-prose theme comments 2026-08-05 16:21:25 +00:00