perf: widget counters, conditional Focus, Container primitives, size-aspect MediaQuery - #225
Conversation
…ads; profile-safe resolvers
…m primitives, size-aspect MediaQuery A gestureless WAnchor around a WDiv installs Focus only when the className carries focus:. WDiv's non-animated Container is replaced by Container.build's own primitives in the same order, skipping a zero Padding. WindContext and WDiv read MediaQuery.sizeOf, so a keyboard inset no longer rebuilds every styled widget.
… only Both read MediaQuery.of(context).size, so a shell that swaps its tree on wScreenIs(context, 'lg') rebuilt on every frame of a keyboard animation. They now read MediaQuery.sizeOf, as do WPopover's and WSelect's flip checks; wind no longer reads the whole MediaQueryData anywhere.
The widgets rule still described the Container WDiv no longer builds, and w-anchor did not say that adding or dropping a focus: class at runtime remounts the children below.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds performance counters across Wind widgets, changes WDiv focus tracking and non-animated box composition, uses size-specific MediaQuery reads, and enables debug and performance resolvers in profile builds. ChangesWidget layout, focus, and performance
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Merge Risk: ⚪ Minimal · up to No actionable issue remains from the supplied evidence; the PR is ready for normal merge checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Profile builds can now opt into widget-state inspection that was previously limited to debug builds. Release builds remain excluded, but access to diagnostics in deployed profile builds needs an explicit policy. No externally reachable attack path was established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. Looks correct overall: Major
Minor
TestsThe new counters ( CI
Not reviewed line by line: the one-line |
…ing, keep resolver snapshots out of the perf counters
|
Round 1 fixes, all in a8cdf75:
Gates: @kodizm please re-review. |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. Looks good to merge: a8cdf75 deals with both earlier findings, and I found nothing new in it. Since the last review, I read only a8cdf75 (df6b5a2 to head).
Tests
CI
I did not read this commit's new |
What
WAnchoraround aWDivinstallsFocusonly when the className carriesfocus:(WAnchor.trackFocus).WDiv's non-animated box is built fromContainer.build's own primitives, in the same order; geometry is pinned againstContainer.MediaQuery.sizeOf:WindContext, theh-fullpaths, the grid fallback,wScreenIs,wScreenCurrent,WPopover,WSelect.Why
MediaQueryDatawas a dependency.Testing
flutter testgreen (1892), coverage 95.5%,tool/check-docs.pyclean.wrapperEmissions.Focusper WAnchor 1.00 to 0.62,wrapperEmissions.Containerper WDiv 1.14 to 0.10 on the dashboard.find.byType(Container)must readDecoratedBox(fixed in magic_starter in this set).Summary by CodeRabbit