Pin the server contract and tokens to LLeMbas 2.0 (server dev f5b3dbb)

The contract moves from v1.7.0 to the server's dev at f5b3dbb965823ade: event_canvas.json is
gone (2.0 has no canvas) and the chat detail no longer carries knowledge_bases. The app modelled
neither, so no model changes; ContractTest now says the canvas fixture is absent and that a
canvas frame from an older stream is ignored.

Tokens from the same commit: only --selection is new among the colours, and it is now in the
palette and used for selected text, as on the web UI. CI also runs on pushes to dev, where 2.0
is built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-10-28 04:30:38 +00:00
1 parent 560427ef48
commit 052d0a3894
8 files changed
+27 -19

No files matched your search

@@ -1,6 +1,8 @@
package eu.llembas.android.ui.theme
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.text.selection.LocalTextSelectionColors
import androidx.compose.foundation.text.selection.TextSelectionColors
import androidx.compose.material3.ColorScheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
@@ -55,6 +57,10 @@ fun LembasTheme(choice: String = "", content: @Composable () -> Unit) {
}
val palette = if (dark) Moria else Shire
CompositionLocalProvider(LocalPalette provides palette) {
MaterialTheme(colorScheme = scheme(palette, dark), content = content)
MaterialTheme(colorScheme = scheme(palette, dark)) {
// The web UI's `--selection`: selected text is a tint you can find, not Material's default.
val selection = TextSelectionColors(handleColor = palette.accent, backgroundColor = palette.selection)
CompositionLocalProvider(LocalTextSelectionColors provides selection, content = content)
}
}
}
@@ -1,4 +1,4 @@
// Generated by scripts/fetch-tokens.py from the LLeMbas server's tokens.css at v1.7.0. Do not edit.
// Generated by scripts/fetch-tokens.py from the LLeMbas server's tokens.css at f5b3dbb965823ade56d57bf5e1d09900eb5946f2. Do not edit.
package eu.llembas.android.ui.theme
import androidx.compose.ui.graphics.Color
@@ -20,6 +20,7 @@ data class Palette(
val accentHover: Color,
val accentInk: Color,
val accentSoft: Color,
val selection: Color,
val leaf: Color,
val danger: Color,
val dangerSoft: Color,
@@ -49,6 +50,7 @@ val Moria = Palette(
accentHover = Color(0xFFB4E6F1L),
accentInk = Color(0xFF061418L),
accentSoft = Color(0x1F8FD8E8L),
selection = Color(0x528FD8E8L),
leaf = Color(0xFF7EE081L),
danger = Color(0xFFF0735FL),
dangerSoft = Color(0x21F0735FL),
@@ -78,6 +80,7 @@ val Shire = Palette(
accentHover = Color(0xFF1F4D30L),
accentInk = Color(0xFFF8F3E5L),
accentSoft = Color(0x1A285F3CL),
selection = Color(0x3D285F3CL),
leaf = Color(0xFF3D6B1CL),
danger = Color(0xFFA3321FL),
dangerSoft = Color(0x1AA3321FL),
@@ -35,6 +35,14 @@ class ContractTest {
assertEquals("""{"app_api":1}""", version)
}
@Test
fun theTwoPointOhContractHasNoCanvas() {
// LLeMbas 2.0 removed the canvas: no `canvas` frame, so no fixture for one. A stream
// that still sends it (a 1.x server) is ignored frame by frame, as any unknown event is.
assertNull(javaClass.classLoader!!.getResource("event_canvas.json"))
assertEquals(LiveReply("m"), LiveReply("m").apply("canvas", """{"tabs": [], "active": ""}"""))
}
@Test
fun aChatAndAnAgentChat() {
val chat = read("chat", Chat.serializer())