Skip to content

perf(webf): land layout optimization stack and follow-up fixes#898

Merged
andycall merged 2 commits intomainfrom
codex/widget-layout-reuse-fix
Mar 29, 2026
Merged

perf(webf): land layout optimization stack and follow-up fixes#898
andycall merged 2 commits intomainfrom
codex/widget-layout-reuse-fix

Conversation

@andycall
Copy link
Copy Markdown
Member

Summary

This branch lands the current layout optimization stack on top of main, plus the follow-up correctness fixes that came out of the rendering regression work.

Highlights:

  • land the flex layout profiling and optimization stack for WebF layout hotspots
  • fix widget layout reuse so stable proxy reuse does not depend on debug-only layout state
  • narrow detached-subtree width fallback so portal-mounted WidgetElement roots use popup/portal constraints without regressing CupertinoContextMenu preview sizing
  • avoid phantom trailing scroll range for transformed flex children with negative start-side offsets

Included Commits

  • ae3b84cf0 feat: add agent skills
  • 896c27c7f profiler: add profiler test specs.
  • ec95a67c4 perf(webf): reduce relayouts in flex fast path
  • 013f63310 fix(webf): restore stable flex layout behavior
  • 5542753e2 perf(webf): reduce redundant flex fast-path relayouts
  • 08af71710 perf(webf): narrow mixed flex measurement reuse
  • cbcd4013a perf(webf): skip futile early flex run-metrics passes
  • 951e67344 perf(webf): reduce layout constraint overhead
  • b5efce08d perf(webf): optimize layout hotspots
  • ad9948096 perf(webf): narrow flex cache reuse under wrapped layouts
  • cd30747e8 perf(webf): optimize flex hotspot profiling
  • c6b0d4051 fix(webf): avoid debug-only layout reuse checks
  • 94aa230ca fix(webf): correct widget layout reuse in flex
  • 5f8c32c95 fix(webf): narrow portal width fallback
  • fe8ab2a38 fix(webf): avoid phantom flex scroll range

Validation

  • flutter test /Users/andycall/workspace/webf3/webf/test/src/rendering/render_widget_portal_constraints_test.dart
  • flutter test /Users/andycall/workspace/webf3/webf/test/src/rendering/render_widget_percentage_width_test.dart
  • flutter test /Users/andycall/workspace/webf3/webf/test/src/rendering/flex_item_width_test.dart
  • npm run integration -- specs/rendering/widget_cupertino_context_menu_popup_preview_width.ts specs/rendering/widget_portal_cupertino_modal_popup_width_not_clamped.ts
  • flutter analyze --no-pub /Users/andycall/workspace/webf3/webf/lib/src/css/render_style.dart
  • flutter analyze --no-pub /Users/andycall/workspace/webf3/webf/lib/src/rendering/flex.dart

Notes

This is a stacked branch rather than a single-fix PR. The two latest fixes are:

  • portal/detached-subtree width fallback narrowed to WidgetElement roots only
  • flex scrollable range corrected for negative transformed offsets

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
use-case Ready Ready Preview, Comment Mar 29, 2026 6:15pm
vue_usecase Ready Ready Preview, Comment Mar 29, 2026 6:15pm

Request Review

@andycall andycall force-pushed the codex/widget-layout-reuse-fix branch from fe8ab2a to 9acd5f2 Compare March 29, 2026 18:15
@andycall andycall merged commit 9b5ac35 into main Mar 29, 2026
8 of 12 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