Skip to content

feat(desktop): Rune pages for Approvals, Automations, Skills and Connected tools (S5 to S8) - #1433

Merged
ajianaz merged 23 commits into
developfrom
feat/rune-pages-approvals-automations-skills
Dec 5, 2026
Merged

ajianaz merged 23 commits into
developfrom
feat/rune-pages-approvals-automations-skills

Conversation

@ajianaz

@ajianaz ajianaz commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Four pages of the native Rune desktop (Track F, epic #1378, F3): Approvals with the approval card (boards S4 and S5), Automations (S6), and Skills and Connected tools (S7 and S8), each written model first, with its presses recorded for the host to take and its states drawn from the model's own values.

Why

The shell and the home page (#1428) were the only Rune pages; every other section said "not built yet". These three pages carry the owner's decisions (an approval card, a switch that pauses a job, the review of a new skill), so they come before the live host. The boards were lost with an unpushed branch and are rebuilt here.

Refs #1378. It does not close the GPUI issues (#1032, #1033, #1034): the GPUI views stay, frozen, until the Rune parity gate.

Changes

  • desktop/ui/src/approvals/: the card for every kind of request (create, replace, delete, command, outside the working folder, unknown tool, from a helper), long and hostile targets, expired, sending, allowed, technical details; the Waiting and Decided tabs with every empty, unknown, unreachable, partial and refused state. An answer is sent once: the model's ApprovalsState::answer decides and the host takes take_approval_decision. Return does not press an answer button (Space does), so an Allow is never one stray key away.
  • desktop/ui/src/automations/: the table with its switch, the count, the scheduler note, the history, the link to Approvals. Presses go by exact id into a bounded FIFO queue (32), taken with take_automations_call. The pause or resume decision is the model's (ToggleDecision).
  • desktop/ui/src/skills/: the Skills groups and the Connected tools tab, trust state, every tab state, the sidebar count (only above zero, unknown is ?, never 0). Only tab switch and Refresh exist: the model is read-only by design and the page points to tole skills approve and tole plugin approve.
  • Shared hot spots, additive: focus.rs (Stop variants), pages.rs, model.rs (ShellModel fields), scenes/mod.rs, lib.rs, tests/focus_order.rs, tests/shell_scenes.rs, desktop/README.md.
  • crates/tole-desktop-model, additive: an AutomationsView mirror of the driver's view with badge, stops, select and toggle_decision; an automation is never unnamed; Tab::ALL and SkillsPageState::new_count.
  • Behaviour change in a shared rule: plain::hidden (used by printable and clean_text, so by the GPUI views too) was narrower than tole-core's sanitize::is_unsafe. It now also drops the soft hyphen, U+2061..U+2064, U+206A..U+206F, the filler characters, the blank braille cell, U+180E and the tag characters (so the England, Scotland and Wales subdivision flags draw as the plain flag, as tole-core already treats them). plain::is_hidden_char is the full predicate and approvals::summary uses it instead of its own copy; a unit test spells out the set and checks the edges outside it. docs/threat-model.md is updated to match.
  • Counts: 31 Approvals, 13 Automations and 23 Skills scenes; the harness table (256) holds them.

Code intelligence (AGENTS.md section 4), for the shared predicate: cora callers hidden resolves by bare name and mixes in unrelated functions of tole-core and tole-cli; checked by grep, the callers of plain::hidden in tole-desktop-model are is_hidden_char, clean_text and printable. printable is called from the model's list and task modules, the GPUI views and these pages; the tests of tole-desktop-model, tole-desktop and desktop/ were all run (below). No public item was moved, renamed or removed.

Testing

Run on the final head:

  • cargo fmt --all -- --check in the root and in desktop/: clean.
  • cargo clippy --locked --all-targets -- -D warnings in desktop/, and -p tole-desktop-model -p tole-desktop in the root: clean.
  • cargo test --locked --no-fail-fast: desktop/ 226 passed, 0 failed; -p tole-desktop-model -p tole-desktop 1079 passed, 0 failed.
  • scripts/arch-check.sh, scripts/arch-check.sh desktop (largest file 456 of 500 lines) and scripts/desktop-check.sh all: ok (the literal warnings are advisory and in frozen GPUI files).
  • git log origin/develop..HEAD --format=%B | sh scripts/ci/message-patterns.sh: prints nothing.
  • No dependency and no deny.toml change, so no cargo deny run.

Cora as the agent's reviewer (scripts/review-local.sh --agent, fresh read-only reviewers that did not write the code, answers merged with scripts/cora-agent-review.py finalize; CI Cora Review is skipped while CORA_PAUSE is set, so this is the review evidence):

  • Round 1, the whole branch in 10 chunks: 9 findings in the code and 13 in the tests, none critical or major. Eight code findings and all test findings were fixed with regression tests: the open history wiped on re-select, an Approvals clock that only a tick moved, a doubly announced landmark, a refusal line that was never cleared, a single call slot that lost presses, a switch rule copied out of the model, an automation that could have an empty accessible name, a duplicated card_title. One finding was answered instead of fixed: the unselected Skills tab reports not-selected through Toggled::False (aria-selected="false"); a Rune focus_group, which would give selected=false, makes the two tabs one Tab stop and breaks the model's focus order (three tests fail), so the test now asserts what is reported.
  • Round 2, the fixes (2 chunks): 3 minor findings, all fixed with tests: a late tick moving the clock back, a not-sent report leaving its line for the owner's return, and, the one with effect, the narrow plain::hidden set above.
  • Round 3, the last changes (3 chunks): no code finding; one wording finding in docs/threat-model.md, fixed. Docs are excluded from Cora by .cora.yaml; that edit was read by me and not reviewed again.
  • finalize still prints the cora index's deterministic findings (index-unused-import, index-dead-code, index-breaking-change). Each reviewer checked them against the source: all are false positives (imports that are used, #[test] functions, helpers moved to a shared test module); the build runs clippy with -D warnings, which fails on an unused import.

Not verified: no real window, no GPU render and no pixel comparison with boards S4 to S8 (the machine has no GPU adapter); layout is checked through the accessibility tree and element rectangles. IME, screen readers and high DPI were not tried. Nothing takes the pages' calls from a live serve yet: that is the live-host PR.


…b list, as model rules

SkillsPageState::new_count adds both tabs and is unknown while either is
(the rule the app and the scenes each wrote inline); Tab::ALL lists the
tabs in the order of the focus targets.
A read-only page drawn from the model's SkillsPane: the tabs and Refresh,
the four groups of the Skills tab, the trust state of each tool, every
body a tab can have, the model's tab order, and one scene per state
including a hostile one. Tab and Refresh are recorded for the host to take;
approving and trusting stay terminal commands, as in the model.
…he note

A different pick closes the technical details instead of reopening them when its card comes back. The expired card scene reads on the Decided tab, the long target sample is over the display bound so the model cuts it, notices carry their key on the note itself, and the diff gutter hides the line number from the accessibility tree.
Three test files read the real window's accessibility tree: the page against the model's words in every scene, the card for every kind of request and state and that an answer is sent once, and Tab against the model's page stops.
…Approvals Tab order

The answer tests move to approvals_answers.rs with the helpers in tests/approvals_common, which keeps every file under the 500-line cap. focus_order.rs gains a test that the page's stops follow the shell's and match the model's page_stops.
… presses in the model, never leave an automation unnamed

- AutomationsView::select on the row that is already open asks for a fresh
  read and keeps the entries and the load state, as the driver does.
- AutomationsState::toggle_decision (and AutomationsView::toggle_decision)
  apply the pause and resume rules without changing anything;
  request_toggle uses it, so a host that only records the press asks the
  model which state to request.
- AutomationRow::name is never empty: a name that cleans to nothing is the
  cleaned id, then the string table's UNNAMED word.
… press queue and model-owned switch rule

Approvals:
- The clock an answer is judged by moves with every action that carries a
  time, never back, so it is current before the first tick.
- The "nothing was sent" line goes when another card or tab is shown, the
  section is left or the card can no longer be answered.
- The visible "all folders" text is hidden from the tree: the list
  landmark already carries it.

Automations:
- Presses queue (at most 32, oldest dropped); take_automations_call pops the
  front and pending_automations_calls counts them.
- The switch press asks AutomationsView::toggle_decision for the state to
  request and puts the model's notice on a blocked resume.
- Picking the open row again no longer wipes its history.
- The hostile scene gains two rows whose names clean to nothing.

Tests: the long-target cap, the hostile character set, the outside-folder
title, the Tab walk of a new card, shared helpers, the chip drawn but hidden,
the model's own top line, every stop has a key, the page scroll and the
clock and refusal rules.
… the page queues

- skills_hostile uses the model's exact hidden-character set and the corpus
  gains U+2060 and U+061C.
- skills_focus walks real Tab presses to the focus scenes' controls.
- shell_scenes requires a non-empty name.
- skills: the unselected tab is asserted through its toggled state; the
  selected property is left unset on purpose (see the test comment).
- README notes the Automations queue and the Approvals clock and refusal
  rules.
…from displayed text

plain::hidden missed the soft hyphen, U+2061..U+2064, U+206A..U+206F, the filler characters, the blank braille cell and the tag characters, which tole-core's sanitize::is_unsafe escapes. Text drawn by the list pages could carry them. A test now spells out the shared set, and is_hidden_char gives view tests a real oracle.
…t-sent line

approvals_tick no longer sets the clock unconditionally, so a late tick cannot move it back. A not-sent report that arrives after the owner left the section no longer leaves its line waiting for the owner's return. The hostile-text tests use the model's own predicate.
…the approval summary

approvals::summary::is_hidden and the Rune card test now use plain::is_hidden_char instead of copies. The pin test also checks the characters just outside each range stay visible. docs/threat-model.md no longer says the plain cleaning is narrower than the approval text.
@ajianaz
ajianaz merged commit 2e1f100 into develop Dec 5, 2026
44 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant