Skip to content

perf: smooth hunt transitions - #18

Merged
slate-rehm merged 1 commit into
masterfrom
perf/smooth-hunt-transitions
Aug 1, 2026
Merged

slate-rehm merged 1 commit into
masterfrom
perf/smooth-hunt-transitions

Conversation

@slate-rehm

@slate-rehm slate-rehm commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Reduce replay React updates to about 30 Hz.
  • Memoize settled DAG lanes and use binary frame lookup.
  • Remove unused per-chunk throughput and replay allocations.
  • Remove full-screen dialog backdrop blur.
  • Disable the implicit view-transition group animation.

Performance

A deterministic five-lane replay benchmark measured these changes:

  • React updates: 120 to 60
  • Lane renders: 600 to 60
  • Replay JavaScript workload: 1,785.96 ms to 293.48 ms
  • Processing replay client chunk: 1.92 kB to 1.47 kB

Checks

  • pnpm test
  • pnpm typecheck
  • pnpm typecheck:tsc
  • pnpm format:check
  • pnpm lint
  • pnpm build

CodeRabbit could not run because this environment has no API key. The build still reports the existing local Sentry token HTTP 401, but exits successfully.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Release notes

  • Replay updates now run at about 30 Hz.
  • The replay memoizes settled DAG lanes.
  • The replay uses binary frame lookup.
  • The replay removes unused chunk throughput tracking and allocations.
  • Dialog overlays no longer blur the page.
  • The main view-transition group no longer animates.
  • A five-lane benchmark shows fewer React updates, lane renders, and replay JavaScript work.
  • The benchmark also shows a smaller replay client chunk.
  • Tests, type checks, formatting, lint, and builds pass.
  • The build reports an existing Sentry token HTTP 401 and exits successfully.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 609ea062-94b8-4c4e-948b-e925adcc2a76

📥 Commits

Reviewing files that changed from the base of the PR and between 8d7080c and 3445c06.

📒 Files selected for processing (8)
  • src/components/ui/alert-dialog.tsx
  • src/components/ui/dialog.tsx
  • src/globals.css
  • src/routes/-hunt/hunt-client.tsx
  • src/routes/-hunt/processing-dag.tsx
  • src/routes/-hunt/processing-replay-panel.tsx
  • src/routes/-hunt/processing-step.tsx
  • src/routes/-hunt/use-hunt-run.ts
💤 Files with no reviewable changes (1)
  • src/routes/-hunt/hunt-client.tsx

📝 Walkthrough

Walkthrough

The change removes throughput-bus and chunk replay tracking, updates replay timing and snapshot lookup, memoizes loading lanes, removes overlay backdrop blur, and disables animation for the ew-main view-transition group.

Changes

Hunt replay flow

Layer / File(s) Summary
Frame-only replay capture
src/routes/-hunt/use-hunt-run.ts
Replay data now contains progress frames and duration only. Run execution no longer tracks throughput data or passes chunk callbacks.
Replay playback and lane rendering
src/routes/-hunt/processing-replay-panel.tsx, src/routes/-hunt/processing-dag.tsx, src/routes/-hunt/processing-step.tsx, src/routes/-hunt/hunt-client.tsx
Playback advances elapsed time with animation-frame deltas and uses binary search for snapshots. Processing lanes are memoized, and throughput-bus props are removed.

UI rendering styles

Layer / File(s) Summary
Overlay and transition styling
src/components/ui/alert-dialog.tsx, src/components/ui/dialog.tsx, src/globals.css
Overlay backdrop blur utilities are removed. The ew-main view-transition group no longer animates.

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

Sequence Diagram(s)

sequenceDiagram
  participant useHuntRun
  participant engine.run
  participant ProcessingReplayPanel
  participant ProcessingDag
  useHuntRun->>engine.run: capture progress frames
  useHuntRun->>ProcessingReplayPanel: provide frames and durationMs
  ProcessingReplayPanel->>ProcessingDag: update controlledNowMs
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary performance improvements to hunt replay and transitions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
error-wolf 3445c06 Aug 01 2026, 03:40 AM

@slate-rehm
slate-rehm merged commit 834cd14 into master Aug 1, 2026
4 checks passed
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