Screens
Where things live in the app, and how to add a screen. This page is folded from server/docs/16-app-design.md; this page wins.
It covers the page server/examples/dummy-client/index.html and the native Android screens: the voice screen (AssistActivity, VoiceGlow), the ringing screen (RingActivity), quick tiles (Tiles.kt), notifications (Notices.kt, RingService.kt) and the rescue dialog (MainActivity.showRescue). It does not cover examples/panel/. The backend never depends on any of it.
Rules
- One home per thing. Each feature lives in one place. Other places may link to it; they never copy its screen.
- Four tabs, no more. A new feature joins one of them.
- Tokens, not values. No hand-typed
#hexorpxin screen code. See Tokens. - Same parts everywhere. Build from the parts in Components. A new part needs a row there first.
- Every screen shows every state (below).
- No inline style. Screen code does not set colours, sizes, gaps or corners in
style. Use a class. Values known only at run time are fine (a progress width, the app's inset values).
The four tabs
| Tab | View id (frozen) | What it is for | Segments |
|---|---|---|---|
| Today | home | What matters now: next things, what needs a yes, what was noticed, what is broken | — |
| Plan | plan | Things with a time or a list | Calendar · Alarms · Lists · Tasks |
| Chat | chat | Talking to the assistant, past chats | — |
| You | settings | How the assistant works, what it knows, this phone, the app | — |
View ids stay as they are: they are stored (startView) and opened by the app. Only labels change.
Below a tab, a detail opens as a sheet: full screen, back button, title. Sheets may open sheets. Nothing else floats over a screen except the approval card, the chat menu and confirm dialogs.
Where every screen goes
"Links from" means another place may point to the home, never copy it.
| Now (where) | New home | Links from |
|---|---|---|
Home tab (index.html #v-home) | Today | — |
"Needs your attention" (bell, subInsights) | Today, card "Needs you" (open sheet for all) | Today header bell |
Update bar (renderUpdBar) | Today, top banner | — |
| Plan tab: Calendar segment | Plan · Calendar | Today "Upcoming" |
| Plan tab: Alarms segment | Plan · Alarms | Today "Upcoming" |
| Plan tab: Lists segment | Plan · Lists | Today (lists with open items, count) |
Assistant tab (#v-chat) | Chat | Tile "Chat", shortcut new-chat |
Chats history (#hist, subHistory) | Chat, header button → sheet "Chats" | — |
| Chat menu: model for this chat, Send log | Chat, menu | — |
Connect / account (#connect, showConnect, showAccount, showKey, showForgot) | Full-screen "Connect" (before any tab) and You · App · Account | — |
| Settings: power card | You, top card (on/off for everything) | — |
| Settings: Set up (checklist) | You · App · Set up | Today card until done |
| Settings: General | You · App · Appearance and You · App · Connection (split by what it holds) | — |
| Settings: Import schedule | Plan, "+" menu → "Import schedule" | — |
| Settings: Status | You · App · Status | Today banner when something is down |
| Settings: Voice | You · Assistant · Voice | — |
| Settings: Integrations | You · Assistant · Skills (segment "Plugins") | — |
| Settings: Recipes | You · Assistant · Skills (segment "Recipes") | Chat (after a recipe card) |
| Settings: Intelligence | You · Assistant · Models | Chat menu ("model for this chat" stays per chat) |
| Settings: Memory | You · Memory (segment "Folders") | Today "Needs you" (unsure facts) |
| Settings: Mind map | You · Memory (segment "Map") | — |
| Settings: Automation (reminders) | Plan · Tasks | Today "Upcoming" rows |
| Settings: Automation (recent actions, undo) | Today, card "Done lately" → sheet "Activity" | Chat (a tool step's undo) |
| Settings: Alarms (jump to Plan) | removed: Plan · Alarms is its home | — |
| Settings: Calendar (jump to Plan) | removed: Plan · Calendar is its home | — |
| Settings: Lists (jump to Plan) | removed: Plan · Lists is its home | — |
| Settings: Location | You · Devices · Location | — |
| Settings: Noticing | You · Assistant · Noticing | — |
| Settings: Health | You · Devices · Health | — |
| Settings: Morning | You · Assistant · Morning | Today (brief card) |
| Settings: Computers | You · Devices · Computers | — |
| Settings: Devices (phones, tokens) | You · App · Access | — |
| Settings: Privacy (phone capture) | You · Devices · Privacy | Today (capture paused/on) |
| Sounds (from Alarms) | Plan · Alarms, "Sounds" row | — |
| Accounts (admin) | You · App · Account | — |
Usage panel (examples/panel/) | not in the app (separate page) | — |
You is one list in four groups, in this order. Search stays at the top.
| Group | Rows |
|---|---|
| Assistant | Models, Voice, Skills, Noticing, Morning |
| Memory | Memory (Folders · Map) |
| Devices | Privacy, Location, Health, Computers |
| App | Set up, Appearance, Connection, Status, Access, Account |
Check before the redesign ships: the 21 old Settings rows, 3 Plan segments, Chats, Connect, Account, "Needs your attention" and the update bar all appear above. Three rows are removed on purpose: they were second doors.
States every screen shows
| State | When | Looks like |
|---|---|---|
| Loading | Waiting for the API | The card's own skeleton lines. Never a blank screen over 300 ms. |
| Empty | Nothing to show | An .empty line that says what will appear, and one action ("Nothing coming up." + "Add event") |
| Error | The call failed | The server's plain message + "Try again" |
| Offline | Server not reachable | #net banner on top. Messages wait in outbox and send later. |
| Signed out | No token, or 401 | The Connect screen, before any tab |
| Off | Power is off (GET /v1/power) | Today shows one card, "Everything is stopped", with the switch |
Voice, approvals and notices
- Voice screen (
AssistActivity): see-through, dark, white text, glow at the bottom. Shows what you said, then the answer as it is spoken. A tap outside stops it. - Live mode in Chat: the send button turns
badand pulses while listening. - Approval card: above the composer. The core's
questionanddetailsfirst; the model's reason under them, labelled "Why". High risk shows the exact command in a code box. - Notices: in the app, a notice is a row in Today "Needs you", never a pop-up. On the phone, three channels: normal, quiet, urgent. Tap opens its chat.
- Alarms ring in
RingActivity: big time, label, Snooze and Stop, dark. - Rescue dialog: "The app did not start", with "Update now" and "Reload". Native Android style.
Layout and safe areas
- The app passes bar sizes as
--sat,--sab,--sal,--sar. Views keep clear of them. - Page header: page title (
type-display) on the left, up to two icon buttons on the right. - Tab bar: floating, bottom,
radius-2xl. - Chat: messages scroll. Approval cards, the offline banner and the composer stay at the bottom.
- Widths: see Spacing and layout.
Words
- Short sentences. Common words. Say what happens: "Turn off to stop everything."
- Titles: one or two words, sentence case ("Needs you").
- Buttons: a verb ("Add event", "Try again", "Snooze").
- Errors: what went wrong and what to do. No codes on screen.
- Talk to the user as "you". The assistant says "I".
- No product name on screen. Use the display name (Principles rule 11).
Add a screen or a feature
- Pick its one home from the table above, and add a row. If it fits nowhere, it goes in You.
- Name the routes it calls (API).
- Build it from parts. No new colour, size or corner.
- Show every state.
- Phone features: add the bridge method on both sides and to the frozen list in App structure. Safety: Safety rules.
- Words: title one or two words; one short hint line.
- Test (below), and update this page in the same change.
Test a page change
There are no page unit tests. Each change passes these by hand:
- It parses. The release step checks the script.
- Bridge kept. No name in the frozen lists may disappear:
grep -o "NativeApp\.[a-zA-Z]*\|NA\.[a-zA-Z]*" examples/dummy-client/index.html | sed 's/.*\.//' | sort -u grep -o "window\.__[a-zA-Z]*" examples/dummy-client/index.html | sort -u - In a browser against a test server: every tab and sheet opens with no console error.
- On the phone: no rescue dialog; tabs, a sheet, a chat with a tool call and an approval, a shortcut and a tile all work.
- Screenshots, light and dark, each tab at phone width, before and after.
- Reduced motion on: nothing slides.
- TalkBack: every button reads a name.
- Safety grep: the diff has no
innerHTMLwith data,eval,new Function,<iframeor<script src.
Not decided
- Whether Mind map stays a segment of Memory.
- A skeleton style for loading cards.
- Whether
examples/panel/folds into You · App · Status later.
Gaps
- The page still has the old tabs: Home, Plan, Assistant, Settings.
- About 91 inline
styleuses remain in the page.
Live: screens, light and dark
A real layout in a phone frame: header, content cards and the bottom tab bar. Tap a tab.
Team sync
10:00 · in 12 min
Needs you
1 approval waiting
Morning brief
3 things, 1 notice
Team sync
10:00 · in 12 min
Needs you
1 approval waiting
Morning brief
3 things, 1 notice
Each frame is forced to its own theme, so you see both at once on any site theme.