Design: the new shape (new chat first, drawer, transcript, composer), screenshots, Scheduled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HomerandClaude Opus 5.5 committed 2026-11-09 12:55:56 +00:00
1 parent f18e962186
commit 8b446ec56e
2 files changed
+72 -4

No files matched your search

+67 -4
@@ -9,12 +9,73 @@ One module, Kotlin and Jetpack Compose, Material 3 coloured by the server's toke
|---|---|
| `api/` | `Models.kt` (the server's shapes), `ApiClient` (every call, with the token), `StreamClient` (the reply, reconnecting), `LiveReply` (applying frames) |
| `auth/` | `InstanceStore` (instances, the active one, preferences; DataStore) and `TokenCipher` (Keystore) |
| `ui/` | `signin`, `chats`, `chat` (transcript, blocks, cards, composer), `settings`, `theme`, `Markdown.kt` |
| `ui/` | `signin`; `home` (the drawer and its list); `chat` (the chat page, transcript, composer, tune sheet, model picker, cards, activity panel); `scheduled`; `files`; `settings`; `theme`; `Markdown.kt` and `MarkdownSplit.kt` |
| `push/` | UnifiedPush service, notifications, the approval buttons' receiver |
| `assist/` | the voice-interaction service, its session, the recognition service, `AssistController` and its sheet, the tile, voice in and out |
| `share/` | the share target |
| `update/` | the self-updater (`full` flavour only) |
## Screens
Shaped like the AI apps people already know, in LLeMbas's own theme:
- **The app opens on a new chat**: the model's picture and a greeting, four suggestions above
the message box. A chat (or a new chat) is a top-level page -- opening one replaces the last,
and Back leaves the app; Files, Scheduled and Settings open over it and Back returns.
- **The drawer** (menu button, or a swipe from the edge on a chat page) holds everything else:
search over the titles, New chat, New agent chat, Files, Scheduled, then the chats in three
sections -- Today, Earlier, Agent chats (`ui/home/ChatGroups.kt`, by the phone's day) -- and
Settings with the account at the foot. It reads the list again each time it opens.
- **The top bar's title is the model**: picture, name and a caret, the chat's title under it.
It opens the model picker, a bottom sheet with each model's picture, what it can do and how
it thinks. A new chat keeps every choice in its `Draft` until the first message makes the
chat; an open chat changes at once.
- **The transcript**: the person's turn is a bubble on the right (plain text, never markdown);
the model's is full width with no bubble. Thinking and each round of tools are one chip each
that opens; a `show` card stays in view. Fenced code is cut out of the markdown
(`splitFences`) into its own block with the language and Copy; an unclosed fence is already a
block while it streams. Copy and Regenerate sit under a reply with its cost; a long press
gives Copy, Select text, Edit or Regenerate (the markdown's TextView then does not select
itself; Select text opens the words in a selectable dialog).
- **The composer** is one rounded field: attachments as tiles above the words, and a row of
+, Options (the tune sheet: Thinking switch or effort levels, the team's size, Plan first or
the agent's mode, a new agent chat's device and folder -- only what the model and the chat
offer), the microphone and Send, which becomes Stop. The Options button sits in the row's one
part that gives, so the icons keep their places at any width and type size.
- **Settings** are grouped lists: a header, one rounded surface of rows, each row an icon column
of fixed width, words that wrap, a control that keeps its size.
- Spacing is on an 8 dp grid, every touch target is at least 48 dp, and every page is
edge-to-edge with the system bars' and keyboard's insets.
## Looking at the screens
Every screen is drawn from its state alone (`ChatContent`, `DrawerContent`, `SettingsContent`,
`ScheduledContent`, `ScheduleContent`, `ScheduleEditContent`, and the sheets' contents), with its
actions behind an interface whose methods do nothing by default. The screenshot tests
(`app/src/test/.../shots/`) render each with made-up data (`Fakes.kt`, the server's contract
files where they fit) on the JVM -- Robolectric draws, Roborazzi writes the PNG -- in Shire and
Moria, at 411×891 dp and 360×640 dp, and the transcript at 1.5× type. CI keeps them as the
run's `llembas-android-screenshots-<run>` artifact. They assert nothing: they are what a design
change is reviewed from, by a person or by an agent reading the pictures. Test-only
dependencies; nothing of it is in the APK.
A bottom sheet is a window of its own, so its content is shot over a dimmed page rather than
as the sheet itself.
## Scheduled
The phone's half of the server's scheduled tasks: the list (rule in words, the last run's
status, the next run, a pause switch), a task's page (Run now, Pause, the next five runs, the
history with each run's model -- and when another model stood in -- and Open for its result),
and create or edit **in words**: the instance reads them and answers with a title, the rule in
words, the instruction and the next five runs, which are shown before anything is saved.
A push with `kind` `schedule` or `schedule_failed` goes to the **Scheduled results** or
**Scheduled failures** channel: private on the lock screen, where its public version says only
that a task finished or failed; Open goes to the run's chat (or the task), Pause pauses it from
the notification. A server without the routes answers 404, and the page says scheduling needs a
newer server.
## Signing in
The CLI's device login: discovery at `/.well-known/lembas.json` (the app refuses an instance
@@ -43,7 +104,8 @@ is "answered elsewhere first" and is said once, quietly.
UnifiedPush 3: the app registers with the distributor the person chose (ntfy, or any other),
giving it the instance's VAPID key, and hands the endpoint and its keys to `/api/v2/push`. The
server sends Web Push to it with the code it uses for browsers. One registration per instance.
Channels: Replies, Questions and approvals (high importance), Reports. An approval's
Channels: Replies, Questions and approvals (high importance), Scheduled results, Scheduled
failures (high importance); every one private on the lock screen. An approval's
notification carries Allow once and Deny; "always" and a corrected command need the card.
## Theme and strings
@@ -60,5 +122,6 @@ later). The release key lives in the CI secrets, never in the repository.
## Later
The wake word (see Assistant), agent-chat pickers (device, directory) in the app, the library
and `@` mentions, canvas and prototypes, a widget, a tablet layout, an offline cache of the list.
The wake word (see Assistant), browsing a device's folders for an agent chat, the library and
`@` mentions, canvas and prototypes, a widget, a tablet layout (the drawer as a permanent rail),
an offline cache of the list, archived chats.
+5
@@ -56,6 +56,11 @@ The tree's rule holds in Compose as in CSS: a row whose parts have unknown sizes
track (`weight`, a `Row` with one part designated to give), and a tap target is 48 dp. Prove a
layout on a real phone at its narrowest; the emulator's default is not a phone.
Every screen is drawn from its state alone, so the screenshot tests can draw it: a new screen
gets a `…Content(state, actions)` composable and a shot in `shots/ScreenShots.kt` (see Design ›
Looking at the screens). Look at the shots -- light, dark, 360 dp, large type -- after every
design change, before a phone.
## Things that will bite
- **`/*` inside a KDoc opens a nested comment** in Kotlin. `contract/*.json` in a doc comment