Skip to content

Conversation

@bartwell
Copy link
Owner

Motivation

  • Replace platform-specific close managers and holders with a single cross-platform command bus so the UI layers handle closing consistently.
  • Preserve the public API Kick.close() as the programmatic entry point for requesting viewer close.

Description

  • Added a shared command bus ViewerCommands in main-runtime that exposes a closeRequests: SharedFlow<Unit> and requestClose() to emit close commands.
  • Made KickImpl.close() emit a close request via ViewerCommands.requestClose() and kept the Kick public API and companion helper Kick.close() intact.
  • Removed platform CloseManager implementations and holder utilities and wired UI layers to collect ViewerCommands.closeRequests: Android KickActivity now lifecycle-collects and calls finish(), JVM LaunchManager uses LaunchedEffect to window.dispose(), iOS IosSceneController collects in a MainScope job and calls dismiss(), and Wasm LaunchManager collects and removes the kick-viewer DOM element.
  • Updated sample app to add a control panel close button (CONTROL_PANEL_CLOSE_BUTTON_ID) and to call Kick.close() and show an alert when the button is clicked.

Testing

  • No automated tests were run as part of this change.

Codex Task

@bartwell bartwell merged commit 8bd4e6e into develop Jan 23, 2026
2 checks passed
@bartwell bartwell deleted the codex/add-button-to-control-panel-module branch January 23, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants