Repository navigation
feat(desktop): the window's source reads the Automations page and takes its presses - #1211
Merged
Merged
Conversation
…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.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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
The app side of the Automations page in the window (#1033, board S6): the window's
Sourcegives 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
NoServeand 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") andAutomationsRefused(NoServe,Busy). Plain data, reachable without the drawing feature.ui/status.rs:Source::automations(default: not loaded) andSource::automations_call(default:NoServe), and the forwarding for a shared source.app/mod.rs,app/window.rs:backend_automationsand the app's implementation, which calls the driver handle (set_enabled,select,dismiss_notice) and maps a full or stopped inbox toBusy.ui/automations/mod.rs,ui/mod.rs: the call module is always compiled; the drawing modules stay behindgpuion 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 warningsandcargo clippy -p tole-desktop --all-targets --features gpui -- -D warningson 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 withoutgpui): ok.