Android: keep Compose out of core/ (ActivitySeries.color) #332

Closed
opened 2026-10-25 17:21:30 +01:00 by agentic-developer · 0 comments
Collaborator

core/ is meant to hold the plain types the screens are given, with StreamSession the only place that calls the bindings. core/Activity.kt imports androidx.compose.ui.graphics.Color for ActivitySeries.color, and StreamSession builds Compose Colors while it converts an activity report.

This makes the session and its JVM unit tests depend on Compose UI.

Proposal

  • Keep the colour in the core record as the #RRGGBB string the bindings give (or an Int), the way Configuring.palette / color already does for the form.
  • Convert it to a Color in ui/ (Activity.kt, ActivityChart.kt).
  • While there, bring core/Activity.kt into the style of the other core files: one record per line block, with documentation. The default methods of Activities that return "Unavailable" failures exist only so test fakes compile; drop them and give the fakes what they need.

Found in a review of the Android app.

`core/` is meant to hold the plain types the screens are given, with `StreamSession` the only place that calls the bindings. `core/Activity.kt` imports `androidx.compose.ui.graphics.Color` for `ActivitySeries.color`, and `StreamSession` builds Compose `Color`s while it converts an activity report. This makes the session and its JVM unit tests depend on Compose UI. **Proposal** - Keep the colour in the core record as the `#RRGGBB` string the bindings give (or an `Int`), the way `Configuring.palette` / `color` already does for the form. - Convert it to a `Color` in `ui/` (`Activity.kt`, `ActivityChart.kt`). - While there, bring `core/Activity.kt` into the style of the other core files: one record per line block, with documentation. The default methods of `Activities` that return "Unavailable" failures exist only so test fakes compile; drop them and give the fakes what they need. Found in a review of the Android app.
Sign in to join this conversation.
No labels
android
cli
epic
planned
tui
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
kfickel/streamd#332
No description provided.