<img width="2318" height="1448" alt="image"
src="https://github.com/user-attachments/assets/bca71d69-4972-420c-b14e-c8cf74a17de9"
/>
## Summary
Everything a knowledge base could not read, and the pieces it cut them
into
saying what they are.
**Reading a PDF.** A PDF records glyphs at coordinates; whether they are
a
heading, a table cell or a running footer is inferred from how they
look. There
are now two readers. The geometric one infers structure from type size
and
position and needs nothing but the file. The other asks deepdoc's
models, ported
into `raven/knowledge/parser/deepdoc`: a layout model that says what
each region
is, a detector and recognizer that read a page carrying no text at all,
and a
table-structure model that rebuilds a grid from a picture of one.
Detecting boxes around text the file already spells
out exactly costs an inference pass per page to learn less, and
recognising it
costs accuracy.
The layout graph answers with a shape its own postprocessing
raises on, and its classes are DocLayout-YOLO's order rather than the
list
Both were established by running the model, and the label order is
pinned by a test.
**Tables go in as tables.** `<table>` is the only shape that keeps what
a grid
states -- which column a cell stood under, which cells are merged, which
row is
the header -- and it is the shape a model reads a table in, which is
what these
chunks are for. PDF, Word and PowerPoint all state their merges exactly,
and
they now survive as `colspan` and `rowspan`. The flat form this replaces
had to
repeat a header standing over two columns across both of them, because
there was
nowhere to record a span; it had no callers left afterwards and is gone.
Two
deviations from upstream, both about what the string is for: every
cell's text
is escaped, where upstream interpolates it raw and a cell holding a `<`
produces
markup that is no longer a table, and the span attributes are written
only where
there is a span, where upstream emits `<td >` for every ordinary cell.
**A picture of where each chunk came from.** A chunk is a few hundred
words with
a page number on it, which is enough to cite and not enough to answer
whether
the parser read the page correctly. So every PDF chunk that knows where
it sits
carries one image: the regions it covers, cropped out of the rendered
pages and
stacked. here they are already structured in the parser's element spans,
so
the markers would only put text nobody wrote into the thing being
embedded.
The panel draws a chunk's tables as tables, parsed and
rebuilt as elements rather than injected: a person can rewrite any piece
from
that same panel, so what comes back from the store is user input however
it got
there.
**The page that reads them.** Upstream retired the knowledge page while
this
branch was out; it is rebuilt against the new architecture, and the half
that
never existed is the one a reader needs -- what a document actually
became once
it was cut and embedded. Documents sit in one-level folders and arrive
by four
routes: a file, a folder, a URL, a written note. Adding and indexing are
two
calls on the contract and nothing drains that queue on its own, so a
page that
stopped after the first left every upload saying Queued for good.
Opening a file takes the whole page: the document on the left, the
pieces the
index holds of it on the right. The left half is the file drawn as its
own
pages rather than framed by the browser's PDF viewer, which reads where
to open
once and answers to nothing afterwards -- and which nothing can be drawn
on.
Pages are rendered once and kept, and the region a piece was cut from is
washed
over the page it came from, placed in fractions of the page so the
picture's
own scale never enters the arithmetic. Clicking a piece takes the file
there;
double-clicking opens it for rewriting.
The pieces can be searched, filtered by state, turned on and off,
deleted,
rewritten and added to, one at a time or in a batch. Every one of those
was
already on the contract with no reader for it. A base's settings are
back and
fuller: how many pieces a search returns, how documents are cut, and how
much
prose comes with a table or a figure. The embedding model is a picker
while the
base holds no pieces and a stated fact once it does -- moving it then is
the
collection made again at the new width and every document re-cut, which
is not
a thing a panel does by being saved.
**An agent can read them.** The retrieval engine was there and nothing
could
reach it: no agent had a tool that opened a library. A reader now points
a
conversation at bases from the composer, the way they pin a working
directory,
and the selection rides in the same place -- the session's metadata,
bound
around the turn.
The tool takes a query and never a base. The scope is the reader's
choice, so a
model cannot reach material nobody offered it, and it is withheld where
nothing
was picked rather than offered and refused. A hit says which document
and page
it came from, because a hit a reader cannot place is a hit they cannot
check --
and the passages are pressable in the transcript, walking into the base,
the
document, the folder it is filed under and then the piece. A citation a
reader
cannot follow is a claim they have to take on trust, and the whole point
of
searching their own material is that they can go and look.
**The word segmenter and the resources.** `raven.core.Tokenizer` is
Infinity's
`rag_tokenizer`, ported: a forward and backward maximum match over a
dictionary
trie, with stemming and lemmatisation on the latin path. XGBoost is not
carried
over. None of the data lives in git -- the dictionary, the NLTK corpora
and the
ONNX graphs run to about a hundred megabytes, so `make fetch-resources`
on an
install and an optional Docker layer behind `RAVEN_RESOURCES` both point
at one
script. A checkout that could not reach the network still works, and
every
feature that reads this data says so when asked.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run on macOS against Python 3.12, with the deepdoc weights fetched (the
model
tests skip without them):
```
uv run pytest 27450 passed, 111 skipped, 3 failed
npm run test --prefix ui-web 3276 passed
npm run test --prefix ui-tui 2106 passed
npm run type-check --prefix ui-web clean (tsc)
npm run lint --prefix ui-web clean (4 pre-existing hook warnings)
make lint-python clean (ruff check + format)
make lint-types clean (ty)
make lint-imports 10 contracts kept, 0 broken
make check-source-language clean
make check-large-files clean
make build-ui built, both boot snapshots match
node ui-web/scripts/check-css.mjs clean
node ui-web/scripts/check-class-namespace.mjs clean
```
The three Python failures are not this branch's and were each confirmed
on the
base alone: one asks a host without LibreOffice to refuse a render and
this host
has LibreOffice installed, and two simulation cases fail on an
unmodified
checkout of the base commit.
The RPC contract was regenerated for both consumers and both match it
(`npm run gen --prefix ui-web`, `npm run gen:rpc --prefix ui-tui`, then
`gen:check`). The page's boot snapshots and region goldens were
refreshed where
the composer bar gained a button, and each records that button and
nothing else.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
A PDF's tables, and a Word or PowerPoint file's, are now indexed as HTML
rather
than as header-prefixed lines. Chunk text changes shape for those
documents, so
a base indexed before this and searched after it holds both forms until
its
documents are reindexed; retrieval keeps working either way, because
both forms
are text. The same applies to how much prose a table or a figure carries
with
it: the setting now reaches as far as it says, where before it stopped
at the
nearest paragraph, so a chunk cut before this keeps the narrower context
until
its document is rebuilt. Rolling back is reverting the branch and
reindexing.
The deepdoc models are optional. An install that never ran `make
fetch-resources` reads PDFs geometrically, exactly as before, and says
so when
the models are asked for by name. Nothing here reaches the network at
request
time.
Chunk crops and rendered pages are written at index time and on first
view, both
under the state directory rather than in the repository, and both are
deleted
with their document. A page is immutable for the life of its document
id, so
the route serving them caches; the document route does not. All three
routes
take ids and no path, and the two image routes answer under the
strictest
sandbox in the tree.
What an agent may search is the reader's choice and nothing else. The
tool takes
no base argument, so a model cannot name one, and it is absent from the
schema
entirely for a conversation that named none -- a lane nobody pointed at
a base
is unchanged by this branch. The bases a session carries are stored
beside its
working directory and travel no further.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
`raven --dev` and `raven web --dev` now serve a trajectory view in the
web page: an icon toggle in the chat header, left of the workspace panel
button, once a conversation has content. The view lists every recorded
step of the conversation with its timing, opens the details of any step,
and draws a duration bar above the list. A normal launch is unchanged:
no capability, no toggle, `/health` reports `trajectory_view: false`,
and `raven web --dev` against a running normal service refuses to attach
and says how to proceed.
Backend (`raven/trajectory`, `raven/observability`, `raven/rpc`,
`raven/cli`):
- `entries.py` projects the span log into trajectory entries with stable
ids and a single Timing Owner per logical span, so the bar never charges
a duration twice; broken records keep unique ids and in-progress spans
charge nothing. A turn opens with `user.input` and closes with
`turn.end`, which owns the turn's whole clock. The projection marks the
rows the list need not show (`meta.hidden`: a turn's end that repeats
the turn's last model output word for word, a turn's end of a turn that
finished ok with nothing recorded in it, an internal step that recorded
nothing) and what every model input adds to the conversation before it
(`meta.delta` first / continued / independent / unknown, with
`new_from`, `echo_at` and `message_count`, proven by an ordered prefix
over the v2 message references within one chain and purpose, the
predecessor's own output written back into the history not counted as
news). Tool results that trip an error rule (an error key, a true
is_error, a false ok / success, an error status word) fail the output
entry with the rule as evidence. A model input's row previews the first
message with text that is not a system one of what the call brought,
read from an inline payload or learnt by bounded repair reads the index
queues, which keep at most five probes per input and treat a failed read
as terminal. A shell that a long tool list pushes past the 64 KiB
preview read still gives its message references, which precede the
tools; an input whose references cannot be read at all leaves unknown
only the input it may have preceded directly. A span whose preview pass
raises (a result nested too deep to parse, a pointer that cannot name a
file) marks its own entry unreadable and never stops the session's
index.
- `observability/purpose.py` names the purpose of each model call
through a context variable that the `llm.call` span records as
`llm.purpose`; the main loop (its wrap-up when the iterations run out
included), watch work, titles, the permission judge, DAG verdicts,
memory extraction, the skill gate and playbooks each set theirs around a
call that records an `llm.call` span, so side questions are told apart
from the main line.
- `index.py` indexes one session's spans incrementally across the
archive chain and the active file, verifies log identity on open,
detects same-size rewrites, serves change snapshots with cursors bound
to an epoch and a revision (up to four list walks at once), and queues
the one blob read a continued input needs for its preview. One index
refreshes one scan at a time, even when the request that started a scan
was cancelled; a spilled sub-agent trace whose first log file was
removed is recovered from the files still there, and the gap is counted.
- `details.py` describes an entry's blocks and reads them in pages under
bounded limits, with integrity findings (missing, outside the store,
oversized, unreadable artifacts) built from the same pass. A
memory.feedback step's skills carry the names its own turn's
skill.inject step recorded. The usage block is attributes only, the
timing block is left out when nothing was charged, empty optional blocks
are left out, the tool block is gone (its fields live in timing and
error), an outline block lists a message list page by page (role, size,
first words and the cursor of the page each row starts, read from the
first 8 KiB of a large message) so a long prompt can be folded before it
is read, and two blocks under the raw record serve the files the span
names: a directory with the recorded size and a cursor per file, and one
file's content by its cursor, as JSON when it parses and text otherwise,
saying when it was cut at the 512 KiB read limit or to fit one response.
- Five RPC methods, `trajectory.state`, `trajectory.list`,
`trajectory.changes`, `trajectory.detail` and `trajectory.block`, with
error codes -32020 (disabled), -32021 (entry not found), -32022 (cursor
expired) and -32023 (revision changed); the `trajectory-v1` capability
is announced only by a process launched with `--dev`, which `web`,
`serve` and `gateway` all accept, and which the page-triggered upgrade
carries into the relaunch; a root `--dev` ahead of a subcommand is
refused with the form that works. Detail and block reads refresh the
index first, and while a rebuilt index is still scanning, an entry it
has not reached yet is answered with its new epoch rather than as gone;
response pages are measured in the UTF-8 bytes the transports send.
Frontend (`ui-web/src/features/trajectory`):
- The icon toggle and the parked conversation scroller; the fixed-row
virtual list over the index's visible rows, with live appends followed
near the tail (a selection from the bar or a link brings its row into
view once and leaves the following alone), stable selection, and
per-session memory of the place, the selection and the zoom. Hidden rows
stay out unless "show hidden entries (n)" is on or a link pointed at
one, which reveals it with a marked edge. That switch and the bar's
duration threshold (a slider over detents from 0 to 1000 ms, applied to
the bar only) are viewer preferences in localStorage, where an earlier
build's switches are migrated.
- The details pane: tabs per block with arrows when they overflow,
on-demand paged reads, an 8 MiB cache budget and a page window that lets
its stalest page go but never the one just asked for, recovery through
revision and epoch changes with bounded retries, and a place in the
page's Escape order. Relations resolve to links by (trace, span); the
usage block is six labelled rows with unrecorded cache counters said so;
an unreadable artifact reads as missing data in red. The messages tab
lists the outline on its own, folds the messages the model had already
seen and opens the new ones, draws only the rows near the viewport and
reads bodies for the open rows in that window; a row whose page the
cache let go folds again until asked for, a row a page was cut short of
to fit one response is read by its own cursor, a page that failed to
read is said in place with a retry, and an outline walk cut short is
taken up again on return. A JSON node draws its children two hundred at
a time. Under the raw record every file the span names is headed by its
attribute and shown as a JSON tree or text; contents are read by their
own cursor only for open files near the viewport, placed by where they
stand on the page, two at a time, kept apart from block pages, and let
go stalest first when the budget is short, to be read again only on
request.
- The duration bar on a canvas above the list: a fit that goes dense
when the rows outnumber the minimum slots, a spread with a frozen unit,
wheel zoom about the pointer, drag to pan with the anchor carried along,
a delayed click that checks the world it was made in, a pick list for
dense blocks placed within the window, a hidden turn end's time as the
turn's band under its blocks, a green dot above the selected entry's
block and a red one below a failed one, the summary in the band's hover
and the tools' title, a sideways wheel or swipe (or Shift with the
wheel) panning a zoomed bar, and a zoomed view that keeps its place on
the next entry when the threshold takes its anchor away.
- 223 `gui.trajectory.*` catalogue keys in both languages, the kind
vocabulary covering every kind the index emits with zh labels of at most
four characters; the TUI catalogue regenerated.
Docs: `commands.md`, `webui.md` and `webui.zh.md` describe the developer
launch; `CONTEXT.md` and `ui-web/CONTEXT.md` define Trajectory Entry,
Timing Owner, Message Delta, LLM Purpose and Trajectory View.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Python, compared with the main commit this branch is based on (61269654)
by test nodeid, same command and environment in both trees (`uv sync
--frozen --python 3.12 --extra dev --dev`, then `uv run --frozen
--python 3.12 --extra dev --dev pytest tests/ -q -p no:cacheprovider
--junitxml=...`):
- main: 52 failed, 27541 passed, 143 skipped (all environment-dependent:
subagent probes, a2a interop, whatsapp, everos, ...)
- branch: 52 failed, 27786 passed, 143 skipped, the same 52 as main, so
no test that passes on main fails here; tests collected only on the
branch: 245 (all added by this PR)
- `uv run ruff check .`: All checks passed; `uv run ruff format --check
.`: already formatted; `make lint-types`: All checks passed
Web UI (`ui-web/`):
- `npm run gen:check`: generated.ts matches the contract (215 methods)
- `npm run type-check`: 0 errors; `npm run lint`: 0 errors, 4
pre-existing warnings outside this change
- `npx vitest run --maxWorkers=24`: 231 files, 3493 tests passed (the
`scripts/gates/*.test.mjs` gates included)
- `npm run build && python3 build.py`: the build matches the boot
goldens, which this PR changes by one node each, `div#trajHost`
(`boot-stub.txt` 344, `boot-live-noserver.txt` 343,
`src/test/__golden__/region-app.txt` 189 lines)
TUI (`ui-tui/`): `npm run lint:rpc` in sync, `npm run lint:i18n` up to
date, `npm test`: 144 files, 2098 passed, 13 skipped.
Repository gates: `make check-source-language`, `make check-large-files`
and `git diff --check` exit 0; `uv run --frozen --group docs mkdocs
build -f docs-site/mkdocs.yml --strict`: built with no warnings.
End to end, on a real service with headless Chromium (scripts, logs and
screenshots kept outside the repository; run on this branch at its head,
every review change in): `raven web --foreground --dev` on a freshly
built fixture home with thirteen sessions (slow, failed, parallel,
nested sub-agent trace with injected skills, rotated archive, broken
artifacts, a 45-message prompt continued twice and a side question, a
240-message prompt, a turn whose end recorded nothing, a tool round
trip, a span naming thirteen small and another naming twenty large
files, empty, 10002 entries). The expected entries, with their hidden
marks, deltas and failure rules, are derived from the fixture definition
by the recording rules; the indexer and the paged `trajectory.list` walk
are checked against that list first, and the page is checked against it
after. 185 checks passed: the toggle and the parked scroller, the
visible rows' ids and order with hidden replies left out and listed
again under the switch, failure marks including a result that carried an
error key, integrity wording per broken artifact, the virtual window
bound and both ends of the long list, the details tabs, relation links
across traces, the usage rows, the messages tab folding the old rows and
opening the new ones as a window over the pane's viewport, a 240-message
list reading only the pages in view, letting the stalest pages go on the
way down and reading a folded row back on request, a feedback step's
skills under their own turn's names, a turn whose end recorded nothing
hidden while a failed one stays, the call after a tool round trip
previewing the first result with its predecessor's echo folded, the
duration threshold at 200 ms and 1 s, sideways panning, every file of a
span headed and read as it comes into view, large files each read once
with the earliest released and read back on request, a file's tree
folding to bring the next file in, the bar above the list, the turn's
band and its hover, the green and red dots read from the canvas, the
short filter, a slot doubling under a x2 wheel, drag by the pointer's
travel with the anchor kept across live appends, dense slots in
proportion at the scale ceiling, the summary hover in the gap between
blocks, pick list placement in tall and short windows, measured column
widths per language, tab arrows under overflow, theme and language
switches, viewports of 1200, 800 and 320 px; then a normal `raven web`
with no toggle, and `raven web --dev` against it exiting 1 with the
stop-first message while the service kept running.
## Risk
- [x] Security impact considered: the view is served only under `--dev`;
the RPC methods answer -32020 otherwise, artifact reads stay inside the
trace store with the 512 KiB cap, and the page reads through the
existing authenticated channel.
- [x] Backward compatibility considered: no existing RPC method, session
file or span format changes; the one new span attribute (`llm.purpose`)
is additive; a normal launch behaves as before. Known recorder gap, left
for a follow-up: `semconv.turn` reads the turn's reply from a tuple and
records `{"content": null}`; this PR only hides such empty turn ends.
- [x] Rollback path is clear for risky changes: revert this PR; it adds
a feature behind a flag and no migration.
## Related Issues
N/A
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
## Summary
Pressing Esc on an approval card previously denied the request and then
reached the page's stop handler, cancelling the running turn. Clicking
the Deny button only denied the request, even though that button
displays Esc as its shortcut.
- Consume Escape in both permission and confirmation cards after
answering deny. The turn can continue to respond to the refusal; a later
Escape follows the existing page close order and stops only when no
higher layer is open.
- Cover all five permission layouts, confirmation cards, editable
fields, the running-turn handler, layer priority, and approvals parked
in another conversation.
- Update the keyboard contract, stale comments, and both permission
guides. Use the existing portable path helper in the CSS gate so the
complete WebUI suite can run on Windows.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Commands below ran in ui-web unless prefixed with uv or git.
- `npm test -- src/features/composer/approve.test.ts
src/state/escapeOrder.test.ts src/features/composer/credential.test.ts
scripts/gates/settings-drawer-css.test.mjs --maxWorkers=4`: 160 passed.
- `npm test -- --maxWorkers=4`: all 3194 tests in 214 files passed. Nine
denial/bubbling cases failed against the original handlers before the
fix.
- `npm run lint`: passed with four existing React hook warnings in
unchanged files.
- `npm run type-check` and `npm run gen:check`: passed.
- `npm run build`: passed.
- `uv run python ui-web/build.py`: passed; both stub and
live-without-server boot snapshots matched.
- `node scripts/check-page.mjs`: passed; the assembled page and its two
scripts validated.
- `uv run python scripts/check_large_files.py origin/main`, `uv run
python scripts/check_source_language.py origin/main`, and `git diff
--cached --check`: passed.
- `uv run pre-commit run --files docs-site/docs/permissions.md
docs-site/docs/permissions.zh.md ui-web/CONTEXT.md
ui-web/scripts/gates/settings-drawer-css.test.mjs
ui-web/src/features/composer/approve.test.ts
ui-web/src/features/composer/approve.ts
ui-web/src/features/composer/credential.ts
ui-web/src/state/escapeOrder.test.ts ui-web/src/state/escapeOrder.ts`:
all applicable hooks passed.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
Esc now has the same deny-only behavior as the card's button. Users can
press Esc again to close the next layer or stop the turn. Denial still
refuses the action; the permission decision and allow shortcuts retain
their existing behavior.
Reverting the squash commit restores the previous combined deny-and-stop
shortcut.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
Fixes#852
Co-authored-by: Codex <noreply@openai.com>
## Summary
The engine half of Personas. A stored Playbook could hold a worker table
and a turn could generate one, but nothing let a person describe the
assistant they wanted, keep it, and come back to it.
**Schema v2** separates three concepts. A reusable artifact carries a
**Harness**, a **Workflow**, or both: the Harness is the durable worker
table bound into a turn, the Workflow is the DAG compiled from one
accepted successful run, and a **Run Record** is the per-execution
evidence, kept beside the artifact and never loaded as one. Schema v1
keeps loading through the `dag` and `prompt` modes.
**A Harness gains a coordinator.** `_SeatPlaybook` carries the four
Harness roles and `CoordinatorPlaybook` / `SubPlaybook` are the two
seats that wear them, so the main seat gets the surface a worker already
had rather than a parallel one. A workers-only payload is normalized on
the way in, so Personas written before this keep loading. Two demands
are contract rather than prose: a named missing-input gate must be a
generated `intake` on the coordinator, and a boundary depending on
tool-call arguments must be a `judge` on the seat making the call. Host
Raven is excluded from the persona roster at the candidate layer.
**Binding needs no new process.** `bind_charter_for_turn` is the
counterpart of `bind_delegate_for_turn`, so `load_playbook` activates a
stored Persona's main seat in the same call that activates its workers.
What a session binds is a snapshot rather than a name to look up later,
carried in the session's own metadata, so editing or deleting the
library entry does not rewrite or break a conversation already running
on it.
**RPC**: `session.create` takes a Harness to open on,
`session.set_harness` reports / binds / unbinds, and `playbooks.list`
grows a `coordinator` flag.
## Scope change
This PR was the whole feature; it is now **the backend only**. The
persona page and the shell wiring are being reworked and will follow in
their own PR, which is why they are not here. The two `rpc/generated.ts`
files stay with this one because the `ui rpc contract` gate reads them
against `openrpc.json`.
Nothing here has a caller yet: the RPC surface grows, a Playbook gains a
shape, and no existing path changes behaviour.
This also supersedes #568, now closed -- every file it added is here.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
```
ruff check / ruff format clean (1782 files)
pytest (full) 27643 passed, 8 failed
coverage_gate diff 91.34% (threshold 90)
gen-rpc-client --check matches the contract (209 methods)
commitlint / commit messages / source language / large files
```
The 8 failures are environmental and fail the same way on plain `main`:
five proxy-credential redaction tests, the node-dir resolver, the
subagent read test, and one runtime-checkpoint timing test that passes
three times out of three when run on its own.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Review history carried over
Both blocking threads raised against the earlier combined branch were
answered and closed before the split: the refinement poll that accepted
the draft it started on, and the staged Persona that outlived the draft
it was made for. Both fixes live in the page, so they travel with the
frontend PR.
LivXue's three non-blocking notes are in this half. One is addressed
here: `default_generation_mode`'s `persona` value never reached the
guard that mints one, and the field now says so instead of describing
itself as a fallback that would. The behaviour is deliberate and
unchanged -- read as a default it had a reader typing "hi" spend a model
call on a Harness. The other two (the missing `error=` on a cancelled
capture's run record, and the `set_preselected` path no producer ever
writes) are left for a follow-up; the second one also needs
`CONTEXT.md`'s discovery contract corrected with it.
## Risk
No behaviour change for a turn that asks for nothing. Rollback is a
revert of the merge commit; stored v1 Playbooks keep loading.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
Co-authored-by: yao pengfei <yaopengfei@evermind.ai>
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
On a connected provider's sheet (Settings > Model providers), the API
key
field is empty by design -- its placeholder says to type a new key to
replace
the saved one -- so the eye beside it had nothing to show. The one key a
reader could not check was the one in use. The page is never sent a key:
`model.options` reports whether one is configured and nothing more.
This reverses a rule the web settings specs record: "the eye toggle
reveals
typed text, never a stored key" (model-section design C10 and A8,
acceptance
T3.2, and the parent design's C10 and "masked" term). The owner asked
for the
key in use to be readable from the eye; each of those rules now carries
a
dated amendment (2026-10-09) saying what it was and what it is. What
still
holds: the stored key never goes back to the wire unedited, and it is
never
part of `model.options` or any other snapshot.
- `model.reveal_key` (new, `raven/rpc/methods/model.py`) reads back the
flat
`api_key` of one provider's section -- the value `model.save_key` writes
and
the field edits -- only when it is the key requests carry: an
`endpoints`
list or Gemini's `apiKeyList` replaces the flat key outright
(`provider_endpoints`), and a flat key left behind under one answers
null.
It answers that key alone: not the rest of the section, not an
endpoint's
key, not a key the environment supplies. Unknown providers are refused
like
the other `model.*` handlers. Schema, Pydantic models and both generated
clients carry it.
- The sheet asks for it only when the eye is pressed over an empty key
field
of a connected provider. The key fills the field as text. Pressed again
with the key unedited, the field empties back to its placeholder rather
than holding a "new" key that is the old one; an edited key is the
reader's
and stays. A key the reader typed is read back as typed, with no fetch.
A
provider that is not connected never asks. Typing, or pressing the eye
again, retires a read still in flight, so an answer that lands after the
reader started typing a replacement does not overwrite it. Update or
Enter
with the revealed key unedited sends what the empty field sends -- no
key
-- rather than writing the stored key back (which rewrote the config and
could restart EverOS for no change).
- `KeyInput` gains an optional `onPeek(shown)`, called before the eye
turns
and waited for, so the field does not flash empty and then fill. A
failed
read still turns the eye (the source has already shown the error). Its
other callers (plugins, tools, agent keys, the add-provider form) pass
nothing and behave as before.
- The offline fixture library answers the new method with a made-up key
per
connected row, so the demo page's eye has something to show.
No new strings and no layout change: the same field and the same eye.
`docs/specs/` carries the amendments above.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `uv run pytest tests/test_rpc_model.py tests/test_rpc_schema_match.py
tests/test_rpc_registration.py --idle-ceiling-strict`
-- 662 passed (eight new cases: the saved key read back, null when none
is
saved or after a disconnect, the key alone from a section that also
holds
an address and a secret header, null for a flat key left behind under an
endpoint or under Gemini's key list, a lone endpoint carrying the same
key
still revealed, the environment's key not read, an unknown provider
refused)
- `uv run pytest --ignore=tests/integration --idle-ceiling-strict` after
`uv sync --all-extras` -- 27691 passed, 115 skipped, 3 failed:
`test_rpc_files.py::test_a_host_without_libreoffice_says_so`,
`test_simulation_scenario.py::test_a_fresh_trial_refreshes_the_subagent_homes_before_it_runs`
and
`test_simulation_suite.py::test_a_stopped_run_is_marked_in_its_record_and_finished_with_its_evidence`,
which fail the same way on main on this machine. The one test over the
idle ceiling is the failing simulation-suite one.
- `ui-web`: `gen:check` clean, `type-check` clean, `eslint .` 0 errors
(the
same 4 warnings as main, in other files), `npx vitest run` -- 214 files,
3205 tests passed, including the fixture gates; build and both boot
snapshots match their goldens
- `ui-tui`: `lint:rpc`, `lint:i18n` and `type-check` clean; `npm test`
-- 144
files, 2111 tests passed
- Real browser, on an isolated gateway running this branch (its own home
holding only a made-up key, its own ports, channels off): Settings >
Model
providers > the connected provider, eye pressed -- the field showed the
saved key as text; pressed again -- the field was empty and masked, with
its placeholder; no console errors
- Fifteen mutations, each reverting one part of the change, each turning
a
test red: the handler reading the key redacted, an empty key sent as an
empty string, a flat key that requests do not carry revealed, an
unedited
revealed key saved again, an unknown provider not refused, the method
not
registered,
the source calling another method, an unconnected provider asked, a
typed
key replaced by the saved one, the revealed key kept when the eye shuts,
an
edited key emptied when it shuts, the eye opening before the key
arrives,
an answer landing after typing overwriting the typed key, typing not
retiring the read in flight, and a failed read keeping the eye shut
- `scripts/check_source_language.py`, `scripts/check_commit_messages.py`
and
`scripts/check_large_files.py` on the merge base, and the prospective
squash header through `commitlint` -- all clean
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No user-facing doc describes the provider key field or its eye.
## Risk
The page can now receive a stored provider key in plaintext, which it
could
not before. The limits on that:
- one provider per call, only on an explicit press, never in
`model.options`
or any other snapshot or poll, so the key does not ride along on every
refresh;
- the answer is the key alone, and the RPC dispatcher logs no results;
- it adds no reach: a signed-in page could already read a stored key in
plaintext through the CLI bridge (`provider get <slug> --show-secrets`
over `cli.dispatch`), and could replace the key or change the address
the
provider sends it to. It is behind the same sign-in and Origin check as
every other page RPC, and it is an RPC method only, not an agent tool.
Compatibility: the method is additive. The page and the gateway ship
together; a page talking to an older gateway would get method-not-found
when
the eye is pressed over an empty field, show that error, and open on the
empty field, as before.
Rollback is a plain revert.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## 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.
- **exec diffs on the page.** A file an `exec` command 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 with `interactive=False`, and that
flag only gates the per-turn checkpoint, so no gateway turn (page, chat
apps, cron) had a shadow repo. `exec` measures a command's writes
against that repo (#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 gateway `TurnPolicy` sites (first generation
and reload) are now `interactive=True`, which is what the
`CheckpointConfig` docstring already says the gateway is. Links in the
reply text still open the file; only the diff tab's rows open the diff.
- **The card for connecting an agent.** An `add` was laid out as a
change to the `subagents` setting: 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_view` now gives an add its own `agents` list (name, preset,
model, lend_key) plus the `subagents.*.lendKeys` note when a key is
lent; the tool adds each preset's display name (`Pi`, not `pi`). 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.
- **The credential card's keys.** It was written before the approval
sheets moved to key caps (#817) and kept numbered rows answered by 1 and
2. It now uses the sheets' foot: Esc skips, the send chord saves, skip
first and save last, no digits. The foot is one shared `SheetActs` in
`AskApproveSheet.tsx`, which keeps the import-direction gate clean.
- **Connectors subtitle.** #830 replaced the agents page title with the
module tabs and dropped its one-line description. `HubHead` now shows a
line for the module on screen: the original agents line, and a matching
new one for channels (en and zh).
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `uv run --frozen --all-extras pytest -q -n 8` with 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 were `test_cli_agent_loop_parity`, fixed by keeping both
gateway `TurnPolicy` calls inline; it now passes with
`tests/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 two `interactive=True`
arguments, which a source test pins. `ratchet` and `baseline-check`
pass.
- Mutation checks, each reverted fix making a test fail: either gateway
site back to `False`; the add card's `agents`, 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 test` in `ui-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-sub` line and
nothing else (the live one against a closed port).
- Manual, in a sandbox `RAVEN_HOME` through `raven web --foreground`: an
`exec` that created `fresh.txt` and appended to `notes.md` listed 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.
- [x] Relevant tests pass locally
- [x] 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:
- Gateway sessions now get the per-turn shadow-git checkpoint the CLI
and `raven serve` already had: a commit of the working directory at the
end of each turn (skipped for a home directory and its ancestors, and
off with `runtime.checkpoint.policy = "never"`), and a recovery note
after an interrupted turn.
- The connect-agent confirmation and the credential card look different;
the credential card no longer answers 1 or 2.
Rollback is reverting the squash commit. Setting
`runtime.checkpoint.policy` to `never` turns the gateway checkpoint off
without a revert.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Raven can now read and change its own configuration through one tool,
`raven_config`, instead of telling the user to open Settings or editing
`config.json` with file tools. The same path lets it connect preset
sub-agents and diagnose the ones that do not answer, and asks the user
only for what needs them (a key, a sign-in, a paid model).
**The tool and its catalog**
- `raven_config` actions: `describe` (every setting with its value, or a
search), `get`, `set` (one path, or several under one confirmation),
`unset`, `add` (connect presets, several at once), `test`, `restart`
(reload or restart once pending changes are gathered). `session.model`
switches only the current conversation.
- `raven/config/self_surface.py` is the catalog: 14 sections, about 93
settings, each with its value kind, its writer, and when a change takes
effect (next turn, at once, reload, restart, memory server, or inert).
Writes go through the RPC methods the settings page already uses
(`SELF_CONFIG_METHODS` allowlist), so the page and the agent share one
validation path. `tests/test_config_self_surface.py` holds every entry
against the schema and every next-turn claim against a real reader.
- A refused sub-agent comes back with one next step per refusal kind (9
Raven fixes itself, 5 the user does), with stop rules: no hunting for
keys, no credential stores, no restarting another app's services, stop
after three commands that explain nothing.
- `subagents.add` stays preset-only: every execution field comes from
the preset. Presets can be named by display name, an add can pin a model
the agent lists, and a model pick on an unmeasured agent reads the
handshake menu first.
- The companion skill `raven-self-config` describes the whole flow; its
description is injected every turn, the body is read on demand.
**Approval**
- Reads run unasked. Every write asks by default, on a dedicated config
card (what changes, before and after, when it takes effect, a sensitive
note). A grant for the session never carries a change.
- In a turn someone is at, full access, the user's allow rule, and smart
mode's reviewer let a change through; the reviewer never approves a
sensitive setting. Sensitivity is declared by the owner: catalog entries
(approval mode and review model, workspace confinement, sandbox, deny
patterns, disabled tools, MCP servers switched on, skill blocklist and
auto-install, provider endpoints, web and media proxies, remote
machines, workspace path, lent keys, sub-agent descriptions) and each
channel adapter's spec (who may instruct Raven, whether a channel is on,
where its credentials and traffic go, encryption). The gate and the tool
read a call the same way: one value decoder, one path spelling, one
channel field lookup, an object value judged field by field; a path the
tool does not write is refused at the gate, and a call naming one
setting twice is refused. A value is secret when the schema, the channel
spec or the catalog says so, a credential-named env entry, any header,
or a credential inside a URL. The reviewer's instruction counts the
agent's own non-security settings as ordinary work. Unattended turns
(cron and other scheduled runs, no one to answer) are refused; a channel
user who can answer an approval is attended.
**Secrets**
- A key never travels through a tool call. The agent names the secret
with an empty value and a credential card of its own
(`credential.request` / `submit` / `skip` / `pending` / `closed`) takes
it; the host writes it through the handler that owns it and the model
learns only saved or skipped. Channel secrets use the same card. A call
that only asks for keys goes straight to the card. Enabled on page
surfaces only.
- Tool output is scrubbed of the values Raven holds
(`config/held_secrets.py`, including JSON-escaped spellings and URL
credentials) and dotfile reads under home are redacted, once, inside
`ToolRegistry.execute`, so the trace span, the page's diffs, the
sentinel and both agent loops get the scrubbed copy. What a sub-agent
says is scrubbed where it is kept: transcripts, call labels, closing
text, the output a later DAG node renders, error records, announces, the
ACP frame journal, probe details. A key pasted into the chat is refused.
- Lent keys: an ACP sub-agent row can name Raven providers (`lendKeys`)
whose key it is started with. The row stores the provider name; each
start (the spawn path and the capability probe) reads the key into the
variable the preset reads (`presets.LENDABLE_KEYS`, Pi only for now), so
it never reaches the model and follows a rotated key. Verified live: Pi
refused without it, answered with Raven's OpenRouter key, and its row
reads connected and tested with a 398-model menu.
**Page**
- Config card and credential card; the model and permission chips
refresh after the agent changes them; the transcript names
`raven_config` calls by what they did.
- Agents page: the note on a refused connect, a failed test, or a check
that found a problem offers "Hand it to Raven" on its title line; it
opens a new conversation with a prompt naming the agent and the reason,
not sent. A connected row whose check found a problem now shows one head
line and an amber note in the body (shaped like a failure's) instead of
the check's English sentence folded under the head.
**Other**
- Memory LLM left unset follows the main model (EverOS restarts when the
main model moves).
- Reload and restart wait for page turns in flight too.
- `plugin` points agents and chat apps at `raven_config`; `cron` names
the missing `message`; a GNU `timeout` shim on hosts without one,
accepting only the durations the permission gate parses (one shared
definition); read-only package-manager subcommands allow.
- Contracts: `CONTRACTS_VERSION` 35 (this branch's credential types plus
main's `FileWrite`) with the surface repinned; paper-tier line ceiling
3,700 (measured 3,682) with its review note. `CONTEXT.md` defines the
self-configuration surface and lent key.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `uv run pytest -q -n auto`: 27187 passed, 3 failed. The 3 fail on this
machine regardless of this branch:
`test_rpc_files::test_a_host_without_libreoffice_says_so` (LibreOffice
is installed here),
`test_simulation_scenario::test_a_fresh_trial_refreshes_the_subagent_homes_before_it_runs`
and
`test_simulation_suite::test_a_stopped_run_is_marked_in_its_record_and_finished_with_its_evidence`.
`schemas/subagent.schema.json` is regenerated for `lendKeys`;
`test_import_cycle_budget` holds (the capability probe takes the launch
env from its caller rather than importing the agent layer).
- `make lint-ui` (gen:check, eslint, tsc): pass; the 4 eslint warnings
are in files this branch does not touch.
- `npx vitest run` in `ui-web`: 3116 passed; `check-css`,
`check-class-namespace`, `check-page` OK.
- `npm run lint:i18n`, `lint:rpc`, `type-check` in `ui-tui`: pass.
- `uv run ruff check` and `ruff format --check` on every changed Python
file, and `lint-imports` (10 contracts kept): pass.
- In a browser against a local gateway: credential card save, skip,
replace and reload replay; the value appears in no session, trace or
log. Agents page link opens a new task with the prompt filled and
unsent; sent, the agent reads the self-config skill and calls
`raven_config` first, and for Pi offers Raven's key before a sign-in.
- Smart-mode reviewer, run against the real model: 7 ordinary config
changes allowed; `sed` or `write_file` on Raven's config, reading an SSH
key, and `curl | sh` escalated.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- Behaviour changes: the agent can now change settings and connect
sub-agents after the user confirms (or unasked under full access, and
under smart mode for non-sensitive settings). Lending gives a sub-agent
Raven's key for a provider after an explicit, sensitive confirmation;
what it spends is billed to that key.
- Memory: a memory LLM left unset now follows the main model, so
long-term memory starts working after the upgrade for anyone who never
pinned one, extracting on the main model and billed to the main
provider's key, and EverOS restarts when the main model changes. To keep
it off, set `memory.backend` to null; to keep it on a different model,
pin one of its own.
- Backward compatible: new config fields are optional, and both probe
fingerprints include `lendKeys` only when set, so recorded verdicts and
menus survive. A `config.json` written with `lendKeys` will not load on
an older build (`extra=forbid`).
- Rollback: revert this PR; nothing is migrated. To switch the feature
off without a revert, add `raven_config` to `tools.disabledTools`.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Channels were a section of the settings dialog, so a reader who never
opened settings never learned that Raven can be reached from a chat app.
This moves them out of settings and puts them beside the agent hub,
under one rail row.
- **One place, two modules.** The rail row "Agent Connector" becomes
"Connectors" in English (its Chinese label changes to match). Its page
has two underlined tabs at the top, Agents / Channels, with no page
title or counts above them (`components/HubHead.tsx`). Both are still
their own module pages and islands; they share the rail button, the
header, and `state/hub.ts`, which remembers the module the reader was
last on so the rail row goes back to it.
- **The channel page is drawn like the agent hub.** Filter tabs (All /
Connected / Not connected) over a grid of fixed-height cards, and the
picked channel in the shared detail drawer. The list's switches and
search are gone: pressing a card only opens it, and connecting happens
in the sheet.
- **Three states on a card, not five.** Connected (green); connection
problem (switched on, host up, adapter not running: red, sorted first,
with a line saying what to do); not connected (everything else,
including an adapter waiting on a scan). No host at all is one notice
over the grid, not a reason on every card. The gateway's refusal from a
write is kept on the row and shown in the sheet instead of a toast.
- **The sheet matches the agent sheet measure for measure** (head,
labels, inputs, white foot with a hairline). It also says where
credentials come from in one guide box with the console link, says
"leave blank to keep" once instead of in every box, counts what is
missing only in its head, moves Disconnect to the far end of the foot,
and lays a scan channel out as the code's frame beside its three steps.
- Copy keys this leaves unused are removed from `i18n/messages.json`,
and `ui-tui`'s generated copy is regenerated. Two keys that were already
unused on main (`gui.conn.gw_live`, `gui.conn.close`) are left alone.
Front end only: no backend, config or RPC change.
Known gap, not addressed here: a WeChat / WhatsApp pairing that expired
reads as "not connected" rather than "connection problem", because
`channels.status` cannot tell an expired pairing from one that never
happened.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
In `ui-web/`:
- `npx vitest run --maxWorkers=4`: 212 files, 3118 tests passed. A plain
`npx vitest run` passed too, apart from timing-sensitive session tests
that time out when the machine is heavily loaded; they pass on their
own.
- `npx tsc --noEmit -p tsconfig.json`: clean.
- `npx eslint .`: 0 errors. The 4 `react-hooks/exhaustive-deps` warnings
are pre-existing (one in the untouched QR panel).
- `node scripts/check-class-namespace.mjs` and `node
scripts/check-css.mjs`: OK. Two pins in `check-class-namespace.mjs` are
lowered because this change retires the debt they count (`extAgents`
unprefixed 1 -> 0, `.k` shared 3 -> 2).
- `npm run build`, then `uv run --frozen python ui-web/build.py`: both
boot snapshots match their goldens (regenerated in this PR, and the live
one was regenerated against a closed port).
At the repo root: `make check-large-files` passes, and `npm run gen:i18n
--prefix ui-tui` is reflected in
`ui-tui/src/i18n/messages.generated.ts`.
Manual: clicked through in a browser against an isolated `raven serve`
(scratch `RAVEN_HOME`) and against the offline `?stub=1` page, in both
languages and both themes. The flow: rail row, module tabs, return to
last module, each card state, the credential and scan sheets.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed: no docs
cover this page, and screenshots are not attached because the repo does
not keep image assets.
## Risk
User-visible changes:
- Channels are no longer in the settings dialog.
- The rail row is renamed from "Agent Connector" to "Connectors".
- Channel rows no longer carry an on/off switch; switching off is
Disconnect in the sheet.
- The toasts for "adapter refused" and "gateway not receiving" are
replaced by the sheet's state line and the page notice.
Rollback is reverting the squash commit; nothing outside the front end
and its copy changes.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
The file viewer picked how to show a file from its extension alone, and
two of those choices did not match what the gateway and the browser can
actually render. This PR lines the classification up with the real
rendering paths and redesigns the note shown for a file that has none.
**Classification, checked against what renders**
- **Office documents.** The gateway converts ten Office formats to PDF
with LibreOffice (`raven/rpc/pdf_preview.py` `RENDERABLE_SUFFIXES`: ppt,
pptx, doc, docx, xls, xlsx, odp, odt, ods, rtf), but the viewer only
routed `pptx` there; docx, xlsx and the rest fell to the "cannot render"
note. They are one `office` kind now (renamed from `pptx`), drawn as
pictures of their pages the way a deck already was. The transcript
delivery tile uses the same kind, so these formats also get a first-page
thumbnail.
- **Unknown names.** Anything the kind table did not know was treated as
binary, so `Makefile`, `.gitignore` or a config file named `x.model`
showed the note. Such a file now has its first 8 KB read with a `Range`
request, and the bytes decide: a NUL byte, or more than 2% undecodable
characters, means binary. Text is shown as text (straight from that one
answer when it covers the whole file); binary gets the note, with the
size taken from `Content-Range`; an empty file (416) is empty text.
Extensions that are never text (archives, media, fonts, model weights,
databases) skip the request. No gateway change: `/file` is an aiohttp
`FileResponse`, which already answers ranges. A test now pins the 206
and 416 answers the viewer relies on.
- **Broken pictures.** An image that failed to load always said the file
was gone. It now says gone (404), too large (413), refused (403), or
could not be drawn, from the route's status.
**The fallback note**
Before: a line of text in the top-left corner, the full path repeated,
and three loose outline buttons ("Open this MODEL in its app", "Open
with...", "Copy path").
After: a card centred in the pane with a file tile carrying the
extension, a title, a `MODEL file - 4.0 KB` line, and one split button
(open in the default app, chevron to choose another). The path and the
copy-path button are dropped from the body because the pane header
already has both. A failed Office render uses the same card, with the
gateway's reason quoted in a monospace box under the title. The rules
moved from `styles/page.css` into `features/workspace/styles.css` under
the `workspace-` prefix; the class-namespace ratchet is lowered to match
(`workspace` 35 -> 33, `.w` 3 -> 2). `browser` goes 25 -> 26 only
because `.h` is no longer shared with the workspace.
**A gone Office file** read as "could not be rendered as a PDF" with the
route's 404 quoted under it. A 404 from the render route now reads as
the file being gone, the way every other kind does, and marks the
delivery missing.
**Second topic, added at the maintainer's request: approval and question
sheet shortcuts.** This is unrelated to the file viewer and is kept in
its own four commits (`feat(ui): answer approvals with esc and cmd+enter
instead of digits`, `fix(ui): shorten the always-allow button and name
its rule on its own line`, `fix(ui): draw the approval sheet as a
tool-approval card`, and `fix(ui): keep the approval answers inside the
card, and draw confirm the same way`), so it can be reverted or
cherry-picked on its own.
- The approval sheet was answered with 1/2/3, with deny as 1: backwards
to anyone used to a terminal agent, where 1 is yes, and unlike the GUI
agents, which answer a tool call with a chord. It now takes Esc to deny
(unchanged), Cmd+Enter to allow once, and Shift+Cmd+Enter for the
broader grant (the suggested rule, or this conversation when there is
none). Ctrl works in place of Cmd. Digits no longer answer; each button
shows its key as a cap instead of a number badge.
- The question sheet keeps its number keys for options and arrows for
steps, and gains Cmd+Enter for Next / Submit, from its own answer field
too. Esc is left to the page, where it stops the turn.
- The broader grant's button said the whole rule ("Always allow: git
push * (every directory)") and was the widest thing on the sheet. It now
says only "Always allow", as GUI agents label it, and the rule it would
save is named on its own line under the evidence, with the pattern set
as code, so the reader still sees what outlives the conversation before
pressing it. No line is drawn when the grant saves no rule.
- The permission sheet is drawn to the approval design: a solid card
(16px radius, a ring and a soft shadow instead of the rack's frosted
glass) capped at 300px, a 15px question, one muted line of why, the
evidence in a bordered box that scrolls on its own, and the answers
pinned to the foot as 30px outlined buttons with allow once filled. Key
caps are outlined, here and on the question sheet's Submit. The corner
cross is gone from this sheet: refusing is Deny and Esc, and a cross
read as "not now" rather than as the refusal it sends. The answers row
is a sibling of the scrolling body, not a child, so a long why sentence
and a long rule on a narrow window scroll the body instead of pushing
the buttons under the card's bottom edge (a CSS gate pins the three
rules this needs, since happy-dom does no layout). The `confirm.request`
sheet wears the same card class and now draws the same card: evidence
box, answers along the foot, deny first and focused, no cross.
- Deny keeps the focus, so a bare Enter still never grants, and a chord
pressed in a field (the composer's own Cmd+Enter) is left to the field.
**Not changed, on purpose:** a standalone PDF is still framed with the
browser's own viewer, which keeps text selection and search. Office
files are drawn as page pictures instead, so the two paths still differ.
## Type
Feature, because the squash commit is released as one entry and the
shortcut change is new behaviour; the file-viewer half is a fix riding
in the same PR (Summary says which commits are which).
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npx vitest run` in `ui-web`: 211 files, 3121 tests passed (at the
head of this branch, rebased on the current main). New cases cover the
ten Office extensions, a text head read in one request, a head that is
only the start of the text, a binary head with its range size, a
never-text extension making no request, an empty file, text that turns
binary past its head, and a 413 picture.
- Shortcuts: new cases cover Esc / Cmd+Enter / Shift+Cmd+Enter on both
approval variants, Ctrl in place of Cmd, digits and a bare Enter
answering nothing, chords pressed in a field being ignored, the
conversation grant when no rule is suggested, a question docked above a
pending approval taking the chord, Cmd+Enter from the question's empty
answer field, the rule line (drawn with the pattern as code when a rule
is suggested, absent otherwise), no close cross on either approval
sheet, the answers row sitting outside the scrolling body, and the
confirm sheet's deny-first order and focus. The restyled card was
checked in a real browser in light and dark themes; at 444px wide with a
multi-line why, a long suggested rule and a long evidence block, the
body scrolled (295px of content in 181px) and the answers row stayed
inside the card. Six mutations of the key handling (Shift chord allowing
once, a bare Enter counting, the field guard removed, the question's
chord or its field chord disabled, the stacking check removed) each
failed at least one case. Checked by hand in a real browser:
Shift+Cmd+Enter answered `allow_session`, "1" answered nothing,
Cmd+Enter allowed once, and a two-step question was answered with "2",
"1" and Cmd+Enter.
- Mutation check: six mutations (sniff every name, drop the one-request
reuse, drop the NUL test, drop the 416 case, map 413 pictures to "gone",
classify only pptx as office) each failed at least one of the new tests.
- `npm run type-check`, `npm run lint` (0 errors), `npm run gen:check`,
`node scripts/check-class-namespace.mjs`, `node scripts/check-css.mjs`,
`npm run build && python3 build.py && node scripts/check-page.mjs` (boot
snapshot matches golden): all pass.
- `npm run lint:i18n` in `ui-tui`: generated catalogue up to date.
- `uv run --frozen --all-extras pytest tests/test_rpc_files.py
tests/test_rpc_transport.py -q`: 100 passed, 1 failed. The failure is
`test_a_host_without_libreoffice_says_so`, which expects 503 and gets
500 here: it empties `PATH`, but this machine has LibreOffice in
`/Applications/LibreOffice.app`. This PR touches no code under `raven/`;
CI, without LibreOffice, is the check that counts.
- In a real browser against a running gateway, light and dark theme: an
unknown-extension text file and a `Makefile` open as text, 4 KB of
random bytes shows the note with its size, a `.docx` renders as a page,
an empty `.keep` shows as empty text, and the open-with menu lists the
host apps.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No docs describe the viewer's fallback, and screenshots are kept out of
the repository.
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
The shortcut change alters muscle memory: a reader who pressed 3 to
allow once now presses Cmd+Enter, and a digit does nothing rather than
answering. The `confirm.request` sheet used to focus allow, so a bare
Enter allowed; it now focuses deny, as the gate card always did, so a
bare Enter refuses. Opening a file of unknown type now costs one extra
ranged GET, capped at 8 KB, on the same authenticated, workspace-fenced
route the viewer already reads. Nothing new is served or executed.
Office formats other than pptx now ask the gateway for a LibreOffice
render; a host without LibreOffice answers 503 and the note shows that
reason, as a failed pptx already did. The kind rename (`pptx` ->
`office`) is page-internal and touches no wire contract. Rollback: the
shortcut change is the four commits named in Summary and reverts on its
own; the file-viewer change is the other three commits. Reverting the
whole PR undoes both.
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Every desk pane said its name twice: once in the window header, then
again in a bar the content drew under it (the file path bar, the task
status line, the node card's back-and-title row). This gives each pane
one header that always names what is on screen, and folds the content's
bars into it.
- New `components/PaneHead.tsx`: glyph (or a back chevron when a part of
something is open), the title, a muted facts line under it, then the
controls that act on the object; the window's fullscreen and close sit
after a hairline. A picked node reads as "task > node", collapsed to one
name when both are the same (a single spawn). The content portals the
head into the desk header, so the state it owns (picked node, tab, file
view) stays where it is.
- The desk header's drag grab is now a native `pointerdown` listener. A
portal's React events bubble through the content's tree, not the
header's, so the old `onPointerDown` prop never heard a press on the
title.
- Task pane: the status bar and the node card head move into the header.
Stop leaves the palette's task list and lives in the pane header, shown
only while the task (or the picked node) is running. The runtime has no
per-node cancel for a graph, so on a graph node it stops the whole run,
and its tooltip says so.
- File and diff panes: the path bar moves into the header. The file
viewer no longer offers a download or the binary note's save-a-copy link
(the conversation's delivery cards keep theirs).
- HTML previews run their scripts by default (`run=1` plus
`sandbox="allow-scripts"`, never `allow-same-origin`, so the page keeps
an opaque origin), without the "preview does not run scripts" note and
its run button. Trade-off: a previewed page can now make network
requests of its own without a click.
- Narrow panes (container <= 560px) drop the parent crumb; the facts
keep their own line so status and duration stay visible.
- Header icons are sized by the ink they draw (about 10px tall each,
even sizes), and close is an SVG cross rather than the font's
multiplication sign, so the row reads level.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
In `ui-web`, after rebasing on the current main:
- `npm run gen:check`: generated.ts matches the contract (202 methods)
- `npm run lint`: 0 errors (4 existing warnings in files this does not
touch)
- `npm run type-check`: clean
- `npm test`: 210 files, 3077 tests passed
- `npm run build`, `python3 ui-web/build.py`, `node
ui-web/scripts/check-page.mjs`, `check-css.mjs`,
`check-class-namespace.mjs`: all OK
- In `ui-tui`: `npm run lint:i18n`: generated catalogue is up to date
New tests were mutation-checked: each goes red when the behaviour it
names is broken (file/diff path bar back in the body, crumb repeating
the title, crumb not wired, stop on a finished node, no stop on a
running node, stop back on the list, a download control back on any file
kind). Swapping the native grab for a React prop on the header fails
only the drag-by-title test.
Checked in a browser against the offline fixtures (before/after
screenshots of every pane kind) and against a real v0.2.2 gateway: a
spawn task, a markdown delivery and an HTML report render with the new
header, and the gateway answers the HTML request with `sandbox
allow-scripts`.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible: pane headers change for every pane kind; stop moves from
the palette's task list into the task pane; the file viewer loses its
download control; HTML previews run scripts without asking. Roll back by
reverting this PR; no data or config format changes.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
The agent connector (Settings > Agent connections, and the onboarding
agents step) is reworked around what goes wrong on it. Frontend only: no
RPC change, and every word drawn comes from fields `subagents.*` already
sends (`data.detail` and `data.remedy` on a refused write, `last_test_*`
on a row).
**A failure is said under the agent, not instead of it.** A refused
connect or a failed test used to replace the line about the agent with a
red sentence, and a card or sheet grew to fit it. Now:
- Every card is one fixed shape: the name, two lines of room for what
the agent does, and a slot that always speaks. With nothing wrong the
slot is a quiet grey word for the row's state (connected, available, not
installed, a caveat, and when a passed test passed). A refused write or
a failed test fills it with a single-line clay strip: one word for what
failed, a short reason read off `remedy.kind` (every kind, including the
ones #779, #786 and #781 added), or "see why" when there is none. A
write in flight fills it in amber. Cards measured at one height across
every state.
- The press that answers a strip is the card's corner control, where
connect and install already live (retry after a refusal, retest after a
failed test on a connected row). The strip carries no button.
- The sheet keeps its fixed 520x500 box. Its head says only which state
(the dot and line read #773's `healthOf`); the why and the how are a
note at the top of the body that scrolls with it: a title per remedy
kind, `FIX_SAY`'s sentence, the command (or #779's two numbered steps
when `remedy.then` is set), and the server's sentence folded under it.
Without a remedy the server's sentence is shown as it came, since it is
the only reason there is.
- The wizard's rows open no sheet, so their second line carries the
step: the short reason, then the command as code, with `then` as a
second piece of code; "run it to see why" for `network`, `silent` and
`config`; and "open it in a browser" for a `plan`, whose command is the
page that sells one.
**Waiting.** Before the first roster arrives the grid draws one
placeholder card per catalogue entry (the catalogue is the roster on
every machine), with the settings sections' shimmer; the tab counts wait
as bars rather than showing 0. The shimmer gate now covers these bars
too.
**Agent marks in the dark theme.** Every mark now sits on a light plate
in both themes, as the app icon does, and no filter reaches a mark.
Inverting `hermesagent.svg` gave its negative, and the hue rotation that
put qoder's green back landed on a different green (#2ADB5C -> #008203).
The plate is a token (`--mark-plate`) declared by every theme block, and
the embedded `color-scheme` is pinned light on the tile, so `raven.svg`
and `miromind.svg` draw their light selves on it.
`agent-mark-css.test.mjs` is rewritten to pin that: no filter on a mark,
the plate token in every theme path, the scheme pinned on the tile and
not on `:root`.
**Copy.** The general settings' language hint now says it picks the
interface's language rather than Raven's.
Rebased onto #773, #779, #786 and #781, which touch the same files.
#773's `healthOf` stays the one verdict for the dot and the sheet's
head; the card's footer and corner, and the sheet's note, are this
change's. #773's rule that an off row wears no dot for a failed test is
kept; its footer still says so. #779's `FIX_SAY` table and step labels
feed the note, with #786's remedy passed through so the `runtime`
sentence names both Node.js versions; a `runtime` fix sent without them
reads as a launch that quit in the title and on the card too (`kindOf`),
as `FIX_SAY` already says it; its row sentences (`bad_run*`,
`bad_retry`, `bad_open`) and the `fix_unknown_*` keys have no caller
left and are removed.
**Earlier decisions this changes, for their authors to confirm:**
- Dark-theme agent marks (@LivXue's filters, @0xKT's gate in #478, whose
note says neither filter may become a blanket rule): the filters are
gone and every mark sits on the plate instead. This reaches every
`.agent-mark` tile on the page, not only the connector.
- A refusal with no remedy (@Handsome-wzw, #730 / #754): the server's
sentence was folded because, shown first, it was a red English
paragraph. Here it is shown as it came when there is no remedy, since it
is then the only reason there is; with a remedy it stays folded.
- An off row whose last test failed (@0xKT, #773): it still wears no
dot, but the card's footer says the test failed.
- Where the fix is said in the sheet (@Handsome-wzw #730, @0xKT #773):
moved from the head's status line to a note at the top of the body. The
head's caveat line for a connected row is unchanged, and still folds the
probe's words under it.
- The card and wizard-row failure text (@Handsome-wzw, #754 / #779 /
#781): the line about the agent stays and the failure is a footer under
it; the row's commands are code inside the sentence. The sentences keep
#779's content. One change of reading: a `config` row says to run `kimi
doctor config` to see where the file is wrong (as #781's sheet sentence
does), where #781's row said to run it and retry.
**Review follow-up.** The failed-test note named Test for every row that
was not connected, but the sheet's bar offers Test only to an
unauthorized row; a row whose test has since cleared its handshake, and
an endpoint still waiting on its key, show Connect alone. The note now
reads its press from the same branches as the bar (`testPress`), and a
test walks every state a failed test can leave a row in and checks the
note names a button the bar renders. The endpoint test that expected
Test for a row waiting on its key now expects Connect.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
After the rebase onto `main` at `05cac1f1`:
- `npx vitest run --maxWorkers=4` in `ui-web` -- 210 files, 3055 tests
passed; the extAgents suites and page gates alone (`npx vitest run
src/features/extAgents scripts/gates`) 385 tests
- `npx tsc --noEmit -p .` and `npm run lint` in `ui-web` -- 0 errors
(the 4 warnings `main` already has)
- `node scripts/check-css.mjs`, `node
scripts/check-class-namespace.mjs`, `npm run build && python3 build.py
&& node scripts/check-page.mjs` in `ui-web` -- OK
- `npm run gen:check` in `ui-web` -- generated.ts matches the contract
- `npm run gen:i18n` and `npm run lint:i18n` in `ui-tui` -- the
generated table is up to date
- `uv run pytest tests/test_ui_agent_marks.py -q` -- 7 passed
- Real browser (Playwright on the Vite dev page, zh and en, light and
dark), with failure states injected from backend-shaped fixtures
(sign_in, setup, api_key, download, and model with a `then` step; the
unit tests take every kind): all 11 cards 149px tall across healthy,
testing and failed states and in the placeholder grid; the sheet 520x500
for 7 rows in different states; a click on the corner retry does not
open the sheet
- Against a live gateway (Vite dev server proxying `/auth` to it): the
real 18-row roster renders with the new footer and plate
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No user-facing docs describe the agent cards.
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
User-visible: the card and sheet layout for failures, the corner control
now also retries and retests, the waiting grid, and every agent mark
sits on a light plate in the dark theme (a visible change to all mark
tiles there, including the sub-agents card and pane headers that share
`.agent-mark`). No RPC, config or stored-state change; reverting the
squash commit restores the previous page.
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
Qwen Code is a Node.js script (`#!/usr/bin/env node`), so it runs on
whichever `node` comes first on the PATH it is launched with, not the
one it was installed with. On a machine whose PATH puts an older Node.js
first (an nvm default left on 18, a Homebrew formula nobody upgraded), a
Connect or Test used to end in "Qwen Code quit as soon as it started",
with the reason folded under it as English that names no Node.js at all.
Measured on Qwen Code 0.24.4 with official Node.js builds:
| Node.js on PATH | What qwen does | What the sheet says now |
| --- | --- | --- |
| 18.20.8 | Exits 1 at import: `SyntaxError: The requested module
'node:fs' does not provide an export named 'openAsBlob'` | It needs
Node.js 22 or newer and this machine started it with 18.20.8, plus the
upgrade command when the installer is recognisable |
| 20.20.2 | Runs | Connects, as before |
| 22 | Runs | Connects, as before |
The verdict is read off facts, not off that sentence, which changes with
every release and names no version anyway:
- `raven/agent/subagent/node_runtime.py` (new): resolves the interpreter
from the agent's shebang the way `env` would, on the launch's own PATH
(the row's, else the login shell's), runs `node --version`, and reads
the floor from the agent's own `package.json` `engines.node` (`>=22.0.0`
for qwen). Any missing fact means no verdict, so Node.js is never named
on a guess. The upgrade command is given only where the installer shows
in the path: `nvm install 22 && nvm alias default 22` under
`~/.nvm/versions/node/`, `brew upgrade node` under `Cellar/node/`;
anything else (a pinned `node@18`, an installer package) gets nodejs.org
and no command.
- `presets.py`: `NODE_RUNTIME_PRESETS` holds the presets measured to die
this way, Qwen Code only.
- `probe.py`: a launch that quit is checked only for such a preset, and
only after the `--acp` check; the check runs `node --version`, so
Connect and Test reach it through `asyncio.to_thread`.
- `probe_state.py`, `rpc/models.py`, `rpc-schema/openrpc.json`:
`SubagentRemedy.kind` gains `runtime`, with optional `needs` and `found`
(both sent for `runtime`). Both generated clients were regenerated.
- ui-web: the sheet says both versions and shows the upgrade command on
its own line, or points at nodejs.org when there is none; a `runtime`
remedy that arrives without its versions reads as a launch that quit.
The card says "Qwen Code's Node.js is too old". zh/en strings in
`i18n/messages.json`. The offline fixture library keeps its Qwen Code
row on the two-step model fix, so `needs` and `found` join `UNSENT` with
the reason.
Why the stderr sentence is not the trigger: Raven keeps the last 400
characters of stderr in the error it reports, and the `SyntaxError` line
sits 642 characters from the end of qwen's output, so the Test path
never sees it.
Also in this PR: the fix for a model its provider no longer serves
(404), no credit (402) and a rate limit or spent quota (429) now says
`/auth`, not `/model`. `/model` only picks among the models already
registered in `~/.qwen/settings.json`, and qwen 0.24.4's own OpenRouter
preset registers exactly two free models, both since withdrawn from
OpenRouter's free tier (each answers 404 "unavailable for free",
measured 2026-09-24). So anyone set up the default way was sent to a
list offering only dead models. `/auth` re-runs the provider setup,
whose "Model IDs" step takes any id the provider serves; the sheet's
three sentences now say to enter a working model at that step
(`MODEL_SWITCH_HINTS` in `presets.py`, `gui.agent.fix_model` /
`fix_billing` / `fix_quota`).
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `python -m pytest --idle-ceiling-strict` over every test file that
touches sub-agents, the ACP client or the RPC layer: 6423 passed, 1
failed. The failure is
`tests/test_rpc_files.py::test_a_host_without_libreoffice_says_so`,
which fails the same way on `main` on this machine.
- `tests/test_subagent_node_runtime.py` (new, 13 tests): the verdict,
the installer-specific commands, the floor as declared, an absolute
shebang, every missing fact, Connect through the thread, and Test.
Removing the classification call in `probe.py` fails the three
Connect/Test tests.
- `ruff check raven tests` and `ruff format --check raven tests`: clean.
- `python scripts/coverage_gate.py --coverage-json coverage.json diff
--base-ref origin/main --threshold 90`: 100.00% (120/120 executable
changed lines).
- ui-web: `npm run type-check` clean; `npm run lint` 0 errors (4
existing warnings in files this does not touch); `npm run gen:check` in
sync; `npx vitest run` 3035 passed.
- ui-tui: `npm run lint:rpc` and `npm run lint:i18n` in sync.
- Live, real Qwen Code 0.24.4 through `ping_agent` and `run_test`, with
official Node.js 18.20.8, 20.20.2 and 22 first on the launch PATH: 18
gets `runtime` (needs 22, found 18.20.8) on both buttons within a
second; 20 and 22 connect. The 20 Qwen Code cases from #779 were re-run
and give the same results as before, except that the model and billing
cases now name `/auth`.
- The rendered sheet was checked in a browser against the offline
fixture library, zh, both with and without an upgrade command.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No user-facing doc describes these refusal messages; the new sentences
live in `i18n/messages.json`.
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
The check runs `node --version` on the resolved interpreter, only after
a Qwen Code launch has already quit, and with a 5 s bound, off the event
loop. Nothing is read or sent beyond the agent's own `package.json`.
`runtime`, `needs` and `found` are additive. A page that predates them
drops a kind it does not know and shows its generic "could not connect"
text; a stored verdict carrying them reads back as no remedy on older
code.
Rollback: revert the squash commit; there is no migration.
## Related Issues
N/A
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Settings polish in three parts, frontend only (no gateway or RPC
change).
**Memory pager stopped jumping.** A page turn keeps the old rows up
while the next page loads, but the count line under the list was dropped
for that moment, so the pager slid 26px down under the pointer and back
up when the rows landed; clicking through pages made it bounce. The
count line now stays through the reload (and only shows when there are
rows), the Previous/Next buttons are pinned to the edges with the page
label in tabular digits (so "Page 9" -> "Page 10" no longer shifts
them), and a new page starts scrolled to its first row.
**Only clickable rows look clickable.** On the Tools and Plugins pages
every row had the pointer cursor and a row-wide hover, even rows whose
only control is the switch. Now only rows with a panel to expand (e.g.
web_search, web_fetch) get them.
**Real empty states, with "nothing here" told apart from "service
down".** Two-pane sections (schedules, channels, memory) and
single-column ones (usage, archive, plugins, skills, providers) share
one shape: a mark, a title, one line, at most one control, centred.
Before, these were grey sentences or paragraphs at the top of an empty
column.
- Usage: the gateway answers an empty range with zeros, so a range with
no calls now reads "No usage yet" instead of a row of 0 tiles over two
tables that each said "nothing". A null answer only happens when the
read failed, so it says the Raven service cannot be reached, with a
retry.
- Memory: a failed read takes the whole frame ("Can't reach the memory
service", the error detail, a retry) instead of a red paragraph and a
full-width button under the search box. A kind that answers with no rows
reads "No memories yet". The plugin-missing / memory-off notes keep
their own "not connected" state. The "0 total" line under an empty list
is gone.
- Schedules and channels with no rows collapse to one column: a search
box over nothing plus an empty list beside the explanation looked
lopsided. Schedules point at asking Raven in a conversation and offer no
manual add (the list's "+" is still there once a job exists).
- "Pick one on the left" and "nothing matches" are a quiet mark plus one
line.
- Plugins drop the "0 of 0 connected" count when there is no server.
- CJK copy wraps at punctuation instead of mid-word.
Also in this change: a retry on the usage page asked twice (it called
the load and the page's effect reloaded too); it now clears the answer
and lets the effect read once. Two now-dead rules (`.settings-soonbox`,
`.errline-lite`) are removed, which lowers the memory unprefixed-class
pin in `check-class-namespace.mjs` from 8 to 7. The boot-snapshot
goldens, three component snapshots, and the TUI's generated i18n
catalogue are regenerated for the new markup and copy.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run after rebasing onto the current main:
- `npm run gen:check` (ui-web): generated.ts matches the contract
- `npm run type-check` (ui-web): 0 errors
- `npx eslint .` (ui-web): 0 errors (4 existing react-hooks warnings,
none in lines touched here)
- `npx vitest run` (ui-web): 209 files, 2975 tests passed
- `npm run build` + `python ui-web/build.py`: boot snapshot OK
- `node ui-web/scripts/check-page.mjs`, `check-css.mjs`,
`check-class-namespace.mjs`: OK
- `npm run lint:i18n` (ui-tui): generated catalogue is up to date
- `scripts/check_commit_messages.py`, `check_large_files.py`,
`check_source_language.py` over the branch: pass
New tests pin: the count line survives a page turn, and the pager label
advances while the rows stay up; empty memory shows no count, no retry
and no failure copy; a failed memory read takes the frame and recovers
on retry; zero usage draws no tiles; an unreachable usage read retries
with exactly one request; schedules with no jobs render one column with
no button; plugins with no server show no count; only rows with a panel
carry the clickable class.
Checked by hand in a browser (Vite dev server against a live local
gateway, zh and en): memory paging over 8 pages including 9 -> 10 with
the Previous/Next positions sampled unchanged across 17 DOM mutations;
hover/cursor on list_dir vs web_search; the schedules, memory (empty and
failed), usage (empty and unreachable), archive, plugins and
skills-no-match states.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed (no docs
describe these states; screenshots are not committed per the repo asset
rule)
## Risk
UI-only. User-visible changes: the empty and failure copy on the pages
listed above, schedules no longer offering a manual "new" button when
there are no jobs, and non-expandable tool/plugin rows no longer
reacting to hover. No config, RPC or stored-data change. Rollback is
reverting this one commit.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Clicking a spawn card's task row right after dispatch opened the agents
panel's instance window (the one with a "carry on with..." composer)
instead of the task pane. Later clicks opened the task pane. So the same
click opened two different windows depending on how soon after dispatch
it came.
**Cause.** `openSpawn` looks the run up in the tasks store by its record
id (the call's `node_id`). While the run is pending, the tasks store
files it under the run's task id, and it renames the row to the record
id only when the running frame arrives. A click in that gap missed the
row. `openSpawn` then fell back to a label match against the agents
roster, and `subagents.openRow` opens the instance window.
**Fix.** `openSpawn` now follows `openDagRun`:
1. Look in the tasks store.
2. On a miss, read that one row with `tasks.list` by record id, retrying
every 700ms for up to five reads while the record is still being
written.
3. If no row ever turns up, open the tasks list.
The label match and the instance-window fallback are removed. The opener
now takes only the record id, which all three callers already carry: the
card's task row, the replayed delivered row, and the live delivered row.
Removing those two imports makes two import-direction pins stale, so
they are removed as well.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run in `ui-web/` after rebasing onto the current `main`:
- `npx vitest run --maxWorkers=4`: 209 files, 2970 tests passed. The
spawn opener tests are rewritten around the task pane: store hit,
one-row read on a store miss, retry until the record appears, the store
gaining the row between reads, falling back to the tasks list when no
row appears or the read fails, and a call that named no record.
- Mutation check: with the one-row read replaced by an empty answer, 4
of the new tests fail.
- `npm run lint` (0 errors, 4 warnings in untouched files), `npm run
type-check`, `npm run gen:check`, `node
scripts/check-class-namespace.mjs`: all pass.
- Real browser, built page against a live gateway, on a real
conversation with a Codex spawn. To reproduce the race, the WebSocket
route dropped the full `tasks.list` reads so that the tasks store never
held the row, and then the task row was clicked:
- current `main`: the instance window opens (the reported bug);
- this branch: one `tasks.list` read for `snake_game_codex`, and the
task pane opens.
- Without the interception, the task pane opens in both builds.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
User-visible change: the spawn card's task row and the delivered row
always open the task pane and never the instance window. A run the
client cannot find lands on the tasks list. Other entrances to the
instance window (the agents strip, the agents list) are not touched.
There are no server or wire changes. Rollback is reverting this commit.
## Related Issues
N/A
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
A filled mini button is `.mini.go`, and `.go` is also the class of the
composer's Send disc, whose rule in `ui-web/src/styles/page.css` fixes
its width at 30px. The two rules tie on specificity, and `.mini`
restates the disc's height, radius, display and colours but never stated
a width of its own. So every `.mini.go` was 30px wide and only its 68px
`min-width` floor made it any wider, and a label wider than that floor
ran out of both sides of the button: Check again on a not-installed
agent's sheet in the agent hub, and the spinner states Checking,
Connecting and Disconnecting.
`.mini` now states `width: auto`, with a comment saying why the
declaration is not a no-op. A new gate,
`ui-web/scripts/gates/mini-width-css.test.mjs`, pins the declaration and
the rule order the specificity tie depends on.
What the declaration can move: it now wins against 51 width declarations
(lower specificity anywhere, or equal specificity and earlier in
`page.css`), all of them single-class rules apart from one scrollbar
pseudo-element. Crossed with every class the source writes beside `mini`
on one element, the only overlap is `.go`. So only the five `.mini.go`
render sites can move, and only where a label is wider than the floor:
the agent sheet's two action buttons and an agent row's Connect
(`ui-web/src/features/extAgents/`), Create in the schedules section
(`ui-web/src/features/cron/CronPage.tsx`), and Add in the add-model list
(`ui-web/src/features/settings/providers/AddModelPop.tsx`).
Checked and deliberately not changed:
- The five `:root[data-lang="en"]` rules (two in `page.css`, one in
`ui-web/src/features/extAgents/styles.css`, two in
`ui-web/src/features/settings/styles.css`) never match. Nothing in
`ui-web` sets `data-lang`: the language store sets `<html lang>`
(`ui-web/src/state/lang/store.ts`), and the only code in the tree that
sets `dataset.lang` is the tracing viewer
(`raven/cli/tracing_viewer/ui/app.js`). So English buttons get the
Chinese floors, and the buttons in one column are not one size in
English (Disconnect at 87.8px beside Test at 68px). Pointing those
selectors at `:root:lang(en)` would raise the floor of every English
mini button to 96px (88px in dialogs and the settings setup rows), which
is a design change for its own PR.
- `.go` also reaches `.mini.go` with `flex: none` and `place-items:
center`. The first stops a filled mini button shrinking below its label,
which is the wanted behaviour, and the second is inert on a flex
container.
- The sheet rack's primary option is `.opt.go`
(`ui-web/src/chrome/SheetRack.tsx`). `.csheet .opt` gives it its own
width, but nothing restates the disc's `height: 30px`, so it likely
inherits it. Code reading only, not measured.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Before and after in headless Chromium (Python Playwright, 1440x900) over
the offline fixtures (`?stub=1`), each build made with `npm run build`
and then `python3 ui-web/build.py`. The agent sheet was opened for real,
and the other sites were rendered in the live document with their real
ancestor classes. Spill is how far the label runs past the button's
border box. Widths come from this box's fonts, and the reported
screenshot measures the same 68px frame against the 520px sheet.
```
lang site label before (px) after (px)
en sheet Check again 68.0, spill 1.5 95.5, spill 0
en sheet spinner + Checking 68.0, spill 1.1 95.1, spill 0
en sheet spinner + Connecting 68.0, spill 12.3 106.3, spill 0
en sheet spinner + Disconnecting 68.0, spill 27.5 121.5, spill 0
en agent row spinner + Connecting 68.0, spill 19.3 113.3, spill 0
en add-model Add (120) 68.0, spill 0 80.9, spill 0
en schedules Create 68.0, spill 0 68.0, spill 0
zh add-model Add (120) 68.0, spill 4.9 98.9, spill 0
zh sheet Check again 68.0, spill 0 78.0, spill 0
controls in both languages (plain .mini, .mini.danger, .mini.ghost): identical widths
```
Every after row has spill 0 and a label that fits the button's content
box.
```
cd ui-web
npx vitest run scripts/gates/mini-width-css.test.mjs
# without the fix: 1 failed | 1 passed. With it: 2 passed.
# with the .mini rule moved above .go: the order test fails, 1 failed | 1 passed
./node_modules/.bin/vitest run --no-file-parallelism scripts/gates
# 45 files, 196 tests passed, no unhandled errors
npm run gen:check && npm run lint && npm run type-check
# exit 0. Lint: 0 errors, the 4 existing warnings in untouched files
cd ..
node ui-web/scripts/check-page.mjs && node ui-web/scripts/check-css.mjs && node ui-web/scripts/check-class-namespace.mjs
# exit 0
uv run --no-sync pytest tests/test_ui_css_token_gate.py -q # 43 passed
pre-commit run --from-ref origin/main --to-ref HEAD # applicable hooks passed, no file modified
npx commitlint --from origin/main --to HEAD --config commitlint.config.cjs # 0 problems
PYTHONPATH=. uv run --no-sync python scripts/check_commit_messages.py origin/main..HEAD # exit 0
PYTHONPATH=. uv run --no-sync python scripts/check_large_files.py origin/main...HEAD # exit 0
PYTHONPATH=. uv run --no-sync python scripts/check_source_language.py origin/main...HEAD # exit 0
```
`npm test` in `ui-web` (the whole suite, in parallel, Node.js 26.6.0 on
this box): 50 failed of 2889, 39 of them timeouts, in
`state/session/runtime.*`, `features/transcript/source` and four gate
harnesses. The 26 failing files re-run serially on this branch: 26
files, 285 tests passed, no unhandled errors. So nothing fails
deterministically on this branch. A full run on a second machine would
be the stronger evidence.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed (not
applicable: no user-facing doc describes these buttons)
## Risk
A filled mini button whose label is wider than 68px now grows to fit it,
so it can be wider than a plain sibling in the same row where it used to
be held at 68px. A label narrower than the floor keeps the 68px frame,
and buttons without `.go` do not move. CSS only, no security surface.
Rollback: revert this commit, which is one declaration in `page.css`
plus the gate.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
Co-authored-by: Claude (claude-opus-5-5[1m]) <noreply@anthropic.com>
## Summary
After the row switch in Settings > Channels, the page kept whatever the
last status load said: a channel that had just started drew "not
started" (or stayed green after it died), and the toast told every
reader to "reopen the Raven app" although the gateway has hot-applied
the switch since August. The reason a start failed (missing SDK, empty
allow-list, refused config) went only to the gateway log.
- `channels.configure` answers `{applied, outcome, detail}`: `outcome`
is the channel manager's word (`started`, `already`, `stopped`,
`missing_dep`, `bad_config`, `deny_all`, ...) or `unreachable` when no
gateway answered; `detail` carries the missing-dependency hint.
`ChannelsConfigureResult`, the OpenRPC schema and both generated
TypeScript contracts are widened together.
- The row switch re-reads `channels.status` after the write, like the
pane's Connect already did, and the pane's `host` flag is re-read on
every write instead of only on section entry.
- The toast says what happened: "enabled" / "disabled" when the gateway
applied it, the reopen sentence only for `unreachable`, and a refusal
sentence per outcome word (with the hint) when the adapter did not
start. The pane's Connect path reports refusals too.
- Switching a scan-login channel on from the list opens its card, where
the QR appears; the list had no cue that the code lives there.
- The TUI's regenerated RPC types and i18n table are included (both are
CI gates).
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `python -m pytest tests/test_rpc_console.py
tests/test_rpc_channels_live.py tests/test_rpc_control.py -q` -> passed
(new cases: outcome and detail surfaced, `unreachable` when the probe
answers None).
- `npm test --prefix ui-web` -> all passed (source.test.ts: toggle
reloads status and toasts per outcome; ConnectionsPage.test.tsx: row
reflects the reload, card opens for scan-login; fixture-shape gate
updated for the new optional result fields). `npm run gen:check --prefix
ui-web`, `npm run type-check --prefix ui-web`, `npx eslint .` -> clean.
- `cd ui-tui && npm run gen:rpc && npm run lint:rpc && npm run gen:i18n
&& npm run lint:i18n && npm run type-check && npm test` -> clean, 2106
tests passed.
- Real machine: isolated gateway from this branch (`python -m raven
gateway --page-port 18812`). Flipping the Weixin row switch: 0.7 s later
the row read "running, waiting to be signed in", the card had opened by
itself, the toast read "Weixin enabled" with no reopen advice, and the
QR was drawn 5 s after the press; flipping it off toasted "disabled".
Over RPC, `channels.configure` with an empty allow-list answered
`outcome: deny_all`, a plain enable answered `started`.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- `channels.configure` gains two optional result fields; older clients
ignore them. The toast copy changes for every channel toggle.
- Rollback: revert the branch; no config or storage format changes.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
Three small web UI changes, one commit each.
1. **Confirm dialog.** The sheet sat on a 48px gap and a divider it
never asked for: an unscoped `footer` rule left in the settings
stylesheet (no settings view renders a `<footer>`) matched the sheet's
footer. The rule is removed. The sheet now uses the settings dialog's
softened, blurred scrim, the upgrade card's 420px width and 14px radius,
32px buttons, and a cancel button that no longer looks disabled.
`confirm.ask` takes an optional tone: `danger` (default, the clay button
every existing caller keeps), `primary` (neutral key button) and
`notice` (one plain close, cancel hidden). The upgrade prompt is
`primary`; the "turn still running" and "rebuild the page" notices are
`notice`. The upgrade body is shortened to "{from} to {to}. The Raven
service restarts."
2. **Rail update notice.** The bordered card with a bent amber left rule
and a breathing dot becomes a rail row: 32px, no border, light amber
tint, 13px text, the dot in the 16px glyph slot so the label lines up
with the settings row, no animation.
3. **Per-turn file changes list removed.** The "Files changed this turn"
card under each reply is gone. Delivered-file cards stay, and the
workspace pane keeps its own change list. The per-turn artifacts source
that only fed that card is removed with it, the closing block is
appended only when the turn delivered something (deliveries are recorded
off their tool result, before the turn ends), and the class-namespace
ratchet is lowered to the new counts. The TUI's equivalent block is
unchanged.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npm test --prefix ui-web`: 208 files, 2883 tests passed
- `npm run type-check --prefix ui-web`, `npm run lint --prefix ui-web`
(0 errors; 4 existing warnings in untouched files), `npm run gen:check
--prefix ui-web`: pass
- `npm run type-check --prefix ui-tui`, `npm run lint:i18n --prefix
ui-tui`: pass
- `npm run --prefix ui-web build && python3 ui-web/build.py`: boot
snapshots match golden
- `node ui-web/scripts/check-page.mjs`, `check-css.mjs`,
`check-class-namespace.mjs`: OK
- Manual, in a local `raven serve` sandbox with a newer build published
to a stand-in release source: opened the upgrade prompt (light and
dark), checked the rail notice lines up with the settings row, and ran a
real turn that wrote two files and delivered one: only the delivered
card shows, live and after reload.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible: the confirm dialog looks different everywhere it is used
(existing destructive confirms keep the clay button), the rail notice
changes look, and the per-turn file changes card no longer appears.
Removing the leaked `footer` rule also drops a 48px top margin it was
adding to the onboarding wizard's footer. Rollback is reverting the
squash commit; nothing persisted changes.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
A spawn card in the transcript now shows only its grid (task, target
agent, state, elapsed). The task row is how you get to the run itself.
- **No sub-run stream in the trail.** The card used to draw the
delegated run's own conversation inside its fold, plus a one-line live
tail under the row while the run was going. The trail records what this
conversation did. The run's own messages belong to its task pane, which
the task row already opens. This is the same rule the dag card follows
("one grid, and a door"). Both surfaces are removed, along with the code
that only served them: the per-card `subagent.context` poll (`readSpawn`
/ `tailText`), the `spawnRecord` seam, `CallData.stream` / `reading`,
`overscroll.ts`, the `.dlgtail` / `.dlgchat` styles and three i18n keys.
The task row now passes the run's record id to `openSpawn`, so the pane
opens that exact run and no longer matches by label.
- **Restored cards resolve again.** A card restored from history looked
up its `subagent.list` row by task-id suffix (`<stamp>-<task_id>`).
Spawn records are now named by the call's required `node_id`, so nothing
matched, and every restored card lost its instance handle and its
duration. The live and restored views of the same run therefore looked
different. The `node_id` from the call arguments is now matched first.
The suffix match remains for records written under the old naming.
The class-namespace ratchet for `transcript` drops from 71 to 68,
because three unprefixed classes are gone.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run in `ui-web/` after rebasing onto the current `main`:
- `npx vitest run --maxWorkers=4`: 208 files, 2874 tests passed. The
delegated-call block was rewritten around the grid-only card, with new
cases for node-id resolution, the legacy suffix path, and the task row
opening by record id.
- Mutation check: with the node-id match disabled, 5 restored-card tests
fail.
- `npm run lint`: 0 errors (4 warnings, all in files this PR does not
touch).
- `npm run type-check`, `npm run gen:check`, `node
scripts/check-class-namespace.mjs`, and `npm run lint:i18n` in `ui-tui/`
all pass.
- Real browser: the built page ran against a live gateway, and two real
restored conversations were opened (a Raven-Research and a Raven-Design
spawn). Both cards show `instance@agent: task` and the run's real
duration once opened (5m33s and 18m53s, matching the task pane). No
inline stream appears. The task row opens the run's task pane.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
Not covered in a browser: a card whose run is still in progress. That
case is covered by unit tests only (state reads running, the clock keeps
moving, no stream is drawn).
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
User-visible change: you can no longer watch a delegated run's messages
inside the transcript card. They are one click away in the task pane. No
server or wire changes. Records written under the old naming still
resolve through the suffix match. Rollback is reverting this commit.
## Related Issues
N/A
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Retires the built-in `deep_research` tool: the MiroThinker HTTP tool,
its
unconfigured stand-in of the same name, the async channel manager, the
`raven deep-research` command group, `tools.deepResearch` /
`DeepResearchToolConfig`, the loop's registration / mid-session
promotion /
broker and submit wiring, the `inline_tool_stream` flag (its only
consumer
was the tool's stream callback) and the `delivered_sink` plumbing from
#705
(its only writer was that callback). The WebUI settings page loses the
row
and its MiroThinker key panel, the ACP command menu loses
`deep-research`,
and the three transcript i18n keys go (readers fall back to the raw
name).
Research keeps two surfaces: the Raven-Research agent and the
MiroThinker
sub-agent preset; neither shared code with the tool.
`TurnRequest.deliver_text`
stays as a spine contract with its own tests, although nothing in-tree
produces it any more; the comments that used deep research as its
example
now name the sub-agent relay.
Config: a load-time migration (floor 10) drops `tools.deepResearch` /
`tools.deep_research`, one notice per spelling it finds, silent and
idempotent when nothing changes (it
re-runs on every load for configs parked by the research rename, and
`load_raven_config` calls it a third time without writing the stamp). A
`deep_research` entry in `tools.disabledTools` is left as written: that
list
is the general name denylist and a plugin tool may carry the name
(plugin
tools register last so one can shadow a built-in), so dropping the entry
would put such a tool back on offer. The first revision stripped it; the
review caught that and the strip is gone.
Kept on purpose (see the grep gate below): the MiroThinker sub-agent
preset
and its fixtures, `agents/raven-research/**`, the four trajectory
cassettes
that recorded the tool's schema (the replay serves the recording's own
tool
list), `benchmarks/skill_evals/queries.jsonl`, and the frozen
vendored-fork
fixtures, and the `deep_research` deny rows in the five
`agents/*/config.json`
files (the same denylist argument as the migration; the launcher parity
tests
are unchanged).
## Type
- [ ] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [x] Refactor
- [ ] Other
## Verification
- `uv run ruff check raven/ tests/` and `uv run ruff format --check
raven/ tests/`: clean.
- `uv run pytest -q` (whole suite, with coverage, at the rebased head):
25840 passed, 109 skipped; `python scripts/coverage_gate.py ratchet
--tolerance 0.05`: line 90.10% vs baseline 87.30%, branch 83.73% vs
79.43%, passed.
- `uv run pytest tests/test_config_loader.py
tests/test_config_update_tools.py tests/test_agent_loop_run_emit.py
tests/test_cli_one_shot_spine.py tests/test_rpc_bootstrap.py
tests/test_rpc_spine.py tests/test_rpc_turn_send.py
tests/test_turn_wire_shape_conformance.py tests/test_core_cron_stack.py
tests/test_cli_gateway_commands.py tests/test_cli_smoke.py
tests/test_acp_methods.py tests/test_rpc_console.py
tests/test_tool_registry_timeout.py tests/test_question_broker.py
tests/test_provider_auth_method.py tests/test_agents_ppt_launcher.py
tests/test_agents_design_launcher.py
tests/test_agents_research_launcher.py tests/test_tool_capabilities.py
tests/test_l4_entrances.py tests/test_settings_tool_groups.py
tests/test_trajectory_regressions.py tests/test_living_docs.py
tests/test_cli_onboard_commands.py tests/test_cli_theme.py -q`: 1500
passed.
- Mutation check on the migration: with the `_migrate_config` dispatch
neutered, three of the four new `tests/test_config_loader.py` cases
fail; with the `_persist_migrations` dispatch neutered,
`test_the_deep_research_section_also_leaves_the_file_on_disk` fails;
with the pre-review stripping behaviour restored, all four fail.
Restored: 74 passed.
- `npm test --prefix ui-web` (208 files, 2884 tests), `npm run lint
--prefix ui-web`, `npm run type-check --prefix ui-web`, `npm run
gen:check --prefix ui-web`: pass.
- `npm run lint:i18n --prefix ui-tui`, `npm run type-check --prefix
ui-tui`, `npm test --prefix ui-tui` (144 files, 2106 tests): pass;
`messages.generated.ts` regenerated with `npm run gen:i18n`.
- Grep gate: `grep -rniE 'deep[ _-]?research' .` (excluding
node_modules, .venv, dist) hits only the kept surfaces listed above plus
CHANGELOG history.
- Real machine, isolated `RAVEN_HOME` whose config carried
`tools.deepResearch` and `disabledTools: ["deep_research", "exec"]` with
a version-9 stamp: `raven agent -m "..."` printed the `Config updated:`
notice for `tools.deepResearch` once, answered, and left the file
without that section, `disabledTools` unchanged (`["deep_research",
"exec"]`), stamp 10; `raven deep-research` answers `No such command`;
the served WebUI (`raven serve`) Settings > Tools page lists 36 rows
with no `deep_research` and `exec` still off, and `ext.list` carries no
`deep_research`.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
- User-visible: the `deep_research` tool, the settings row and `raven
deep-research` are gone; a config that still carries the section loses
it once at load with a notice; a `deep_research` entry in
`tools.disabledTools` stays as written. Reports the tool wrote under
`<workspace>/deep_research/` stay on disk. Archived transcripts that
recorded a `deep_research` call replay with the generic icon and the raw
tool name instead of the `researched` verb.
- Coverage: the two deleted modules were well covered, but the live
totals sit several points above the committed baseline, so the ratchet
passes with room to spare (measured locally, see Verification).
- Rollback: revert the PR; the migration is additive on the stamp, so a
reverted build reads a migrated config unchanged (the section it would
have read is simply absent).
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
#156 (its deep-research half no longer applies; tracing half unaffected)
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
AGENTS.md 1.3 exempts several trees from the English-source rule and
`ui-web/src` is not one of them. A sweep of it found three kinds of hit
rather than one, and only the third changes behaviour.
Six were the literal every region is served with before a language is
picked: the confirm sheet's title and its button, the settings heading,
the chat heading, the environment chip, the permission chip, and the
dev-only clarify preview. Each was Chinese because `src/page.html` is,
and each is a transcription rather than a lookup because a rendered
value would fight the store that owns the element. They are in English
now, and each in the message catalogue's own spelling of what it stands
in for: `Settings` is `gui.nav.set`, `New task` is `gui.new_task`,
`Local` is `gui.reach.local`, and each of those keys spells in Chinese
exactly the literal being replaced. English because that is what
`raven/config/schema.py` defaults the language to, so the frame before
a pick is one language throughout rather than two.
The permission chip is the one that changes more than its language.
Its fallback said the Chinese for auto-execute, which is a phrase the
catalogue does not contain -- the tier it stands for is `gui.perm.smart`
and the catalogue spells that one `Smart mode` and, in Chinese, smart
mode rather than auto-execute. `DEFAULT_TIER` is `smart`, so the new
fallback is now exactly what the store's own first draw puts there for
a reader with nothing stored, instead of a word no tier answers to.
One was punctuation doing the work of a word. The schedule humanizer
joined an already-translated list with an ideographic comma, so an
English schedule read `Mon, Wed, Fri` with Chinese punctuation holding
it together. A mark belongs to its language like the items around it,
so it comes from the message catalogue now, under `gui.cron.h.sep`.
One was a comparison, and it is the only behaviour change here.
`state/session/naming.ts` tested a stored title against a single
spelling of the default, so a conversation created under one language
and read under the other was never recognised as unnamed and never got
a generated title. It tests against every spelling the message
catalogue carries.
The `first-frame-literals` ratchet drops from 38 runs in 14 files to 21
in 4, and `ui-web/CONTRIBUTING.md`'s row moves with it in the same
change, as that gate's own rule requires.
Two follow-up commits answer `ui-web/CONTEXT.md`'s retired words: it
retires `catalogue` alone, which in the Runtime's `CONTEXT.md` is the
Session Mode catalogue, and `gateway` alone, which on this page is
`gateway()` in `src/rpc/gateway.ts`. Four of the first (one of them an
identifier this branch had just introduced) and one of the second had
come in with the text around them.
Rebase note for a reviewer diffing against the base: `page.css`
conflicted, and the conflict was resolved by taking the base's side
whole. The comment this branch was de-Chinesing described the mechanism
that hid a session row's stamp behind an absolutely positioned marker,
and the base has since replaced that mechanism with a plain dot, taking
the comment with it.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run from `ui-web/` unless noted. This box runs node 26, whose
experimental `globalThis.localStorage` shadows happy-dom's and kills
every suite that clears it, so the suite runs need
`NODE_OPTIONS=--localstorage-file=<path>` and `--no-file-parallelism`.
Neither is a repo change; CI runs node 22 and needs neither.
```
vitest run src/features/cron/humanize.test.ts \
src/state/session/runtime.naming.test.ts \
scripts/gates/first-frame-literals.test.mjs
Test Files 3 passed (3) Tests 29 passed (29)
same files, with only humanize.ts and naming.ts reverted to the base
Tests 3 failed | 21 passed (24)
vitest run (whole ui-web suite, serial, --testTimeout=30000)
742 suites, 2868 tests, 2866 passed, 2 failed, 0 unhandled errors
npm run type-check clean
npm run gen:check generated.ts matches the contract (202 methods)
npm run lint 4 problems (0 errors, 4 warnings), the pre-existing four
npm run lint:i18n (in ui-tui) generated catalogue is up to date
```
The 2 suite failures are `features/desk/store.test.ts` and
`features/desk/palette.test.ts`, both `when storage refuses`, and
neither is this branch. They are unevaluable on a node 26 box either
way: with the flag, storage works when the test needs it to throw;
without it, the file dies in `beforeEach`. A reviewer running the same
suite on another machine reported 2870 of 2870 passed, which settles
them as this box's artifact rather than a repository-wide failure.
Three of the four added assertions go red when the source is reverted.
The fourth, `keeps the ideographic comma for a reader who is in that
language`, is green on the base by construction: it is the positive
half of the pair, and what it guards is the fix dropping the mark for a
Chinese reader rather than the bug it was written beside.
The ratchet is a two-sided gate -- it fails a pin that is too low, one
that is too high, and a row for a file that carries nothing -- so its
five green assertions are what proves 6 + 2 + 12 + 1 is what the tree
carries, and `CONTRIBUTING.md`'s `21 ... in 4 files` matches that sum.
No production reader of the six replaced literals is left in either
front-end tree. Walking every tracked file under `ui-web/` and
`ui-tui/src/` for the six, with the message catalogue itself as the
positive control, leaves three hits and both kinds are deliberate. One
is the word for Preview in `src/page.html`, the served no-JavaScript
shell, and one of the six runs the ratchet pins. Two are the words for
Confirm and Local in `src/rpc/fixtures/plughub.ts`, the offline fixture
library the gate excludes by name as the demo shell's canned content
rather than the page's own words. The boot and region goldens record
element shape without text, so none of them moves.
One layout consequence, measured in Chrome on the built page because
happy-dom lays nothing out and the whole suite is blind to it. The
English fallback is wider than the Chinese it replaces, and at exactly
780px -- the floor `page.css` declares with `body { min-width: 780px }`
-- that is enough to wrap the composer bar:
```
#permName content width .under height at 780px / 800px / 900px
the Chinese it replaced 48px 30px / 30px / 30px
Smart mode 65px 62px / 30px / 30px
Approve each step (live) 100px 62px / 62px / 30px
```
So a reader whose catalogue value is Chinese sees the bar wrap and
unwrap once, at one width, in the frame before the store's first draw.
An English reader sees one fewer shift than before, since the live
value wraps it at 780px either way. The 780px floor itself is not this
branch's to move.
Everything above was run with the branch rebased onto `main` as it
stood a few commits ago; `main` has moved since. Left un-rebased on
purpose, since the merge ref is what CI measures and the branch would
be stale again before it was reviewed. The one gate that could have
turned on that drift is the ratchet, because `lib/prose.ts` carries
twelve of the twenty-one pinned runs and `main` has edited that file
since: it still carries exactly twelve, counted at both revisions, so
the pin holds across the merge.
Repository gates, from the repo root:
```
scripts/check_source_language.py origin/main...HEAD clean
scripts/check_large_files.py origin/main...HEAD clean
scripts/check_commit_messages.py origin/main..HEAD clean
npx commitlint --from origin/main --to HEAD clean
```
Three dots on the first two deliberately: both run a plain `git diff`
over whatever range they are handed, so a two-dot range on a branch
whose base has moved reports the base's own deletions as the branch's
additions.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
User-visible: a reader who loads the page and has never picked a
language sees English where six elements used to say Chinese, until the
store resolves and rewrites them. That is the point of the change, and
it matches what the backend defaults the language to. A reader who has
picked Chinese sees no difference: every one of the six is overwritten
from the message catalogue on the next frame either way.
Also user-visible, and a fix rather than a risk: an English reader's
schedule no longer carries an ideographic comma, a conversation titled
with the other language's default now gets named, and the permission
chip's pre-store frame names the tier the store is about to draw.
The one cost is the 780px wrap measured above: one extra layout shift,
at the narrowest supported width, for a Chinese reader, lasting until
the store's first draw. Kept rather than tuned away, because the word
that avoids it is not the one the catalogue uses for that tier.
Rollback is reverting the commits. Nothing persists, no stored shape
changes, and the one added message key is additive.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
## Summary
The memory page drew every detail header behind a coloured square
holding the title's first character, upper-cased. A CJK title has no
initial, so the square showed one Chinese character as though it were
one, and the title then sat 48px right of the DETAIL label and the body
under it.
Two surfaces could still draw that tile, and both lose it:
- the memory detail header, which now takes no mark at all, so its title
lines up with the section beneath it;
- ChannelMark's fallback, for an id the mark table has no file for or a
file that fails to load, which now draws a plain mark on the same
plate mail and Matrix already use. Its `name` prop went with the tile,
since nothing else read it, so the row's name can no longer reach a
component that must choose by channel id.
SetupRow's Tile was the last producer, so `.pmtile` leaves page.css with
its eight tints and the five per-container size rules, and check-css
loses the allowlist entry that let it carry literal colours.
Both CSS gates read their expected geometry off `.pmtile`'s own rule, so
each now states what it guards directly: the channel mark declares a
whole box that neither of its slots overrides, and an agent mark gets a
whole square box in every slot that resizes it. That is weaker than what
it replaces -- the channel mark's box was pinned against the tile's one
rule, so resizing the tile moved the guard with it -- and there is no
longer a second rule to derive it from. The agent-mark slots are now
read off the stylesheet rather than hand-listed, which the test's own
"every slot" wording had been claiming without checking.
Deliberately not done, and left for a separate decision: `SetupRow.tsx`
has had no call site since schedules, channels and memory moved into the
settings dialog and TwoPane replaced its row. This change removes the
last live export from that file, so the whole module and its `.surow`
rules are now unreferenced. Deleting a component is a wider call than
removing a tile, so it stays.
Scope worth stating: the channel fallback is close to unreachable in
practice. tests/test_ui_channel_marks.py asserts that the mark table
plus the generic set equals the adapter set and that every named file
ships, so an unknown id cannot occur for a real channel and a 404 cannot
occur at build time. What remains is a browser failing to decode a file
that is present. The user-visible change is therefore the memory page;
the fallback is the same defect fixed where it could recur.
The plain mark's glyph is a judgement call. It is a neutral outline on
the existing inset plate, matching the envelope's stroke weight, chosen
over an empty plate because an empty one reads as a broken image.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run in a worktree at this branch's head, rebased onto main after the
chat-view change landed. That change adds a dependency, so this worktree
was given its own node_modules rather than a link to another checkout's;
`npx tsc --noEmit -p tsconfig.json --listFiles` confirms the compiler
read this tree's copies of the edited files.
- `npx tsc --noEmit -p tsconfig.json` -- exit 0, no errors.
- `./node_modules/.bin/eslint .` -- exit 0, with the four pre-existing
`react-hooks/exhaustive-deps` warnings. The one in ConnectionsPage.tsx
is at line 566; the lines edited here are 175 and 227.
- `vitest run --no-file-parallelism scripts/gates src/components
src/features/memory src/features/connections` -- 324 of 326 passed.
Both failures are in scripts/gates/boot-order.test.mjs, which fails
three at a clean detached origin/main under the same command, so this
head's set is a strict subset of the base's. 0 introduced.
- `vitest run` (the whole suite, as CI runs it) -- 246 of 2880 failed
here against 262 of 2880 at origin/main, and the two sets differ in
both directions: 14 fail only here, 30 only there. That is this box's
node-26 localStorage artifact rather than a regression, and all 14 sit
in files this change does not touch. At the granularity where the
result is stable -- one file, its own process, a fresh storage db --
head and base are identical: src/state/session/registry.test.ts gives
3 failed and 25 passed, three runs of three, on each.
- `uv run --frozen --all-extras pytest tests/test_ui_channel_marks.py
-q` -- 7 passed. This one matters because it regex-parses
ChannelMark.tsx and asserts the mark table still equals the adapter
set.
- `node scripts/check-class-namespace.mjs`, `node
scripts/check-css.mjs`, `node scripts/check-page.mjs` -- all OK. Two
namespace pins were lowered in the same change, since removing the
class put both lists under their budget.
- `npm run build` then `python3 build.py` -- built, boot-snapshot 290
and 289 nodes matching golden, and the page 3,714 bytes smaller than
the same two steps produce at origin/main.
- `make check-large-files`, `make check-source-language`,
`scripts/check_commit_messages.py origin/main..HEAD` -- all exit 0.
Both rewritten gates were mutation-proved rather than assumed: dropping
`border-radius` from `.channel-mark` reddens the first, adding a
`.two-pane-head .channel-mark` override reddens the second, and dropping
`border-radius` from `.pmdhead > .agent-mark` reddens the agent-mark
one. The stylesheet was restored from HEAD after each and `git diff
HEAD` confirmed empty.
Rendering was checked in headless Chrome against the real stylesheet and
the real icon files, in both themes, because happy-dom applies no
stylesheet and none of the above can see a pixel. The before state was
generated from origin/main's own copy of the component rather than
hand-written.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No doc names the tile, and the repo does not carry screenshots for this
surface.
## Risk
User-visible, and only in appearance. A memory detail header loses its
coloured square and its title moves 48px left to line up with the text
below it. An entrance whose icon cannot be drawn shows a neutral outline
instead of a coloured letter; every entrance that ships a mark is
unaffected.
No behaviour, data or wire shape changes. `ChannelMark` loses a required
prop, which is a compile error at any missed call site rather than a
silent one, and both call sites are in this diff.
Rollback is a revert of this pull request; nothing persists and nothing
migrates.
One note for whoever lands second: an open pull request also edits
page.css and check-class-namespace.mjs. It touches neither the pins
lowered here nor any `.pmtile` rule, so the overlap is textual only.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
## Summary
Brings the web chat view to the Figma chat design system (Raven file:
UserMessage, AssistantMessage, the Thinking compositions, dates between
long-gap messages, and the flattened layout of message types).
Messages
- The user bubble is the design's: #333, 12px radius, 1.8 line height
(40px for one line). Files sent with a message are small tags inside the
bubble (PDF / Word badge, plain glyph otherwise); pictures still stand
above it.
- A reply is a flat white card, 16px padding, one 12px gap between its
parts. Prose is 14/1.8 with 8px paragraph gaps; headings are 16/22
semibold in the sans face.
- Tables: one half-pixel rule boxing the table at a 12px radius and
dividing every cell, a grey head row, 40px rows of 13/26 text. Long
cells wrap; the head row does not.
- Code listings: the same box, with a 40px header naming the language as
`< CSS >`.
Process and thinking
- The turn fold is one quiet 11px line with the turn's duration ("Done
1m16s"); opened, it shows the process lines at 11px with 12px glyphs
from the design's icon set (search, read skill, use skill, run command,
write, error), 8px apart. Diff counts keep green for additions and red
for deletions.
- A live thought starts folded, so a turn opens with the design's small
thinking card (40px, a shimmering "Thinking..." line; its caret appears
on hover). Clicking it opens the thought, which still follows its newest
line.
- Mid-turn narration stays, set at 12px between the process lines and
the answer.
Dates
- A centred "Today 10:58" / "Yesterday 10:58" / date line appears
between two questions more than 30 minutes apart. Asks now carry their
epoch time (`AskData.at`) for this.
Delivered files
- Each delivery is a compact card under the reply (flattened layout):
the type's page-with-a-fold mark (PPT / MD / HTML tones from the design,
nearest family for the rest) or, where the file has one, a small
first-page / image thumbnail; name and size; and the design's actions:
open in a browser for HTML, download for binaries, open in the panel
otherwise. The whole card still opens the file in the panel. The scaled
markdown / code miniatures and their fetch are removed. The file-changes
list keeps a card of its own below.
Syntax highlighting
- Listings that name a language are coloured with Shiki 4: the
synchronous core with the JavaScript regex engine and a fixed grammar
set (C, CSS, diff, Dockerfile, Go, HTML, INI, Java, JavaScript, JSON,
Markdown, Python, Rust, shell, SQL, TOML, TSX, TypeScript, XML, YAML;
C++ reads with the C grammar, JSX with TSX). Colours are page tokens
(`--code-*`, light and dark) set to the design's roles. Unknown or
unnamed languages render as before.
- Bundle cost: the IIFE grows from about 1.25 MB to 2.44 MB (gzip 388 KB
to 570 KB); dist/index.html from 1.69 MB to 2.90 MB. The grammars are
what it costs; the page is one inlined file, so they cannot load on
demand.
- The HTML / XML grammars carry a literal `<!--`, which breaks an
inlined script. A build-only Vite step rewrites it to `\x3C!--` after
minification (it occurs only in string, template and regex literals,
where it is the same character).
Other
- The desk grid no longer sets `overflow: hidden`, which clipped its
panes' drop shadows.
- New catalogue keys: `gui.transcript.date_today`,
`gui.transcript.date_yesterday`, `gui.arts.browser`,
`gui.arts.download`; `gui.think.live` gains an ellipsis. ui-tui's
generated catalogue is regenerated.
- `lone-delivery-css` is replaced by `delivery-picture-css`, which pins
the same invariant for the new card (the picture is sized from its
height and never cropped). The class-namespace pins for the transcript
went down and are lowered.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npx tsc --noEmit -p tsconfig.json` (ui-web): pass
- `npx eslint .` (ui-web): 0 errors (4 existing warnings in files this
PR does not touch)
- `npx vitest run` (ui-web): 2873 passed, 1 failed. The failure is
`settings-drawer-css` ("sizes classes the markup actually carries"),
which fails on main too on Windows: the gate builds the path `D:\D:\...`
and cannot scan it.
- `node scripts/check-css.mjs`, `node
scripts/check-class-namespace.mjs`: OK
- `npm run build` then `uv run python ui-web/build.py` then `node
ui-web/scripts/check-page.mjs`: OK (boot snapshots match their goldens)
- `node ui-tui/scripts/gen-i18n.mjs --check`: up to date
- `scripts/check_source_language.py origin/main..HEAD`,
`scripts/check_large_files.py origin/main..HEAD`: exit 0
- Checked in the browser on `?stub=1` at 1440px against the Figma
frames: one-line bubble 40px, card padding 16px, table rows 40px, file
card 340x66, process lines 23px apart, thinking card 40px; light and
dark themes; a desk pane's shadow drawing past the grid. The built dist
page also boots offline with no console errors.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
User-visible: the whole chat transcript restyles; a live thought is
folded by default; delivered markdown / code files show a type mark
instead of a miniature. Highlighter output is built from escaped token
text in spans whose colours come only from the theme, so no source
markup reaches the page. The main operational cost is the page size
above. Rollback is reverting this one squash commit; the page has no
stored state that depends on it.
## Related Issues
N/A
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Five small web UI fixes, one commit each so any of them can be reverted
alone.
1. **Reopened conversations arrive folded.** A live turn folds its steps
once the answer lands (#659), but replaying a session from history ran
`openLastFold`, which opened the last turn's fold again. Every session
opened with its final trail spread out. The replay now opens nothing;
every turn arrives shut, the last one included. Delegated panes keep
opening their own folds, unchanged.
2. **Settings opens on General.** The shared section slot
(`state/settings.ts`) was seeded with `usage` and is read before the
island's own default, so a first open landed on Usage. It is seeded with
`general`.
3. **General page layout.** It was one bordered card of three bare rows.
Each setting now has a title and a line saying what it is for, with no
card around the list; the theme is three window miniatures (System /
Light / Dark) with a radio each, drawn in their own palette whatever the
page is in; the heading reads Appearance. The loading skeleton takes the
same shape. New keys:
`gui.settings.general.{language,theme,notify}_sub`.
4. **Agent connector width.** The page sat in the shared 1080px column
plus a 780px cap of its own, so it read much narrower than the composer.
`#extAgentsPage .wrap` now follows the composer's rule (`--col` cap,
36px gutters), and the grid shows at most four cards a row, none under
200px.
5. **Model pill clear control.** On hover a 30px clear control lies over
the pill's right edge, but the chevron only went invisible and kept its
space, so the provider name ran under the control. The chevron now
leaves the row and the button's right padding grows by exactly what it
took. This is the shared `RolePill` (model roles page, onboarding, tools
page) plus the agent sheet's copy; a new CSS gate pins the arithmetic.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `make lint-ui` (gen:check, eslint, tsc): pass, 0 errors (4
pre-existing warnings in untouched files)
- `npm run lint:i18n --prefix ui-tui`: catalogue up to date
- `npm test --prefix ui-web`: 207 files, 2862 tests passed
- `npm run --prefix ui-web build && python3 ui-web/build.py && node
ui-web/scripts/check-page.mjs && node ui-web/scripts/check-css.mjs &&
node ui-web/scripts/check-class-namespace.mjs`: all OK
- Changed tests fail against the parent's code: 3 fold tests, the
settings default test, the 4 pill gate assertions
- Browser, `vite dev` against a local `raven serve` with real sessions:
a reopened session shows only the fold header and the answer; settings
opens on General; theme cards switch the page in both themes; agent grid
edges equal the composer's at 1000/1280/1700/1900px wide (3/4/4/4 a
row); hovering the Rerank pill leaves the provider's right edge at 991px
with the control starting at 992px
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible layout and default changes only, no RPC or config changes.
The theme heading changes from Theme to Appearance. Each commit reverts
on its own.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Two small rail/composer polish fixes, one commit each.
**Empty rail groups are their heading alone.** The cron and recent
groups stay on the rail when they have no sessions, but the heading was
still a fold control (caret, press, focus stop, hover ground) over an
empty note that only said there was nothing there. An empty group now
draws a plain label and nothing under it. The cron group's Manage verb
stays and still appears on hover. What goes into each group and the
recent cap are unchanged. The empty note, its `.grp-empty` style, the
`gui.rail.none` key and the gate assertion that only compared its
padding are removed; the rail class ratchet drops from 10 to 9.
**A scrollbar thumb leaves with its scroller.** The overlay thumbs live
in a fixed layer of their own and only fade `SB_HIDE` (900ms) after the
last scroll. Closing the model picker removed its list but left the
thumb over the page for the rest of that timer plus its fade, and a
thumb that had already faded stayed in the layer for good, one more per
picker opened. While any thumb exists, a MutationObserver on the
document now takes the thumbs of scrollers that left it; the fade timer
removes rather than hides a gone scroller's thumb; the observer
disconnects when the layer is empty. This covers every scroller, not
only the picker.
Rebased onto the rail redesign in #701: the empty heading also opts out
of the new hover ground.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `make lint-ui` (gen:check, eslint, tsc): pass, 0 errors (4
pre-existing warnings in untouched files)
- `npm run lint:i18n --prefix ui-tui`: catalogue up to date
- `npm test --prefix ui-web`: 206 files, 2858 tests passed
- `npm run --prefix ui-web build && python3 ui-web/build.py && node
ui-web/scripts/check-page.mjs && node ui-web/scripts/check-css.mjs &&
node ui-web/scripts/check-class-namespace.mjs`: all OK
- New tests fail against the parent's code: 1 rail test, 3 scrollbar
tests
- Browser, `vite dev` against a local `raven serve`: empty cron heading
has no caret, no role, default cursor, no hover ground, Manage shown on
hover; recent (non-empty) still folds. Model picker opened, scrolled and
closed three times in a row: the thumb is on while open and gone on the
next task after close, with no leftover node
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible: an empty cron or recent group no longer folds or shows
"Nothing here yet". The observer runs only while a thumb exists and its
callback checks `isConnected` on a handful of scrollers. Roll back by
reverting either commit on its own.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
Brings the web UI's sidebar, composer and settings nav to the Figma
design (Raven file: AppSidebar, SidebarAction, SidebarSectionHeader,
ConversationItem, ChatComposer, SendButton, Setting).
Sidebar (rail)
- New tile logo: drawn inline in the rail wordmark and the empty-chat
greeting, an SVG on the boot splash (sharp at any size, where the old
86px PNG was upscaled), and a 48px PNG favicon that works on light and
dark tab strips, so `raven-dark.png` is gone.
- HugeIcons (the same packages and versions as everme-backend/web)
replace the hand-drawn glyphs; the Agents and Archive glyphs are the
design's own drawings.
- Row, group-header and session-row states follow the design in light
and dark (dark rail ground #333, hover and open rows #474747).
- Session rows no longer show a timestamp; the run/done/failed/asking
dot stays. A new More button opens the row's existing menu (rename, pin,
archive, delete).
Composer
- Frosted card (80% white over a 50px blur, 0.5px rule, 16px radius),
14/26 field that opens at two lines and scrolls after about eleven.
- 30px bar controls; the permission and model chips turn into a pill on
hover; the + turns into a close mark while its menu is open.
- Send button in the design's four states: disabled, active, a spinner
while the turn is being sent, and a stop square while it streams. The
arrow now points up.
- Staged files show as small tags with a PDF or Word badge (a plain file
glyph otherwise); the badge becomes the remove button on hover. A
finished file's size moves to the tooltip.
- The shared column width (`--col`) goes from 760px to 1112px, so the
transcript, banner and composer widen together.
Settings dialog
- New icons for all twelve sections (nine HugeIcons, three of the
design's own drawings) and the design's 32px nav rows.
Tooling
- Vitest pre-bundles `@hugeicons/core-free-icons`: the package is about
12,000 per-icon modules behind one barrel, and without this the slowest
session tests timed out in a full run.
Not changed on purpose: the permission chip keeps its three real mode
names and shield icons (Figma's "Approve for me" label does not map
clearly to one of them), and the workspace chip and usage meter stay in
the bar. The design's rounded one-line composer variant is not
implemented.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run on the branch after rebasing onto the latest `main`:
- `npx vitest run` (ui-web): 204 files, 2824 tests passed
- `npm run type-check` and `npx eslint .` (ui-web): clean
- `node scripts/check-css.mjs` and `node
scripts/check-class-namespace.mjs`: OK
- `npm run build` then `python ui-web/build.py`: built; both boot
snapshots match their goldens
- `npm run gen:i18n -- --check` (ui-tui): up to date
- `python scripts/check_source_language.py origin/main..HEAD` and
`python scripts/check_large_files.py origin/main..HEAD`: pass
- Checked by hand in the dev page (stub mode), light and dark: rail
hover/fold/More menu, composer default/filled/attachments/send states,
settings nav
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No docs describe these surfaces, so there is nothing to update.
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
Visual change only; no RPC, config or data format changes. User-visible:
the new logo and favicon, session rows without timestamps, a wider
reading column (1112px), and the new composer and settings look. The
dark colours for the composer and settings nav are ours (the design has
no dark frames for them). New runtime dependencies: `@hugeicons/react`
and `@hugeicons/core-free-icons` (tree-shaken; only the icons used reach
the bundle). Rollback is a revert of this single commit.
## Related Issues
N/A
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
A pass over the settings dialog's drawers, the plugin page and the model
provider page, plus one composer layout fix. Frontend only: no RPC or
backend change.
**Row drawers (tools, plugins, chat parameters).** A drawer is the same
table indented one step and tied to its row by a rail, instead of a
bordered
card inside the card. Its controls line up with the row's own control
edge
and are one size (28px / 12px). The old rule that claimed this step down
never applied: it named `.settings-mini`, a class no markup carries, so
it
and eight sibling rules were dead and are removed. The chat parameters
disclose through the page's own fold (`.foldcap`) and read out their
values
while closed; the context window's value and mode share one row. An open
row
gives up its separator (opening one used to make a line appear between
the
row and its own drawer, because the row stopped being `:last-child`).
The
add-a-provider box keeps its box on rules scoped to both classes, which
it
previously lost to the drawer's later, equal-specificity rules.
**Plugins.** The drawer now shows what the runtime row and the catalogue
entry already carried and the page dropped: the credential, the address,
the tool names, and the connection manager's own error text. A server
the
catalogue has no entry for is no longer told "this server takes no
credential" (github hit this with an expired token); the offline
fixture's
catalogue ids and auth modes now match its rows. "Connection failed" is
a
static status chip; reconnect moved into the drawer, first, beside the
reason.
**Model providers.**
- The add-model popover lists only models not yet added, is
tick-then-add
(one `model.add_models` call for the ticked set), and has a select-all
per
vendor group and one for everything shown. Previously each click wrote
one
model and reloaded every configured provider twice.
- Rows and chips name a model without the provider's own prefix (full id
in
the title), and a gateway's live list groups by vendor rather than under
the gateway's own name.
- The configured-model chips fold past eight; the fold state lives in
the
store so a removal does not collapse it.
- One outbound link per page (the name's arrow opened the same key page
as
"Get a key"). Fields are one width with their buttons on the pane's
right
edge. A keyless local provider no longer shows "Server address" twice.
- Controls inside a section label no longer inherit its bold (the "Add
model" button was weight 600).
**Composer.** `dockLift` measures every direct child of the dock rather
than
a class list, so the running-task chip moves the transcript up instead
of
covering its last lines.
Copy: `gui.settings.roles.chat_use` now says it is the default
configuration
for new sessions. Unused keys (`ctx_current`, `plugins.auth`,
`plugins.failed_retry`, `model.add_all`, `model.add_group`,
`providers.showing_added`) are removed and the TUI catalogue
regenerated.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run on the branch after rebasing onto `main` (5b3788da0):
- `npm run gen:check --prefix ui-web`: generated.ts matches the contract
- `npm run type-check --prefix ui-web`: clean
- `npm run lint --prefix ui-web`: 0 errors (4 pre-existing warnings in
other files)
- `npm test --prefix ui-web`: 206 files, 2854 tests passed
- `npm run lint:i18n --prefix ui-tui`: generated catalogue is up to date
New tests: `scripts/gates/settings-drawer-css.test.mjs` (stylesheet
facts
jsdom cannot see, including that every `.settings-cfg .X` rule targets a
class the markup carries), `features/composer/store.dockLift.test.ts`
(stubs
rects and asserts the measured value), and cases in `Roles.test.tsx`,
`Plugins.test.tsx`, `ProviderDetail.test.tsx`. Each new assertion was
mutation-checked: the change was reverted in place and the test failed.
Checked in a real browser against the offline fixtures and against a
live
local gateway (settings read, models ticked but never added): widths,
alignment, weights and tick latency (30-46 ms, no RPC per tick) measured
with `getComputedStyle` / `getBoundingClientRect`.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
No user docs describe these screens.
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
User-visible: the add-model popover no longer removes models (the chips'
`x` on the provider page does, with the same in-use refusal), and a
click on
a row ticks instead of writing. No stored data or wire shape changes;
the
settings source's `serverAuthFields` became `serverDetail` inside the
page
only. Rollback is reverting this commit.
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5-5) <noreply@anthropic.com>
## Summary
The channels section of the settings dialog drew a hashed letter tile
for every
entrance. It now draws each app's own icon, in the list row and in the
picked
channel's header, and every entrance is named in both of the web UI's
locales.
**Icons.** `ui-web/src/assets/channels/` holds eleven files:
- Nine are the icons the vendors publish on their App Store listings
(China
storefront for Feishu, DingTalk, WeCom, WeChat and QQ; US for Slack,
Telegram, Discord and WhatsApp), resampled from the 512px artwork to
96x96
PNG. For the five Chinese apps the listing is where a colour icon was
found:
the permissively licensed icon sets checked (lobe-icons,
`@cherrystudio/ui`,
SVG Logos, Simple Icons and the brand sets on Iconify) carry them only
as
single-colour glyphs.
- `matrix.svg` and `mochat.svg` are the files matrix.org and MoChat
serve as
their own marks, copied byte for byte.
- Mail is a protocol rather than a brand, so it gets a neutral envelope
drawn
in the component.
`scripts/refresh_channel_marks.py` names the listing or URL behind every
file and
regenerates the directory; `LICENSES/README.md` records the basis for
showing
them (the vendors' marks, identifying the row they sit on, as with
AMD's).
`ChannelMark` is keyed by channel id, never by the row's name, and falls
back to
the letter tile for an id with no mark and for a file that fails to
load. The
asset digest helper moves out of `ProviderMark.tsx` into
`lib/assetStamp.ts` so
both marks share it and a refreshed icon is not served from cache.
**Names.** Six brands bypassed the message catalogue with one verbatim
spelling,
and `gui.chan.mochat` held the Chinese name in its English slot. Every
entrance
now has a `gui.chan.<id>` entry in both locales (Slack, QQ, Telegram,
Discord,
WhatsApp and Matrix keep their Latin names in Chinese, as their own
Chinese
builds do), the verbatim path is gone (`ConnChannel.key` is required),
and the
English name is MoChat. The adapter's `display_name`, which the CLI
prints, and
the two channels docs pages also say MoChat. The TUI's generated
catalogue is
regenerated.
**Guards.** `tests/test_ui_channel_marks.py` holds the mark table equal
to the
adapters, the shipped files and the refresh script, and the PNGs to
96x96.
`catalogue.test.ts` holds every entrance to both locales and to English
in the
English slot. `tests/test_channels_display_names.py` holds the CLI and
the web UI
to one English name per channel.
`scripts/gates/channel-mark-css.test.mjs` reads
the expected box off `.pmtile`'s own rule, since the mark stands in for
that
per-container-sized tile.
**Also in this PR.** `.pre-commit-config.yaml` adds `channels/` to the
end-of-file fixer's exclude beside `providers/` and `agents/`:
matrix.org writes
`matrix.svg` without a trailing newline, and appending one would end the
byte-for-byte copy.
**Existing tests whose meaning changed.** `test_channels_mochat.py` now
expects
the MoChat display name; `source.test.ts` now expects every row, a brand
included, to be named through the message catalogue; the
`ConnectionsPage`
fixtures move from `name:` to `key:` (the stand-in translator hands a
key back
as its text, so no query changed); the DOM snapshot shows the mark in
place of
`.pmtile`.
**Deliberately unchanged.** Adapter docstrings, log lines and class
names keep
"Mochat" (identifiers and developer text, not a name a reader is shown).
The
TUI draws no channel list, so it gets no icons. The refresh script needs
the
network and is run by hand; neither CI nor the build runs it.
**Weight.** Eleven files, about 66 KB, copied into `dist/assets` and the
wheel.
Nine commits: the feature, then one per finding of the pre-submit sweep.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Suites ran before the last commit, which changes only
`.pre-commit-config.yaml`
and was checked with pre-commit.
- `npx vitest run --no-file-parallelism` in `ui-web/` (with
`NODE_OPTIONS=--localstorage-file=<file>`, needed under node 26): 202
files,
2790 tests, 2788 passed, 2 failed. The two are the "when storage
refuses"
cases in `src/features/desk/palette.test.ts` and `store.test.ts`, which
fail at
every revision under this machine's node 26 and pass under CI's node 22;
this
branch touches neither.
- `npm run gen:check`, `npm run lint` (0 errors, the 4 existing
warnings),
`npm run type-check` in `ui-web/`: pass. `npm run type-check` and
`node scripts/gen-i18n.mjs --check` in `ui-tui/`: pass.
- `npm run build`, `python3 ui-web/build.py`, `check-page.mjs`,
`check-css.mjs`,
`check-class-namespace.mjs`: all OK.
- `uv run pytest -q` with all extras: 25778 passed, 114 skipped, 1
failed:
`tests/test_install_script.py::test_resolve_node_dir_answers_each_case_it_exists_for`,
which fails the same way on a checkout without this branch (this machine
has
npm on four PATH entries, which defeats its no-npm case).
- `ruff check` and `ruff format --check` over the Makefile's lint
targets: clean.
`lint-imports`: 10 kept, 0 broken. `ty check` on the changed modules:
clean.
- `uv run --isolated --frozen --group docs mkdocs build -f
docs-site/mkdocs.yml --strict`:
exit 0; both channels pages render MoChat.
- `pre-commit run --from-ref origin/main --to-ref HEAD`: every hook
passes except
prettier (ui-tui), which flags only
`src/__tests__/instanceModeCommand.test.ts`,
unchanged here (last touched by #669); CI's pre-commit job skips that
hook,
having no `node_modules`.
- `scripts/check_commit_messages.py origin/main..HEAD` and commitlint:
pass.
- Red first and mutants: every new case failed before its
implementation.
Mutants, each reverted with the tree clean after: no `onError` fallback,
a
failure kept as a boolean, marks keyed by name, the asset digest
dropped, `qq`
dropped from the table, the English name set back to "Mochat",
`.channel-mark`
resized, and a slot-specific `.pmtile` box. Each turned the tests
written for it
red: 1, 1, 3, 1, 3 Python guards, the display-name guard, and the CSS
gate twice.
- Browser, headless Chrome over the built page with `?stub=1`: all
twelve rows
draw a 38x38 mark with its file loaded and the digest in its URL, and no
letter
tile is left. The letter tile measures the same 38x38 with an 11px
radius in
both slots. English reads Feishu, Email, WeChat, WhatsApp, Telegram,
Discord,
MoChat, WeCom, Slack, DingTalk, QQ, Matrix. After Settings > General >
Chinese,
MoChat shows its Chinese name and the six brands keep their Latin names.
Matrix's mark follows the theme switch on a light OS.
- `raven channels list` from this tree: `mochat | MoChat`.
- `scripts/refresh_channel_marks.py` run twice: the second run
reproduced every
PNG byte for byte, and the two SVGs are `cmp`-identical to a separate
fetch.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
User-visible: the channels section shows app icons where it showed
letter tiles,
and MoChat's English name changes from its Chinese name (web UI) and
from
"Mochat" (CLI). The other eleven names read as before. No config, RPC or
stored
data changes; `ConnChannel.name` was internal to `ui-web`. Rollback is
reverting
the squash commit.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5-5[1m]) <noreply@anthropic.com>
## Summary
Two breaks in one chain: a page that never gets `config.language` from a
gateway
renders in Chinese for every reader, permanently.
`state/lang/store.ts` resolved the language from a remembered pick, else
what
`<html lang>` declares -- which the served page hardcodes to `zh-CN`.
The
gateway's answer is what moves a clean profile off that. Two paths never
get it:
1. The offline library (`?stub=1`, and a page opened from disk) answered
`config.get` with `null` for `language`. A gateway cannot: `config_get`
fills
`_DEFAULTS["language"] = "en"` for every key the config file omits, so
the
fixture modelled a wire state that does not exist, and `load` moves the
page
only for an explicit 'en' or 'zh'. `rpc/fixtures/index.ts` states the
invariant this broke -- the offline page and the live page are the same
program with a different socket.
2. A connect that fails returns at `authFail()` before `load` is ever
called, so
a reader the gateway has never answered for has only the declaration.
The
sign-in notice, the one message whose whole job is to be read on that
page,
was in Chinese whatever they read.
(1) is fixed in the fixture. (2) adds one step to the resolution: the
first of
`navigator.languages` naming a language this page has words for, read
between a
remembered pick and `<html lang>`. Two properties hold it in place:
- `picked` stays false for a browser-resolved language. A browser
stating a
preference is not a reader choosing, and `picked` is what puts
aria-label,
title and data-tip on a page whose markup carries none.
- a browser naming neither language still falls through to the
declaration, so
the step can only move a page towards a language its reader asked for.
A remembered pick still wins, which keeps a Chinese install's notice in
Chinese
for a reader whose browser asks for English: `load` caches the gateway's
answer
under that same key. Measured in both directions.
`<html lang>` is now written whenever it disagrees with the language the
page is
in, rather than only on a pick. That is the rule the module header
already
stated; `picked` was an exact proxy for it only while a pick was the one
thing
that could differ from the declaration. A screen reader picks a voice
from that
tag.
The third commit fixes two descriptions of the resolution found by the
pre-submit sweep: `ui-web/CONTEXT.md` and `app/boot.ts` both called it
two
steps, and boot.ts additionally asserted that the notice explaining a
page which
cannot connect "is already in the reader's language", which was false
for
exactly the readers item 2 is about.
### Checked and deliberately not changed
- The heading literal `chrome/ChatTop.tsx` serves still renders in
Chinese on
the unauthenticated page in an English browser, because the writer that
replaces it does not run on that path. Not a one-line change: React
deliberately never rewrites that node (a rename swaps the whole heading
for an
input) and `state/session/naming.ts` string-compares against that
literal.
Left for its own change.
- The fixtures' canned session titles stay Chinese, so an offline page
now reads
as English chrome over a Chinese playbook. That is sanctioned demo
content --
`scripts/gates/first-frame-literals.test.mjs` exempts
`src/rpc/fixtures/` --
and there is no `?lang=` override, so a Chinese offline page needs
`localStorage['raven.gui.lang'] = 'zh'`.
- Two words on an `_Avoid_` list appear in the added prose, "page" and
"catalogue". Kept: both are this module's and `CONTEXT.md`'s own
vocabulary
for it ("the page's language, the catalogue behind it"), and the avoided
senses are the module page and the Session Mode catalogue.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Browser rows are a real headless Chrome over CDP with a new context
each, so no
remembered pick. The `ui-web` suite runs under happy-dom, which has no
layout
engine, and no CI job runs it.
Offline page, clean profile. The "before" page is the built bundle with
the one
added fixture value removed, so nothing else differs:
| page | `<html lang>` | CJK / latin chars | `#railBtn` aria-label |
| --- | --- | --- | --- |
| `?stub=1` before | `zh-CN` | 113 / 51 | none |
| `?stub=1` after | `en` | 64 / 186 | `Collapse sidebar` |
| `file://` before | `zh-CN` | 113 / 51 | none |
| `file://` after | `en` | 64 / 186 | `Collapse sidebar` |
Unauthenticated live page, one browser locale per row:
| browser | `<html lang>` | notice | `[data-tip]` |
| --- | --- | --- | --- |
| en-US | `en` | "The service is running but this tab's sign-in expired"
| 0 |
| zh-CN | `zh-CN` | the Chinese wording, unchanged | 0 |
| fr-FR | `zh-CN` | falls through to the declaration | 0 |
A remembered install language still beats the browser: cached `zh` under
an
`en-US` browser gives the Chinese notice, cached `en` under a `zh-CN`
browser
gives the English one.
No flash. Sampling `<html lang>` beside the splash's computed opacity
while the
page boots, at 1x / 4x / 8x CPU throttle, the number of pre-flip frames
with the
splash no longer covering is 0 at every rate and in both directions (at
8x, flip
at 2425ms against splash uncovered at 2676ms).
Commands and results:
- `npx vitest run --no-file-parallelism` -- 2686 tests, 2684 passed, 2
failed,
`unhandledErrors` 0. The two are `features/desk/palette.test.ts` and
`features/desk/store.test.ts` "when storage refuses"; they fail
identically
with this branch's one behavioural line reverted, and are a local
artifact of
the `--localstorage-file` flag node 26 needs here.
- `npx tsc --noEmit -p tsconfig.json` -- no errors.
- `npx eslint src/state/lang/ src/rpc/fixtures/settings.ts` -- no
issues.
- `npm run --prefix ui-web build && python3 ui-web/build.py` -- exit 0,
both boot
snapshots match (228 and 227 nodes).
- `uv run --frozen --all-extras pytest tests/test_living_docs.py -q` --
2 passed;
it globs `ui-web/CONTEXT.md`, which this branch edits.
- `python3 scripts/check_commit_messages.py origin/main..HEAD` -- exit
0.
Each of the six new cases was watched to fail before its fix. The two
offline
cases were re-checked red after the browser step landed, by removing the
fixture
value again, so the new step does not mask them.
`scripts/__golden__/boot-stub.txt` was regenerated from `origin/main`'s
copy
rather than from the pre-rebase one. The delta is exactly six
`X -> X[data-tip]` lines, the node count is unchanged at 228, and no
element
moved. The offline page now has `picked` true, which is what those
attributes
wait for; an authenticated live page carries the same eight, measured.
`boot-live-noserver.txt` is unchanged at 227.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
`ui-web/CONTEXT.md` is updated; that box is left unchecked for the
screenshots
only. The repository carries none (AGENTS.md section 7), and any
externally
hosted shot of a clean offline page now shows English chrome rather than
Chinese. Recapturing those is a separate change.
## Risk
- A clean profile on `?stub=1` or a page opened from disk now boots
English
instead of Chinese, which is what a fresh live install shows. A reader
who
wants Chinese there sets `localStorage['raven.gui.lang'] = 'zh'`; there
is no
URL override.
- A live page now follows the reader's browser before the gateway
answers. The
settled language does not change: the gateway's answer still wins and a
remembered pick still beats the browser. What moves is the frame before
`load`
resolves, measured above as never exposed at any throttle rate.
- The offline page gains the aria-label, title and data-tip attributes
the live
page already carried. That follows from it resolving a language at all,
and is
the whole of the boot golden's delta.
- Rollback: revert the three commits. They are independent of each other
-- the
fixture value and the resolution step can be reverted separately.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
## Summary
Every settings section waited behind the same dashed box with "Loading"
in it.
That box is a line of display text and 34px of padding, so the panel was
a 90px
strip that became whatever the section is the moment the snapshot
landed, and a
section is rarely one line: the usage page is four cards and a chart,
the
provider catalogue is a full-height two-column grid.
The waits the pages own drew even less. The usage totals and the archive
list
each replaced a card's worth of rows with a single grey word inside it,
and the
card shrank to fit the word. Channels, schedules and the schedules' run
history
drew nothing at all, and an empty column beside an empty pane is what
"there are
no channels" looks like.
So a section draws its own anatomy instead, in the section's own card,
row and
list classes: the skeleton is the page with its words replaced by bars,
which is
what makes the swap a fill-in rather than a resize. Twelve places in
all:
- the settings panel, with a shape per section (general, usage,
providers,
models, skills, tools, plugins, archive, about);
- the onboarding wizard's two step bodies, which wait on the same
snapshot;
- the five a page or a drawer fetches for itself: usage totals, archive
list,
skill body, plugin credential fields, vendor model list;
- the four lists the two-pane frame holds (channels, schedules, memory)
and the
schedules' run history.
Key decisions:
- The usage range picker stays live through the page's own wait: the
range is
the reader's state, not the counter's, so only what the counter answers
is
drawn as bars.
- The vendor list keeps the line naming the vendor being asked, with the
rows
under it: a shape cannot say which vendor.
- The bar is the one shape added, and it is added three times. A class
belongs
to one namespace (`scripts/check-class-namespace.mjs`) and the existing
`skel`/`sk` pair is pinned at the two domains that already name it, so
the
settings sheet, the two-pane frame and the cron sheet each carry their
own.
All three are a translucent wash rather than a named surface, because
these
sit on the card, on the catalogue's rail and inside the model popover
and no
one named colour reads against all three.
- Channels and schedules draw the wait in the unentered state too: the
condition is the same `!loaded && !rows.length` either way, the box is
hidden
until the section opens, and opening it starts the load. This is what
grows
both boot goldens by the channels list's wait.
Also here:
- `_resetForTests` clears the settings store's in-flight load. A case
that
mounted the dialog on a load it never resolved left `refresh` handing
the same
promise to every later caller, so one failed assertion turned the four
cases
after it into timeouts.
- The run history says the schedules' own word (`gui.cron.reading`)
rather than
the hub's. `gui.hub` is said by nothing now, so its ALIAS row in the
i18n gate
goes.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npm test --prefix ui-web` -- 194 files, 2695 tests, all pass
- `make lint-ui` -- gen:check, eslint and tsc clean (4 pre-existing
react-hooks/exhaustive-deps warnings, none in changed files)
- `npm run lint:i18n --prefix ui-tui` -- generated catalogue up to date
- `npm run --prefix ui-web build && python3 ui-web/build.py` -- both
boot
goldens match (264 and 263 nodes)
- `node ui-web/scripts/check-page.mjs`, `check-css.mjs`,
`check-class-namespace.mjs` -- all OK
- Mutation check: 14 mutations applied one at a time (each wait reverted
to its
old word or to `null`, each shimmer and each reduced-motion rule
removed, one
section's shape deleted so it falls through to the default). Every one
turns a
case red.
- Real browser: every wait photographed in light and dark through
Playwright on
the vite dev page, with the fixture transport's replies held open so the
wait
states stay on screen.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible: every settings wait changes from a word to a shape. No
behaviour,
no state and no wire shape moves; what a section draws once its values
are in is
unchanged. The three new bar classes are additive and scoped to their
own
sheets, and all three hold still under `prefers-reduced-motion`.
Two changes reach past the waits: the settings store's test-only reset
now
clears its in-flight load, and the i18n gate loses the `gui.hub` ALIAS
row that
nothing measures any more.
Rollback: revert the single commit. Nothing is persisted and no
generated file
other than the two boot goldens and the TUI catalogue moves.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
A delivered deck's card drew the slide as a letterboxed strip with its
own title cut in half. Measured on the reported card: the picture box
was **688x98** -- a 7.02 ratio -- holding a **1280x720** picture, a 1.78
one, under `object-fit: cover`. So `cover` filled the width and kept the
middle quarter of the slide.
The two arrangements of the tile want different things:
- **In the grid**, a preview sits above its caption in a column of
stated width. The box states a ratio and the image fills it (`width:
100%`, `cover`); a little crop is the price of a tidy grid, and that is
unchanged.
- **Alone**, the preview stands beside the caption at a stated height,
and the column follows it -- `grid-template-columns: auto minmax(0,
1fr)`, which #624 introduced so a picture wider than the 92px document
face stopped running over the title.
That last part has to be paid for. A column told to follow the picture
needs the picture to state a width, and an image that fills a box states
none: it is `width: 100%` of whatever it is given. Given an auto column,
that resolved to the whole row, and the stated 98px height then made the
box a strip.
Sized from the height instead, the image resolves its own width from its
own ratio, the column resolves from that, and the box ends up the shape
of its contents. `contain` is stated anyway: with the box right there is
nothing left to crop, and the rule should say what it means rather than
rely on the box being right.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- Measured on a real delivered deck, live, in **both** engines. Before:
picture box 688x98, ratio 7.02 against the picture's 1.78, card 137px
tall. After: 173x98, ratio 1.77 against 1.78, nothing cropped, card
124px tall.
- The fault the auto column was introduced to fix stays fixed: the
picture's right edge and the caption's left edge are both 555, so it
does not run over the title. WebKit and Chromium agree on every number
above.
- Three assertions in `ui-web/scripts/gates/lone-delivery-css.test.mjs`:
the lone arrangement sizes the image from its height and crops nothing;
the grid arrangement still fills its stated box; the column still
follows the picture. A gate rather than a DOM test for the reason the
other CSS gates in that directory give -- happy-dom does no layout, so a
picture cropped to a strip and one drawn whole are the same assertion
there.
- Falsifiable, by two mutations: retracting the rule fails the first
assertion, and putting the width back to `100%` -- which is the fault
exactly -- fails it too. Both restored green.
- `npx vitest run` in ui-web: 193 files, 2661 tests, every gate
included. `npm run type-check` clean, `npm run lint` 0 errors (the 4
warnings are main's), `npm run build` and `python ui-web/build.py` with
both boot goldens matching.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
One rule, scoped to the lone arrangement by the selector it already had;
the grid arrangement's own rule is untouched, so a row of tiles is drawn
exactly as before. A tile whose preview is the generic document face is
unaffected -- that face is not `.pic.shot`. Reverting the commit
restores the strip.
## Related Issues
N/A
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
Reworks the composer bar of the served page and everything that opens
off it.
- The bar is four things: a "+" (upload a file / pick a deck template,
in a draft and in a conversation alike), the workspace chip (a draft's
only), the permission chip and the model chip. The sub-agent tier is a
row of the model picker, not a chip.
- A conversation says the folder it runs in as a tag after its title,
"Default folder" included. The rail no longer groups conversations by
folder or tags rows with one.
- Every small popover is a child of an anchor wrapper around its own
chip and hangs off it with the stylesheet: nothing measures an element
or leaves the card any more, and the portal table has no reparented
entry left.
- Menus carry names only. Permission: three rows (Approve each step /
Smart mode / Full access), the sentence behind each on the row's title.
Workspace: the default, a rule, the recent folders, and one row that
opens the host's own folder dialog through the new `fs.pick_dir` RPC
method where the gateway is this desktop, or the in-page directory walk
elsewhere.
- The model picker is one 340px list pinned by its lower edge to the
chip: a search box, the last three picks (remembered in localStorage), a
group per account with the provider's mark on the head, folded at six
rows with a "show all N" row, the effort rungs as one segmented control
with its explanation behind a question mark, and the settings door. The
per-model API route control is gone from the picker; the seam behind it
stays.
- Effort copy: heading "Effort", rungs Light / Standard / Max, one
wrapped tooltip; the built-in catalogue's rung sentences say what each
rung buys.
- A conversation is renamed by clicking its title (text cursor, frame on
hover); the pencil button is gone.
- The template sheet keeps one fixed height across the grid and the
pages view; the offline fixture lists 41 templates so the many-templates
state can be seen.
- Fixed in passing: the picker pinned the current model under the
account the session started on even after a switch to another account,
drawing it twice with two ticks.
Key decisions: `fs.pick_dir` runs the dialog in a thread with a blocking
subprocess, because under asyncio's child handling the macOS `choose
folder` dialog dismissed itself after about three seconds with "user
canceled" (-128) and nobody at the keyboard; the same command run
synchronously stays up until answered. The page offers the dialog only
while `location.hostname` is a loopback address, since it opens where
the gateway runs.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npm run --prefix ui-web test` -> 192 files, 2658 tests passed
- `npm run --prefix ui-web type-check` -> clean
- `npm run --prefix ui-web lint` -> 0 errors (4 pre-existing warnings in
files this PR does not touch)
- `npm run --prefix ui-web gen:check` -> generated.ts matches the
contract (195 methods)
- `npm run --prefix ui-web build && python3 ui-web/build.py` -> both
boot goldens match (228 / 227 nodes)
- `npm run --prefix ui-tui lint:i18n` -> generated catalogue is up to
date
- `uv run pytest tests/test_rpc_console.py
tests/test_rpc_schema_match.py tests/test_i18n_boundary.py
tests/test_config_schema.py tests/test_source_language_check.py -q` ->
572 passed
- `uv run ruff check raven tests` and `uv run ruff format --check raven
tests` -> clean
- Browser: every popover, both bar states, the title tag, the picker's
search / fold / recent rows, the template sheet at 41 templates and
click-to-rename were exercised on the vite dev page (`?stub=1`). The
real folder dialog was exercised by calling `fs_pick_dir` directly on a
Mac: the dialog opens and stays up; the dismissed path answers `{ok:
false}`.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible: the composer bar, its four popovers, the model picker, the
rail grouping, the title row and the template sheet all change shape;
three permission names and the effort names change; the pencil rename
button is replaced by clicking the title. One new RPC method
(`fs.pick_dir`) is added to the contract; no method is removed.
Rollback: revert this PR; the config file and every existing RPC method
are unchanged.
- [x] Security impact considered (the dialog runs only on the gateway
host and the page offers it only for a loopback origin; the chosen
folder goes through the same `validate_override` gate as `fs.dirs`)
- [x] Backward compatibility considered (no RPC method removed;
per-model protocol overrides in config keep working)
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
The composer is an **opaque** card floating over the transcript
scroller, and
nothing ended the transcript's paint before it reached the card.
Scrolled up, a
line was cut mid-glyph at the card's top edge, and the 22px gutter below
the
card left the next line legible *underneath* the field the reader types
in.
This gives `.scroll` a mask whose alpha reaches zero at the top of
whatever is
docked, over a 40px ramp:
```css
.scroll {
--tail-fade: 40px;
mask-image: linear-gradient(180deg,
#000 calc(100% - var(--lift, 96px) - var(--tail-fade)),
transparent calc(100% - var(--lift, 96px)));
}
```
Three decisions worth stating:
- **A mask, not a ground-coloured band.** A band is a rectangle painted
*over*
the transcript, so it has to match whatever is behind it; on this page's
wash
(a gradient) it reads as a flat seam. A mask takes the alpha out of the
transcript itself, so there is no ground to match, and it needs no
second copy
per theme. `page.css` records that an earlier band above the composer
was
deleted for exactly that reason, which is why this does not reintroduce
one.
- **Anchored to `--lift`, which already exists.** `dockLift`
(`features/composer/store.ts`) publishes the distance from the chat
column's
bottom edge up to the top of the highest docked thing. `.col` spends it
as
bottom padding and `.backpill` as its offset. Spending the same number
here is
what makes the clear edge land on the composer's top edge however tall
it has
grown (a longer field, queued rows, a clarify sheet), rather than on a
hardcoded resting height.
- **The tail is never under the ramp.** Because `.col` reserves the same
`--lift`, the newest message sits above the ramp when the scroller is at
rest,
so the fade engages only once the reader scrolls back. Nothing is hidden
at
the moment a message arrives.
The second commit corrects the `.dock` leading comment, which this
change
falsified: it claimed the transcript "scrolls underneath and stays
legible
through the glass" and that "the old fade band above the composer is
gone".
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Verified in headless Chrome two ways: against `page.css` itself in a
probe page
carrying the real DOM structure, and against the running app over CDP.
Painted
ink was measured, not layout rects -- masked text still occupies its
box, so a
rect-based measurement is byte-identical before and after and cannot see
this
change at all. Ink is counted as pixels differing from the page's own
background
(the wash is not white, so the background is sampled from an empty
band).
**The clear edge lands on the composer's top edge** (`aligned` compares
the
`getBoundingClientRect().top` of `.dock-in` against the mask's
transparent stop):
| case | `--lift` | composer top | mask clears at | aligned |
|---|---|---|---|---|
| light theme | 106px | 654 | 654 | yes |
| dark theme | 106px | 654 | 654 | yes |
| composer grown to three lines | 180px | 580 | 580 | yes |
| landing page (`data-fresh`) | 106px | 654 | 654 | yes |
| live app, session "ESG..." | 139px | 721 | 721 | yes |
**Nothing is painted at or past the clear edge.** Ink in a 14px band
below it,
measured in the gutters either side of the card: `0` in all five cases.
**The fade is the only thing that changed.** Ink inside the 28px just
above the
card went `1651 -> 144` (91 percent removed), while the control band
100-600px
above it was `36133` before and `36133` after -- unchanged to the pixel.
**No scroll cost.** 240 scroll frames x 3 interleaved runs each, mask on
vs off:
median frame `16.70ms` both, p95 `16.80ms` both, worst `16.77 ->
17.17ms`.
**A mask creates a stacking context, so `position: fixed` descendants of
the
scroller would be clipped.** Enumerated all 434 descendant elements on
the live
page: zero are `fixed` and zero are `sticky`. The scrollbar thumbs
(`.sbars`),
`#deskHost`, `.backpill` and `.dock` are all siblings of `.scroll`, not
descendants. This is the commit-authors' manual check; the branch adds
no
automated guard for it.
Commands and results:
- `npx vitest run scripts/gates/` -- 39 files passed, 170 tests passed,
no
unhandled errors. The new gate is collected by the runner: `npx vitest
list
--filesOnly` prints `scripts/gates/transcript-tail-fade-css.test.mjs`.
- The new gate was proven not to be theatre by removing the `.scroll`
block and
re-running: 4 of its 6 assertions go red. The other 2 assert
pre-existing
invariants the pair depends on (`.col` must reserve the same `--lift`;
`.col`
must not carry a mask of its own) and pass on both trees.
- `node ui-web/scripts/check-css.mjs` -- OK. `node
ui-web/scripts/check-class-namespace.mjs` -- OK. `npx eslint
scripts/gates/transcript-tail-fade-css.test.mjs` -- clean.
- `node ui-web/scripts/check-page.mjs` -- OK (1,387,731 bytes, 2 scripts
parse).
- `node ui-web/build.py` -- `boot-snapshot: OK (241 nodes match golden)`
twice.
- `python3 scripts/check_commit_messages.py origin/main..HEAD`,
`check_source_language.py origin/main...HEAD`,
`check_large_files.py origin/main...HEAD` -- all exit 0.
- Every added line is ASCII, and `git ls-files --error-unmatch` resolves
the one
path the new CSS comment cites
(`ui-web/src/features/composer/store.ts`).
Rebased onto `origin/main` after it gained #656, which touched
`page.css`. Its
one change there is a desk change-chip selector at line 2622 and touches
none of
`.scroll`, `.col`, `.dock` or `--lift`; both changes are intact at the
head and
all gates above were re-run after the rebase.
## Risk
- [x] Security impact considered -- none. A CSS mask on an existing
element; no
new input surface, no new file, no change to what is sent anywhere.
- [x] Backward compatibility considered -- the composer keeps its
position,
size, padding and hit area. The mask removes paint only; it does not
change layout, so nothing reflows and nothing becomes unclickable.
- [x] Rollback path is clear -- revert the two commits. No data, config
or
persisted state is touched; `ui-web/dist` is a gitignored build
artifact.
User-visible change: a message scrolled up now dissolves over the last
40px
before the composer instead of being cut off at the card's edge. A
reader who
scrolls back to the tail gets it back, since the column's own `--lift`
padding
keeps the newest message clear of the ramp.
Not covered, stated so it is not mistaken for done: `ui-web` has no test
for
this beyond the stylesheet gate (happy-dom applies no stylesheet and
does no
layout, so the pixels are browser-only evidence), and the top of the
scroller
still cuts a message at the header, which this change does not address.
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
## Summary
The desk tasks pane drew an input box under every node of a stateful
sub-agent that had a live handle ("Continue chatting with X"), sending
into that instance's own lane through the same `turn.send` with `target`
the sub-agent composer uses. The product no longer wants a second place
to write to a sub-agent from the task view, so the dock is removed: the
`ChatDock` component and its mount on the node card's context tab, its
`.tkdock` styles, the `gui.tasks.continue_with` catalogue string (both
locales, with the TUI's generated table regenerated) and the two
comments that described the dock as pinned under the scrolling record.
`SendGlyph` and the `ds('subagents')` seam leave this file only; both
keep their other users. The desk's instance conversation pane keeps its
own composer, and nothing under `features/subagents` changes.
Ratchets: no CSS, class-namespace or i18n gate named `.tkdock`, the
dock's owner of the shared `go` class, or the removed key, so none was
lowered; the shared-class licence comment for `go` lost the clause that
cited the dock.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npm test --prefix ui-web -- src/features/tasks/` -- 196 passed. The
one dock case is replaced by one asserting that a stateful agent's node
with a live handle, on the context tab, renders its card with no
`.tkdock` and no input; red against the previous `TasksPage.tsx` (the
card still drew the dock).
- `npm test --prefix ui-web` -- 192 files, 2571 passed, the contract and
CSS gates included.
- `npm run type-check --prefix ui-web`, `npm run lint --prefix ui-web`
-- clean (the 4 pre-existing react-hooks warnings are in untouched
files).
- `npm run gen:i18n --prefix ui-tui`, `npm run lint:i18n --prefix
ui-tui` ("generated catalogue is up to date"), `npm run type-check
--prefix ui-tui` -- clean.
- `grep -rn "continue_with\|ChatDock\|tkdock" ui-web/src ui-tui/src
raven docs-site/docs i18n` -- only the new test's own assertion remains.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
User-visible: the input under a task node is gone; a reader who wants to
talk to that sub-agent opens its conversation pane from the transcript
instead. No wire or Python change. Rollback: revert the single commit.
## Related Issues
N/A
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
Three changes the owner asked for while walking this feature's
acceptance cases.
**A session grant where no rule can be saved.** `permissions.tools`
takes prefix patterns for `exec` alone, so the runtime suggests no rule
for a file write or an MCP call and their sheet offered two answers:
once, or every time from now on by hand. Editing one file five times in
a task asked five times. The sheet now offers the grant the engine
already understood and the page never drew, `allow_session`, which the
gate keys by tool, normalised path and directory
(`raven/permissions/builtin.py`). It takes the saved rule's slot rather
than adding a fourth answer beside it: two "don't ask again" answers
side by side is a question about storage the reader did not come here to
answer.
**No more receipts.** Pressing the button and watching the sheet go is
the receipt; a line that repeats it is one more thing to read in the
place the reader is trying to work. Two answers still leave a line,
because both leave something to do: a saved rule, which nothing else in
the product can take back (`approval.revoke` has exactly one caller,
that undo), and an answer the engine never took, which means the turn is
still waiting. The sentence a refusal invited goes with them, since the
composer is an inch below and does the same job.
**No more line about another conversation.** The rail's own ask light
already says a conversation is waiting, in the list where that
conversation is. The rack's watcher plumbing goes with the line, whose
only subscriber it was; the `data-asks` mark stays, because the sweeps
read it to know which sheets a new question may replace.
Driving that last one found it was not true yet (third commit). The
row's stored mark is written only when a request arrives at a
conversation the reader is NOT looking at, cleared when the row is
opened, and overwritten by `park` on the way out -- so a reader who
watched the question appear and then walked away was left with a row
reading "running", like every other turn. The rail now derives the state
from the questions actually standing rather than defending a stored mark
against each of those writers in turn: the rack keys every docked sheet
by conversation and every asking tenant marks itself, on screen or
parked. That count is `askingIn`, which this PR deleted a commit earlier
along with the watcher that pushed it to the line that is gone; it comes
back as something pulled.
**Three things found while walking the sheet** (second commit). The mark
saying the engine shortened the evidence was the last child of the
evidence block, which scrolls: on a 40 KB single-line write the block
was 168px over 4096px of content and the mark sat at scroll offset 4407,
so it was read only by whoever reached the end. It is now a sibling
after the block in all four layouts. The publishing family matched a
forge CLI's group whole, so `gh pr view` and `glab mr list` were asked
about in the words of a push; a verb that only reads now leaves the
family, while anything that writes still asks and `gh secret` keeps no
relief. And the why line printed the whole absolute path that the
evidence block prints again right under it, so the sentence now takes
the short form and the evidence keeps the path whole.
Six catalogue keys go with the features that read them. The design
record this PR's feature was built from is updated in the same change
(sections 4.2 and 4.3 of the local design note), and the acceptance
cases these three retire are marked for rework.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `cd ui-web && npx vitest run` -- 191 files / 2544 tests pass. `npx tsc
--noEmit -p tsconfig.json` clean. `node
scripts/check-class-namespace.mjs` clean. `npm run gen:check` in sync
(194 methods).
- `cd ui-tui && npm run type-check` clean after regenerating its
catalogue.
- `npm run build && python3 ui-web/build.py` green; both booted-DOM
goldens re-pinned at 242 nodes, the diff being exactly the one removed
node (`div#cpElsewhere`).
- Real host, `raven serve` on an isolated `RAVEN_HOME` in ask mode with
deepseek-v4-pro, driven with playwright-cli:
- A file write now offers `1 deny / 2 allow for this session / 3 allow
once`.
- Taking the session grant leaves nothing docked: no landed line, no
sheet, and the edit lands on disk.
- The same file edited again in the same conversation is not asked
about. Gateway log: first `edit_file` 6943ms (the wait for the click),
second `edit_file` 2ms.
- A saved rule still lands its line with the undo, and the undo still
removes the rule from the isolated config.
- The notice that the evidence was shortened is on screen without
scrolling (measured: the block scrolls 4071px inside 168px, and the
notice sits outside it, 497px down a 720px viewport).
- `gh pr list` is now titled "Allow Raven to run this command?" rather
than in the words of a push, and still offers its rule.
- A question raised in the open conversation, then the reader walks
away: the row reads `ask` ("waiting for you") with no banner anywhere,
clicking it returns to the sheet, answering drops the row back to
running and the command runs.
- `uv run --frozen --python 3.12 --all-extras pytest -q
tests/test_shell_approval.py tests/test_permissions_gate.py
tests/test_core_runtime_swap.py` -- 498 passed. The four read-verb rows
are reverse-verified: with the relief disabled they fail, and only they.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
- Behaviour the owner asked to remove: the "allowed, just this once" and
"denied" lines, the sentence field after a refusal, and the banner
naming another waiting conversation. A refusal can still be followed by
a sentence: it is typed in the composer, one line below, and reaches the
model the same way.
- A session grant is memory-only and dies with the process, which is
what the four products surveyed in the design note do for file edits.
Nothing new is written to disk by this PR.
- Rollback: revert the commit. No data migrates and no config changes.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: gloryfromca <23442919+gloryfromca@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5[1m]) <noreply@anthropic.com>
## Summary
Three sections of the settings dialog never caught up with the prototype
they
were ported from, and the control standard the rest of the dialog took
never
reached them. This aligns the schedules pane, the provider pane and the
desk
palette's empty states, and lifts the vocabulary they read with into one
place.
**Shared**
- The dialog's small buttons are the control standard's size, 32 and 8.
The
rule hung on the settings island's own root, which channels, schedules
and
memory never sit under: those three are other domains' islands, rooted
beside
`#spanels`, so their buttons stayed 28px next to 32px fields. It is
keyed on
the dialog now. `key` on a `.mini` had no rule at all -- it styles a
`.btn` --
so the one filled verb the dialog has reads as one.
- The dropdown, the mono caption, the grey footnote, the external link
and the
fold are page vocabulary in `styles/page.css`, defined once. Settings
kept its
own copy of the dropdown at 12.5px and radius 7, and of the link with no
icon,
no gap and no focus ring.
- The two-pane frame takes the prototype's own numbers: a 286px column,
13 side
padding, a search box at the control standard with its focus ring, and a
foot
rule for the actions that belong to a whole pane rather than to one
block.
- The settings pages take the prototype's type scale, which the port had
a half
step small throughout (12.5 where the prototype says 13, 11.5 for 12,
10.5 for
11), and `.seg` takes the control standard. Where the prototype's own
field
rules predate its control standard, the standard wins.
**Schedules**
- Four labelled blocks in one scroll, and no save button: the form
commits on
the native change moment, a select as it is picked and a box as the
reader
leaves it, so a half-typed expression is never written.
- Frequency is one dropdown with the hourly intervals in it. The
interval used
to be a number box beside it that a reader had to notice to use, so in
practice every hourly job ran exactly once an hour. Monthly is
expressible
now, and the clock is two dropdowns rather than a text box that refused
half
of what was typed into it.
- A round-trip fix: every schedule but an interval and a one-off is
stored as a
cron job, and a row came back as `freq: cron`. Reopening a weekly job
showed a
raw five-field expression in a box nobody had asked for, and saving from
there
rewrote it as a custom one. The three shapes the editor writes are read
back.
- Creating one stands in the right column. It was a modal over the
dialog, which
is a layer over a layer, and it covered the list the reader was about to
name
the new job against. `#jobVeil` leaves the page's static shell with it.
- An autosave answer leaves the reader where they are. A blur starts the
request, so the reader has moved on by the time it lands, and selecting
the
saved row took them back to the job they had left. The draft an answer
carries
is the request's own and replacing it remounts the detail, so the same
job
edited field by field lost data as well: name, blur, start typing the
instruction, and the answer put the old instruction back and took the
focus
with it. Refreshing the rows is enough. Creating a job still opens it --
that
is a button the reader pressed.
- The "where results go" block is gone: `jobToSave` never carried a
destination
and every row comes back as `app`, so it stated a global setting inside
a form
about one job.
**Providers**
- Flat labelled blocks rather than a card each, the address and
display-name
overrides behind a closed fold, and disconnect at the foot under a
hairline
rather than beneath the box the reader types a key into.
- The kind label leaves the head, the state line takes the dot the rest
of the
page states a state with, and the catalogue's filter is one square
beside the
search rather than a control as wide as it. The page's own menu draws
the six
choices as a radio group, so they stay keyboard reachable and still say
which
one is in force.
**Desk palette**
- One nothing for all three tabs: the tab's own icon and one line of
fact. Two
of them carried a second sentence and a link to the other tab, so three
tabs
read as three different shapes of nothing.
- The size handle sits on whichever edge is free. Anchored, the right
edge is
pinned under the launcher and hard against the window's own gutter, so
that
corner was both the hardest place on screen to grab and backwards to
pull --
the hand goes left to make the panel bigger.
Copy is the prototype's wording throughout the schedules pane (its four
block
labels, both placeholders, the three refusals) and the three desk empty
states.
`i18n/messages.json` is the one catalogue the served page and the TUI
both read,
and the TUI ships a generated module rather than importing the json, so
the
second commit is `scripts/gen-i18n.mjs` run over the new copy. Nothing
in the
TUI changes; the file is the catalogue restated in the shape that build
wants.
Not included, and deliberately: the channels pane, which is untouched;
the
prototype's environment-variable hint under a provider key, which needs
an `env`
field the wire does not send; and the prototype's delete confirmation
for a
schedule, which claims the job's sessions are deleted with it while this
branch
says they are kept -- a statement about backend behaviour, not copy.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run from `ui-web/` unless noted.
- `npx vitest run` -- 192 files, 2548 tests, all pass
- `npx tsc --noEmit` -- clean
- `npx eslint .` -- 0 errors, 4 warnings, all pre-existing
`react-hooks/exhaustive-deps`
- `node scripts/check-css.mjs` -- OK
- `node scripts/check-class-namespace.mjs` -- OK; the schedules domain's
unprefixed
count drops from 10 to 2, `connections` is untouched, and `composer`,
`subagents`
and `chrome` each rise by one without a class being added (names they
shared with
the deleted new-job sheet are theirs alone now, which the file records;
on this
base `composer` reads 10, so it is pinned at 11)
- `npx vite build`, then `python3 ui-web/build.py` from the repo root --
both
boot snapshots match at 242 nodes, the removed `#jobVeil` included
- `npx vitest run scripts/gates` -- 38 files, 164 tests, all pass (one
CSS owner
per class, i18n namespaces)
- `npm run gen:check` -- generated client matches the contract, 194
methods
- From `ui-tui/`: `npm run lint:i18n` reports the catalogue up to date,
`npm run lint:rpc` in sync, `npm run type-check` clean, `npm test` 143
files
and 2068 tests pass
- `node scripts/check-page.mjs` -- OK
- Ten mutation checks on the new behaviour (monthly save, the
commit-on-blur
dirty check, a frequency pick committing, the hourly interval, the
provider
foot, and the two autosave-answer cases): each one fails at least one
test
when broken. The two autosave tests were also run against the half-fix
that
guards only the selection, which the same-job test refuses
- Verified in a browser on the offline fixtures, light and dark: the
three empty
states are the same shape and height, the handle is on the free edge
with the
matching cursor, and the provider pane draws flat sections with a folded
advanced block
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible, all inside the settings dialog and the desk palette.
- A schedule now saves when the reader leaves a box instead of when they
press
a button. The same validation gates it, and the native change moment
means an
untouched form writes nothing. Creating one is no longer a modal.
- A schedule stored as a plain cron expression that the editor could not
have
written is still read as custom; the three shapes it can write are read
back
as themselves, which changes what the frequency control shows for
existing
weekly and daily jobs (it shows what they are instead of an expression).
- Providers keep every field they had; the address override, the request
headers
and the display names are behind a fold that starts closed.
- No wire or config change. Rollback is reverting the three commits.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: arelchan <204152633+arelchan@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
While a turn is running, the page now sends the reader's next message
into that turn instead of queueing it for a fresh turn after the answer.
The backend already had the mechanism (`turn.send` with `busy:
"inject"`, merged at the top of the loop's next iteration, before the
model call); channels and the ACP steer path use it. What was missing
sat in three layers:
1. `feat(agent)`: the injected messages reached the model as bare user
messages, so a correction read like a fresh question. Each adjacent run
of mid-turn arrivals is now folded, at the call seam only, into one user
message under a bracketed "Mid-turn messages" header with the bodies
joined by blank lines. History keeps one entry per message the reader
sent, stamped with its arrival time; the merged message keeps the
mid-turn mark the rerun seed relies on, and folding is idempotent so the
prompt-cache prefix is stable.
2. `feat(rpc)`: an inject that merged emitted no event, and the
persisted mark never reached the wire, so a reload drew the message as
the question opening a new turn. A new `message.injected` event (the
inject's own turn id and text, tagged for a direct chat) is emitted once
the scheduler accepts it and enters the replay buffer; the stored mark
becomes a plain `mid_turn` field on the transcript message. Both
generated clients are regenerated.
3. `feat(ui-web)`: the busy branch of send calls `turn.send` with `busy:
"inject"` and touches nothing on the runtime; the echo draws the bubble
so every window shows the same one. The client queue stays as the
fallback (an older gateway refusing the field, a lane gone idle in
between, a dropped socket). On replay a `mid_turn` row draws inside its
turn: no fold closed, no turn number spent, no narration promoted to an
answer, no workspace turn counted.
The two surfaces that enumerate the wire vocabulary exhaustively name
the new event without forwarding it: the ACP update translator (the
client's own steer request is already the record that it sent a message
mid-turn) and the terminal's event switch (it queues its own follow-ups
and draws no row for a message it did not send). A fifth commit covers
the field and the event in the offline contract gates.
The sixth commit, `fix(*)`, answers an adversarial pass over the served
page. Live, the work a turn did after a mid-turn message was drawn above
the bubble and the turn lost its fold and elapsed header (the fold, the
merge of silent steps and the stop note all read the bubble as the start
of a turn), while a reload drew it correctly; the bubble now carries a
mid-turn mark on the live path too, runs are never merged across it, and
the fold closes below it when work followed it and above it when none
did. A message the host turn ended before draining runs as a turn of its
own, and its bubble is now taken back from inside the ended turn and
drawn where the new turn opens, below the earlier answer. The stored
entry is stamped when the message reached the server
(`TurnRequest.received_at`), not when the turn reached its next gap. The
injected-files note names only paths the text does not already name, so
a page send reads the same live and after a reload. A second message
typed while a brand-new conversation is still being made is queued
rather than sent with no session key, and `turn.send` answers a
malformed request with `-32602 invalid_params` (new
`InvalidParamsError`) instead of an internal error with a traceback.
Stated limits, unchanged in this PR: a mid-turn message sent while the
turn waits on an approval or question merges after the reader answers
it; a mid-turn attachment still reaches the model as a text note rather
than an image block; Stop with an undrained inject lets that message run
as its own turn (pinned by a test); the TUI's `steer` mode and the
sub-agent direct-chat composer keep their current behaviour.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `uv run pytest tests/test_agent_loop_run_emit.py
tests/test_rpc_turn_send.py tests/test_rpc_turn_cancel.py
tests/test_agent_loop_mid_turn_merge.py
tests/test_transcript_mid_turn.py
tests/test_agent_loop_session_stamps.py tests/test_rpc_schema_match.py
tests/test_rpc_registration.py -q` -- 546 passed; the new files again
with an empty `HOME` -- 117 passed. Cases from the first five commits:
two injects in one gap reach the second provider call as one labelled
message with both bodies in order, one inject is labelled too, injects
from different gaps stay apart; the merge is idempotent, keeps the mark,
hands an unmarked list back unchanged and never labels replayed history;
the mark is renamed for storage, reaches the wire and is declared in the
schema; an accepted inject is announced once with its own turn id and no
`message.start`, a direct-chat inject carries its target, a refused
inject is announced to nobody, an undrained inject is announced once and
opened once, a stop leaves an unmerged inject to run as its own turn.
Sixth commit: the inject request carries `received_at`; the stored
mid-turn row carries it rather than the drain clock, and keeps the drain
clock when no arrival is given; an attachment the text already names is
not named twice while one it does not name still is; a missing or null
`session_key` and a missing `content` answer `-32602`.
- `uv run pytest tests/ -q -k "rpc or spine or agent_loop or transcript
or session_stamps or acp_updates"` -- 3681 passed.
- `npm test --prefix ui-web -- src/state/session src/features/transcript
src/features/workspace` -- the earlier cases plus: on the live path a
turn [ask, step, mid-turn ask, step, answer] folds with its header below
the bubble and the second step stays below it, the fallback shape [ask,
step, mid-turn ask] folds above it, and `turnKept` is true above a
mid-turn bubble; `message.injected` marks the bubble mid-turn, and a
`message.start` with the same id re-files it once as the new turn's
question however many windows announced it; a busy send during a draft's
promotion queues and calls no `turn.send`. The live-path, re-file and
promotion cases fail against the fifth commit's `store.ts`,
`stages.ts`/`runtime.ts`.
- `npm test --prefix ui-web` -- 190 files, 2483 tests passed, the
contract gates included.
- `uv run pytest tests/test_acp_updates.py -q` -- 196 passed (the
vocabulary sweep names the new event; a mid-turn message produces no ACP
update).
- `uv run pytest tests/ -q` -- full suite green; `npm run type-check
--prefix ui-tui`, `npm run type-check --prefix ui-web`, `npm run lint
--prefix ui-web`, `npm run gen:check --prefix ui-web`, `npm run lint:rpc
--prefix ui-tui`, `uv run ruff check raven tests` -- clean.
- Served page, isolated agent home, a turn that sleeps in a shell tool,
two messages typed while it runs: before the change both sit in the
composer queue and go out as their own turns after the answer, and the
provider payload carries no header; after the change both are drawn at
once inside the running turn in the sending tab and in a second tab, the
provider call made after the sends carries one user message with the
header and both bodies, the session file holds two `mid_turn` entries
stamped before the answer, and a reload draws them inside the one turn.
Second pass, after the sixth commit: with two gaps the live transcript
and the reload read in the same order (first command above the first
bubble, second command inside the fold below it, the fold's elapsed
header present), and the stored stamps are the send times; a message
sent in the turn's last second opens its own card below the earlier
answer, live and after a reload; Stop with a pending message leaves the
bubble below the stop note, live and after a reload; a page send with an
attachment shows the same text and chip live and after a reload.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
The header and the folding change what the model sees for mid-turn
arrivals on every surface that injects (channels included); the folded
shape is deterministic. The bubble depends on the websocket echo; an RPC
refusal re-queues the text, a wedged socket already breaks every other
event. `mid_turn` and `message.injected` are additive: older clients
ignore the field and the event. A malformed `turn.send` now answers
`-32602` where it answered `-32603`; the page treats both as a refusal.
Rollback: revert the six commits in reverse order.
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
A conversation reached disk only when its turn finished, and the session
store knows a session only by its file. So a conversation whose first
turn was still running was in no listing: the rail kept it as an unsaved
row only while it stayed the open one, a refresh of the list (an
approval or a question arriving does that) dropped it once the reader
had switched away, and a reload lost it outright while the turn kept
running with nobody watching.
Six commits (plus a merge of `main`, whose #617 moved the generated RPC
clients):
1. `fix(agent)`: the question is written as soon as the prompt is
assembled and before the first model call, through the same `_save_turn`
that wrote it at turn end, so it is filed exactly once with its arrival
timestamp. The three closing writes (healthy, cancelled, failed) start
after it. `prev_len` is read before the opening write so the
memory-backend slice and the output-limit marker still count from this
turn's start, and the history handed to hooks is sliced there so it
still ends with the previous turn, as documented. The session namer now
runs before the `message.start` emit, otherwise the filed question made
it decline to name a new session.
2. `feat(rpc)`: `running` on `SessionListItem` and `SessionInitInfo`,
read from the active-turn table, so a page that has just loaded can
tell. Both generated clients regenerated.
3. `feat(ui-web)`: the rail badges a running row from the list answer
and lets that answer clear a stale badge; opening a conversation whose
resume bundle says it is running puts the composer back into the
streaming, cancellable state, so the stop button works, a send queues
instead of being refused, and the deltas still to come land in a fresh
step. What already streamed before the reload is not recoverable and is
not pretended at.
4. `fix(*)`: the reload race the review found. `turn.subscribe` now
answers `running`, read on the far side of the emitter's replay publish,
so a completion that would make it stale is one the new subscription
itself receives; the page keeps the resume hint (it pre-arms the machine
so the replayed `message.start` does not draw the question twice) and,
once subscribed, re-opens the conversation from disk when the hint said
running but the subscription says otherwise while the machine is still
busy. The offline fixtures answer the new `running` fields, which the
fixture-shape gate had been failing on.
5. `fix(ui-web)`: found in the owner's acceptance pass -- after a reload
the live row's clock restarted from zero. The resume path now anchors
the live clock and the runtime's start stamp to the last user message's
timestamp (the question is on disk from turn start, so it carries the
turn's arrival), through the transcript's own stamp parser exposed via
its seam.
6. `fix(*)`: from the reviewer's timezone finding and an adversarial
pass over the served page. The resumed clock had been anchored to the
question's stored stamp parsed in the browser; the loop writes that
stamp off the gateway's wall clock with no offset, so a browser in
another timezone read the offset back as the turn's age.
`session.resume` now answers `running_ms`, measured on the server
against its own clock (naive against `datetime.now()`, aware against
`datetime.now(tz)`), and the page anchors at `Date.now()` minus that.
The re-open of the fourth commit had landed on the kept-turn branch:
`park()` keeps a busy machine and leaves `rt.events` set, so the second
pass restored the streaming phase instead of reading the conversation
off disk, and the stop button stood over a finished answer for the life
of the tab -- reachable on every Stop that overlaps a reload, because
`turn.cancel` emits its error frame before the active slot clears. The
re-open now disarms the machine and the anchor first and tells the
second pass the turn is over. A `run` badge that came from
`session.list` never came off: the on-screen turn end now clears the
current row's badge, and while any listed row says somebody else is
answering, the page asks for the list again every five seconds, stopping
when none is left. `running` was false for every turn `turn.send` did
not start, so a cron or channel conversation answering for a minute
listed as idle; `session.list` and `session.resume` now ask the
scheduler as well (`is_session_answering`).
Known limits after this PR, to follow up separately: a cron or channel
turn is listed and badged while it runs, but opening it shows no stop
button or live clock, because the spine emits no opening frame for a
scheduler-origin turn, so `turn.subscribe` cannot say it is running
(making it read the scheduler would re-open the Stop-overlaps-reload
window). A message queued while a turn runs is still page-local and lost
by a reload (rarely reached once #622 injects instead of queueing). A
reload within about two seconds of a send boots a rail without the
conversation until the next list. A gateway that dies mid-turn leaves
the filed question with no answer and nothing on screen saying so: the
wire has no `interrupted` flag on a transcript row and the page no
renderer for one.
Behaviour visible elsewhere: every consumer of the session list (TUI
picker, `raven sessions list`, `session.most_recent`, the heartbeat's
delivery target) now sees a conversation from the moment its turn starts
rather than when it ends, and a row moves to the top of the list on send
rather than on answer. Every turn costs one more locked append.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `uv run pytest tests/test_agent_loop_turn_open_persist.py
tests/test_agent_loop_broken_turn.py
tests/test_agent_loop_iteration_hooks.py tests/test_session_manager.py
tests/test_rpc_session.py tests/test_rpc_session_init_bundle.py
tests/test_rpc_turn_session_naming_wiring.py tests/test_rpc_turn_send.py
tests/test_rpc_session_naming.py tests/test_rpc_schema_match.py -q` --
299 passed, and the same again with an empty `HOME`. New cases: the
session is on disk and listed from inside the first provider call; the
question is filed once and the answer follows it; a cancelled and a
failed turn each leave the question once with what had streamed and the
end marker; the slice handed to the memory backend still opens on the
question; a hook's `session_history` stops before this turn's question;
a session holding only its open question lists as a complete row with an
auto title; naming still starts when the question is already filed;
`session.list`, `session.resume` and `session.create` report `running`.
The on-disk and naming cases fail against the previous `turn_path.py` /
`turn.py`; the once-only and history cases fail under the single
mutation each guards.
- `uv run pytest tests/ -q` -- 24334 passed, 119 skipped.
- `npm test --prefix ui-web -- src/features/rail src/state/session` --
234 passed (new: a listed `running` row carries the badge; the server's
answer clears a stale run badge while the reader's own marks stay; a
resumed running conversation puts the turn machine into
streaming/cancellable and repaints; a resumed idle one stays idle).
- `uv run pytest tests/test_rpc_turn_subscribe.py
tests/test_rpc_schema_match.py tests/test_rpc_registration.py -q` -- 413
passed (new: `turn.subscribe` says running while a turn is buffered, not
running on a quiet session, not running once the turn completed; red
against the previous `turn.py`). `npm test --prefix ui-web --
src/state/session/registry.test.ts` -- 24 passed (new: resume running +
subscribe running stays streaming; resume running + subscribe not
running re-opens and ends idle, red against the previous `registry.ts`;
resume not running + subscribe running is left to the replayed
`message.start`).
- `uv run pytest tests/test_rpc_session.py tests/test_rpc_turn_send.py
tests/test_rpc_turn_cancel.py tests/test_rpc_turn_subscribe.py
tests/test_rpc_schema_match.py -q` -- passes (new: resume of a busy
session carries `running_ms` measured against a monkeypatched clock, the
same for a naive and an offset-bearing stamp; idle answers no elapsed
and an unparsable stamp null; `session.list` and `session.resume` say
running for a lane the scheduler holds that `turn.send` never saw, and
not for a different lane). Red against the previous `session.py`.
- `npm test --prefix ui-web -- src/state/session` -- passes (new: the
re-open reads the conversation back off disk with the REAL residency
module in the harness -- second `session.resume` issued, transcript
re-read, machine idle; the badge poll asks again after 5 s, clears when
the answer says not running and stops; the visible turn end takes a
listed `run` badge off the row; a resumed turn anchors to `Date.now() -
running_ms`, and a bundle without it leaves the clock alone). Each red
against the previous `registry.ts` / `pipeline.ts`.
- `npm test --prefix ui-web` -- whole suite green, the contract gates
included; `npm run type-check --prefix ui-web`, `npm run lint --prefix
ui-web`, `npm run gen:check --prefix ui-web`, `npm run lint:rpc --prefix
ui-tui`, `uv run ruff check raven tests` -- clean.
- `npm run type-check --prefix ui-web`, `npm run lint --prefix ui-web`,
`npm run gen:check --prefix ui-web`, `npm run lint:rpc --prefix ui-tui`,
`uv run ruff check raven tests` -- clean.
- Served page, second pass: a Stop fired from another connection while
the page reloads, detected by the page's own second `session.resume` --
2 of 14 attempts landed in the band and both ended idle with the
question, the partial answer and the stop note (before: stuck with the
stop button up); a background conversation's badge clears within the
same sample the server turns idle (before: still on after 140 s); the
badge on the conversation being watched clears at the turn's end;
browsers in America/New_York and Asia/Tokyo read 11 s and 16 s of
elapsed at 12 s and 17 s of wall time (before: 0 s and 60m17s); a cron
turn lists and badges as running while it runs and clears at its end.
- Served page, isolated agent home, a turn that sleeps in a shell tool:
before the fix nothing is on disk or listed until the turn ends, and a
reload lands on the new-task screen with no row; after the fix the file
exists within a second of the send (metadata plus the question),
`session.list` carries the key with one message and `running: true`, a
reload lists the conversation with its badge, opening it shows the
question and the stop button, the answer lands when the turn ends, and
the JSONL holds the question exactly once; a cancelled turn also leaves
the question once, followed by its end marker.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
The turn path gains one write per turn on every surface, channels and
cron included; a gateway that dies mid-turn now leaves a one-message
conversation instead of nothing. The `running` field has a default, so
older clients ignore it. `running_ms` is optional and defaults to null,
so older clients ignore it. The listed-badge poll costs one
`session.list` every five seconds only while a row shows another client
answering. Rollback: revert the commits in reverse order.
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
The approval prompt used to reach the page as one English sentence plus
a truncated argument line, with a 30 s countdown the web never drew and
a 35 s deadline that silently retired the sheet. This makes the request
typed and lets the sheet be drawn from facts instead of prose:
- `approval.request` now carries `kind` (shell.exec / file.write /
mcp.call / unknown), `family` (the shell command family that words the
prompt), `origin` (the main agent or a named sub-agent) and `evidence`
(the tool's own account of the call: the command and its directory, a
path and the diff the write would make, an MCP tool and its input). Each
tool describes itself through the new `Tool.approval_kind` /
`Tool.approval_evidence`; the gate only reads them, and caps what they
return, so no tool can send more than a person reads. `created_at`,
`expires_at` and `action_digest` leave the frame: nothing read them.
- No pending approval can block forever, and none is lost silently. The
broker serializes requests per conversation (a background sub-agent
asking while the main agent's prompt is up waits its turn instead of
replacing it), keeps a day-long floor instead of the 35 s ceiling, and
answers `approval.pending` so a reloaded or reconnected page draws the
open requests again; a request in another conversation lights the line
above the composer. No sweep takes a pending approval down unanswered: a
clarify ends on its own after ten minutes and a confirm on its own hard
limit, so both may be replaced, while the gate's ask has only that floor
under it. The TUI countdown and its expiry state are removed.
- The runtime and the ACP editor declare the same seven shell command
families through one call, so the terminal, the page and the channels
word a delete as a delete.
- Web sheet redesign: title and why-line by family, evidence block by
kind, three answers (deny, always with the suggested rule shown and
where it applies, allow once), a landed line after the answer, undo for
a saved rule (`approval.revoke`), a sentence field after a refusal that
goes on as the next message, and a line above the composer when another
conversation is waiting.
- A rule that reached the config file gets no session grant beside it,
so taking the rule back really does mean being asked again -- unless the
user's own stricter rule outranks it (the strictest matching rule wins),
in which case the session grant stays and the identical call is not
asked twice.
- Recovery and undo are scoped to the surface that asked.
`approval.pending` and `approval.revoke` each answer only for the
conversations a connection owns, plus the unclaimed ones whose frames
are broadcast anyway, so an id alone cannot authorize a command or
delete a rule on a conversation that socket was never shown. The undo
names the answer rather than the rule's text and waits for the gate to
report what its write did, because `approval.respond` answers the page
before the gate persists. A removal that fails on the way to disk leaves
the receipt unspent, so it can be pressed again; the line that reports
the failure names the rule.
- The landed line says so when the engine did not take the answer
(`approval.respond` returned `ok: false` or the socket dropped); a digit
typed into a field is text, not an answer; and the sentence field stays
up while it is still being typed into.
This replaces PR #608, which targeted `refactor/ui_web_architecture`.
That work is now on `main`, so the five commits were replayed onto it
and #608 was closed.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- Rebased from `refactor/ui_web_architecture` onto `main` (`git rebase
--onto`), then onto the newer `main` tip again. One conflict, in
`raven/core/runtime.py`: `main` had rewritten the hooks block this
change appends after, resolved by keeping both. The generated web client
was regenerated rather than hand-merged.
- `uv run --frozen --python 3.12 --all-extras pytest -q` -- full suite.
3 failed, 24615 passed, 111 skipped in 4:40. The three are pre-existing:
a `git worktree` at the `main` tip with none of this change runs the
same three files and fails the same three (`3 failed, 95 passed`).
- `cd ui-web && npx vitest run` -- 189 files / 2482 tests pass; `npx tsc
--noEmit -p tsconfig.json` clean; `npm run gen:check` in sync (194
methods); `node scripts/check-class-namespace.mjs` clean; `npm run build
&& python3 ui-web/build.py` green (both booted-DOM goldens match at 236
nodes).
- `cd ui-tui && npx vitest run` -- 143 files / 2068 tests pass; `npm run
type-check`, `npm run lint:rpc`, `npm run lint:i18n` clean.
- `scripts/check_source_language.py` and `scripts/check_large_files.py`
clean over this PR's range; `npx commitlint` over the same range exits
0.
- Five independent review passes over the finished branch (completeness,
correctness, appropriateness, maintainability, evidence). Every
behavioural finding is fixed and listed under Risk; each fix was re-run
against the code with the fix removed, and fails there on the symptom it
names.
- Real host: `raven serve` on an isolated `RAVEN_HOME` in ask mode with
deepseek-v4-pro, driven with playwright-cli; the TUI from source in tmux
against the same home. Delete: titled as a delete, allowed once, files
gone. Edit: diff shown, refused, note typed after the refusal arrived as
the next message, file untouched. Always-allow wrote
`permissions.tools.exec["glab mr list *"]`, undo removed it, and a rule
the reader had written themselves was left alone. A pending approval in
another conversation shows the waiting line; clicking it switches back;
a reload draws the sheet again. A main-agent request and a background
sub-agent request two seconds apart arrived one after the other, never
side by side.
- The real-host runs found two things the unit tests could not: the dock
passes pointer events through, so the waiting line needed
`pointer-events: auto` before a real click reached it; and the waiting
line filtered out a conversation whose very first turn was blocked,
which is not on disk yet and so not in the list.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
- A pending approval no longer expires in 35 s; it waits for the person,
up to a day. Reloading the page redraws it; another conversation's
request is announced above the composer. Two requests in one
conversation are answered one at a time, in order.
- Wire: `approval.request` gains four fields and drops three; the TUI
reads none of the dropped ones any more. `approval.revoke` and
`approval.pending` are new methods, both scoped to the calling
connection. ACP's `session/request_permission` is unchanged.
- A saved rule that a stricter user rule outranks no longer re-asks
within the session (the session grant stays); before this change the
same click would have re-asked on the next identical call.
- One tool's evidence is cut at 16 KiB per value and marked when cut, so
a very large write or MCP payload now shows a prompt that says it was
shortened rather than sending the whole thing.
- Contract tier version 28 -> 30 (`Tool` and `ApprovalResponder` shape,
then `ApprovalOutcome` carrying the id of the request it answered).
- Rollback: revert the commits; no data migrates.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: gloryfromca <23442919+gloryfromca@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
Co-authored-by: KT <74288668+0xKT@users.noreply.github.com>
## Summary
The rebuilt frontend kept the rail's grouping by working directory but
lost the control that produced it: since the replay, a new conversation
cannot be pinned to a folder from the page. The backend half (`fs.dirs`,
`session.create` with `workdir`, `SessionListItem.workdir`) is untouched
and still in use by the rail; this brings the picker back on top of it,
built the way the rebuilt page builds its composer chips.
What the reader gets:
- A folder chip in the bar under the field, beside the permission chip.
On a draft it is live and opens a popover: the default, the folders
recent conversations ran in (from the rail's rows, each once, latest
first), and "Open folder...", which walks the gateway's `fs.dirs` from
the home directory with home / up buttons. A folder the engine would
refuse (the agent's own data or an ancestor of it) is greyed and
explained, but still enterable, since its subfolders may be fine; "Use
this folder" is disabled there.
- The pick is staged on the draft and rides the first message's
`session.create`, the only moment the engine takes a working directory.
The row the promotion adds carries it, so the rail groups the
conversation and the chip reports it before the list is read back. A
fresh draft drops the pick with the model, tier and permission mode it
already dropped.
- In a conversation the chip is a report: disabled, the folder's name on
it, the full path and "fixed once the conversation starts" on its title.
- The word for no pick is "Default", on the chip, in the menu and on the
rail group, which was "No folder". The folder group is now "Pinned to a
folder" so the two group names read as a pair.
How it is built, for the reviewer who knows the page's rules:
- `state/workdir.ts` is the store (`makeStore`,
`get`/`set`/`subscribe`/`_resetForTests`), and holds the draft's pick as
module state rather than on the draft runtime:
`state/session/registry.ts` imports the rail's store, and the rail's
`draw` is what repaints this chip, so a pick on the runtime would have
closed a cycle the import-direction gate forbids. It reads no element.
- `chrome/WorkdirChip.tsx` and `chrome/WorkdirPopover.tsx` render it.
The popover stays a child of the composer card and is positioned by the
card's own `.pop` rule (like the slash palette), so it is never
reparented, needs no portal for its clicks, and adds no DOM reach to the
frame. New classes carry the `chrome-wd-` prefix; the rest is the page's
own vocabulary.
- The `fs.dirs` call lives in `features/workspace/source.ts` as an
optional `dirs` member of `WorkspaceSource`; the offline library answers
it with a small fixed tree (`rpc/fixtures/fs.ts`) so the stub page and
both boot goldens exercise the menu.
- `state/session/runtime.ts`'s `promote` passes `{ workdir }` to
`session.create` when a pick is staged and puts it on the row;
`registry.ts`'s `switchToDraft` clears it.
- Region and boot goldens are regenerated for the two new nodes under
the card (the chip and the popover shell); no existing node moved.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `npx vitest run` in ui-web: 189 files, 2474 tests pass, all gates
included (import-direction, state-dom-touch, check-class-namespace,
check-css, css-one-owner, i18n-keys, offline-coverage, fixture-shape,
store-shape, domain-shape, portals).
- New `state/workdir.test.ts` (7 cases): default word and live chip on a
draft; disabled report with the path on the title in a conversation;
menu with the default ticked, recents deduped, browse row; pick and
un-pick; walk of a listing with a refused ancestor greyed and enterable,
"use" disabled inside it, home and up; staging the folder the browser
stands in; the two notes (nothing to browse, listing refused) shown in
place.
- `runtime.promote.test.ts` gains three cases: the pick reaches
`session.create` as `{ workdir }` and the row, and is spent; no pick
sends `{}`; a fresh draft drops the pick.
- `Dock.test.tsx` updated for the third chip and its popover (ids,
roles, click ownership, child order).
- `npm run type-check`, `npm run lint` (0 errors; the 4 warnings are
main's), `npm run build`, `python ui-web/build.py` (both boot goldens
match), `check-page.mjs`, `check-css.mjs`: pass. `ui-tui` catalogue
regenerated with `npm run gen:i18n`.
- Live, on a gateway serving this build, in Chromium and WebKit: the
chip reads "Default"; the menu lists the default (ticked), one recent
folder and the browse row; the browser opens at the home directory with
"Use this folder" disabled there (home is an ancestor of the agent's
data), enabled inside a subfolder; picking it puts its name on the chip;
sending one message minted a session whose `session.list` row carries
that `workdir`, whose `fs.list` root is that folder, whose chip is
disabled with the path on its title, and which the rail lists under
"Pinned to a folder" with the folder tag; the other group reads "Default
workspace". Test session deleted afterwards.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
Frontend only; no contract, RPC or backend change. A page that never
opens the chip behaves as before, except for two catalogue words.
Against an older gateway without `fs.dirs`, the browse row reports the
failure on the menu and the default and recent folders still work.
Reverting the commit restores the previous page, goldens included.
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
The orchestration card in the transcript (a `run_subagent_dag` or
`load_playbook`
row, expanded) drew a graph of its own and, under it, a node panel whose
"open the
run" link raised the old agents-panel record window. The desk's task
pane already
draws the same graph and reads the same `dag.node` record, node by node,
so the
card was a second renderer for work the desk owns. The prototype's card
is the grid
alone, with the task cell as the door to the run. This PR makes the card
that.
Two commits, the second deleting only what the first killed:
1. **The card hands its graph to the desk.** The card keeps its grid
(task, scale,
playbook, state, cost, run id, replanned-into) and nothing else. The
task cell is
a door -- `role=button`, a title, a standing arrow -- whenever the run
has an
id, and opens the run's task pane on the desk. `openDagRun` goes through
the
tasks seam: `openRun` when the tasks store holds the row, one
`tasks.list` read
when it does not, the tasks tab when neither answers (a branched
conversation
replaying its parent's delivered row lands there). The delivered row
already
went through `openDagRun` and follows. The node panel, the `openDagNode`
seam,
`features/dag/open.ts`, the 21 catalogue keys only the panel read and
the
`dag-renderer` gate go.
2. **The renderer's default box goes.** The desk's board is `DagGraph`'s
only
caller and hands it its own node card, so the default SVG box, the card
surface, the label trimming, the mark table and the per-node clock had
no
reader left.
User-visible changes besides the door: the first failed node is no
longer opened
unasked inside the card (the desk pane's failure banner names it, one
click away);
a node's internal dependencies are read off the board's edges rather
than a list;
the node id, which the deleted panel spelled out, rides on the desk node
panel's
title.
Left for a follow-up, deliberately: `features/dag/mount.ts` and
`store.ts` (the run
state `state/session/resume.ts` still writes and nothing reads) --
deleting them
means either a new row on `domain-shape`'s shrink-only exceptions or
dissolving
`features/dag/` into its two remaining consumers, which is a decision of
its own.
## Type
- [ ] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [x] Refactor
- [ ] Other
## Verification
- `npm test --prefix ui-web` -- 188 files, 2464 tests, all pass (three
suites
fewer than the base: the two deleted gates and the deleted label suite)
- `npm run type-check --prefix ui-web` -- clean
- `npm run lint --prefix ui-web` -- 0 errors (4 pre-existing warnings in
CronPage/SubagentsPage, untouched here)
- `node ui-web/scripts/check-class-namespace.mjs` -- OK; the transcript
and dag
pins lowered to what the tool prints
- `npm run --prefix ui-tui lint:i18n` -- generated catalogue up to date
- `npm run --prefix ui-web build && python3 ui-web/build.py` --
boot-snapshot OK
(235 nodes match golden)
Driven on a real host (`raven serve` from this branch on an isolated
`RAVEN_HOME`
built from a real config, deepseek as the default model, every channel
off), with
a playwright driver against the served page:
| Step | Result |
| --- | --- |
| Expand the card of a running three-node graph | grid only, no graph,
no node panel; task cell is `role=button` with a title and the arrow; a
long title is cut and the arrow stays in view |
| Click the task cell | exactly one desk pane, `task:dag:<run_id>`,
headed by the run's summary, showing the board |
| Click a node on the board | the desk's node panel with the node's
record |
| Click the task cell again | no second pane |
| Click the delivered row after the run settles | the same pane |
| Reload, expand the restored card, click | the same pane |
| A graph with one node on a lane that cannot reach its model | the
card's state row counts `1 failed`; the desk pane shows the failure
banner before any node is picked; the banner opens the failed node |
| The board before and after commit 2 | screenshots identical (node
cards, edges, lane frames) |
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
Web UI only; no server or wire change. The transcript card loses its
graph and
node panel on purpose; every fact they showed is on the desk's task
pane, reached
from the card's task cell and from the delivered row.
`features/dag/mount.ts` keeps
running unchanged. Rollback is reverting the squash commit.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-sonnet-5) <noreply@anthropic.com>
## Summary
The strip above the composer drew one chip per running task (name only,
up to three, plus an overflow chip), each opening that task's own desk
pane. The prototype -- the spec for this page -- draws one pill, "{n}
running", with the task names as its hover title, and a click opens the
desk's tasks tab, whose rows already name each run and say how far it
has got. The strip is a reminder that background work is under way, not
a second copy of the tasks list, so this redraws it as the prototype has
it.
Three commits:
- `fix(ui-web)`: the strip becomes one `.tkrunhint` pill inside
`.tkruns`, on the dock's column axis, with a `.tkrundot` running dot
matching the task row's. It subscribes to the language store (the whole
pill is a catalogue word; the old overflow chip never did and stayed in
the served language after a pick). `gui.tasks.running_n` replaces
`gui.tasks.overflow_more`; the TUI's generated table is regenerated. The
old `.runs` / `.trun` rules leave `page.css` for the domain sheet, the
class-namespace pins for tasks come down by two, and the CONTEXT.md
"Task strip" term, the Dock comment and two dot comments are rewritten
to match.
- `refactor(ui-web)`: the tasks store's `hover` key and the row's `.hl`
class go. They existed so the strip's chip and the list row could light
each other up; with one pill there is no other side, and a row lighting
itself through a store round trip is what `.sarow:hover` already does.
The row's class is a plain attribute again, so the class-namespace tool
counts `.task` on the local list instead of the expression list: one pin
up, one down, nothing added (the tool's own header documents this kind
of move).
- `fix(ui-web)`, found by the browser regression for the pill: a spawn's
pending frame files a row under the manager's `task_id`, and the running
frame renames it onto the record id. A `tasks.list` read landing between
the two brings the same spawn in under its record id, and the store's
merge keeps the pending row beside it; the running frame then updates
the record row and leaves the pending one standing until the next full
read. On the served page the pill counted three tasks where two ran. The
frame that names both ids now folds the pending row into the record row.
Targets `refactor/ui_web_architecture`, not `main`.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
All from the repo root of the branch checkout, against the merge base
`refactor/ui_web_architecture` @ cbaa057d:
- `npm test --prefix ui-web` -- 191 files, 2494 tests passed (base:
2492; the two new cases are the strip's live repaint and the reducer's
fold). Includes the gates: `check-class-namespace` OK at 260 unprefixed
/ 57 in expressions (base 261 / 59), `css-one-owner`, `i18n-keys`,
`island-lang`.
- `npm run type-check --prefix ui-web` and `npm run lint --prefix
ui-web` -- clean (the 4 `exhaustive-deps` warnings are the base's, in
files this branch does not touch).
- `npm run build --prefix ui-web && python3 ui-web/build.py && node
ui-web/scripts/check-page.mjs` -- both boot snapshots match their
goldens (235 nodes), page check OK.
- `npm run gen:check --prefix ui-web` and `npm run --prefix ui-tui
lint:i18n` -- the RPC client and the TUI's generated catalogue are
current.
- `make lint-python`, `make test-python`, `pre-commit run --from-ref
origin/refactor/ui_web_architecture --to-ref HEAD`,
`scripts/check_commit_messages.py`, `scripts/check_source_language.py`,
`scripts/check_large_files.py` -- all green (24487 python tests passed,
109 skipped); the TUI lane (`npm run lint && npm run lint:rpc && npm run
type-check && npm test && npm run build` in `ui-tui/`) passes with the
regenerated catalogue.
- Served page, real browser (playwright against a gateway started from
this checkout on an isolated `RAVEN_HOME`): two slow `spawn`s in one
conversation show one pill "2 running" (its Chinese counterpart in the
zh build) whose title lists both names; with the desk shut, a click
opens it on the tasks tab with the two rows and opens no pane; with the
desk on the deliverables tab, a click brings the tasks tab forward;
after `config.set language=en` and a reload the pill reads "2 running";
once both spawns settle the pill is gone. 6/6 steps pass on the
three-commit build. The reducer fix in commit 3 came out of this run: on
one attempt the pill briefly read 3 where 2 ran.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
## Risk
User-visible: while tasks run, the composer shows one pill "{n} running"
instead of up to three named chips; clicking it opens the desk's tasks
tab rather than one task's pane (the pane is one more click away, on the
row). The tasks tab, its running-count badge and the rows are unchanged.
Rollback is reverting the two commits; nothing outside `ui-web/`, the
catalogue and its generated TUI table is touched.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
Replaying this branch onto main drops the two catch-up commits that used to
carry main's tree wholesale, so git merged main's own edits to the rebuilt
frontend in wherever there was no textual conflict. The result passed as a
merge and failed as a page: the rail kept twelve unprefixed class names, the
offline fixtures left three optional fields unsent, and the wizard's agent
step offered Connect on a row the snapshot had already recorded as refused.
Those files take the rebuilt branch's own version, which is the reviewed
merge of both sides. build.py is the exception: it keeps main's newline=""
fix and this branch's flush=True, since each side fixed a different half.
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
The rail's import row counted settled sources over the total, so its
share stood still for the whole of a large source. On the live run a
287-message memory directory is 29 batches of 10 and about ten minutes
at 42 percent, which the maintainer read as a hang.
- The orchestrator reports, per source, how many of its messages have
landed after each batch (`on_batch(platform, source_key, sent, total)`),
the way it already reports per-source outcomes.
- `import.status` carries it as a nullable `current {platform,
source_key, sent, total}` beside `phase`, set while the message pass is
on and null otherwise; additive and optional in the contract, both
generated clients regenerated.
- The row adds that source's share to its count: `(settled + sent/total)
/ total`. A gateway restart clears the field and the row falls back to
the per-source share, which is what it showed before.
- A source is counted or named, never both. The gateway stops naming a
source the moment the run's progress event settles it, and leaves the
one a retry is sending out of the settled count instead of out of sight.
Without the first, a poller on a three-source pass saw 33, 67, 33, 47,
60, 67, 100, 67 percent, reaching 100 with a whole source still to send;
without the second, a failed source being sent again was held by the
count and named at the same time. The row also ignores a `current` while
no run is on.
- The row stops at 99 percent until every source is settled: rounding
carried the last source over 99.5 well before it was done, which is the
100-percent-then-wait the profile mirror's progress line already warns
about.
- The row carries the current source's own counts beside the percentage
(`41% - 120/287`), the way it already carries the phase's `1/3`. One
source's whole share is `1/N` of the bar, so in a run of many the
percentage alone moves a few times an hour; the counts move with every
batch.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
- `uv run pytest tests/test_rpc_schema_match.py
tests/test_rpc_import_sync.py tests/test_importer_orchestrator.py
tests/test_importer_phases.py -q`: 472 passed.
`tests/integration/test_import_e2e.py` green on the first round of this
branch.
- The reports are read out of a real pass rather than a set global: a
two-source run over a fake backend that polls `import.status` from
inside `store` sees `[(k1,0,12), (k1,10,12), (k2,0,12), (k2,10,12)]`,
and a poll taken in the window between one source settling and the next
one's first batch sees `current` null both times.
- ui-web: 194 tests across the import feature and the gates pass; `npm
run type-check` clean, `npm run gen:check` in sync, eslint clean on the
touched feature.
- Mutation checks, each confirmed red: report the batch before
`backend.store` rather than after it lands; report once per store
attempt instead of once per landed batch; name every report after the
first source of the run; drop `on_progress` from the gateway's
`run_import` call; drop `on_batch` from it; drop the `running` guard,
the clamp, or the zero guard from the row's share.
- Real host: a gateway built from this branch, its own RAVEN_HOME and a
synthetic Claude Code home of three memory sources (5, 68 and 9
messages), driven through the wizard's data-sync step in a browser,
storing into a real EverOS. The row, sampled from the DOM:
```
run 0% - 0/5 (first source)
run 33% - 0/68 (second source begins)
run 38% - 10/68
run 43% - 20/68
run 48% - 30/68
run 53% - 40/68
run 58% - 50/68
run 63% - 60/68
run 67% - 0/9 (third source begins)
done 100%
```
The number moves with every batch inside the 68-message source, the bar
width follows it, no step goes backwards, and 100 percent arrives only
with the finished row. One apparent inversion appeared while two
samplers were reading the page at once and did not reproduce with a
single sampler; the row's poll is a fixed interval and does not
serialise its reads, so an out-of-order answer could still show one.
That is older than this branch and corrects itself on the next read.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
User-visible: the row's percentage now moves during a large source
instead of stepping once per source. `import.status` gains one optional
nullable field; older clients ignore it.
Rollback: revert the squash commit; no data migration is involved.
- [x] Security impact considered (no new inputs, credentials or
endpoints)
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: gloryfromca <23442919+gloryfromca@users.noreply.github.com>
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
The memory section offered a delete that no store behind it can honour,
so this
takes the control off and drops the `memory.delete` method with it. Base
is
`refactor/ui_web_architecture`, not `main`.
What the reader hit: deleting a know-how entry answered "this backend
cannot
delete a agent_skill memory". That row could never have been deleted.
The
adapter rebuilds the skill directory path from the row's name, and a
directory
written before EverOS started sanitizing names keeps its spaces, so the
derived
path matches nothing and delete reports False.
Why the path rule was not fixed instead:
- EverOS has no user-facing memory deletion. Its one destructive
operation on a
skill exists to reap the directory an update left behind when it renamed
a
skill. Retirement is a design decision EverOS states and defers: its
extractor
lowers the confidence of a skill it wants retired, and the store writes
that
back as an ordinary skill.
- Episodes were the one kind the adapter could act on, through the
`deprecated_entries` frontmatter map EverOS itself uses, and that
answered
True. It still was not what the reader asked for: the section lists
through
`POST /api/v1/memory/get`, which does not filter `deprecated_by` the way
`/search` does. A retired episode left recall and stayed on the list, so
the
delete was reported as done and the row came back on the next load.
- Profiles and cases answered False throughout, so two of the four kinds
could
only ever report the same failure.
Removed: the armed delete button and its two call sites, the memory
source's
`remove` and the store's guard around it, the `memory.delete` method and
its
contract entry (193 wire methods to 192), the five catalogue strings,
the
offline fixture's parameters for the call, and the tests that drove all
of it.
`memory.*` is now the read-only surface its registration comment already
claimed, so `register_memory_methods` no longer takes a loop factory.
`MemoryBackend.delete` and the EverOS adapter that implements it are
left as
they are. Nothing calls them now; the backend contract test still holds
the
adapter to answering a bool, so a backend that grows a real deletion has
a
contract to meet when a UI for it is designed.
No doc, spec or screenshot in the tree names the removed control, so
none
needed updating.
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
Commands and results:
- `uv run --frozen --all-extras pytest tests/test_rpc_memory.py
tests/test_rpc_registration.py tests/test_rpc_schema_match.py
tests/test_rpc_contract_shapes.py tests/test_i18n_boundary.py
tests/test_memory_backend_protocol.py
tests/test_memory_backend_contract.py tests/test_cli_tui_bootstrap.py
-q` -> 506 passed, 0 skipped
- `npm test` (ui-web) -> 189 files, 2469 passed
- `npm run type-check` (ui-web) -> clean; `npm run lint` (ui-web) -> 0
errors (4 warnings, all pre-existing in connections / cron / subagents)
- `npm run gen:check` (ui-web) -> generated.ts matches the contract (192
methods); `npm run lint:rpc` and `npm run lint:i18n` (ui-tui) -> in sync
- `node scripts/check-css.mjs`, `node scripts/check-class-namespace.mjs`
-> OK
- `make check-source-language`, `make check-large-files`,
`scripts/check_commit_messages.py`, `commitlint` -> exit 0 each (checker
exit codes, not a pipeline's)
- Isolated acceptance run: a gateway on its own port with its own
`RAVEN_HOME`, reading the running EverOS. Settings -> Memory -> Know-how
-> the OCR entry opens with no button on it; the profile view has none
either; the gateway answers `memory.delete` with `-32601
method_not_found` while `memory.stats` still reports its 396 episodes.
- The assertion the removed tests carried was put back on the pick test
(a kind switch drops the picked memory) and checked by no-op-ing
`closeDetail`: red with the mutation, green without it.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
User-visible change: the memory section loses its delete control.
Nothing else
on the section changes; listing, semantic search, the kind switch and
the picked
memory all behave as before.
Wire change: `memory.delete` is gone from the contract, so a client that
still
calls it gets `-32601`. The TUI never called it, and the page's only
caller is
removed in this change.
Rollback: revert the commit. The backend implementation is untouched, so
the
control returns in the state it was in.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
N/A
Co-authored-by: gloryfromca <23442919+gloryfromca@users.noreply.github.com>
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
The provider split (#565) moved model picking to one body-level picker
surface and left the compact provider card to the onboarding wizard
alone, but the wizard's first step was not re-aligned with it. This PR
does that, keeping the step in the prototype's shape.
**Regression fix.** The picker now lives at the picker layer (46)
outside the wizard, so opening it from a role pill inside the wizard
(110) drew it behind the wizard. It is lifted the same way the confirm
veil already is while the wizard is shown, and the layer gate pins the
ladder (picker token below the wizard, base rule on the token, lifted
rule present).
**Wizard add block, aligned with the prototype and the catalogue page.**
- The vendor select shows the catalogue page's four groups (direct,
gateway, browser sign-in, local). One `groupOf` answers both the
wizard's select and the catalogue's filter, in the catalogue's order (an
aggregator first, whatever credential it takes), so the two cannot
drift; labels are the catalogue's and no i18n key is added. A new test
pins the buckets, that every vendor lands in exactly one, the
connected-first order and the search needle.
- An aggregator gets the address row the catalogue's connection card
already gives it, prefilled from its default base. The base is sent
whenever the field is non-empty, as before.
- When a device flow lands, the add form that started it closes:
pointing at a now-connected slug, it used to redraw itself silently for
the next unconnected vendor.
**The settings catalogue's columns.** Found while trying the catalogue
in the wizard, fixed where it lives: the provider catalogue sized its
grid with a max-height, which a grid's fr row does not resolve against,
so both columns grew to the vendor list's height and were clipped -- the
list could not scroll past the first seventeen vendors and the "pick
one" placeholder sat below the fold. A definite height bounds the row
track, so the list and the detail pane scroll on their own; a gate reads
the sheet and pins it.
Decisions for the reviewer:
- Local vendors keep their optional key row (the prototype has none). It
matches the catalogue's connection card and costs nothing; drop it on
request.
- Known debt, not addressed here: the wizard's add block duplicates
about sixty lines of form rules from the catalogue's connection card.
Folding them into one component is a follow-up.
- Two small inconsistencies surfaced by review, left for that same
follow-up: the vendor tag on the catalogue's detail card still says
"Local / self-hosted" where the filter and the wizard say "Local
deployment" (identical in Chinese), and three address-row conditions
carry an `endpoint` term that the kind helper already implies.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
```
cd ui-web && npm test # see the PR checks for the counts; includes the layer and catalogue gates
cd ui-web && npm run type-check # clean
cd ui-web && npm run lint # 0 errors, 4 pre-existing warnings (same on the base)
cd ui-web && node scripts/check-class-namespace.mjs # OK
```
Real host: a gateway from this branch under an isolated RAVEN_HOME,
driven by Playwright on the first-run wizard. Before: the picker
computed z-index 46 and the element under its centre belonged to the
wizard. After: z-index 111 and the element under its centre is the
picker's search field; the vendor select shows the four groups with the
same counts the registry gives the catalogue page (direct 25, gateway
21, browser sign-in 4, local 5). In the settings dialog the catalogue's
columns measure one screenful and the list scrolls on its own (they
measured 2008px and were clipped before).
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
- [ ] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
UI only. The lift rule applies only while the wizard is open. The
settings dialog changes in two places: its catalogue columns are bounded
and scroll (they were clipped before), and its filter reads the shared
grouping, which files every one of the registry's 55 vendors exactly
where the old predicate did (recomputed over the registry). The store
change touches only the OAuth poll's success branch. Rollback is a plain
revert.
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
Draws the onboarding wizard's agents step with the Agent Hub's rows.
took the agents page to the hub prototype but left the wizard's third
step on
the old settings page's two-bucket rows, with classifiers of its own and
a
toast for a refused connect -- two looks and two classifications for the
same roster.
The hub's row, its one control, the dot and the section block move out
of
`ExtAgentsPage.tsx` into `Rows.tsx`, and the wizard draws them in two of
the
hub's three sections -- available first, then connected -- from the
hub's own
`sectionOf`. So a refusal stays on the row in red with Retry, a connect
in
flight says so on the row, and a stale preset asks the hub's question
before
it migrates. The one new seam is `onOpen`: the page passes the sheet
opener,
the wizard passes nothing and gets a plain row.
What stays the wizard's, as decided for #523: no sheet (a step is a
decision, not a roster to manage), no "not installed" section and no
openai
row, and the step counts itself done on an external agent alone, so the
shipped ravens are drawn as connected without completing it. One
classifier
now: `wizardSection` narrows `sectionOf` and `isFound` reads it; the
wizard-only predicates and toast verbs are gone with their tests. The
wizard's duplicate section labels leave the catalogue for the hub's
identical
ones, and the TUI copy is regenerated. In the class-namespace gate the
extAgents pin drops to the one `.pmhero` the page still writes: `.kd`
and
`.sulist` were the old step's alone, and nothing names them now.
Connectivity itself is untouched: the adapter pins, the probe and the
credentials an agent needs are the sub-agents module's, and the step
inherits
whatever lands there through the same `subagents.*` calls.
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
```
cd ui-web && npm test # 190 files, 2549 tests passed (40 gates included)
cd ui-web && npm run type-check # clean
cd ui-web && npm run lint # 0 errors
cd ui-web && node scripts/check-class-namespace.mjs # OK
cd ui-web && npm run build && python3 build.py # boot goldens 251/252 match
cd ui-web && npm run gen:check # generated.ts matches the contract
npm run lint:i18n --prefix ui-tui # generated catalogue up to date
```
Real host: a fresh RAVEN_HOME served from this branch, walked with
playwright
to the agents step -- the two sections drawn with the hub's rows (Claude
Code
and Codex available with their catalogue lines, the four shipped ravens
connected), rows without a button role, Connect on Claude Code showing
"connecting" on the row and then landing (the adapter pin on the base is
current now), the step's primary lighting up; the hub page opened beside
it
draws the same rows in its three sections.
Base merge (refactor/ui_web_architecture at ccd32f97, one merge commit
on
this branch): npm test 189 files / 2471 tests, type-check, lint, the
class
gate, build + build.py (boot goldens 235 nodes), gen:check and lint:i18n
all green; the real-host walk repeated on the merged head with the same
result, and Codex shows the disabled Unauthorized control after the
re-scan
(the base's #595 stage, carried by the shared rows).
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
Behaviour changes, wizard only: a refused connect is red text on the row
with
Retry rather than a toast, and -- the hub store keeping failures per row
--
that row stays red on the agents page too until the next write on it; a
preset the probe has not measured yet is offered like the hub offers it;
a
connected row counts towards the step whatever its probe says; a shim
preset
whose binary is absent is out of the step (the hub's "not installed").
The
agents page is unchanged in markup and behaviour except that only a row
that
opens the sheet shows the hand cursor and the hover. Rollback is
reverting
the squash commit; no config or wire change.
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
Eight items on the conversation view, on top of
`refactor/ui_web_architecture`.
- **The answer footer was invisible for good, not just at rest.**
`.turn.ai > .ansfoot .acts` is four classes and the reveal it was paired
with, `.turn:hover .acts`, is three, so the transparent rule outweighed
the hover and the copy and branch buttons never came back. Measured on
the running page: `opacity` stayed `0` with `.turn:hover` matching. The
footer now fades as one element at the turn level, which is also the
shape the reference design gives it. Its button hover colours already
matched the design and now actually show.
- **The permission popover** takes the reference design's geometry and
type: 268px wide, 7px/9px rows at an 8px radius, the name at 13.5px
going from 500 to 600 when it is the one in force, the hint at 11.5px in
`--faint`, and a 14px amber tick with a 2px stroke. The per-row shield
and the filled band behind the chosen row are gone. `gui.perm.smart_h`
and `gui.perm.full_h` are reworded to the design's sentences, in both
languages, and the tui catalogue is synced.
- **The boot splash and the favicon** are the flat raven mark
(`ui-web/src/assets/raven.png`), square so a browser tab cannot stretch
it, with the bird 68px of the 86px box and the rest transparent. The
splash mark was sized for the old 960px illustration; at 111px square it
renders the bird at the size it did before without upscaling much past
the file. The mark is a silhouette, so it inverts on the dark ground -
down both theme paths, the way the page's own mono marks do - and
`raven-dark.png` is the same drawing inverted, behind a `media` query on
a second icon link, because the favicon has the same problem against a
dark tab strip.
- **The back-to-bottom pill** centres on the transcript column rather
than on the chat. With the anchored desk taking a strip off the chat's
right edge, the pill sat half that strip, 162px at the default panel
width, right of the text it marks.
- **The wash moves from `.chat` to `.main`,** so a desk pane shares the
conversation's ground instead of standing on flat `--page` two pixels
beside it. That seam ran the full height of the window whenever a pane
was open. `--page` is the wash's own last layer, so nothing changes
where no gradient stop reaches.
- **The inline rename field sizes to the name in it.** It opened at
`min(420px, 52%)` however long the name was, so a two-word conversation
got a field with most of it empty paper. `field-sizing: content` makes
the input measure its own value; the cap stays the heading's own, so a
rename cannot widen the header past where the title already sat, and a
7ch floor keeps a field you have just emptied from collapsing to a
sliver.
- **The desk reserve leaves the scroll container alone.** Its three
columns now take the same inset as `max-width: min(cap, 100% - R)` plus
`translate: -R/2`, which is the same geometry case for case and does not
relay the transcript out on every frame of the animation.
That last one is a partial answer to a reported render glitch in the
message list when panes open and close: two cards of the same width
225px apart with a clean horizontal break between them, which is a stale
raster band rather than two layouts. It did not reproduce here -
hundreds of frames of pane and palette cycling at the reported window
size and with a wider dragged panel, checking every frame that the turns
agree on their offset and that the column tracks the composer, found no
disagreement. A padding animation on a scroll container is the standing
suspect, so this removes it; it is offered as a plausible fix, not a
confirmed one.
Three judgement calls worth a reviewer's eye:
1. `gui.perm.full_h` first took the reference design's "no restrictions"
wording, which review caught as a false security model - and it was: the
waterfall in `raven/permissions/gate.py` returns builtin denials and
user deny rules BEFORE it reads the mode, so `PermissionMode.FULL`
bypasses the ask tier and nothing else, which is what
`PermissionsConfig` documents. The hint now keeps the design's
dangerous-operation warning and drops the claim about the standing
denials.
2. The popover keeps its note ("takes effect from the next tool call").
The design's menu is generic - the effort chip opens the same one - and
has no slot for it, but the sentence is real information.
3. The popover heading keeps the page's own `.lab` face rather than the
design's plain sans, because `#tierPop` opens from the chip next door
wearing the same heading and one of the two in a different face is worse
than either.
`ui-web/src/assets/ravens/main-agent.webp` is now unreferenced, as the
other four in that directory already were. Left in place rather than
deleted on my own.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run in `ui-web/` on the rebased branch:
- `npm test` - 189 files, 2462 cases, all passing.
`scripts/gates/desk-reserve-css.test.mjs` is rewritten: it pinned the
old `padding-right` on `div.scroll` by literal, and now pins the
cap-and-slide pair, the composer's `36px + R`, the pill's centring, and
that the scroll container itself carries no inset.
- `npm run type-check` - clean.
- `npm run lint` - 0 errors, 4 pre-existing
`react-hooks/exhaustive-deps` warnings, none in the touched files.
- `npm run build` then `python ui-web/build.py` - page assembled, both
boot goldens match (235 nodes each).
Measured in Chrome against the dev server, stub fixtures, rather than
asserted:
- the answer footer reads `opacity: 0` at rest and `1` with the turn
hovered, the button at `--text` on `--surface`;
- the transcript column, the composer card and the pill share one centre
with the desk closed (986) and open (824, reserve 324);
- the clamped narrow-window case lands the column's left edge on the
scroller's, which is what the old padding did;
- the popover measures 268px with the row metrics above and no shield;
- the rename field measures 135px for an eight-character name where it
used to take 420, caps at 420 for a 200-character one, and holds its
56px floor when emptied, at a 1177px header;
- the splash mark renders 111x111 from an 86x86 file, and the favicon is
served as `image/png`.
- the splash mark resolves to `invert(1) drop-shadow(...)` over a
#1d1d1d ground down both the explicit-dark and system-dark paths and to
the shadow alone down both light ones, and the dark icon link matches
only under `prefers-color-scheme: dark`;
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
All of it is the conversation view's paint. The two that could bite
beyond it:
- A `translate` makes its element a containing block for positioned
descendants. Nothing in the scroller's three columns depends on an outer
one today - measured on the running page, one absolutely positioned
element and it sits inside its own positioned parent - but a new
`position: fixed` inside the transcript would be re-based by it. The
comment beside the rule says so.
- The wash on `.main` is inherited by anything that later renders there
without a ground of its own. The module pages are opaque fixed layers
and are unaffected; dark theme resolves to its own flat gradient.
`gui.perm.full_h` is the one wording change a reader could act on, and
item 1 above is the caveat.
Rollback is per item: each is one or two rules in
`ui-web/src/styles/page.css`, except the popover markup
(`ui-web/src/chrome/PermPopover.tsx`, `ui-web/src/state/perm.ts`), the
two catalogue strings, and the new asset with the two references to it
in `ui-web/src/page.html`.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
Co-authored-by: KT <74288668+0xKT@users.noreply.github.com>
Brings the web UI to the updated prototype in three parts.
**Playbooks is gone.** The domain, its page row, rail button, source
seam, fixtures and live gate. The `load_playbook` references in
`features/dag/` and `features/tasks/` stay: those are runtime facts, not
this page's.
**Schedules, channels and memory are sections of the settings dialog**
rather than module pages. The rail keeps two rows, the More fold and
`state/navfly.ts` are gone, and the settings nav is twelve sections.
Each of the three is drawn in a shared two-pane frame
(`components/TwoPane.tsx`), so the channels modal and the memory drawer
go with them: inside a dialog both were a layer over a layer, and the
list each covered is what a reader comparing two entries needs to keep.
Three decisions worth a reviewer's eye:
- The three islands stay their own React roots, mounted into boxes
`App.tsx` renders beside `#spanels`, because a root inside the settings
island's tree would be unmounted the moment the reader picked another
section. Which one is on screen is `data-section` on the veil, written
by the settings island on every draw.
- A domain that is a section registers what arriving at it costs on
`state/settings.ts`'s `onEnter`, and what leaving costs on `onLeave`, at
its own module evaluation. Registering those from `app/install.ts`
instead pulled three island stores into the page's own wiring and
roughly doubled the module-graph load of the transcript's own test.
- `#jobVeil` moved above `#setVeil` in the body order. The new-job sheet
is raised from inside the dialog now, and the two veils share a `--z`
step, so the order they sit in is the whole of the stacking decision.
**The delivery row and the scheduled turn are the prototype's.** A
delivery row is a capped name and a dot-and-one-word verdict. A graph's
verdict now comes out of the counts line inside its fence, so a run that
partly failed no longer reads as "finished" -- a graph's own status is
always `ok`, because the manager reports placement rather than outcome.
Its receipt is drawn as the two things it is: the machine block in the
mono face, then one captioned section per terminal node.
A turn a timer opened is the reader's own side of the thread, outlined
rather than filled because nobody typed it, headed by a chip and
carrying the instruction that fired. Only part of that entry is a
reader's to see: `cron_stack.py` writes four parts and two of them were
written for the reader (the parenthetical, whose own docstring says so,
and `Scheduled instruction:`), while the header and the closing "when
you reply, mention ..." are wording aimed at the model. An origin whose
shape nothing reads leaves the chip standing alone rather than guessing.
The offline fixture library gains three scheduled conversations, which
is where those two rows can be read at all. Between them they carry the
cron chip and all five verdicts a delivery row has: a spawn that
returned, one that failed, a graph that partly ran, one that was
stopped, and one whose node is waiting on a decision. That also takes
`session.resume`'s `origin` and `delegated` off the fixture gate's
UNSENT list.
Rebased onto `refactor/ui_web_architecture` after #565 landed the
provider/model split. Where the two met, this branch takes that one's
shape: its `pages/Provider.tsx`, its `ProviderSide`, its `openModels`
name and its nav wording. This branch adds the three sections around it.
Known follow-up, not in this change: there are now two two-pane frames
in the dialog. #565's `.settings-tp` is the settings domain's own, and
`components/TwoPane.tsx` is the shared one the other three domains use,
which cannot import a sibling's private components. Converging them
means lifting `.settings-tp` into the component.
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
Run from `ui-web/`:
- `npx vitest run` -- 188 files, 2452 tests, all passing. Includes the
gates under `scripts/gates/`.
- `npx tsc --noEmit -p tsconfig.json` -- clean.
- `npm run lint` -- 0 errors, 4 warnings, all of them pre-existing
`react-hooks/exhaustive-deps`.
- `node scripts/check-class-namespace.mjs` -- OK.
- `npm run build && python build.py` -- both boot snapshots match their
goldens.
Run from the repo root, over `45e11b4f3..HEAD`:
- `python scripts/check_source_language.py` -- exit 0.
- `python scripts/check_large_files.py` -- exit 0.
Checked by hand in Chrome against the prototype, light and dark: all
twelve settings sections, the two-pane detail in each, the channels scan
wizard, the new-job sheet over the dialog, and both message styles
across the three scheduled conversations.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
`ui-web/CONTEXT.md`, `CONTRIBUTING.md` and `README.md` are updated for
the vocabulary and the tables that moved. No screenshots attached:
`AGENTS.md` section 7 bars image assets from the repo.
User-visible, and deliberately so:
- The playbooks page is gone. Nothing in the rail or the settings dialog
reaches it any more. Rolling back is reverting this commit; the
runtime's playbook support is untouched.
- Schedules, channels and memory are no longer rail destinations.
Anything that linked to them by page now opens the settings dialog on
the matching section.
- The three `gui.deleg.delivered*` strings are shorter, because the row
is a dot and a word rather than a sentence.
- A turn a timer opened now shows the job's instruction, which it did
not before. It still shows none of the wording written for the model.
No wire change: no new RPC method, no new field read, no contract edit.
The catalogue gains eight keys and shortens three. Rollback is a single
revert.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
On security: the delivery fold still draws only what sits inside the
untrusted fence, and the scheduled turn draws two named lines of a
reminder rather than the entry's text. Both are narrower than what
shipped before, not wider.
N/A
---------
Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
## Summary
A tester's report, in two halves: after a rebuild the browser may still
show the old page, and after a `git pull` nothing rebuilds the page or
says that it is stale. This PR closes both.
**A rebuilt page reaches the tab.** `raven serve` sent `dist/index.html`
from `/` with an ETag and a Last-Modified date but no Cache-Control. A
browser then guesses a freshness lifetime from that date (about a tenth
of the file's age) and answers a navigation to `/` from its cache
without asking the server. The sign-in page at `/auth` ends by
navigating the tab to `/` (`location.replace('/')` after the nonce
exchange), and a browser answers that navigation from the copy it still
guesses fresh, so a rebuilt or upgraded page kept opening as the build
before it until a hard reload. Three rebuilds in a row went unseen this
way on the architecture branch; a released install is exposed the same
way after `raven upgrade` whenever `raven web` is run again inside that
guessed lifetime, which for a weeks-old install is days. The assets
already carried `Cache-Control: no-cache` for exactly this reason (the
provider icons, 2026-09-11); the same `on_response_prepare` hook now
covers `/` too, registers whenever the page is served rather than only
when an assets directory exists, and `no-cache` keeps the 304 path (an
unchanged 1.3 MB page still costs no bytes; `no-store` would re-download
it on every navigation). The upgrade watcher's HEAD probe of `/` already
used `cache: 'no-store'` and was never affected.
**A stale page says so.** Only a source checkout can serve a page older
than the code beside it: `ui-web/dist` is git-ignored, so a pull brings
`ui-web/src` and the message catalogue but not a rebuild, and the served
page silently stays on the old build. `resolve_ui_dist` now judges that
the way make would, by mtime: when the checkout's `dist/index.html` is
older than anything under `ui-web/src` (tests, the `src/test` harness
layer and snapshots excluded, since they change without changing the
page), than the build's own files (`build.py`, `vite.config.ts`,
`package.json`, `package-lock.json`, `icon/raven.svg`) or than
`i18n/messages.json`, it logs one WARNING naming `make build-ui`, and
both page hosts (standalone `raven serve` and the gateway's page mount
behind `raven web`) hand that judgement to `build_app`, which answers
`/` with `X-Raven-Page-Behind: sources` -- asked per response, so a
rebuild takes the header away without a restart. The page's existing
30-second HEAD probe of `/` reads it and raises the rail-foot notice row
with a third wording, "Stale page build / How to rebuild"; the click
opens the confirm sheet with the command instead of reloading a page
that would come back the same, and the row goes back down when a later
look no longer carries the header. It outranks the rebuilt-page notice
("UI updated on disk / Reload"), because the reload that one offers
would come back behind as well: the row asks for the rebuild first, and
the probe that sees it land hands the row to the reload. A newer release
outranks both. The wheel's copy ships beside the code it was built with,
so a `raven web` user of an installed raven never sees the warning or
the header.
The terminal alone was not enough for the hint: `raven web` detaches the
gateway and its log goes to `web.log`, so the page is the one place both
launch paths can show it.
Also in this change: `showUpNote` now writes the row's two texts through
one `wording(kind)` helper (four `textContent` writes down to two), so
the DOM-touch ratchet's pin for `app/updates.ts` drops from 4 to 2 and
the debt row in `ui-web/CONTRIBUTING.md` follows. The TUI's generated
copy of the catalogue (`ui-tui/src/i18n/messages.generated.ts`) is
regenerated for the four new keys, which its `lint:i18n` gate requires.
Reviewed before opening by read-only panels (HTTP caching semantics,
aiohttp mechanics and test quality, page integration, completeness),
with adversarial refutation of every blocking claim; what survived is
in. One follow-up came out of it and is deliberately not here:
`/files/download` (raven/rpc/transports/deliverables.py) has the same
shape as the page had -- ETag and Last-Modified, no Cache-Control, a
token URL that stays the same when the deliverable is regenerated,
fetched by `<img src>` and `<a download>` in default cache mode. Same
one-header fix, separate PR.
## Type
- [x] Fix
- [ ] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Run from the branch checkout, base
`origin/refactor/ui_web_architecture`:
- `uv run --frozen --extra dev pytest tests/test_cli_serve_commands.py
tests/test_rpc_transport.py tests/test_cli_gateway_page.py -q` -> 133
passed in 5.06s
- `make lint-python` -> `ruff check`: All checks passed!; `ruff format
--check`: 2019 files already formatted
- `make test-python` -> 24034 passed, 109 skipped in 254.85s
- `npm run --prefix ui-web gen:check` -> generated.ts matches the
contract (189 methods); `npm run --prefix ui-web type-check` -> clean;
`npm run --prefix ui-web lint` -> 0 errors (5 pre-existing react-hooks
warnings in files this PR does not touch)
- `npm test --prefix ui-web` -> 189 files, 2594 tests passed in 19.68s
(includes the new `src/app/updates.test.ts` and the `state-dom-touch`,
`i18n-keys`, `first-frame-literals` gates)
- `npm run --prefix ui-tui lint`, `lint:rpc`, `lint:i18n`, `type-check`,
`test`, `build` -> 0 errors (23 pre-existing warnings), both generated
tables in sync, 144 files / 2074 tests passed in 12.19s, bundle built
- `npm run --prefix ui-web build`, `python3 ui-web/build.py`, `node
ui-web/scripts/check-page.mjs`, `node ui-web/scripts/check-css.mjs`,
`node ui-web/scripts/check-class-namespace.mjs` -> all OK, both boot
snapshots match their goldens
- `uv run pre-commit run --from-ref origin/refactor/ui_web_architecture
--to-ref HEAD` -> every hook Passed or Skipped; commitlint,
`scripts/check_commit_messages.py`, `scripts/check_large_files.py`,
`scripts/check_source_language.py` -> OK
- Live, `raven serve` from this branch with an isolated `RAVEN_HOME`:
`curl -sI http://127.0.0.1:<port>/` answers 200 with `Cache-Control:
no-cache` and an ETag, the same request with that ETag in
`If-None-Match` answers 304 also carrying the directive; with
`dist/index.html` backdated below its sources the startup log carries
the WARNING and the same request adds `X-Raven-Page-Behind: sources`,
which disappears after `touch dist/index.html` with no restart;
`/assets/raven.svg` carries `no-cache` and never the behind header
- Live, both install shapes for the no-cache half: a wheel built from
this branch and installed into a fresh venv (`resolve_ui_dist` resolves
to the venv's `raven/ui/dist`), and the `raven gateway --page-port`
child that `raven web` starts from a source checkout -- both answer `/`
with `no-cache` and 304 with the directive
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed
(`ui-web/CONTRIBUTING.md` debt row; the notice text itself is in the
catalogue)
## Risk
- [x] Security impact considered (two response headers on `/`; the
behind header only ever appears on a source checkout and names no path;
auth, origin checks and the nonce flow are untouched)
- [x] Backward compatibility considered (browsers now send If-None-Match
on each navigation and get a 304 for an unchanged page; `build_app`
gains an optional keyword; no RPC contract or config change)
- [x] Rollback path is clear for risky changes (revert the three
commits)
A tab that already holds the old copy does not see the new header until
it next asks the server: it may open the old build once more, until a
hard reload or until its guessed lifetime runs out. Verify from a fresh
browser profile or after one hard reload, not from the tab that showed
the bug. The mtime judgement is make's: a checkout or pull that rewrites
a source file with unchanged content also makes the page read as behind
until the next `make build-ui`, which is a spurious warning rather than
a missed one.
## Related Issues
N/A
---------
Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
## Summary
The settings dialog's Model page answered two questions at once -- which
accounts this install holds, and which model each job runs on -- and it
listed the connected providers only, so the fifty-odd vendors Raven
supports were reachable through a dropdown inside an "add" form and
nowhere else. This splits the page in two, gives every model a kind, and
merges the two model pickers into one.
**Model providers** is a two-column page. The left column is every
provider `model.options` returns (fifty-five on a stock registry,
`hosted_vllm` and `custom` among them) with a search box and six filters
-- connected, direct vendors, aggregators, browser sign-in, local --
connected rows first and each carrying its vendor mark. The right column
is that provider's connection, beside the list rather than paged into.
**Model settings** keeps the roles card alone, and each of its eleven
slots offers its own kind: the embedding slot lists embedding models,
image lists image models, and a chat model appears in neither.
**Adding a model** is a popover under its button. It fetches the
vendor's list, groups a gateway's ids by vendor, counts the kinds
present over the current search result and filters to the one pressed,
and writes one model per click rather than collecting ticks for a
confirming press. An id the vendor does not list is typed into the same
box with a chip saying what kind it is.
**One picker.** `components/ModelPicker` (164 lines, the roles card's)
is deleted; the roles card opens the composer's. What an opening lists
is now an `Offer`: a kind, the providers the caller allows, a title, the
pair it marks, and what a pick means.
### Two decisions worth reading
**The kind narrows each provider's column, never the provider list.** A
tester reported that a provider with a working key but no model list
built vanished from the composer's picker, and the model the chip named
-- set by onboarding, never "added" -- was in no column to be marked. So
a provider with nothing of the offered kind is listed with a count of
zero and a column that says so plus a row to type an id into; and the
model a slot or the conversation currently holds is listed in its
provider's column even when that column does not carry it. Verified on a
real host: with `agents.defaults.model` set to an id absent from
`providers.deepseek.models`, the picker opens on DeepSeek and lists it
first, marked, and writes nothing.
**One classifier, in Python.** `registry_data.kind_of` files a model by
what it writes, and `ModelLabel.kind` carries that answer to the page;
nothing in TypeScript derives a kind from capabilities or modalities.
The one exception is the chip on a typed id, which guesses from the name
-- a translation of `inferred_tags`, with a nine-row table asserted on
both sides so the copy cannot drift.
### Backend
Two read-only, additive fields on `model.options`: `ModelLabel.kind` and
`ModelOptionProvider.gateway` (the registry's `is_gateway`, which no
client can derive from a slug). No new method, no new config key.
Contract first: `openrpc.json`, then pydantic, then the handlers, then
`npm run gen`.
### Not in this change
The three navigation entries the prototype also adds (channels, cron,
memory); the prototype's OAuth pane, which tells the reader to run a CLI
command -- the browser device flow stays; backend enforcement of kinds,
which remains a filter the page applies; the onboarding wizard, which
keeps rendering `providers/Providers.tsx` untouched; the TUI.
## Type
- [ ] Fix
- [x] Feature
- [ ] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other
## Verification
Rebased onto `refactor/ui_web_architecture` at 6062b3678 and re-run
after the rebase.
```
uv run pytest tests/test_rpc_model.py tests/test_provider_registry_data.py tests/test_rpc_schema_match.py -q
630 passed in 12.44s
(cd ui-web && npx vitest run)
Test Files 186 passed (186)
Tests 2552 passed (2552)
(cd ui-web && npx tsc --noEmit && npm run gen:check && npm run build && python3 build.py)
generated.ts matches the contract (189 methods)
boot-snapshot: OK (250 nodes match golden)
boot-snapshot: OK (251 nodes match golden)
make check-source-language; make check-large-files; npm run lint:i18n --prefix ui-tui
i18n: generated catalogue is up to date
uv run ruff check raven tests
All checks passed!
```
Mutation checks on the two new backend fields: commenting out the
`"gateway"` line fails `test_options_rows_carry_the_gateway_flag` on
`KeyError: 'gateway'`; commenting out the `"kind"` key fails
`test_model_labels_carry_a_kind` on `KeyError: 'kind'`. Restored, `git
diff` clean.
Driven on a real host (`raven serve` on its own home and port 18899,
real keys for DeepSeek / OpenRouter / Gemini, a real browser):
- Model providers draws 55 rows in two columns of 286px and 462px, the
three connected ones first with a status dot, DeepSeek carrying the
default badge, 54 vendor marks and one lettered tile (`custom`).
- The embedding slot's picker lists all three connected providers with
counts 1 / 0 / 0 and exactly one model. It is at the body, not inside
the dialog, at z-index 46 over the veil's 40.
- The add-model popover against OpenRouter's live catalogue: 534 models,
kind tabs reading all 534 / text 445 / image 52 / embedding 33 / audio
4, five vendor groups, the four seeded models checked. Typing
`my-team/bge-custom` offers it with an "embedding" chip, which is what
`inferred_tags` answers for that name.
- The composer's chip lists the same three providers with OpenRouter
counted 1: its embedding, reranker and image models are not offered for
chat.
- [x] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [ ] User-facing docs or screenshots are updated when needed
## Risk
Composer users see two changes: embedding and reranker models leave the
model chip's picker, and typing an id there now adds it to the provider
before switching. Settings users learn two navigation entries where
there was one; `settingsTab.id` values written elsewhere still land on a
model page, since the roles page keeps the id `model`.
A model the registry classifies wrongly -- an embedding model with no
`embedding` tag whose name the two patterns miss -- is invisible to the
embedding slot until an overlay states its kind. The add-model popover's
chip is the way to state it.
Rollback: the two wire fields are additive and optional on the reader's
side; the section split is a data change in `SECTIONS`; the deleted
picker is one `git revert` away.
One gate pin moved: `fixture-shape`'s `UNSENT` list loses its six
`model_labels` entries, because the offline fixtures now send them (a
page that filters by kind needs a kind offline too). The gate's own
message asks for exactly this.
- [x] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes
## Related Issues
N/A
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>