Repository navigation
feat(desktop): Rune pages for Approvals, Automations, Skills and Connected tools (S5 to S8) - #1433
Merged
Merged
Conversation
…dge and the stops
…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.
…page's scenes in the README
…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.
…proval card differs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sApprovalsState::answerdecides and the host takestake_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 withtake_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?, never0). Only tab switch and Refresh exist: the model is read-only by design and the page points totole skills approveandtole plugin approve.focus.rs(Stopvariants),pages.rs,model.rs(ShellModelfields),scenes/mod.rs,lib.rs,tests/focus_order.rs,tests/shell_scenes.rs,desktop/README.md.crates/tole-desktop-model, additive: anAutomationsViewmirror of the driver's view withbadge,stops,selectandtoggle_decision; an automation is never unnamed;Tab::ALLandSkillsPageState::new_count.plain::hidden(used byprintableandclean_text, so by the GPUI views too) was narrower than tole-core'ssanitize::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_charis the full predicate andapprovals::summaryuses it instead of its own copy; a unit test spells out the set and checks the edges outside it.docs/threat-model.mdis updated to match.Code intelligence (AGENTS.md section 4), for the shared predicate:
cora callers hiddenresolves by bare name and mixes in unrelated functions of tole-core and tole-cli; checked by grep, the callers ofplain::hiddenintole-desktop-modelareis_hidden_char,clean_textandprintable.printableis called from the model's list and task modules, the GPUI views and these pages; the tests oftole-desktop-model,tole-desktopanddesktop/were all run (below). No public item was moved, renamed or removed.Testing
Run on the final head:
cargo fmt --all -- --checkin the root and indesktop/: clean.cargo clippy --locked --all-targets -- -D warningsindesktop/, and-p tole-desktop-model -p tole-desktopin the root: clean.cargo test --locked --no-fail-fast:desktop/226 passed, 0 failed;-p tole-desktop-model -p tole-desktop1079 passed, 0 failed.scripts/arch-check.sh,scripts/arch-check.sh desktop(largest file 456 of 500 lines) andscripts/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.deny.tomlchange, so nocargo denyrun.Cora as the agent's reviewer (
scripts/review-local.sh --agent, fresh read-only reviewers that did not write the code, answers merged withscripts/cora-agent-review.py finalize; CI Cora Review is skipped whileCORA_PAUSEis set, so this is the review evidence):card_title. One finding was answered instead of fixed: the unselected Skills tab reports not-selected throughToggled::False(aria-selected="false"); a Runefocus_group, which would giveselected=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.plain::hiddenset above.docs/threat-model.md, fixed. Docs are excluded from Cora by.cora.yaml; that edit was read by me and not reviewed again.finalizestill 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.