Repository navigation
Agent: a running task traces its row instead of showing a coral ring - #1521
Draft
matthewrball wants to merge 3 commits into
Draft
matthewrball wants to merge 3 commits into
matthewrball wants to merge 3 commits into
Conversation
A running task showed a coral ring with a breathing dot beside its title, and a task waiting on a question showed a coral dot. The two states differed only by shape, and the ring read as a radio button. Give each state one channel: a running row traces its outline with two neutral comets that circle it, the only looping motion in the sidebar, and shows no glyph. Coral now only means a question is waiting. The green dot (finished unseen) and red alert (failed unseen) stay as they were. Rows from paired computers use the same treatment. The trace is ui::outline_trace, stroked paths on a canvas that fills the row. It adds no layout and takes no input. A moving arc steps visibly at the 15 fps loop rate, so motion::Ticker takes a per-loop rate through fps(). A view's coalesced repaint now follows its fastest pending loop: each request takes a generation, a faster one takes the view's slot over, and the timer it replaced stays quiet, so a view never runs two repaint chains whatever order its loops ask in. The trace runs at 30 fps. Reduce Motion and background windows still stop it on a rest frame, and thermal pressure still caps it at 6 fps.
In light mode a row's buttons filled with the selected-row colour on hover and with the hairline colour when pressed. On a selected row under the pointer the hover chip came out lighter than the row, and a press flashed near white. On a hovered row the press matched the row and showed nothing. Hover and press now lay the shared hover overlay and a new, stronger overlay_press over whatever the row is, so they always read one and two steps past it in either theme. The pin and overflow buttons use the same pair, and an open overflow button holds its press fill under the pointer. With a task's menu open, the pointer leaves the row for the menu, so the row lost its hover fill while the action strip kept it. The row now holds its hover fill while its menu is open, as a project header does, and the strip keeps covering the title behind the open button. The running trace and the needs-you dot were washed out on light: the running grey was 1.7:1 on a selected row and the coral 2:1 on the sidebar. The trace now draws in activity_trace, the running grey on dark and a darker pebble on light (3.3:1 on a selected row). The dot draws in attention, Maple coral on dark and maple-700 on light (3.1:1 on the sidebar). The contrast test now holds both to 3:1 on every resting surface. The shared selected fill, which also colours pressed controls and off toggles elsewhere, is unchanged.
A task waiting on the user and a task that finished unseen both showed an 8 px dot, told apart only by colour. The waiting mark is now a small coral dot in a soft coral halo with a solid coral edge; the finished mark stays a plain green dot, so the two differ by shape too. The edge keeps the shape readable on selected and hovered rows in light mode, where the halo fill alone fades into the row. The indicator and the running trace had no accessible name, so screen readers heard only a row's title and project. A task row's description now leads with its status (Running, Waiting for your answer, Last run failed, Finished, not opened yet), then its project details, on this computer's rows and a paired computer's alike. The description is cached per status and details, so the trace's repaints allocate nothing for it. English and Spanish. A row being renamed no longer draws the trace over its text field.
This branch has not been deployed
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.
Summary
A running task showed a coral ring with a breathing dot beside its title, and a task waiting on a question showed a coral dot. The two differed only by shape, and the ring read like a radio button. Each status in the sidebar now has its own signal:
ui::outline_trace: stroked paths on a canvas that fills the row, with no layout and no input.Animation frame rate
At the 15 fps loop rate a moving arc steps visibly, so
motion::Tickernow takes a per-loop rate throughfps(), and the trace runs at 30 fps. Each view still gets a single coalesced repaint, at the rate of its fastest pending loop. Every request carries a generation, so the timer of a replaced request stays quiet and a view never runs two repaint chains, whatever order its loops ask in. Reduce Motion and background windows still stop loops on a resting frame, and thermal pressure still caps them at 6 fps.Light mode
overlay_hoverand a newoverlay_pressinstead of solid fills. Before this, on a selected row under the pointer the hover chip came out lighter than the row, a press flashed near white, and on a hovered row a press didn't show at all.activity_trace(light#6e6f7e) andattention(light#e8633d, maple-700). The running grey had been 1.7:1 on a selected row and the coral 2:1 on the sidebar. The contrast test now holds both to 3:1 on every resting surface.Screenshots
Sidebar rows rendered with gpui's offscreen Metal renderer from the real row code. Before is
master; after is this branch. The rows are, top to bottom: running, needs you, running and selected, failed, finished, and no status.Light
Live debug app, light mode
From left to right: a waiting task while it's selected, the same task while another task is selected, and its row under the pointer with the action strip covering the mark.
The trace on a selected running row:
From left to right: the "…" button under the pointer, the task menu just opened, and the pointer moved into the menu. The row keeps its fill, and the open button stays pressed.
Validation
cargo test -p maple-agent-app --bin maple-agent: 1,346 passed, 0 failed, 3 ignored atea85e9fa. This includes the new geometry tests for the trace outline, the scheduler tests (a replaced timer never claims a newer request at its rate), the contrast test with the two new tokens, and the i18n catalog and translation-review tests.-D warningspasses onmaple-agent-app, for all targets with default features and for--no-default-features --features acp,proxy. It allowsunexpected_cfgsfrom theobjcmacros andclippy::nonminimal_boolin code this PR doesn't touch.cargo fmt --all -- --checkpasses.record_reviewed_translations, which is whatjust translations-reviewed esruns.help="Waiting for your answer. Untitled project"while the task waits, andhelp="Untitled project"after.just cididn't run on the pinned toolchain. Everything ran on rustc 1.96 through the shared Agent cache.Notes
chat-task-running,chat-task-needs-you,chat-task-failed,chat-task-finished-unseen, andchat-task-status-details, in English and Spanish.Merge order
Trial merges against the open PRs at their current heads are clean except #1515, the motion PR. Both PRs rewrite the
motion.rsmodule docs, both append a test module at the end ofmotion.rs, and both change the task rows insidebar.rsandsidebar_computers.rs. Whichever merges second needs a rebase.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.