Skip to content

Spike Compose source names for layout trees#21

Merged
static-var merged 2 commits into
mainfrom
layout-tree-source-names-spike
May 25, 2026
Merged

Spike Compose source names for layout trees#21
static-var merged 2 commits into
mainfrom
layout-tree-source-names-spike

Conversation

@static-var
Copy link
Copy Markdown
Owner

Summary

  • add research spike for enriching experimental layoutTree nodes with composable/source names
  • add Android probe for Compose tooling composition data
  • add CMP Android-target probe for the same approach
  • document feasibility, risks, correlation strategy, and recommended production shape

Key findings

  • Compose tooling data can expose composable names such as Column, Row, Button, Card, and custom composables
  • source file/line information is available when Compose source information is present
  • NodeGroup.node can be the actual runtime LayoutNode, enabling identity correlation
  • named call groups are often separate from node groups, so production should correlate by node identity first, then nearest named/source ancestor, then fallback to bounds/order
  • APIs are tooling/internal/high-risk and should be used only as nullable best-effort enrichment

Verification

  • build-brief ./gradlew spotlessCheck detekt :plugin:test :preview-scanner:test
  • ANDROID_HOME=$HOME/Library/Android/sdk build-brief spikes/renderer-android-compose/gradlew -p spikes/renderer-android-compose :app:testDebugUnitTest --tests dev.staticvar.agentpreview.spike.CompositionToolingDataProbeTest
  • ANDROID_HOME=$HOME/Library/Android/sdk build-brief spikes/renderer-cmp-compose/gradlew -p spikes/renderer-cmp-compose :composeApp:testDebugUnitTest --tests dev.staticvar.agentpreview.cmp.CmpCompositionToolingDataProbeTest

Review

  • Implementation delegated to subagent
  • Separate review subagent approved with no blocking findings

No production schema/runtime changes in this spike.

@static-var static-var merged commit 9d2f286 into main May 25, 2026
1 check 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