Skip to content

✨ Add typed JVM dialog parents - #629

Open
vinceglb wants to merge 4 commits into
mainfrom
vinceglb/unified-jvm-dialog-parent
Open

✨ Add typed JVM dialog parents#629
vinceglb wants to merge 4 commits into
mainfrom
vinceglb/unified-jvm-dialog-parent

Conversation

@vinceglb

Copy link
Copy Markdown
Owner

Summary

  • replace the AWT-only JVM parentWindow setting with one canonical typed FileKitDialogParent
  • support AWT windows, native Windows HWNDs, X11 window IDs, and Wayland surface handles
  • route parents through Windows, XDG portal, Linux fallback, AWT/Swing, macOS, and Compose integrations with explicit validation and redacted errors
  • demonstrate Nucleus + Tao parenting on Windows and propagate the parent transform through file, directory, and save flows
  • document the breaking migration, backend support matrix, borrowed-handle lifetime rules, and Nucleus limitations

This intentionally makes a breaking JVM API change to keep the model simple: callers migrate from parentWindow = window to parent = FileKitDialogParent.awt(window) (or the matching native factory).

Requested from the Kotlin Slack discussion to improve integration with Nucleus using the Tao backend.

Validation

  • ./gradlew :filekit-dialogs:jvmTest :filekit-dialogs-compose:jvmTest --no-daemon
  • ./gradlew :filekit-dialogs:check :filekit-dialogs-compose:check --no-daemon
  • ./gradlew :sample:shared:check :sample:nucleusApp:compileKotlin --no-daemon
  • ./gradlew check --no-daemon (572 tasks)
  • changed Kotlin sources formatted with ktlint 1.8.0
  • two-pass independent GPT-5.6 Sol High implementation review: approved with no substantive standards or spec findings

Manual verification

Windows runtime verification should confirm that the Nucleus Tao sample passes its borrowed HWND to native dialogs and preserves owner-relative modality/stacking. This macOS host cannot execute that Windows-only smoke test.

The Nucleus packaging task could not run locally because the configured Android Studio JBR does not include jpackage; compilation is green and hosted CI uses Temurin JDK 21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant