Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
64e4619
Glow × Glass wave 0: blends, squircle shapes, glass materials, screen…
sayed0am Nov 12, 2026
2f615ff
Glow × Glass build plan
sayed0am Nov 12, 2026
887e8ef
Glow × Glass: workout family blends
sayed0am Nov 12, 2026
d55947c
Glow × Glass plan: decisions 14 to 18 and the night's gate calls
sayed0am Nov 12, 2026
b93bf3e
Glow × Glass: shared cards draw glass, tinted glass, solid light and …
sayed0am Nov 12, 2026
49f8442
Merge wave 1A cards
sayed0am Nov 12, 2026
6cc17fd
Glow × Glass: lists, strips, buttons, chips, header chip and tab bar
sayed0am Nov 12, 2026
40962df
Merge wave 1C lists, controls, tab bar
sayed0am Nov 12, 2026
26a1802
Glow × Glass: charts and pictures draw the metric's blend
sayed0am Nov 12, 2026
73a121c
Merge wave 1B charts
sayed0am Nov 12, 2026
41bea6d
Glow × Glass: heavy glass sheets, sheet screens, page light
sayed0am Nov 12, 2026
a2d1944
Merge wave 1D glass and sheets
sayed0am Nov 12, 2026
90587c7
Glow × Glass: widget blends and status dot, white bpm with zone dot i…
sayed0am Nov 12, 2026
87c48d0
Merge wave 2E widgets and notification
sayed0am Nov 12, 2026
b800caf
Glow × Glass: Today screen light per moment, clear glass strips and p…
sayed0am Nov 12, 2026
0ebc5b0
Merge wave 2A Today
sayed0am Nov 12, 2026
f31b5e7
Glow × Glass: tab and detail lights, detail hero, contributor blends,…
sayed0am Nov 12, 2026
e9aa9f1
Merge wave 2B tabs and details
sayed0am Nov 12, 2026
4765fe5
Glow × Glass: workout summaries, share cards, celebration, rewards, w…
sayed0am Nov 12, 2026
23ccfcb
Merge wave 2F workout summary, rewards, share
sayed0am Nov 12, 2026
a0e6e5a
Glow × Glass: You and Strap pages
sayed0am Nov 12, 2026
67c873f
Merge wave 2D You and Strap
sayed0am Nov 12, 2026
32ea9a4
Glow × Glass: workout Choose, Ready and live screens in the family bl…
sayed0am Nov 12, 2026
4fd46b0
Glow × Glass: tab bar takes the tab's light, screen light clipped to …
sayed0am Nov 12, 2026
13b7b5a
Merge wave 2C workout start and live
sayed0am Nov 12, 2026
f4f6032
Glow × Glass: live zone line no longer cut short
sayed0am Nov 12, 2026
ceb1697
Glow × Glass: Activity, Recovery and Choose polish against the boards
sayed0am Nov 12, 2026
35c37c0
Glow × Glass: tests follow the new tokens, type roles for 12 and 14 s…
sayed0am Nov 12, 2026
a666f29
Merge tabs polish
sayed0am Nov 12, 2026
ef128d5
Glow × Glass: places polish (strap tiles, tinted rows, alarms, profil…
sayed0am Nov 12, 2026
8a9e255
Merge places polish
sayed0am Nov 12, 2026
9ba0dc6
Glow × Glass: summary polish, glass secondary buttons, quiet delete, …
sayed0am Nov 12, 2026
670d933
Merge summary polish
sayed0am Nov 12, 2026
78de69c
Glow × Glass: tests follow the new rules, chooser and confirm title s…
sayed0am Nov 12, 2026
f1709a0
Glow × Glass: detekt clean-up (magic numbers, line length, modifiers,…
sayed0am Nov 12, 2026
584f09f
Glow × Glass: lint clean-up (zh strings, unused strings, chart list p…
sayed0am Nov 12, 2026
25b79e4
Glow × Glass: keep chart overload complexity suppress
sayed0am Nov 12, 2026
75bc34d
Glow × Glass: status after the overnight waves, emulator contact sheet
sayed0am Nov 12, 2026
74de120
Glow × Glass: phone pass on the Fold
sayed0am Nov 13, 2026
1d4dc86
Glow × Glass: baseline profile recorded again
sayed0am Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ dependencies {
implementation(libs.core.ktx)
implementation(libs.window)
implementation(libs.haze.blur)
implementation(libs.squircle.shape)
// Workout maps: open source, no API key; tiles from OpenFreeMap (README, Network use).
implementation(libs.maplibre)
// Home screen widgets.
Expand Down
18 changes: 18 additions & 0 deletions app/src/debug/kotlin/org/openstrap/app/DebugIntents.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private const val TAG = "unstrap"
private const val HEX = 16
private const val SIMULATED_BATTERY = 80
private const val SCORE_MAX = 100
private const val PERCENT = 100f

private val MainActivity.container: AppContainer get() = (application as OpenStrapApp).container

Expand All @@ -41,6 +42,23 @@ internal fun MainActivity.handleDebugIntent(previews: DebugPreviews) {
shownStates(previews)
workoutSamples()
dumpRaw()
corners()
level()
}

/** `--ez corners true` shows the corner panel (two sliders over the real screens), `false` hides it. */
private fun MainActivity.corners() {
if (!intent.hasExtra("corners")) return
org.openstrap.app.ui.theme.CornerTuning.panel = intent.getBooleanExtra("corners", false)
intent.removeExtra("corners")
}

/** `--ei level 50` draws every level card's fill at 50%, `--ei level -1` goes back to the real levels. */
private fun MainActivity.level() {
if (!intent.hasExtra("level")) return
val v = intent.getIntExtra("level", -1)
org.openstrap.app.ui.theme.CornerTuning.levelOverride = if (v < 0) null else v / PERCENT
intent.removeExtra("level")
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
package org.openstrap.app.ui.components

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Slider
import androidx.compose.material3.SliderDefaults
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.openstrap.app.ui.theme.CornerTuning
import kotlin.math.roundToInt

private const val RADIUS_MAX = 48f
private const val SMOOTHING_MAX = 100f
private const val PANEL_ALPHA = 0.88f
/** Smoothing moves in fives. */
private const val SMOOTHING_STEPS = 19

/**
* Debug only: two sliders over the real screens for the card corner radius and the squircle smoothing
* ([CornerTuning]). Shown with `adb shell am start -n org.openstrap.app/.MainActivity --ez corners true`.
*/
@Composable
@Suppress("ModifierMissing", "ComposeModifierMissing") // an overlay over the whole app, placed by itself
fun CornerPanel() {
if (!CornerTuning.panel) return
var top by remember { mutableStateOf(false) }
Box(Modifier.fillMaxSize().safeDrawingPadding().padding(horizontal = 12.dp, vertical = if (top) 8.dp else 96.dp)) {
Column(
Modifier.align(if (top) Alignment.TopCenter else Alignment.BottomCenter).fillMaxWidth()
.background(Color.Black.copy(alpha = PANEL_ALPHA), RoundedCornerShape(12.dp))
.padding(horizontal = 16.dp, vertical = 8.dp),
) {
Row(verticalAlignment = Alignment.CenterVertically) {
Text("Corners", color = Color.White, fontSize = 15.sp)
Spacer(Modifier.weight(1f))
TextButton(onClick = { CornerTuning.reset() }) { Text("Reset") }
TextButton(onClick = { top = !top }) { Text(if (top) "Down" else "Up") }
TextButton(onClick = { CornerTuning.panel = false }) { Text("Close") }
}
val radius = CornerTuning.cardRadius
Tuner("Card radius", "${radius.roundToInt()} dp", radius, 0f..RADIUS_MAX, RADIUS_MAX.toInt() - 1) {
CornerTuning.cardRadius = it.roundToInt().toFloat()
}
val smoothing = CornerTuning.smoothing
Tuner("Smoothing", "$smoothing", smoothing.toFloat(), 0f..SMOOTHING_MAX, SMOOTHING_STEPS) {
CornerTuning.smoothing = it.roundToInt()
}
}
}
}

@Composable
private fun Tuner(
label: String,
value: String,
current: Float,
range: ClosedFloatingPointRange<Float>,
steps: Int,
onChange: (Float) -> Unit,
) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Column(Modifier.width(96.dp)) {
Text(label, color = Color.White.copy(alpha = 0.7f), fontSize = 12.sp)
Text(value, color = Color.White, fontSize = 16.sp)
}
Slider(
value = current, onValueChange = onChange, valueRange = range, steps = steps,
modifier = Modifier.weight(1f),
colors = SliderDefaults.colors(thumbColor = Color.White, activeTrackColor = Color.White),
)
}
}
Loading