Fixes the portaled terminal workspace picker menu appearing invisible behind the floating terminal modal by z-layering it above the panel's floatingZ and hiding it until it is positioned.
- Compute terminalWorkspaceMenuFloatingZ one layer above the floating modal's floatingZ (min 5000) so the portaled listbox always renders above the floating terminal stack.
- Position the workspace picker menu synchronously via useLayoutEffect before paint, instead of relying only on the async rAF-driven position update.
- Keep the menu invisible and non-interactive (visibility: hidden, pointer-events: none) until computed trigger-relative coordinates are applied, avoiding a flash at stale/fallback CSS coordinates.
- Add regression tests covering floating-mode z-index layering/pre-rAF positioning and docked/below/embedded/mobile workspace-picker positioning.
- Add a patch changeset describing the fix.
Files changed:
.changeset/terminal-workspace-picker-floating.md | 7 ++
.../dashboard/app/components/TerminalModal.tsx | 37 +++++--
.../components/__tests__/TerminalModal.test.tsx | 120 +++++++++++++++++++++
3 files changed, 156 insertions(+), 8 deletions(-)
Fusion-Task-Id: FN-7931
Fusion-Task-Lineage: 41736804-3f99-4cb7-a0fb-f755a86ffc62
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>