Jewel Swing Interop
SkillCloud & infraUse when working on IntelliJ/Jewel popup hosting, ComposePanel embedding, SwingBridgeTheme, popup rendering modes, or AWT/Compose coordinate conversion.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Jewel Swing Interop skill
What this skill tells your AI
The instructions your AI receives, as published by rock3r/spectre in .agents/skills/jewel-swing-interop/SKILL.md and read by ahel’s review.
Use this skill when the task touches Jewel, Swing-hosted Compose, IntelliJ tool windows, or popup behavior.
Highest-Level API First
Prefer the simplest valid integration point:
ToolWindow.addComposeTab(...)for IntelliJ tool windowsJewelComposePanel(...)or equivalent bridge wrappers for generic Swing hosting- lower-level
ComposePanelwiring only when higher-level bridge APIs do not fit
Theme And Hosting Rules
- In IntelliJ plugin contexts, prefer
SwingBridgeTheme. - Avoid unmanaged extra
ComposePanelwrappers when a bridge utility already exists. - Reach for
LocalComponentwhen you need the host Swing component in Compose.
Popup Caveats That Matter For Spectre
JewelFlags.useCustomPopupRendererdefaults tofalse.- When custom popup rendering is disabled, Jewel falls back to normal Compose popup behavior.
- Compose Desktop defaults
compose.layers.typetoOnSameCanvas. - Because of that, popup discovery cannot assume every popup creates its own AWT window.
Always consider all of these when investigating popup semantics, hit-testing, or window discovery:
- same-window extra semantics roots
- Swing-hosted
ComposePanellayers - real owned windows such as
JDialog/JBPopup
Synthetic Key Dispatch Guidance
- Compose Desktop key listeners usually live on the inner Skiko canvas (
SkiaLayer/SkiaSwingLayer), not on the outerComposePanel/ComposeWindowPanelwrapper. - When debugging synthetic typing in Jewel or Swing-hosted Compose, do not assume
Window.focusOwneris available. macOSapple.awt.UIElement=truehelper JVMs can keep every AWT window unfocused while Compose's internal focus model still has a focusedTextField. - Spectre's synthetic driver should therefore target the key-listening descendant under
the pointer target or Compose host and use
KeyboardFocusManager.redispatchEvent, not plainComponent.dispatchEvent, for key events generated outside the OS keyboard path.
Coordinate And Interop Guidance
- Be careful when moving between Compose coordinates and AWT screen coordinates.
- Prefer established prior art from IntelliJ remote-driver and Compose Desktop internals over ad-hoc math.
- When a conversion seems obvious, verify it against existing host code before locking it in.
Local References
Read these checked-out sources when implementing:
/Users/rock3r/src/intellij-community/platform/jewel/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/ToolWindowExtensions.kt/Users/rock3r/src/intellij-community/platform/jewel/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/JewelComposePanelWrapper.kt/Users/rock3r/src/intellij-community/platform/jewel/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/SwingBridgeTheme.kt/Users/rock3r/src/intellij-community/platform/jewel/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Popup.kt/Users/rock3r/src/intellij-community/platform/jewel/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/JewelFlags.kt/Users/rock3r/src/intellij-community/plugins/performanceTesting/remote-driver.compose/src/com/intellij/performanceTesting/remoteDriver/compose/ComposeXpathDataModelExtension.kt
Signals
- GitHub stars
- 35
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
jewel-swing-interop- Source
- github.com/rock3r/spectre