Tao: track upstream CMP-10678 (RectManager EDT dispatch) and remove RectManagerEdtGuard once fixed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
Research direction
Start by reading the existing RectManagerEdtGuard and the owner-creation path where the proposed RectManager.executeDelayed swap would be attempted. Verify the reflective final-field write with the reachability metadata in a real runGraalvmNative build, while keeping the current guard as the fallback. Done means the swap removes the residual EDT dispatch when successful, failures warn and retain the guard, or the upstream Compose fix makes this follow-up obsolete.
Written by the indexing model from the issue text.
Description
Follow-up to #551 / PR #554.
RectManagerEdtGuard closes the Compose 1.12 RectManager EDT race for every app that does not register debounced rect callbacks. A documented residual remains: an app explicitly using Modifier.onLayoutRectChanged / onFirstVisible / onVisibilityChanged (with debounce) can still get one EDT dispatch if a layout pass runs >16 ms past a mid-pass re-arm with no layout/semantics notification in between — because a real (non-pinned) deadline lowers minDebounceDeadline and the pass-end scheduleDebounceCallback arms a live EDT timer that the guard can only cancel at the next observable hook.
Proposed full closure (opt-in, layered)
Swap RectManager.executeDelayed (private field) for a scene-thread implementation at owner creation:
- The
ExecuteDelayedimplementation itself can be static (@Suppress("INVISIBLE_REFERENCE"), no dynamic Proxy) — it schedulesdelay(millis)on the scene's coroutine context, exactly like the guard's post-frame wakeup. - The only reflective operation is a single
Field.setonRectManager.executeDelayed. - GraalVM native-image: needs one reachability-metadata field entry for
androidx.compose.ui.spatial.RectManager; must verify on a realrunGraalvmNativebuild that a reflective write to a final instance field works with the metadata (final-field writes are the sensitive part). - Layered behavior: attempt the swap at first owner; on success the residual disappears entirely; on any failure (missing metadata, future Compose renames the field) log one warning and keep the current guard — never worse than today.
Exit criterion
This issue becomes obsolete if JetBrains fixes the upstream bug (desktop postDelayed runs on skiko's hardcoded MainUIDispatcher/EDT — their code carries TODO CMP-7153; a standalone no-framework reproducer crashing 3/3 off-EDT and never on the EDT has been prepared for the YouTrack report). Once the upstream fix ships, both the guard and this follow-up can be removed for that Compose version.
- Dominant language
- Kotlin
- Stars
- 393
- Forks
- 27
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NucleusFramework/Nucleus
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
NucleusFramework/Nucleus#475 · 1 comment ·
Maintainers usually reply within 1 day
-
AppX: taskbar icon plated onto accent color — no targetsize/altform-unplated variants generatedOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
NucleusFramework/Nucleus#923 · 1 comment ·
Maintainers usually reply within 1 day
-
AppX: fileAssociation(...) silently dropped — not emitted into AppxManifest for TargetFormat.AppXOpen
Difficulty 4/5 3-5 days Newbie friendliness 45/100
NucleusFramework/Nucleus#922 · 1 comment ·
Maintainers usually reply within 1 day
-
NativeView: opt-in placement above the Compose surface on macOS (placedAsOverlay)Possibly taken @xephosbot claimed this today. Open
Difficulty 5/5 Over a week Newbie friendliness 48/100
NucleusFramework/Nucleus#920 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
NucleusFramework/Nucleus#901 ·
Maintainers usually reply within 1 day
All issues in NucleusFramework/Nucleus
Similar issues
-
Preserve database capacity during dev deploymentsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
world-federation-of-advertisers/cross-media-measurement#4870 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ankidroid/Anki-Android#23156 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
paritytech/polkadot-android-community#307 ·
Maintainers usually reply within 2 days
-
android enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day