Fantasia floating windows

From vishiri/fantasia-archive · View interactive version

Fantasia floating windows is an AI agent skill from the GitHub repository vishiri/fantasia-archive. In-renderer floating Window* surfaces: Teleport to body, useFaFloatingWindowFrame, per-edge viewport margins, resize geometry and clamp, z-index band 5000–5999, Vitest teleport stub, custom fa-floatingWindowPop open/close transition. Use when adding or changing Window* components, frame behavior, or

How to use this skill

Skill file

Fantasia Archive — in-renderer floating windows

What they are

Window* under src/components/floatingWindows/ — movable/resizable position: fixed in same renderer. Not extra Electron BrowserWindow instances.

Architecture (checklist)

  1. Teleport — _FaFloatingWindowBodyTeleport under document.body. Transition wraps single element: Teleport → Transition → frame root
  2. Composable — useFaFloatingWindowFrame(visibleRef, layout?) from src/scripts/floatingWindows/: center, title drag, resize, ResizeObserver, frameStyle + z-index
  3. Z-index — 5000–5999 session counters; below 6000 (modals/chrome). Bands: standard 5000–5799, projectStyling 5800–5899, app noteboard 5900–5949, project noteboard 5950–5999. raiseZ on open/interaction
  4. Layout — I_FaFloatingWindowFrameLayout / FA_FLOATING_WINDOW_FRAME_DEFAULT_LAYOUT: fractions, min/max, per-edge margins
  5. Resize — faFloatingWindowResizeGeometry.ts, faFloatingWindowResizeClamp.ts; _FaFloatingWindowFrameResizeHandles
  6. Modals — no registerComponentDialogStackGuard for Window*
  7. i18n — i18n/<locale>/floatingWindows/

Shared window families (`_shared*`)

Open/close Transition (Custom app CSS / WindowAppStyling)

Project Noteboard (WindowProjectNoteboard)

Project Custom CSS (WindowProjectStyling)

Tests

Custom app CSS help (WindowAppStyling)

? menu lists --fa-color-* names — logic in src/scripts/faTheme/

Related docs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.