Skip to content

feat(desktop): the window's source reads the Automations page and takes its presses - #1211

Merged
ajianaz merged 9 commits into
developfrom
feat/desktop-automations-source
Nov 24, 2026
Merged

ajianaz merged 9 commits into
developfrom
feat/desktop-automations-source

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

The app side of the Automations page in the window (#1033, board S6): the window's Source gives the page the automations driver's view and takes its three presses, the same way it does for Approvals. Nothing draws the page in the window yet; the shell wiring is the next change.

Why

The window must read what the app knows and never claim more. A source with no automations driver reads as the driver does before it has read anything (the list is not read, never empty), and a press with no driver is refused as NoServe and nothing is sent, so a press never looks as if it had worked.

Changes

  • ui/automations/call.rs (new): AutomationsCall (SetEnabled { id, enabled }, Select(id), DismissNotice; a press carries the id of the row, never "whatever is selected") and AutomationsRefused (NoServe, Busy). Plain data, reachable without the drawing feature.
  • ui/status.rs: Source::automations (default: not loaded) and Source::automations_call (default: NoServe), and the forwarding for a shared source.
  • app/mod.rs, app/window.rs: backend_automations and the app's implementation, which calls the driver handle (set_enabled, select, dismiss_notice) and maps a full or stopped inbox to Busy.
  • ui/automations/mod.rs, ui/mod.rs: the call module is always compiled; the drawing modules stay behind gpui on unix.
  • app/tests_automations.rs (new): with no serve the page is not read and every press is refused; with a serve whose cron routes refuse, the page says it could not read the list (never an empty one) and a press is taken.

Testing

  • cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings and cargo clippy -p tole-desktop --all-targets --features gpui -- -D warnings on Rust 1.100: no errors.
  • cargo test -p tole-desktop --lib: 689 passed (2 new).
  • scripts/desktop-check.sh: ok; Windows simulation (-D warnings, with and without gpui): ok.

…utomations table needs (#1033)

A run that passed is green, one that failed is red, one that stopped to ask, hit its limit, was interrupted or ended in a way nobody taught the model is amber, and a cancelled one or one with no result yet is neutral. The column widths and the size of the on/off switch are tokens, the Dismiss word is in the string table, and a generic holder of one focus handle per control that Tab visits is added for the pages whose model decides the order. Nothing draws them yet.
…ells in two small files (#1033)

The page asks its host for three things: the id of the row the owner picked, the id of the switch the owner used, and that the notice was dismissed. It also keeps a focus handle for each control Tab visits, in the order the model gives. The table cell, the small text under a name and the ink of a tone are shared by the rows and the page. Nothing draws the page yet.
…age (#1033)

The switch is drawn from a track and a knob. It shows the state the serve last reported, is dimmed while its call is out, and changes only when the serve answers. The page also has the line that stands where the table would be (checking, could not read, or the empty list, with the server's words under a failure), the warnings under the table, and the button that dismisses the notice about the last press. Nothing draws the page yet.
A row shows the name with its notes and warning, when it runs, its folder, the next run, the colour and words of the last result, and the switch. A press on the row is reported to the host as the id of the row, and the row is a stop for Tab. Nothing draws the page yet.
…ote about the scheduler (#1033)

The page is a pure function of the driver's view: the title, the count at the right of the top bar only for a list that was read, the table or the line that stands in its place, the notices, and the note about where automations run. Nothing calls it yet; the window comes next.
…es its presses (#1033)

The source gives the page the driver's view (a list that was not read reads as not read, never as empty) and takes three presses by the id of the row: turn a switch on or off, pick a row, dismiss the notice. With no serve for the automations driver a press is refused as NoServe and nothing is sent; with a driver it is taken and the outcome is the next view. The call types are toolkit-free and reachable without the drawing feature.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit cdc6366 into develop Nov 24, 2026
36 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