Turn the dev status bar into a Linear-style developer toolbar - #7263
Merged
Conversation
Drop the react-scan dependency and observe React commits directly through a minimal devtools hook installed before react-dom loads. The bar now counts renders itself, draws its own fading purple outlines with component labels, and lists the most rendered components in the RENDERS tooltip. Because the hook is ours, this also works in staging builds, not just under Vite. Remove the macOS-native Devtools panel (Swift NSPanel, windows plugin commands and event, settings section) and expose the same actions from a dropdown on the bar's channel badge: onboarding and instruction flows, toast and OTA previews, notification previews, billing dialogs, countdown sessions, the recurring-notes seeder, and the error trigger. Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
✅ Deploy Preview for anarlog canceled.
|
|
|
ComputelessComputer
marked this pull request as ready for review
September 2, 2026 18:15
Restyle the bar as a neutral dark strip with a colored channel dot, a plan badge, and threshold-colored values, and add the health metrics Linear's toolbar exposes: Jank (share of long frames, bar chart), Delay (worst main-thread stall via timer drift) and Net (HTTP requests in flight, IPC excluded). Tooltips are now styled and informative: IPC lists the most invoked Tauri commands, Renders the most rendered components, and the others show avg/min/max over the window. Add a collapse control that persists, a one-click diagnostics snapshot copied as JSON (build, device, metrics, top commands and components, CloudSync status), and Theme / Toggles submenus in the channel menu so display-affecting settings can be flipped in place like feature flags. Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2c5dbd7. Configure here.
Each submenu now opens with a one-line description of what the group is for, and every item shows a short explanation in a tooltip beside the submenu while hovered, so the actions and toggles are self-explanatory. Co-authored-by: John Jeong <ComputelessComputer@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Problem: After #7259 the developer tooling was still split three ways: the new status bar, React Scan as its own floating toolbar (Vite dev only, third-party dependency), and the Devtools actions in a separate macOS-native NSPanel that other platforms never got. The bar itself also only covered FPS/IPC/memory and had none of the health signals or controls Linear's internal toolbar is built around.
Fix: Remove React Scan and the Devtools panel, fold their features into the bar, and grow the bar into a proper developer toolbar modelled on Linear's (
Prod · user · internal · flags … Mem · Delay · Jank · Net · ↓ · _).Developer bar while typing in a note
The bar
Neutral dark strip, monospace, 24px. Left to right:
DEV/STAGING, version and short git hash. Click opens the devtools menu (below).free/trial 12d/pro/lite, orsigned out; tooltip lists subscription status, payment method and entitlements.↑invokes /↓callbacks per second. Tooltip lists the most invoked Tauri commands (e.g.plugin:db|execute ×3), the Tauri equivalent of Linear's network panel.IPC tooltip listing Tauri commands
The menu
Clicking the channel badge opens a dropdown with, at the top, Theme (system/light/dark) and Toggles — one-click switches for display-affecting settings (floating bar, sidebar folders/tags, tray and dock icons, notification kinds). This is the closest Anarlog equivalent of Linear's feature-flag tiles: flip a build between two states without leaving the current view. Below that are the former Devtools panel groups: Navigation, Toasts, OTA, Notifications, Billing, Countdown, Data (recurring-notes seeder, previously unwired) and Error, with the same handlers as before (
devtools-bar/actions.tsx).Every group and item is self-describing: each submenu opens with a one-line description of what the group is for, and hovering an item shows a short explanation in a tooltip beside the submenu.
Devtools menu with group description and item tooltip
Render tracking without react-scan
devtools-bar/render-hook.tsinstalls a minimal React DevTools global hook (or chains onto React Refresh's in Vite dev) and must stay the first import ofmain.tsx, since React only reports commits to a hook that exists before react-dom evaluates. With no subscribers it costs a no-op call per commit, so it is safe in every build.render-tracker.tswalks only the part of the fiber tree React worked on (skipping subtrees whosechildpointer is unchanged, the same pruning React DevTools uses), countsPerformedWorkcomposite fibers, and resolves their nearest host nodes;render-outlines.tsdraws fading purple rectangles with labels on a fixed canvas. The bar marks its own subtree as ignored so tooltips, menus and dialogs it renders never show up in counts. Because the hook is ours, this works in staging (production React) too, which react-scan could not do.Render outlines while typing
Removed
react-scandependency and its bootstrap inmain.tsx(lockfile updated).DevtoolsPanelManager/DevtoolsPanelView, thedevtools_panel_show/hidecommands andDevtoolsPanelActionevent inplugins/windows(bindings and permissions regenerated), their capability entries,devtools-panel/host.tsx, and the Settings → Developers "Devtools panel" section (Lingui catalogs regenerated).Copy in the bar is English-only on purpose: it never ships in stable, so it is kept out of the Lingui catalogs.
Verification
pnpm -F desktop typecheck,pnpm -F @anlg/plugin-windows typecheckpnpm -F desktop test— 435 files / 3728 tests pass, including tests forrender-hook,render-tracker(mount/update pruning, subtree ignoring),metrics(IPC per-command counts, HTTP in-flight tracking, self-exclusion, tick sampling) and the bar (tones, plan badge, menu actions and descriptions, outline toggle, copy, collapse persistence)pnpm exec oxlint --quiet --format=github apps/desktop/src/— 0 errorslingui extract --clean+lingui compile --strict— catalogs stable. Note:@lingui/cli6 silently no-ops on Node < 22.18 (import.meta.main), so this was run with Node 22.23; CI'snode-version: "22"resolves to a current 22.x.pnpm exec dprint checkon changed files;pnpm install --frozen-lockfilepassescargo test -p tauri-plugin-windows(regenerates bindings/permissions, committed).cargo clippy --no-deps -D warningson the plugin reports only pre-existing findings in untouched code.tauri devbuild on Linux compiled and ran. Manually verified in the app: live FPS/Jank/Delay/IPC/Net/Mem with charts, FPS turning amber under load, idle Renders at 0 and rising while typing with labelled outlines, all tooltips (IPC listingplugin:db|execute ×N, Renders listing components),↓showing "Diagnostics copied" and pasting valid JSON,_collapsing to a strip and expanding again, Theme switching to dark and back, Toggles flipping "Sidebar tags" with the menu staying open, group descriptions and item tooltips in every submenu without breaking hover/click, and the action groups (toast preview, trial dialog, error trigger) working.swift build --package-path plugins/windows/swift-lib(macOS only; Swift changes are file deletions plus removal of the matchingRustBridgesymbol and test stub) andcargo check -p desktop --features direct-distribution|app-store.To show artifacts inline, enable in settings.