Skip to content

Conversation

@ReneeVandervelde
Copy link
Member

Leverage the new remote-render module from the InkUI framework to handle serialization.
This is a breaking change, but greatly simplifies the project while extending support for things like UI events like button presses beyond the HTTP actions previously supported.
As such, the Item classes have been removed, as well as the http actions.
The GlassClient remains for configuration of the app beyond setting the layout, which is now done through the inkui remote-render library.

Copilot AI review requested due to automatic review settings July 6, 2025 13:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the homegrown display serialization and HTTP actions with InkUI’s new remote-render module, removes legacy Item classes, and integrates remote rendering into the Android app with configurable endpoints.

  • Migrate PIN pad element to structures.pin and add a custom serializer for hashing PIN input events
  • Remove legacy DisplayItem, serializer classes, and HTTP‐based actions in favor of remote rendering
  • Rename client/server methods from updateDisplay/update to setConfig/config and update Ktor endpoints
  • Integrate RemoteRenderModule in ApplicationModule and refactor MainActivity to bind remote vs. local presenters

Reviewed Changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
structures/src/commonMain/kotlin/com/inkapplications/glassconsole/structures/pin/PinPadElement.kt Move and prepare PIN pad for serialization (missing class annotation)
structures/src/commonMain/kotlin/com/inkapplications/glassconsole/structures/pin/HashingPinPadElement.kt Add HashingPinPadElement serializer and event wiring
structures/src/commonMain/kotlin/com/inkapplications/glassconsole/structures/elements/WeatherElement.kt Introduce WeatherElement with new @SerialName tags
client/src/commonMain/kotlin/com/inkapplications/glassconsole/client/remote/KtorGlassHttpClient.kt Rename updateDisplaysetConfig, update path to /config
android/src/main/java/com/inkapplications/glassconsole/server/ConfigServer.kt Rename DisplayServerConfigServer, change route and port
Comments suppressed due to low confidence (3)

android/src/main/java/com/inkapplications/glassconsole/server/ConfigServer.kt:6

  • Removed the import for io.ktor.server.application.call, but call.receive and call.respond are still used; re-add that import so the routing handlers compile.
import io.ktor.serialization.kotlinx.json.json

structures/src/commonMain/kotlin/com/inkapplications/glassconsole/structures/pin/PinPadElement.kt:4

  • Imported Serializable but the PinPadElement class isn’t annotated; add @Serializable above the data class PinPadElement to enable serialization.
import kotlinx.serialization.Serializable

android/src/main/java/com/inkapplications/glassconsole/UiLayoutFactory.kt:3

  • The GroupingStyle import is no longer referenced in this file; remove this unused import to keep dependencies clean.
import ink.ui.structures.GroupingStyle

@ReneeVandervelde ReneeVandervelde merged commit 680ef91 into master Jul 6, 2025
1 check passed
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.

2 participants