fix(*): show exec diffs on the page and fix three confirmation details - #849
Conversation
- Gateway turns are built interactive, so the default checkpoint policy
covers the page and the chat apps. exec measures what a command wrote
against the turn's shadow repo; with the gateway non-interactive there
was none, and a file a command wrote reached the desk diff with counts
only, so opening its row showed the file instead of the diff.
- An add that connects agents is laid out as the agents it connects
("Connect Pi, started with Raven's openrouter key"), with the lendKeys
security note when a key is lent, instead of the whole subagents table
as the old value and the call's JSON as the new one. The prompt line no
longer says a lent first run spends the agent's own quota.
- The credential card answers and is drawn like the approval sheets: Esc
skips and the send chord saves, with key caps along the foot, skip
first and save last. No numbered rows and no digit answers.
- The connectors hub shows one line under its tabs on what the module on
screen is for: the agents line it lost when the tabs replaced its
title, and a matching one for channels.
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
I reviewed the full github/main...HEAD diff and traced the changed producers and consumers: gateway TurnPolicy construction through checkpoint activation and exec diff measurement, config add evidence through the approval card, credential key handling and shared sheet controls, and both hub-page render paths. I also checked the relevant history and project constraints in AGENTS.md, CONTEXT-MAP.md, CONTEXT.md, and ui-web/CONTEXT.md; backward compatibility; generated i18n/RPC state; and that tests were extended rather than weakened.
Verification: uv run --all-extras pytest tests/test_cli_gateway_commands.py tests/test_raven_config_tool.py tests/test_config_self_surface.py -q (320 passed); focused Vitest for HubHead, approval, and credential behavior (64 passed); npm run type-check; npm run gen:check; focused Ruff and format checks; source-language check; and npm run lint (0 errors, four pre-existing warnings on untouched lines). An initial Python invocation without --all-extras reached no test bodies because the autouse fixture could not import optional raven_everos; the all-extras rerun above is the valid result.
Summary
Four follow-ups from a sandbox acceptance run of main on the web page, driven through
raven web(the gateway) the way users open it.execcommand wrote opened as the file, not as a diff, when its row in the desk's diff tab was pressed. The gateway built its loop withinteractive=False, and that flag only gates the per-turn checkpoint, so no gateway turn (page, chat apps, cron) had a shadow repo.execmeasures a command's writes against that repo (fix(*): let exec measure the files its command wrote #829); without one a created file goes out with counts only and a rewrite as a bare row, and the desk opens a row with no hunk as the file. Both gatewayTurnPolicysites (first generation and reload) are nowinteractive=True, which is what theCheckpointConfigdocstring already says the gateway is. Links in the reply text still open the file; only the diff tab's rows open the diff.addwas laid out as a change to thesubagentssetting: the whole table as the old value, the call's JSON as the new one, and no security note when it lent a key.change_viewnow gives an add its ownagentslist (name, preset, model, lend_key) plus thesubagents.*.lendKeysnote when a key is lent; the tool adds each preset's display name (Pi, notpi). The page draws one line per agent ("Connect Pi, started with Raven's openrouter key") and the note. The prompt line also stops saying a lent first run spends the agent's own quota, since the lent key pays for it.SheetActsinAskApproveSheet.tsx, which keeps the import-direction gate clean.HubHeadnow shows a line for the module on screen: the original agents line, and a matching new one for channels (en and zh).Type
Verification
uv run --frozen --all-extras pytest -q -n 8with coverage: 27446 passed, 27 failed. 22 of the failures fail the same way on clean main on this machine (research tool vendors, libreoffice, simulation timing). The other 4 weretest_cli_agent_loop_parity, fixed by keeping both gatewayTurnPolicycalls inline; it now passes withtests/test_cli_gateway_commands.py(95 passed).scripts/coverage_gate.py diff --base-ref github/main --threshold 90: 91.67%. The two uncovered lines are the twointeractive=Truearguments, which a source test pins.ratchetandbaseline-checkpass.Mutation checks, each reverted fix making a test fail: either gateway site back to
False; the add card'sagents, its lend note, the lent-run prompt line and the display name; the page's add row and its words; the credential card's chord save, its key caps, and digit answers restored.npm testinui-web: 214 files, 3175 tests passed.npm run lint(0 errors, the 4 existing warnings),npm run type-check,npm run gen:check,check-class-namespace,check-css,npm run lint:i18n --prefix ui-tui.ruff check,ruff format --check,lint-imports(10 kept),check_source_language.py github/main..HEAD, commitlint.Boot snapshots regenerated: each gains the
p.hub-head-subline and nothing else (the live one against a closed port).Manual, in a sandbox
RAVEN_HOMEthroughraven web --foreground: anexecthat createdfresh.txtand appended tonotes.mdlisted both with counts, and each diff-tab row opened the diff while the reply's link opened the file; the Tavily key card showed Esc / Cmd+Enter caps and saved on Cmd+Enter; "connect Pi with Raven's openrouter key" showed the one-line card with the lend note; both hub tabs showed their line.Relevant tests pass locally
Relevant lint / type checks pass locally
User-facing docs or screenshots are updated when needed: no docs cover these surfaces, and the repo keeps no image assets.
Risk
User-visible changes:
raven servealready had: a commit of the working directory at the end of each turn (skipped for a home directory and its ancestors, and off withruntime.checkpoint.policy = "never"), and a recovery note after an interrupted turn.Rollback is reverting the squash commit. Setting
runtime.checkpoint.policytoneverturns the gateway checkpoint off without a revert.Related Issues
N/A