Skip to content

Animate the FX Viewer favicon during active runs - #160

Merged
softmarshmallow merged 1 commit into
mainfrom
chore/viewer-active-favicon
Nov 21, 2026
Merged

softmarshmallow merged 1 commit into
mainfrom
chore/viewer-active-favicon

Conversation

@softmarshmallow

Copy link
Copy Markdown
Member

User problem

Several FX Viewer tabs can look alike at a glance when one run is still executing.

Closes #158.

Resulting behavior

  • The active run tab shows a green tile behind the f(x) mark. The tile pulses between two shades and stays bright with reduced motion.

  • The viewer returns to the standard icon when execution ends or the runner disappears. Resuming the run restores the activity indicator on the same tab.

  • I added an Unreleased entry to CHANGELOG.md.

Affected scenarios

Watch a run alongside a saved plan and a completed run. Leave a tab open across completion or resume. Inspect an unfinished record after its runner has exited, or use the viewer with reduced motion enabled.

Before and after

Previously, all three tabs showed the same light/dark wordmark. In the demo, the rightmost tab gains a green tile during execution and returns to the standard wordmark at completion.

Demo and evidence

Chrome tab strip showing a completed run, a plan, and a live run whose green favicon pulses and clears on completion

Captured from Chrome for Testing with the provider-free viewer observation fixture. Watch the rightmost tab.

  • I included a working demo, or explained why one is not applicable.

How to test

bun --no-env-file run build:viewer
bun --no-env-file x playwright-core install chromium
bun --no-env-file run test:viewer:browser

To inspect actual Chrome tabs, build the engine and run the project service demo. Open the plan and let the baseline run complete. Start the variant, then watch it alongside the other two tabs. While the variant is active, enable reduced motion and confirm that its green tile stays steady.

Verified in Chrome and Chrome for Testing with the native engine. The Rust workspace tests, viewer unit tests, embedded viewer check, and observation and control checks passed.

Caveats

Browsers may throttle animation in background tabs. The indicator uses verified local runner activity and follows the viewer's observation polling cadence.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fx Ready Ready Preview Nov 20, 2026 12:10pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The viewer now verifies whether a matching run is executing and reports that status to browser clients. The browser uses the status to animate the viewer favicon, with a static active icon when reduced motion is enabled.

Changes

Run activity indicator

Layer / File(s) Summary
Verify active run ownership
crates/grida-fx-runtime/src/control.rs
The runtime validates the run owner and adds is_executing, which confirms activity through an inspect handshake.
Report verified activity
crates/grida-fx-viewer/src/lib.rs, crates/grida-fx-viewer/src/tests.rs, spec/service.md
The viewer reports verified activity in qualifying snapshot and empty event-batch responses. A Unix-only test checks matching and mismatched invocations and owner shutdown. The service specification documents the header.
Carry activity through observation
web/fx-web/src/observation.ts, web/fx-web/src/controller.ts
The observation reader reads the activity header and optionally filters event requests by invocation. The controller tracks activity and clears it on errors and refresh.
Update and verify the activity favicon
web/viewer/src/run-favicon.ts, web/viewer/src/main.tsx, tools/check_viewer_browser.mjs, docs/guide/07-viewing.md, CHANGELOG.md, AGENT_READINESS.md
The viewer updates the favicon from controller activity, handles page lifecycle events, and supports reduced motion. Browser checks cover activity changes and navigation. Documentation and the changelog describe the indicator, and the readiness evidence includes the browser check.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature · Severity of issue fixed: Low

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant ViewerAPI
  participant RuntimeControl
  participant ObservationReader
  participant ViewerController
  participant RunFavicon
  Browser->>ViewerAPI: Request snapshot or event batch
  ViewerAPI->>RuntimeControl: Check matching run execution
  RuntimeControl-->>ViewerAPI: Return execution status
  ViewerAPI-->>ObservationReader: Return response and activity header
  ObservationReader-->>ViewerController: Provide activity status
  ViewerController-->>RunFavicon: Update favicon activity
Loading

Possibly related PRs

  • gridaco/fx#145: Adds the viewer favicon that this change updates with active-run states.
Merge Risk: Minimal · up to 7fb2f

The viewer tab icon now pulses green while a run is verified as executing, and returns to the standard icon otherwise. The change is additive and falls back safely when the runner cannot be verified, so I found no remaining merge-blocking risk.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #158 requires: (1) an animated accent on the f(x) mark while a run executes; (2) resume on resumed execution; (3) static favicon for plans, idle or inactive runs, and terminal states, with anima… Confirm that web/viewer/public/favicon-active.svg and web/viewer/public/favicon-active-dim.svg preserve the light/dark treatment from #145 and that the reduced-motion static state uses the active variant. This check requires a reviewer …
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title "Animate the FX Viewer favicon during active runs" names the main change: the viewer favicon animates while a run is executing. The changeset adds RunFavicon, active-run signaling through th…
Description check Passed The description follows the repository template's main sections: What changed, Why, and Verification. It also adds a user problem, resulting behavior, affected scenarios, demo evidence, test commands,…
Out of Scope Changes check Passed All changed areas connect to the #158 feature. run-favicon.ts, main.tsx, controller.ts, and observation.ts implement the client-side indicator. control.rs and lib.rs provide the verified r…
Full details: Title check

Explanation

The title "Animate the FX Viewer favicon during active runs" names the main change: the viewer favicon animates while a run is executing. The changeset adds RunFavicon, active-run signaling through the x-fx-run-active header, and controller and observation updates that drive the favicon. The title is specific and concise, and it does not cover the header or reduced-motion details, which is acceptable.

Full details: Description check

Explanation

The description follows the repository template's main sections: What changed, Why, and Verification. It also adds a user problem, resulting behavior, affected scenarios, demo evidence, test commands, and caveats. The template's Product & UX pointer is not used, but the author's content fits the viewer-appearance change. The 'What changed?' section does not list the code changes directly. It describes the resulting behavior instead. The 'Why?' section is labeled 'User problem' and gives the motivation. The description is mostly complete.

Full details: Out of Scope Changes check

Explanation

All changed areas connect to the #158 feature. run-favicon.ts, main.tsx, controller.ts, and observation.ts implement the client-side indicator. control.rs and lib.rs provide the verified run signal, and the control.rs discover_owner extraction supports is_executing without changing the operate behavior. The tests and tools/check_viewer_browser.mjs verify the feature. spec/service.md and docs/guide/07-viewing.md document the new header and behavior. AGENT_READINESS.md and CHANGELOG.md record the scenario and the Unreleased entry for this feature. No unrelated change was found in the summary.

Full details: Linked Issues check

Explanation

Issue #158 requires: (1) an animated accent on the f(x) mark while a run executes; (2) resume on resumed execution; (3) static favicon for plans, idle or inactive runs, and terminal states, with animation stopped on state change or navigation; (4) a static active-state variant under reduced motion; (5) preservation of the light/dark treatment from #145; (6) swapping reusable static SVG frames without cache-busting URLs.

Evidence from the summary supports most coding requirements. web/viewer/src/run-favicon.ts alternates two active frames every 650 ms when reduced motion is not preferred, and holds the active frame when it is. setActive(false) restores the idle URL. main.tsx drives the icon from runActive and disposes on pagehide. crates/grida-fx-runtime/src/control.rs is_executing returns true only for running or cancel_requested phases after a successful handshake. crates/grida-fx-viewer/src/lib.rs sets x-fx-run-active only for unfinished snapshots and matching owners. The frames use stable URLs with no cache-busting parameter. An automated Rust test and browser checks cover active, reduced-motion, completion, and resume behavior.

The requirement for the light/dark treatment and the content of the static reduced-motion variant depend on web/viewer/public/favicon-active.svg and web/viewer/public/favicon-active-dim.svg. These paths are excluded by the !**/*.svg rule in ignored_files, so their contents were not reviewed. The light/dark treatment and the static active-state appearance cannot be verified from reviewable evidence.

Resolution

Confirm that web/viewer/public/favicon-active.svg and web/viewer/public/favicon-active-dim.svg preserve the light/dark treatment from #145 and that the reduced-motion static state uses the active variant. This check requires a reviewer to inspect those excluded SVG files directly or to view the rendered tab in both color schemes. No code change is indicated by the current evidence.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 14c93de8-2e3a-444f-8a1e-954ea64c4972
Commits

Reviewing files that changed from the base of the PR and between d303a6d and 7fb2f41.

Files ignored due to path filters: 2

  • web/viewer/public/favicon-active-dim.svg is excluded by !**/*.svg
  • web/viewer/public/favicon-active.svg is excluded by !**/*.svg
Files selected for processing: 12

  • AGENT_READINESS.md
  • CHANGELOG.md
  • crates/grida-fx-runtime/src/control.rs
  • crates/grida-fx-viewer/src/lib.rs
  • crates/grida-fx-viewer/src/tests.rs
  • docs/guide/07-viewing.md
  • spec/service.md
  • tools/check_viewer_browser.mjs
  • web/fx-web/src/controller.ts
  • web/fx-web/src/observation.ts
  • web/viewer/src/main.tsx
  • web/viewer/src/run-favicon.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@softmarshmallow
softmarshmallow merged commit e295da7 into main Nov 21, 2026
14 checks passed

This branch was successfully deployed

1 active deployment
Preview — 7fb2f411 Deployed Nov 20, 2026 by vercel[bot]
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.

Animate the FX Viewer favicon while a run is active

1 participant