Skip to content

chore(android-client): remove the unused Kotlin event bus - #354

Merged
V3RON merged 1 commit into
mainfrom
chore/android-remove-dead-event-code
Oct 16, 2026
Merged

V3RON merged 1 commit into
mainfrom
chore/android-remove-dead-event-code

Conversation

@V3RON

@V3RON V3RON commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What is this?

The Android client ships a Kotlin event bus (voltra.events.VoltraEventBus and VoltraEvent) that nothing uses. No code sends, reads, or listens to its events, VoltraEvent is a sealed class with no subclasses, and VoltraEvent.fromMap always returns null, so the bus can never hold or deliver an event. Its voltra_event_queue preferences file is never written. This removes both files.

How does it work?

The two files under packages/android-client/android/src/main/java/voltra/events/ are deleted. Nothing else referenced them: no Kotlin caller, manifest entry, ProGuard rule, or test. No behavior changes, so there is no changeset. The classes were public Kotlin, so a host app's native code could in principle import them; any such call can simply be deleted, because the bus never delivered an event.

Some neighbouring code looks related but stays, because a host app can see it and removing it would be a breaking change. It can go in a separate, versioned change:

  • addVoltraListener and the event types in @use-voltra/android-client. They are public exports. On Android the function only warns and returns a no-op subscription.
  • VoltraView's onInteraction prop on Android. It still calls addVoltraListener, so passing the prop logs that warning. The warning is currently the only sign that the callback never fires on Android, so this change leaves it alone.
  • The widgetId and componentId extras that RenderCommon.kt puts on the widget launch intent. Voltra never reads them, but a host app can read them from its own activity intent.

Why is this useful?

Anyone working on Android events now finds no event system rather than one that looks wired up. That matters now: native-to-JavaScript events for Android are being designed, and this bus would be an easy wrong place to start.

VoltraEventBus and VoltraEvent no longer have callers and never sent or
received an event: VoltraEvent has no subclasses and fromMap always
returned null, so nothing could ever be queued or delivered.
@V3RON
V3RON force-pushed the chore/android-remove-dead-event-code branch from ad6c0c5 to 052058c Compare October 15, 2026 11:47
@V3RON
V3RON marked this pull request as ready for review October 15, 2026 11:47
@V3RON
V3RON merged commit 5965765 into main Oct 16, 2026
16 checks passed
@V3RON
V3RON deleted the chore/android-remove-dead-event-code branch October 16, 2026 07:55
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