Skip to content

feat: add Ask UI runtime widget bounds#26

Merged
drown0315 merged 6 commits into
mainfrom
feat/ask-ui-runtime-widget-bounds
Jul 9, 2026
Merged

feat: add Ask UI runtime widget bounds#26
drown0315 merged 6 commits into
mainfrom
feat/ask-ui-runtime-widget-bounds

Conversation

@drown0315

Copy link
Copy Markdown
Owner

Summary

Adds an ask_ui_runtime Flutter package and wires Bridge/Web marker placement to real app-side widget bounds. This lets Selection Comment markers render inside the selected widget area instead of relying on unavailable Flutter Inspector JSON geometry.

What Changed

  • Added packages/ask_ui_runtime with registerAskUiRuntime() to register debug-only Ask UI VM Service extensions.
  • Added ext.ask_ui.widgetBounds support in Bridge and converts Flutter logical bounds to device-screen coordinates with devicePixelRatio.
  • Updated Widget Tree serialization to carry bounds from the runtime extension.
  • Moved Selection Comment overlay marker placement into the device frame and positions markers inside widget bounds.
  • Documented runtime package setup and the widget bounds extension contract.

Why

Flutter Inspector tree JSON does not expose global widget origins. The runtime extension runs inside the target Flutter app and can use RenderBox.localToGlobal(Offset.zero) to return reliable bounds for Inspector widget ids.

Verification

  • flutter analyze in packages/ask_ui_runtime
  • flutter test in packages/ask_ui_runtime
  • dart analyze in apps/bridge
  • dart test in apps/bridge
  • npm test -- --run in apps/web
  • npm run build in apps/web

@drown0315
drown0315 merged commit 1f5299e into main Jul 9, 2026
2 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