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

  1. One home per thing. Each feature lives in one place. Other places may link to it; they never copy its screen.
  2. Four tabs, no more. A new feature joins one of them.
  3. Tokens, not values. No hand-typed #hex or px in screen code. See Tokens.
  4. Same parts everywhere. Build from the parts in Components. A new part needs a row there first.
  5. Every screen shows every state (below).
  6. 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

TabView id (frozen)What it is forSegments
TodayhomeWhat matters now: next things, what needs a yes, what was noticed, what is broken—
PlanplanThings with a time or a listCalendar · Alarms · Lists · Tasks
ChatchatTalking to the assistant, past chats—
YousettingsHow 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 homeLinks 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 segmentPlan · CalendarToday "Upcoming"
Plan tab: Alarms segmentPlan · AlarmsToday "Upcoming"
Plan tab: Lists segmentPlan · ListsToday (lists with open items, count)
Assistant tab (#v-chat)ChatTile "Chat", shortcut new-chat
Chats history (#hist, subHistory)Chat, header button → sheet "Chats"—
Chat menu: model for this chat, Send logChat, menu—
Connect / account (#connect, showConnect, showAccount, showKey, showForgot)Full-screen "Connect" (before any tab) and You · App · Account—
Settings: power cardYou, top card (on/off for everything)—
Settings: Set up (checklist)You · App · Set upToday card until done
Settings: GeneralYou · App · Appearance and You · App · Connection (split by what it holds)—
Settings: Import schedulePlan, "+" menu → "Import schedule"—
Settings: StatusYou · App · StatusToday banner when something is down
Settings: VoiceYou · Assistant · Voice—
Settings: IntegrationsYou · Assistant · Skills (segment "Plugins")—
Settings: RecipesYou · Assistant · Skills (segment "Recipes")Chat (after a recipe card)
Settings: IntelligenceYou · Assistant · ModelsChat menu ("model for this chat" stays per chat)
Settings: MemoryYou · Memory (segment "Folders")Today "Needs you" (unsure facts)
Settings: Mind mapYou · Memory (segment "Map")—
Settings: Automation (reminders)Plan · TasksToday "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: LocationYou · Devices · Location—
Settings: NoticingYou · Assistant · Noticing—
Settings: HealthYou · Devices · Health—
Settings: MorningYou · Assistant · MorningToday (brief card)
Settings: ComputersYou · Devices · Computers—
Settings: Devices (phones, tokens)You · App · Access—
Settings: Privacy (phone capture)You · Devices · PrivacyToday (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.

GroupRows
AssistantModels, Voice, Skills, Noticing, Morning
MemoryMemory (Folders · Map)
DevicesPrivacy, Location, Health, Computers
AppSet 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

StateWhenLooks like
LoadingWaiting for the APIThe card's own skeleton lines. Never a blank screen over 300 ms.
EmptyNothing to showAn .empty line that says what will appear, and one action ("Nothing coming up." + "Add event")
ErrorThe call failedThe server's plain message + "Try again"
OfflineServer not reachable#net banner on top. Messages wait in outbox and send later.
Signed outNo token, or 401The Connect screen, before any tab
OffPower is off (GET /v1/power)Today shows one card, "Everything is stopped", with the switch

Voice, approvals and notices

Layout and safe areas

Words

Add a screen or a feature

  1. Pick its one home from the table above, and add a row. If it fits nowhere, it goes in You.
  2. Name the routes it calls (API).
  3. Build it from parts. No new colour, size or corner.
  4. Show every state.
  5. Phone features: add the bridge method on both sides and to the frozen list in App structure. Safety: Safety rules.
  6. Words: title one or two words; one short hint line.
  7. 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:

  1. It parses. The release step checks the script.
  2. 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
    
  3. In a browser against a test server: every tab and sheet opens with no console error.
  4. 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.
  5. Screenshots, light and dark, each tab at phone width, before and after.
  6. Reduced motion on: nothing slides.
  7. TalkBack: every button reads a name.
  8. Safety grep: the diff has no innerHTML with data, eval, new Function, <iframe or <script src.

Not decided

Gaps

Live: screens, light and dark

A real layout in a phone frame: header, content cards and the bottom tab bar. Tap a tab.

Light
Today

Team sync

10:00 · in 12 min

Needs you

1 approval waiting

Morning brief

3 things, 1 notice

Dark
Today

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.