Skip to content

fix(remix,registry): stop RemixSidebar rebuilding on unrelated MediaQuery changes - #323

Open
leoafarias wants to merge 1 commit into
mainfrom
fix/remix-sidebar-media-query
Open

leoafarias wants to merge 1 commit into
mainfrom
fix/remix-sidebar-media-query

Conversation

@leoafarias

Copy link
Copy Markdown
Collaborator

Description

RemixSidebar read MediaQuery.maybeOf(context)?.disableAnimations, which subscribes it to every MediaQuery field, so it rebuilt on each keyboard-inset frame. It now reads only disableAnimations through MediaQuery.maybeDisableAnimationsOf; the value and the no-MediaQuery fallback (false) are unchanged.

The Agent loading glyph in the presets had the same read. Its preset source, the Vanilla and Fortal registry templates, and the installed dashboard and playground copies take the same one-line change. The Vanilla and Fortal SidebarLayout reads are left alone: MediaQuery.removePadding in the same widget subscribes it to the whole MediaQuery regardless, so narrowing those reads would change nothing (probed: one layout rebuild on a viewInsets change before and after).

Overlap: the reduced-motion PR (fix/remix-reduced-motion) replaces the same sidebar lines with its RemixReducedMotion helper; whichever merges second keeps that version.

Validation

  • New rebuild-count tests (debugOnRebuildDirtyWidget): a viewInsets change rebuilds neither the sidebar nor the loading glyph; a disableAnimations change rebuilds each once and takes effect (collapse settles, glyph stops). Both fail on the old read (Expected: 0, Actual: 1).
  • packages/remix suite (2832) and registry_source suite (1391): passed.
  • dart analyze (remix, registry_source), root dart format check, melos run ci:checks, open-code:registry:build (no drift), open-code:apps:check: passed.

Related Issues

Follow-up from the review of #319.


Checklist

  • My PR includes unit or integration tests for all changed/updated/fixed behaviors.
  • I have updated or added relevant documentation (doc comments with ///).
  • I am prepared to follow up on review comments in a timely manner.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

…uery changes

RemixSidebar read MediaQuery.maybeOf(context)?.disableAnimations, which
subscribes the sidebar to every MediaQuery field, so it rebuilt on each
keyboard inset frame. Read only disableAnimations through
MediaQuery.maybeDisableAnimationsOf.

The Agent loading glyph read the same field the same way. Its preset
source, registry templates, and installed dashboard and playground copies
take the same one-line change. The Vanilla and Fortal SidebarLayout reads
stay: MediaQuery.removePadding in the same widget subscribes it to the
whole MediaQuery regardless.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T00:30:48.139542Z 4daac33 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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