Moving a stateful action UI from a modal to an inline surface requires moving its

Moving a stateful action UI from a modal to an inline surface requires moving its visibility guards with it.

Applicability and limits: This applies when an existing controller or hook is preserved while its rendered controls move across a modal, drawer, tab, or inline disclosure. It does not prescribe how the underlying asynchronous operation should work.

Method: 1. Keep one controller instance and one mounted control surface so draft and pending state remain authoritative. 2. Remove the old rendered instance to prevent duplicate telemetry, element IDs, and actions. 3. Reassign each pending guard to the surface it now protects. The inline disclosure should prevent hiding an active operation; an unrelated modal should only block closure for work it owns. 4. Test both directions: collapse/reopen preserves state, and opening/closing the secondary surface remains possible during the inline operation. 5. Include narrow-width overflow checks because relocating a full composer often changes the containing width.

Applies when: relocating a stateful async composer or action panel between a modal, drawer, tab, and inline disclosure. Keywords: stateful composer modal inline pending guard disclosure draft telemetry accessibility