Skip to content

feat(antigravity): reimagined pool alternating — smooth on-demand hover crossfade for dual & single pool modes - #184

Open
fix2it wants to merge 8 commits into
CodeZeno:mainfrom
fix2it:feature/antigravity-hover-crossfade
Open

fix2it wants to merge 8 commits into
CodeZeno:mainfrom
fix2it:feature/antigravity-hover-crossfade

Conversation

@fix2it

@fix2it fix2it commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary & Vision

This PR reimagines the previous timed 8s / 2s pool alternating feature, evolving it from an automatic background timer into an enhanced, interactive on-demand hover crossfade for the taskbar tile.

Background & Evolution

The original alternating mechanism allowed users to view both Antigravity pools (Gemini and Claude/GPT) by cycling them on an 8-second / 2-second timer.

While this solved the dual-pool visibility goal, experience showed that:

  1. Taskbar visual noise: An automatic timer cycling in peripheral vision creates unintended motion on the taskbar.
  2. Timing friction: When a user wants to check the secondary pool, they have to wait for the next timer cycle.
  3. Single-pool gap: When only one pool is enabled (e.g., solo Gemini), the secondary pool remained inaccessible from the taskbar without opening the settings menu.

The Reimagined Experience:
Instead of passive cycling, values remain rock-solid and stable at rest. Whenever the user needs to inspect the other pool, hovering the cursor over the Antigravity tile immediately and smoothly reveals it on demand — now working seamlessly for both dual-pool and single-pool setups.


What’s New & Enhanced

  1. On-Demand Hover Crossfade:

    • At rest: displays the primary pool stably (Gemini in dual mode, or the active pool in solo mode).
    • On hover: crossfades to the other pool's labels and gauges over a fluid 180 ms window.
    • On leave: crossfades back immediately with zero exit lag.
    • Single-pool support: solo Gemini now smoothly crossfades to reveal Claude/GPT, and vice versa.
  2. Engine & Performance Optimizations:

    • Continuous time-based animation (CrossfadeAnimation): replaces timer-tick-dependent steps with wall-clock interpolation (Instant::elapsed() / duration), ensuring 60 FPS fluidity regardless of Windows timer resolution or system load.
    • $O(1)$ Cached Hit-Testing (antigravity_tile_rect): bounds are cached and reused during WM_MOUSEMOVE, avoiding expensive recursive layout recalculations on every mouse pixel movement. Automatically invalidated on DPI changes, theme swaps, and provider toggles.
    • Tick pacing during mouse motion: crossfade ticks directly on mouse movement (throttled to 15 ms), preventing WM_TIMER starvation during active cursor movement.
  3. Codebase & Theme Polish:

    • Cleaned out legacy timer machinery (arm_crossfade_schedule, obsolete dual_mode gate leftovers).
    • compact-fluent-quad.json: unified value and pace-tick opacity expressions using antigravity.<pool>.opacity.

Testing & Verification

  • Theme Engine tests: added test cases for solo Gemini & solo External hover states, intermediate crossfade opacities (0.0, 0.25, 0.75, 1.0), and pace-tick opacity expressions (src/theme_engine/tests.rs).
  • Animation tests: unit tests directly validating CrossfadeAnimation timing, completion, and boundary clamps (src/window.rs).
  • Full Suite: 576 unit tests pass cleanly (cargo test).
  • Static analysis: 0 errors, 0 warnings (cargo check).

fix2it and others added 8 commits October 19, 2026 14:19
duration_short truncated to whole units, so 4d23h read "4d" and 59m40s
could not be told from 59m. It now rounds: half steps below 10 h and
10 d (1.5ч, 2.5д), whole units above, minutes clamped to 59 so the next
step is "1h", and 23h45m rolls over to "1d".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two UI text assertions followed the system language and failed on
non-English Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cap a stored Retry-After cooldown at 15 minutes instead of 24 hours.
- A manual refresh sends one real request when the cooldown is older than
  60 s; a success clears it. Automatic polls still respect the cooldown.
- When the poll succeeds overall but an enabled account failed, retry with
  the usual backoff (from 30 s, capped at the poll interval, not before the
  cooldown ends) instead of waiting the full interval; such a retry is not
  shown as an error.
- --diagnose logs each HTTP request as method, host and path with its
  status (no query or headers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A partial retry now needs a network error, HTTP 429 or HTTP 5xx. Missing
credentials, auth errors and other permanent failures no longer keep the
retry running, so the past-reset fast poll stays available for healthy
providers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw a 1 px tick on each Claude, Codex and Antigravity 5-hour and weekly
gauge in the compact theme at the share of the window that has elapsed
(remaining mode: 100 - elapsed). The engine exposes
{window}.expected / expected_display / expected_available. Settings menu
gets "Show pace" (on by default, display.show_pace binding).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allow a minute of slack past the window length so poll latency right
after a reset does not hide the tick; it sits at 0 instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssfade

Replaces the background 8s / 2s cyclical timer between Antigravity's
Gemini and Claude/GPT pools with an interactive, smooth hover crossfade
on the taskbar tile.

- Show primary pool at rest (Gemini in dual-mode, or the enabled solo pool).
- Smoothly crossfade to the secondary pool over 180 ms while hovered.
- Continuous time-based animation (CrossfadeAnimation) for fluid 60 FPS transitions.
- O(1) cached tile bounds hit-testing in WM_MOUSEMOVE with auto-invalidation on
  theme reload, DPI change, or provider count updates.
- Remove obsolete periodic timer machinery and dual_mode gate leftovers.
- Add comprehensive unit tests for dual and single pool crossfade modes.
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