allternit-ai, src/fabric-session/phone/), the iPhone app and the native Android app follow one contract. Where they differ, the sections below say so. This page is for developers. For the user view, see Composer and Code session list.
Contract
Mode orb
The mode orb is the one control for switching mode. It sits on the bottom line of every view: Home, Bots, Code and ACI, and also Projects, Artifacts, Settings and drill-down screens. On a view with a composer it is the composer’s orb line. On a view without one it is a docked orb. No view locks you into a mode.- Size. The orb is 41 points (41 dp on Android) and solid at rest. The open pill is 46 points, with labels.
- Hold and slide. Press the orb and slide to switch mode in one move; lift to pick. A clear glass lens follows your finger, magnifies the item under it and stretches with speed. It overshoots a little and settles, gives one haptic per mode, and selects on release. There is no blur anywhere: the text behind the pill and the lens stays sharp.
- Glyphs. Each mode has its own animated glyph, from one shared spec (
glyphs-mode.json). The web phone usesModeGlyph, iOS usesModeGlyphView, and Android draws it on a Canvas inAnimatedGlyph.kt. - Wordmark spell-in. On a mode switch the header wordmark (A://TERNIT, A://BOTS, GIZZI CODE, A://ACI) spells in one letter at a time, about 35 ms per letter. With reduced motion it appears at once.
- Reduced motion. The lens does not swell, stretch or magnify, and the glyphs hold still.
PhoneOrbDock, which opens the hub through the allternit:open-mode-hub event. It hides while the composer’s own orb row is on screen.
Rail
The rail is the drawer, and it lists sessions only.- Slide. The page slides right to about 80% of the width at full size, with no scale. It keeps the phone’s corner radius and a thin edge, and a light dim covers it. The slide follows your finger and snaps on release by velocity. Tap the strip of page to close. With reduced motion the rail fades in.
- Contents. The wordmark, Needs you, search, Recents with View all, then one row per session (the mode icon and an unread dot). Your account is at the bottom left and the New chat pill at the bottom right. There is no mode switcher in the rail.
- Pages. Projects, Artifacts, Automation Tasks and Catalog (and, in ACI, MCP Apps, Extensions, Computers and Teach) are in the mode’s pages menu (see Headers). The Home pages menu also holds Meetings and Phones. The Desktop rail keeps its page rows.
- Pull to search. Pull the session list down. The search button grows into a blue Search pill, with one haptic at the threshold. Release to open search at the top of the screen with the rail at full width and the keyboard up. On iOS, search opens as a full-screen cover and pull-to-refresh is gone.
- Hold to preview. Hold a session row. The row lifts with a preview of its last messages, the background blurs, and a menu opens under it: Pin, Rename, Share, Move to project, Archive and, at the bottom in red, Delete. Delete always asks you to confirm first (iOS shows a dialog; the web phone uses hold-to-confirm). It works on the rail rows and on session overview cards. Move to project is hidden until it has a handler. On Android, Delete stays in the card’s ⋯ menu (hold-to-delete strip), and Bots rail rows have no Delete because a bot is not a session.
Headers
Every phone header is one row, with no capsule behind it.- Wordmark. The mode wordmark sits at the left, with a small ⌄ in the four main modes. Tap it for the mode’s pages menu: Projects, Artifacts, Automation Tasks and Catalog in Home, plus Meetings and Phones; the matching pages in Bots; and MCP Apps, Extensions, Computers and Teach in ACI.
- Icons. The view’s plain icons sit at the right, dark. Code has the thread overview and the Terminal switch.
- No New in headers. On views without a composer (Projects, Artifacts, Automation Tasks), New is a dark pill at the bottom right: + New project, + New artifact, + New session. It hides while you scroll down and returns when you scroll up. Home, Bots and Code have no pill, because the composer starts the work.
- Chat actions. Share, Pin and Archive moved from the old ⋯ to the chat’s own menu, on the title.
Search
Search uses one placement everywhere: the field drops in at the very top under the status bar, the page slides down one row, the keyboard comes up, and Cancel closes it. It covers Bots, Projects, Artifacts, Code sessions, Settings, Catalog, Computers, MCP Apps and ACI Extensions. The rail uses the same field inside the rail. On the web phone, the search button in a section’s floating bar (Automation Tasks, Overview) opens the same top field. On Android every screen in this list uses the top field.Artifacts filter
The Filter icon in the Artifacts header opens one menu that grows out of the button like a drop and shrinks back on close. It is clear glass, with no blur behind it.- Who: All, Pinned, Yours, Shared with you.
- Type: All types, then Docs, Sheets, Slides, Sites, Design, Images, Data, Whiteboard and Other. The kind tabs row is gone; this group holds the same kinds. The list scrolls when it is long.
- State. The checked rows have a checkmark. A picked type puts its icon on the accent fill in the Filter button. A Who choice other than All adds a small accent dot.
- Nothing matches. The view shows “No matching artifacts” and “Try a different filter”.
- Build. iOS (
PhoneFilterMenu, with a View group for layout and archive) and Android (LibraryFilterMenu, a popup) build it natively. The web phone reuses the sharedFilterMenufromui/polish.
One background and the terminal
Every view draws one background edge to edge. The white header band and the grey wash behind it are gone. The terminal view is black edge to edge, including the status bar and home indicator strips, with light bar icons. On iOS the terminal strips come fromTerminalChromeKey; on the web phone the rule is CSS only.
Code composer
At rest the Code composer is a top rule and one prompt row.- Top rule, left: the context meter.
- Top rule, right: the computer chip, beside the model.
- Header: the Code and Terminal switch is in the Code header, always visible, beside the thread overview.
- + sheet: the permission mode.
- While typing: the folder, branch and worktree, and the last run’s usage, show under the composer.
Composer rest and Tools
The composer is one line at rest and opens on focus. The focus ring draws only for keyboard focus (src/lib/input-modality.ts sets data-modality on the html element). The mode orb sits on the bottom line (see Mode orb). The New orb sits at the composer’s top corner. The New orb shows only when a session is open, and logic for the new item lives in src/shell/new-item.ts. Hosts with no composer, such as Settings, open the hub through the allternit:open-mode-hub event.
Code status signals (C6)
The node owns the signals, incmd/allternit-api/src/code_session_status.rs. They are session metadata keys that clients cannot write: needsInput, needsInputAt, needsInputKind (permission or question), readyForReview, readyForReviewAt. Absent means false.
needsInputis set when a permission or question is asked, and cleared when no ask is pending, on error, on idle and on run start.readyForReviewis set on idle when the run sentfile.editedor finished an edit, write, patch or artifact tool. It clears on run start or onPATCH { markReviewed: true }.- Clients send
markReviewedwhen a session is opened. The web does so only while the Code screen is visible:markSessionReviewed(id),registerCodeViewOpen(),sessionApi.markReviewed(id). - An always-on watcher reads the gizzi
/v1/global/eventstream, so flags update with no client connected. Open clients getsession_flagsevents on/agent-sessions/sync. The sync stream closes when the gizzi stream ends so clients reconnect. - Web helpers:
codeSessionFilterStatus,isNeedsInput,needsInputKind,isReadyForReviewinsrc/lib/code-session-status.ts. Filters live incomponents/session-overview/code-session-filter.ts. - Known limits: events while the node is disconnected are missed, and a thread placed on another server takes its flags from that server.
Shelves hub
src/shell/mode-hub/contract.ts holds the sections for each mode, the timings (HOLD_MS 450, HOVER_INTENT_MS 120), the haptic map and the event names. ModeHubHost is mounted once in the phone shell and once in the desktop shell. After a pick it fires allternit:mode-arrive with { from, to }. With reduced motion, states change at once. The old menu hold fan and Bots shelf (menu-hold.ts) are removed.
Titles, intros and arrivals
The motion numbers (dock distance, springs, intro unlock, arrival timeline, drawer push) live insrc/design/polish/contract.ts and dock-math.ts. Swift and Kotlin copy them. Arrivals and mode intros trigger on a change in the shell mode store, and also on allternit:mode-arrive, so pill taps, rail buttons and deep links count. With reduced motion, titles and arrivals fade. Haptics do nothing on Desktop and iOS Safari. For users, see Phone titles, intros and arrivals.
First-visit intros store their seen state in the account flags intro*SeenAt (see Account flags). Each client keeps a local cache so an intro shows once even when offline.
Calm errors
src/lib/errors/plain-error.ts exports plainErrorText(err, fallback), stripStatusText, statusSentence and isComputeGateRefusal. Use plainErrorText for any text shown to a person. A 409 compute_required or 428 on a read shows no error: the list shows its empty state and the chip shows. On an action the compute gate sheet opens as before. Chip state comes from useComputerChip() in PhoneNoComputer.tsx.
Haptics and accounts
src/lib/haptics.ts exports light, medium, soft, selection, setHapticsEnabled and isHapticsEnabled; the setting key is allternit.haptics. src/lib/accounts/switch-account.ts holds switchAccount and switchAccountCleanup. Clerk single-session mode is still on for the instance, so there are no session rows. Switching person is done with remembered accounts instead (below).
Remembered accounts
Accounts used on a device are remembered under one key on both platforms:allternit-remembered-accounts-v1. On the web and PWA it is in localStorage. On iOS it is in UserDefaults. The value holds, for up to 8 accounts, a user id, name, email, avatar, plan label and last-used time. It never holds a password or a token. It is not in the per-person key list, so the person cleanup and sign-out keep it.
- Web:
rememberAccountruns on every Clerk-confirmed sign-in. Helpers:listRememberedAccounts,forgetRememberedAccount,setRememberedAccountPlan,switchToRememberedAccount,addAnotherAccount,signInUrlFor,readSignInEmail,useRememberedAccounts. A switch runs the person cleanup, thensignOut({ redirectUrl })to/sign-in?email=. The PWA reads?email=infabric-session/App.tsx. Electron hides the section. - iOS:
RememberedAccounts.*,PersonSwitchOrder.runandAccountSwitch.switchPerson(email:authManager:). The email is passed to Clerk’sAuthView.initialIdentifier(_:)throughAuthManager.pendingSignInEmail. A person change also runsAccountSwitchCleanup.resetLocalState(reason:). Device credentials are keyed per Clerk user (RuntimeCredentialKeys).
iOS launch arguments (DEBUG builds)
These open a screen directly, for screenshots and checks. They exist in DEBUG builds only, are listed in the onboarding bypass inAllternitApp.swift, and are constants on LaunchArgument. Add -sample-workspace for sample data; the Code ones also take -code.