Skip to content

Agent: one short call for an eased hover, used everywhere - #1577

Closed
AnthonyRonning wants to merge 1 commit into
codex-gpuibump-motion-corefrom
codex-gpuibump-motion-hover
Closed

AnthonyRonning wants to merge 1 commit into
codex-gpuibump-motion-corefrom
codex-gpuibump-motion-hover

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Fifth PR of the stack. It changes how a hover background is written, not how it looks.

What changed

One call. .hover_bg(color) replaces hover_background(element, rest, hover). It reads the resting background from the control itself, so a call site no longer restates the colour it just set with .bg(..):

// before
.when(is_selected, |row| row.bg(gpui::rgb(theme::bg_sidebar_row_selected())))
.map(|element| {
    let rest: gpui::Hsla = if is_selected {
        gpui::rgb(theme::bg_sidebar_row_selected()).into()
    } else {
        gpui::transparent_black()
    };
    crate::ui::motion::hover_background(element, rest, gpui::rgb(theme::bg_sidebar_row_hover()))
})

// after
.when(is_selected, |row| row.bg(gpui::rgb(theme::bg_sidebar_row_selected())))
.hover_bg(gpui::rgb(theme::bg_sidebar_row_hover()))

All 36 call sites are converted, and the two colours can no longer drift apart.

Every hover eases. Nine hover backgrounds still changed in a single frame, most of them in Settings code that merged after the motion branch was cut: the catalog cards and tiles, the usage chart's bars and range pills, the theme pills, the ACP example tabs, the effort reset button and two transcript controls. They now ease like the rest.

motion::reveal(element, visible) fades a control in place. The sidebar's section chevron was using a hover between two transparent colours to get that.

Behaviour

No colour or timing changes. Two details:

  • The danger button now sets its own fill; before, only the hover painted it.
  • The Settings catalog card gained an element id, which the eased hover needs to keep its state.

Validation

On macOS, at this head: cargo test -p maple-agent-app --locked with -D warnings: 1,485 passed, 0 failed, 3 ignored, and the repository pre-commit hook passed.

Not verified

A running app. The nine newly eased controls in particular have only been compiled and tested, not looked at.

🤖 Generated with Claude Code

`.hover_bg(color)` replaces `hover_background(element, rest, hover)`. It
reads the resting background from the control itself, so a call site no
longer restates that colour beside the `.bg(..)` that set it, and the two
cannot drift. The 36 call sites shrink from a five-to-nine-line `.map`
block to one line each.

The nine hover backgrounds that still changed in a single frame (the
Settings catalog cards and tiles, the usage chart's bars and range pills,
the theme pills, the ACP example tabs, the effort reset button and two
transcript controls) now ease like the rest.

`motion::reveal(element, visible)` fades a control in place; the sidebar's
chevron used a hover with two transparent colours to get that.

No colour or timing changes. The danger button sets its own fill now
instead of relying on the hover to paint it.

Co-Authored-By: Claude <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning removed this pull request from stack #1574 November 12, 2026 03:37
@AnthonyRonning

Copy link
Copy Markdown
Contributor Author

Folded into #1575. The rework of the motion layer (springs and timing, the hover call, the shared composer numbers and the send fixes) is one PR now instead of four. This commit is unchanged and is on that branch.

@AnthonyRonning
AnthonyRonning deleted the codex-gpuibump-motion-hover branch November 14, 2026 16:22
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