Skip to content

Add VS Code-style developer status bar to dev and staging builds - #7259

Merged
ComputelessComputer merged 4 commits into
mainfrom
cursor/dev-status-bar-9f71
Sep 2, 2026
Merged

Add VS Code-style developer status bar to dev and staging builds#7259
ComputelessComputer merged 4 commits into
mainfrom
cursor/dev-status-bar-9f71

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Problem: Dev and staging builds have no at-a-glance runtime signal in the window itself. Checking which build you are on, whether the UI is dropping frames, how chatty the frontend is with the Rust side, or whether memory is drifting means opening Web Inspector or the separate Devtools panel window. React Scan runs in dev, but as its own floating toolbar that is disconnected from the rest of the app chrome.

Fix: Mount a slim, Linear/VS Code-style status bar at the bottom of the main window whenever show_devtool is true (debug builds, dev/devtools features, and the com.hyprnote.staging bundle). Stable builds render nothing and the layout wrapper is the same one the Windows title bar already used. Segments, left to right:

  • Channel badgeDEV / STAGING with version and short git hash; whole bar is tinted per channel (blue = dev, amber = staging). Clicking it opens the existing Devtools panel window (macOS-only, same as the Settings → Developers button).
  • FPS — rAF-based, with a 30s sparkline pinned to 60.
  • IPC — Tauri traffic per second: invokes, callbacks (invoke responses, events, channel messages). Tauri freezes __TAURI_INTERNALS__, so this is observed from the outside: invokes are fetch calls to the ipc scheme, deliveries go through the exposed callbacks Map whose get we shadow. The bar's own memory poll is excluded.
  • RENDERS (Vite dev only) — React Scan component renders per second; click toggles re-render outlines. The bar's own components are marked ignored so it does not outline or count itself.
  • MEM — host process RSS via a new misc plugin command get_process_memory_bytes (sysinfo); sparkline is min/max scaled so slow growth is visible.
  • react scan (Vite dev only) — toggles React Scan's own toolbar (inspector, slowdown notifications). The toolbar is now hidden by default since FPS and renders live in the bar.

Developer status bar in the running dev build

Zoomed status bar: DEV 0.0.0 7df7853, FPS 62, IPC, RENDERS 0, MEM 313MB

React Scan bootstrapping moved out of main.tsx into devtools-bar/react-scan.ts. Note that React Scan only attaches in Vite dev because it relies on the devtools hook React Refresh installs before React evaluates; staging (production bundle) shows the bar without the React Scan segments. Enabling it there would need react-scan/install-hook loaded ahead of React behind a build-time channel flag, which is left as a follow-up.

Copy is English-only on purpose: the bar never ships in stable, so it is kept out of the Lingui catalogs.

Verification

  • pnpm -F desktop typecheck, pnpm -F @anlg/plugin-misc typecheck
  • pnpm -F desktop test — 430 files / 3692 tests pass, including new devtools-bar/metrics.test.ts and devtools-bar/index.test.tsx, and an updated main/shell-frame.test.tsx
  • pnpm exec oxlint --quiet --format=github apps/desktop/src/ — 0 errors
  • pnpm -F desktop i18n:check — no catalog diff
  • pnpm exec dprint fmt / dprint check on changed files
  • cargo test -p tauri-plugin-misc (regenerates bindings.gen.ts and autogenerated permissions, committed) and cargo clippy -p tauri-plugin-misc --tests -- -D warnings
  • Manual: ran turbo dev:desktop on Linux (WebKitGTK), skipped onboarding, confirmed the bar renders in the main shell, FPS/IPC/MEM update every second, RENDERS toggles to off and back, the react scan button mounts/unmounts React Scan's toolbar, and the bar no longer outlines itself while idle (RENDERS stays at 0).
  • Not run locally: cargo check -p desktop --features direct-distribution|app-store (the dev build compiled and ran; only the misc plugin's internal surface changed and init() is unchanged).

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 2, 2026 12:44
Add a get_process_memory_bytes Tauri command (sysinfo RSS of the current
process) with regenerated bindings and permissions, for the developer
status bar's MEM readout.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
Mount a slim bottom bar in the main window when show_devtool is true. It
shows the build channel, version and git hash (click opens the Devtools
panel), FPS, Tauri IPC traffic (invokes/callbacks per second), host
process memory, and, under the Vite dev server, React Scan render counts
with toggles for re-render outlines and the React Scan toolbar.

Move React Scan bootstrapping into devtools-bar/react-scan.ts and hide
its floating toolbar by default now that the bar embeds its metrics.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for anarlog canceled.

Name Link
🔨 Latest commit 561f111
🔍 Latest deploy log https://app.netlify.com/projects/anarlog/deploys/6a9850eb2ba20d0008d06435

@cla-assistant

cla-assistant Bot commented Sep 2, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

The bar re-renders once a second, so React Scan outlined its own segments
and counted them as renders. Mark each bar component's props as ignored so
outlines and the RENDERS counter only reflect the rest of the app.

Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
@ComputelessComputer
ComputelessComputer marked this pull request as ready for review September 2, 2026 13:30

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f60c556. Configure here.

Comment thread apps/desktop/src/devtools-bar/index.tsx Outdated
Wait for build metadata before rendering and use the mount-only metrics hook.
@ComputelessComputer
ComputelessComputer merged commit e60448b into main Sep 2, 2026
20 checks passed
@ComputelessComputer
ComputelessComputer deleted the cursor/dev-status-bar-9f71 branch September 2, 2026 16:54
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.

2 participants