Loquax: the user interface
Part of the Loquax design record. Two decisions live here: how keys are dispatched, and what an honest delivery display looks like. They share one discipline — a single table read by everything that renders from it — and that discipline is the reason both are on one page.
1. Decision: the input model
This is the hard one, and the browser's answer does not transfer. In a browser, plain letters are free because there is nothing to type into most of the time. In a chat client, the single most common action is typing prose.
Options
A. Modal, vi-style. Normal mode for commands, insert mode for
composing, i to enter, Esc to leave.
For: every key stays available for commands; scales to any number of
bindings; vi users are instantly at home; it is the only option where
j/k mean what they mean in lnomad.
Against: it is the single biggest complaint non-vi users have about
terminal software. A user who types a message, presses Esc out of habit,
and then types "quit" has issued four commands. Mode errors in a messenger
are worse than in an editor because the consequence can be sending
something.
B. Always-insert, everything Ctrl-modified. NomadNet's answer
(NomadNet's Conversations.py, lines 68-80). Focus starts in the compose
box, plain typing always composes, every command is Ctrl-something.
For: zero mode errors; a user who has never read the manual can still
type and send. Against: the Ctrl namespace is about twenty-six slots wide
and readline already claims a dozen of them. NomadNet ran out and started
overloading by focus, so Ctrl-X means two different things depending on
invisible state.
C. Focus-follows-pane. The conversation list and the message list are
command panes with lnomad-style bindings; the compose box is a text pane
where plain keys type. Tab moves focus.
For: no modes to learn, because the mode is visible as which pane has the
cursor; single-letter commands survive in the panes where they make sense;
it matches how tmux, mutt and every mail client behave.
Against: the same key does different things in different panes, which is
a mode by another name, just one you can see. And Tab becomes precious.
D. Prefix key. Everything types; a prefix (Ctrl-Space, Ctrl-A, or
,) introduces a command.
For: unlimited namespace, no modes, tmux and screen users know it.
Against: two keystrokes for everything, including scrolling, which is the
operation you do most.
Decision (2026-08-08)
C, with a command palette (D) layered on it, and no modes.
Concretely:
- Three panes: conversations (left), messages (right, upper), compose
(right, lower).
TabandShift-Tabcycle; a click focuses. - In the conversation and message panes,
lnomad's keymap applies unchanged: the scroll rows verbatim (SCROLL_ROWS,leviculum-ui/src/keymap.rs:666), soj/k,Ctrl-n/Ctrl-p, arrows,Ctrl-f/Ctrl-b,Ctrl-v/Alt-v,Ctrl-d/Ctrl-u,g/G,Home/Endand the wheel all work, in all four idioms, for free. - In the compose pane, plain keys type. Only
Ctrl-andAlt-chords are commands, plus the scroll table'sCtrlandAltrows, which do not collide with readline because they are page motions and readline's are line motions.Entersends: LXMF is email on the wire but chat in every deployed client — Sideband, NomadNet, MeshChat and columba all render conversations, nobody uses the title field — so users arrive with chat expectations, and Enter-to-send is the universal chat convention. Newline isAlt-Entereverywhere and additionallyShift-Enterwhere the terminal speaks the keyboard enhancement protocol (legacy terminals cannot distinguishShift-EnterorCtrl-EnterfromEnter— same byte — which is also whyCtrl-Enter-to-send was dropped; crossterm'sPushKeyboardEnhancementFlagsenables the modern protocol where available).Enteron an empty buffer does nothing. The keymap table carries asend_on_enterswitch; off flips to email style (Enternewline,Ctrl-Dsend) for long-form writers.Ctrl-Don an empty buffer must not send and must not quit. - A command palette on
:in a command pane andCtrl-Pin the compose pane, with fuzzy matching over named commands. This is what makes the scheme learnable: every command has a name, the palette lists them all, and each entry shows its key if it has one. NomadNet's static shortcut bar is the failure mode to avoid. fhint mode fromlnomad(hints,lnomad/src/app/model.rs:1012-1049), extended to conversations. Its best property is that it matches either the hint label or a substring of the target's text (hint_matches,lnomad/src/app/model.rs:1039-1049), softhen typing part of a contact's name jumps to that conversation. That is a better contact switcher than anything in either prior-art program.
What must not be copied: lnomad quits on Ctrl-C from any mode,
before the mode dispatch (the quit row's Ctrl-c, in every pane,
lnomad/src/app/keys.rs:330). In a messenger
that is a half-written message thrown away by a reflex. Ctrl-C in the
compose pane clears the buffer to a recoverable draft; quitting needs
Ctrl-Q or the palette.
The keymap must be one table. lnomad applied single-source-of-truth
discipline to scrolling and nowhere else, and its help overlay's other
groups were hand-typed strings that could drift, until its slice 1b made
them rows of one table (lnomad/src/app/keys.rs:150). Every binding here is one table read by
the key handler, the help overlay, the palette and the footer hints. That
table is also the natural place to hang user configuration later, which
lnomad has none of.
What would change this: if the compose box turns out to be where users spend nearly all their time, B (always-insert, Ctrl for everything) is simpler and has no invisible state at all, at the cost of losing single-letter commands entirely. The way to find out is to build C and count how often focus is in the compose pane.
The quiet keyboard, with its one exception (decided 2026-08-08). The
lnomad rule that single letters are reserved for cheap local actions
(lnomad/src/app/keys.rs:189-191) generalises here to: no single keystroke
may put bytes on the air — except Enter in the compose pane. The
exception is principled, not a leak: the deliberate act was typing the
message into a deliberately focused pane, and Enter completes that act.
Everywhere else the rule is absolute: no key in a command pane transmits,
syncing needs a chord or the palette, announcing needs a chord or the
palette. Everything free is free.
Built 2026-10-25, slice one
loquax tui (the tui cargo feature, which the packages ship; 994, #232;
since 1023 plain loquax with no subcommand, tui staying as its alias) is the
first frontend on the shared widgets. The screen is a model in the
messenger core, loquax/src/ui.rs, no_std like the rest of it (just loquax-core-no-std builds it): UiModel with the conversations, the
selection, the compose field, the focus, the toasts and the palette;
update(model, UiEvent) -> Vec<UiEffect>; and view, which hands the
renderer each pane's lines. The terminal half is the binary's
loquax/src/tui.rs. A send is the CLI's --via auto runner
(send::run_send_auto, which loquax send runs too) and a fetch is
loquax fetch's, each on a tap of the one engine
(loquax/src/fanout.rs) while the screen reads the same events. Sends run
one at a time; a fetch runs alongside them, so a send never waits for a
propagation node that does not answer (order 1072).
In:
- Three panes, focus follows the pane,
Tab/Shift-Tabcycle. - Conversations and messages:
j/k/arrows move,g/GandHome/Endjump,Enteropens the conversation or goes to compose,?help,qquits,:opens the palette. - Compose: plain keys type through the
tui-inputtable lnomad's fields use;Entersends, and on an empty line does nothing;Alt-Enterbreaks the line (since 1002; crossterm reads the ESC CR a terminal sends for it asEnterwithALT, andShift-Enterarrives only under the keyboard enhancement protocol, whichloquaxdoes not switch on yet, so it is bound but legacy terminals cannot send it); the pane grows to five rows and then scrolls;Escgoes back to the messages;Ctrl-Cclears the line into the kill buffer (Ctrl-Ybrings it back) and does not quit. - Everywhere:
Ctrl-Popens the palette,Ctrl-Qquits. - The palette fuzzy-matches the names in
leviculum_ui::commands(send,fetch,quit,help,focus conversations|messages|compose), the one table the desktop GUI will share. - Delivery glyphs from the table in section 2, mapped from the router's states as listed there; received messages, deduplicated by id, with an unread count on a conversation that is not open. A body with line breaks is drawn as its lines, wrapped to the pane at a space, the mark on the first row only and the rest set in by four.
loquax --script <file>runs a key script against the real engine and writes the frames it asks for to a file;loquax/tests/tui_snapshot.rspins a session (open, type two lines, send,◷to✓✓, a two-line reply) that way; a script'snewlinestep isAlt-Enter. A script ticks only when it says so:tick [n], orsleep <ms>(up to 60000), which reads the engine every 20 ms as the idle terminal does and applies one tick per 250 ms of its own length, however long the host took.until leg <direct|propagated> [secs]waits for the runner to report that leg for the newest sent message, sountil leg direct 5thensleep 2500drawsme (direct 2 s):on every run (1014, the second pinned session intui_snapshot.rs).
Not in, and open: history (Loquax keeps no message store yet, so the
screen holds this session's messages and says so), trust states, the
mouse, QR codes, the per-message detail view and its ledger, the
send_on_enter switch and the keyboard enhancement protocol for
Shift-Enter, f hint mode, lnomad's full
SCROLL_KEYS table (only the motions above), and display names (a
conversation is its address; --to lists one from the start). The keymap
is still a match in ui.rs beside the help text, not yet the one table
the decision asks for.
Built 2026-10-26, slice two: the keymap
1030 (#232) closed four items of that list: the keymap is one table,
loquax/src/keys.rs beside the shared scroll rows of
leviculum-ui/src/keymap.rs, which lnomad reads too, and the key
handler, the help overlay, the footer, the palette's keys and the compose
pane's hint all derive from it; lnomad's full scroll table applies in the
two command panes; the send_on_enter switch (config key and palette
toggle); and the keyboard enhancement protocol, pushed where the terminal
speaks it, for Shift-Enter and Ctrl-Enter. With it the four decided
changes of keys, mouse and layout, section 3:
Enter on a message shows its details, compose is i, a, r, Ctrl-p
and Ctrl-n are motions and the palette is : or Alt-x, and Ctrl-c
quits nowhere.
Built 2026-10-26, the chat layout
1033 (#232) is slice 2 of keys, mouse and layout,
section 7: the list as two rows a conversation, most recent first, with
the last line's preview, the time and the unread badge; the conversation
as blocks, ours right and theirs left, with a date line between days, the
new rule where the unread begins and the narrow fallback below 40 cells;
the header with the trust state and the propagation node's state; and the detail view
behind Enter on a message, with the ledger of what this session saw
happen to it, in place of the toast of 1030. The model hears the screen's
size and the clock, so a page is the pane's height and a reply arriving
while the reader is scrolled up leaves the view where it is. Its section
5, "Built", lists where the screen differs from the mockups.
Built 2026-10-26, the colours
1042 (#232) is the colour half of the same slice, section 5, "Colour",
as Lew decided it on 2026-10-26: one token table in leviculum-ui with a
value for each of four tiers (monochrome, 16, 256, truecolor) and two
themes, our blocks tinted blue and theirs grey, the date as a pill, the
new rule in an accent, the delivery tones per theme and tier. The tier
comes from a ladder over --no-color, NO_COLOR, --color, COLORTERM
and TERM, the theme from --theme, the config file's theme key and
the terminal's background, and the palette's theme swaps light and dark
for the session. lnomad reads the same table for its toast, selection,
muted text and chrome bars. Monochrome is the look the frames pin; the
colour is pinned as per-cell style maps beside them. "Colour", "Built",
lists where the build differs from the text.
Built 2026-10-26, the mouse
1036 (#232) is slice 3 of keys, mouse and layout,
section 7, and the proposal "The mouse as a first-class citizen" below:
a click focuses a pane and lands on what is drawn there (a conversation,
its badge, a message, its delivery mark, a link, the compose box at a
cell, a footer item), the wheel scrolls the pane under the pointer, and a
drag over the conversation selects text across lines and messages and
copies it by OSC 52 on release. The two clicks that transmit are the
words send on the compose box's border and the propagation node's state, the same
commands as Enter and F5. --no-mouse and the palette's mouse give
the terminal its own selection back. The OSC 52 sequence and the rule a
link is followed by are lnomad's, moved to leviculum-ui so both
programs read one copy. Its section 5, "What the mouse does", lists where
the screen differs from the table.
Built 2026-10-26, the search
1041 (#232) is slice 4 of keys, mouse and layout,
section 7: / or Ctrl-s turns the list pane into the search, its field
on top and the results under it as the query is typed, conversations by
name and then this session's messages by text, each most recent first,
the first match marked between « and ». A result opens with Enter or
a click, a message's conversation at that message with the match marked in
its block; n/N and Ctrl-s/Ctrl-r step the matches in place, and
Esc brings the list back. The footer while it is open is the search's
own, from the same table. Its section 5, "Built 2026-10-26, the search",
lists where the screen differs from the mockup.
Built 2026-10-26, names
1047 (#232) is slice 5 of keys, mouse and layout,
section 7: a peer is the name it announces, or the reader's petname from
${LNMSG_HOME}/contacts, with the address's first four hex digits after
it (Alice ·4f2a), in the list, the header, the compose box, the detail
view, the toasts and the search. Names are sanitised for display, two that
look alike are both marked ≈, a changed name is said once in the
conversation, and the header says the trust state in words: known,
unknown or blocked. Its section 5, "Built 2026-10-26, names", lists
where it differs from the decision in the mailbox page.
Built 2026-10-27, history
1049 (#232) is slice 6 of keys, mouse and layout,
section 7: conversations, their messages with their marks and ledgers, the
pins, the unread counts and the names heard outlive the process in the
SQLite store of storage. A send cut off by quitting is
◷ again after the restart, with the reason in its ledger. d then y
deletes a message from the device, the palette deletes a conversation or
pins one above the list's rule, and the search reaches older messages
through the store's FTS5 index. Its section 5, "Built 2026-10-27, history",
lists where it differs from the pages.
Built 2026-10-30, the desktop chat
1145 (#232) gives loquax gui the chat, after the phone's design: the
conversation list on the left (avatars with initials in the peer's LXMF
icon colours, the name, the last line, the list's time, the unread count
or our delivery mark, a search, a new conversation by address), the open
conversation on the right (a top bar with the avatar and the name,
rounded bubbles, ours right in the accent and theirs left, grouped, date
lines, reaction pills, position lines that open the map, a pill compose
bar with an emoji button and a round send button; Enter sends,
Shift-Enter breaks the line). A right click on a bubble opens the quick
reactions and reply, copy and delete. The theme follows the desktop's
light or dark setting, which iced reads, and a toggle turns it round; the
map keeps its own (1133). The window draws the shell's model through
loquax::ui::chat, which the phone's facade draws through too: the rows,
the bubbles, the grouping, the marks, the avatars, the tokens below.
Pinned by model tests and one golden picture of the chat pane per theme,
drawn off screen by iced's software renderer
(loquax/tests/golden/gui-chat-*.png).
Not yet in the window (the next slice): forward, select, info and pin on a bubble, the full emoji picker over the emoji table with the recents (the button offers the six quick ones), the address book's names and photos, and the toolbar menu beyond the map.
Built 2026-11-01, the window draws the scene
1218 (#232, slice two of the one UI contract) makes the window a renderer
of loquax::ui::scene, the value the phone's facade is derived from: one
function per node in loquax/src/gui/chat.rs (the top bar, the tabs, the
rows, the chat bar, the groups, the bubbles, the bubble's menu, the
compose bar). The window keeps no rule of its own for the grouping, the
day lines, the liveness words and rings or the list's search
(List::found). A press on a node is its Intent; a click on a row is
a hit on its NodeId, which Scene::action turns into its opening. The
window's keys go through keys::resolve, so the map takes the
terminal's chords (arrows and hjkl pan, Tab steps through the pins,
Enter opens one), and Escape in a stacked chat is Back.
The window shows the shared structure: the reader's top bar with the
avatar, the bar's search and new conversation and the window's theme
toggle as drawn icons, and the tabs with the unread count. From 712
logical pixels (rail, list and a chat of 300) it is Wide, the tabs a rail
at the left; below it is Compact and stacks as the phone does: the list
with the tabs at the bottom, or the open chat alone with a back in its
bar. A resize switches (Scene::in_class, no model needed). The words
are the catalogue's in the desktop's locale (LC_ALL, LC_MESSAGES,
LANG); a few of the window's own words stay English (the empty chat,
the address field, the reply line). The mailbox link's dot on the
reader's avatar is drawn once the scene knows the link (slice three).
Pinned by gui-chat-{light,dark}.png and
gui-chat-compact-{chat,list}.png.
Built 2026-11-01, drafts
1219 (#232): a message typed and not sent stays with its conversation,
on every target, as the messengers do. The model keeps it
(Conversation::draft, loquax/src/ui/history.rs: the text, the
message a reply being written answers, and an attachment list that stays
empty until messages carry attachments). The scene's compose node holds
it (Compose::text, Compose::reply), so a chat opens with it in the
field, and a field reports every change back (Intent::Draft,
UiEvent::Draft): the phone's EditText mirrors the scene and keeps
nothing in Java, the window's editor is put back from the scene when
another chat opens, and the terminal's compose line is the draft of the
open conversation, put back on a switch and at start. A send or a reply
takes it away.
The store keeps it beside the conversation (drafts, schema 8 of
conversation storage), never in the config. A
keystroke moves the write on by half a second
(history::DRAFT_DEBOUNCE_MS); leaving the conversation, quitting and the
phone's session ending write it at once. A conversation not open shows
it as its last line, Draft: … in italics, in the catalogue's words
(draft_row). It counts as nothing unread, raises no badge and moves
nothing in the list. Pinned by a_draft_stays_with_its_conversation, the
terminal's tui_draft.frames, the facade's
a_draft_survives_another_chat_and_a_new_session and the device walk's
draft step.
Built 2026-11-01, the compose bar after Signal
1270 (#232, Lew 2026-11-01): the compose bar is one rounded field with the emoji button at its left edge, and inside it at its right edge the position button (the crosshair ⌖), the camera and the microphone; outside it, right, one round accent button that is a plus while there is nothing to send and Send once there is:
( ☺ Message ⌖ 📷 🎤 ) (+)
( ☺ on my way ⌖ 📷 ) (➤)
The rule is the core's (loquax/src/ui/compose.rs, Round::of): text in
the field (blanks are none) or a staged photo make it Send, and the
microphone hides with it; a shell whose plus has no row keeps Send. The
scene's compose node carries the button set as data
(Compose::round, Compose::buttons, each a ComposeButton with its
node id, its action and its words; Compose::staged), so every target
draws the same bar from it, and what a shell cannot do is not in it
(compose::Abilities: camera, microphone, picker, location).
| Button | Node id | Intent | Shows |
|---|---|---|---|
| emoji | emoji | Emoji | always, at the field's left edge |
| position ⌖ | locate | Locate { peer } | where the shell reads its position |
| camera | camera | Camera { peer }, answered with StagePhoto | where the shell has a camera |
| microphone | record | SendVoice (held, 1222) | where it records, only while the button is the plus |
| plus | plus | Attach { peer } | outside, nothing to send and a row to offer |
| Send | send | Send { peer } | outside, text or a staged photo |
The plus opens the attachment sheet, a Sheet node with its rows
(sheet_gallery Gallery, sheet_file File, sheet_position My
position; a Contact row later). The position button opens the position
sheet straight away, unlike Signal, which buries the position in its
plus: sharing a position is one tap away. That sheet shows the own fix on
the map and its age ("Found 5 min ago"; the scene's Whereabouts) and
the row "Now, once" (ShareFix, "Send my position now" until 1273),
which sends the fix to the chat as the position report of 1209 (a state,
not a message) and closes the sheet, then since 1273 the four shares
(StartShare, the map, "Sharing for a while"); without a fix it says so and offers "Turn location on", the
permission flow of 1201. Both paths lead to the same sheet.
The camera takes a photo at once and stages it in the bar with its
size; the field's hint becomes "Add a caption", and Send sends the
photo and the text as one message (1268's one bubble). The staged photo
went through the same scaling and stripping as a gallery pick
(loquax::photo::prepare), and lives in memory only: a photo is not a
draft. Gallery picks still go at once, as in 1220.
Per target:
- Android draws the bar from the facade's
Messages/Barfields (round,buttons,hint,staged,sheet,sheet_rows, the fix);Query::Baris asked on every change of the field, so the plus turns into Send with the first letter. The camera is the platform's capture intent (ACTION_IMAGE_CAPTUREintoCaptureProvider's one file): the app builds without Gradle and AndroidX, so CameraX is not on the table, and the intent needs no preview code of ours. The sheets are bottom sheets as the map's Friends sheet is. - The window draws the same buttons from the scene. It has no camera, no recorder, no picker and no position today, so its bar is the emoji and Send; a button appears there once the window can do it.
- The terminal keeps its palette and gains no
photocommand: the hosts it is built and tested on have no camera (/dev/video*) and no capture tool (ffmpeg,fswebcam).
Pinned by compose::tests (the plus/send rule, one message of photo and
caption, the share), scene::tests::the_compose_bar_has_its_buttons_and_its_sheets,
the facade's the_compose_bar_stages_a_camera_photo_through_the_gallery_path
and the device walk's compose_bar, camera_photo and
share_position_from_bar steps.
Pixel screens: the tokens
The phone and the window draw with one table of colours and sizes,
loquax/src/ui/chat.rs (LIGHT, DARK, size). The phone's
loquax-android/android/res/values*/colors.xml holds the same colours
name for name, and the_phone_draws_the_same_colours refuses a drift.
The chrome's rows of the table (background, text, text_secondary,
accent, bar, panel, failed_mark_on_panel, selected_row,
badge, badge_text) are the suite's, leviculum_ui::pixel, which
lnomad's window draws in too (#475).
Every text keeps 4.5:1 on its ground, a mark or a control 3:1; the
numbers per pair are the comments in colors.xml.
| Token | Light | Dark | Where |
|---|---|---|---|
background | #ffffff | #17181b | the screen |
text | #1b1b1d | #ececec | names, the compose text |
text_secondary | #5c5f66 | #a9abb0 | last lines, times, date lines, hints |
accent | #3a7d44 | #81c784 | links, an unread time |
bar | #f1f2f4 | #26272b | the chat's top bar, the compose pill, the search |
bubble_ours | #2e6b38 | #3b6b45 | our bubble |
bubble_ours_text | #ffffff | #ffffff | its body |
bubble_ours_meta | #d6eadb | #dbeadd | its time and mark |
bubble_theirs | #e9eaed | #303134 | theirs |
bubble_theirs_text | #1b1b1d | #ececec | its body |
bubble_theirs_meta | #55585e | #a9abb0 | its time |
failed_ground, failed_mark | #ffdad6, #93000a | the same | the failed mark in a bubble |
send, on_send | #2e6b38, #ffffff | #4f8f5b, #ffffff | the send button |
badge, badge_text | #2e6b38, #ffffff | #3b6b45, #ffffff | the unread count |
list_failed_ground, list_failed_mark | #93000a, #ffffff | #ffdad6, #93000a | the list's failed mark |
dim | #99000000 | #b3000000 | under the phone's long press |
panel | #ffffff | #2c2d31 | the reactions and actions |
failed_mark_on_panel | #ba1a1a | #ffb4ab | delete on the panel |
reaction_ours | #5f9a69 | #4f8f5b | our reaction's circle on the panel |
selected_row | #403a7d44 | #4081c784 | a selected message, the open conversation |
The avatar without an icon appearance takes one of eight grounds by the
address's first byte (AVATAR_PALETTE), white letters at 5:1 or more.
Sizes, in the phone's dp and sp, which the window takes as logical
pixels (size): the list's row 80 high with a 56 avatar, name 18, last
line 15, time 13, the unread pill 22 high with a corner of 11 and text
12; the top bar 64 with a 40 avatar and the name at 20; a bubble's body
17, its time 12, its corner 18 and a grouped bubble's inner corner 6, at
most 0.8 of the chat wide, 10 above a group's first and 2 above the rest;
the date line 14; a reaction pill's text 14 and corner 14; the compose
pill 48 high with a corner of 24 and text 17, the send button 48 round.
Bubbles of one sender at most 180 seconds apart on one day form a group
(GROUP_SECS), whose last shows its time, and one of ours whose mark
differs from the next one's keeps its mark.
The second round on the screen, the full key table (vi, Emacs, the mail and the chat programs side by side, per pane), the mouse, the chat layout in text mode and the slices after 1002, is keys, mouse and layout (2026-10-26).
2. Decision: what honesty about delivery looks like
Most chat UIs lie by simplification: one check for sent, two for delivered, and everything ambiguous rounded to the friendlier reading. LXMF has real states and the library reports them, so there is no excuse.
The states as they actually are, from the library survey:
| Situation | Library state | What is actually true |
|---|---|---|
| queued, waiting for a route or a retry | Outbound | nothing has been transmitted |
| computing proof-of-work | Outbound + StampPending | nothing has been transmitted, and it may take a while |
| link being built, or bytes going out | Sending | in flight, no confirmation |
| opportunistic packet handed to Reticulum | Sent | transmitted once, unproven, still retryable |
| propagation node accepted the upload | Sent, entry deleted | it waits at a propagation node; the recipient may never collect it |
| transport proof received | Delivered | the bytes reached the destination identity |
| receiver cancelled the resource | Rejected | they refused it, or their client did |
| node refused the upload (bad stamp) | Rejected | the propagation node refused it, not the recipient |
| five attempts exhausted | Failed | give up, keep the text |
What a truthful UI shows
Different marks for different truths, and words in the detail view. The three that must never be collapsed:
- handed to the network, unproven (opportunistic
Sent), - left at a propagation node for later (propagated
Sent), - arrived at the destination (
Delivered).
columba collapses the first two into one check mark; NomadNet gives them different colours but never words. Words for each, and, crucially, a per-message detail view (columba's best idea) showing delivery method with a one-sentence explanation, attempt count, hop count, and the error string when there is one. In a terminal that is a key press on a focused message.
Claim a read only on a receipt. LXMF has no read field
(leviculum-lxmf/src/constants.rs:60-86), so a read is never inferred from
a proof or anything else. Since 2026-10-31 Loquax carries its own, signed
by the reader, in the lev namespace of the custom field pair: a message
is shown read only when its peer's receipt named it, and a contact without
receipts stays at delivered. The wire, the gating, the read event and the
glyph ladder that replaces the table below are
read receipts.
Say what Delivered means, once. It means the bytes reached the
destination identity, not that a human saw them. The detail view is where
that sentence lives.
Distinguish the two Rejecteds by correlating with the message's
method before the entry disappears. "The propagation node refused this message" and
"the recipient's client refused this message" are different problems with
different fixes.
Handle the restart discontinuity honestly. restore resets every
queued message to Outbound (leviculum-lxmf/src/router.rs:2308-2311). So
after a restart, a message that was "sending" is "queued" again, and the UI
must show that rather than a frozen progress bar. NomadNet's equivalent,
forcing a stale mid-flight message to FAILED on load (NomadNet's
Conversation.py, lines 455-467), is at least honest, though our library
gives us the better option of an honest retry.
Never let a late failure demote a success. columba added exactly this
guard after a real bug. Delivered must be terminal in the UI even if
something arrives afterwards claiming otherwise.
Decision (2026-08-10): the ledger and the glyph
The ledger is one keypress away, inside the per-message detail view — part of the normal program, not a debug flag, but costing no space in the conversation. It is also where the airtime number lives. The ledger rows are stored beside the message in SQLite (a handful of roughly 50-byte rows per message) and share the message's retention (storage).
Decided with it: one coloured glyph per message in the conversation view, carrying the delivery state at a glance. Since 2026-11-01 (1232) the glyph is the tick ladder of read receipts, section 3, two cells wide, and it replaces the 2026-08-10 table, which drew unproven, mailbox and proof as three distinct one-cell marks. The words still keep them apart: the detail view and the screen reader say "sent, not confirmed", "in the mailbox" and "delivered" for what the glyph draws as a clock, one tick and two. The glyph is the compact face of the same state machine the detail view explains; both render from one shared state-mapping table (the keymap discipline above, applied again — the glyph, the detail view and the ledger can never disagree).
The ladder, one shape per rung, each carried by its shape before its colour:
| state | glyph | ASCII | tone | weight |
|---|---|---|---|---|
queued, or sent with no proof (opportunistic Sent) | ◷ | . | grey | normal |
| computing proof-of-work, in flight | braille spinner ⠋⠙⠹⠸⠼⠴ | * | grey | normal, animated on the tick |
left at a mailbox (propagated Sent; on a client of a home node, the home's Sent) | ✓ | v | grey | normal |
arrived (Delivered) | ✓✓ | vv | grey | normal |
read (the peer's receipt, Read) | ✔✔ | VV | green, the accent | bold |
refused (Rejected) or given up (Failed) | ! | ! | red | bold |
The rules it encodes: a tick only for what someone else confirmed, one
from the mailbox, two from the recipient's device; green only for read,
and read is also heavier, so a reader who cannot tell green from grey, or a
monochrome terminal, still sees it; the clock means nobody confirmed it yet,
whether it waits here or left without a proof; animation means "the machine
is working right now" and nothing else, driven by the
event-loop tick so it freezes honestly if the
program hangs. Every glyph is padded to two cells, so the text before it
never moves when the state changes. The phone draws the same ladder as bare
ticks on a 24-unit grid (loquax::ui::chat::Shape, read by Glyph.java);
a failed mark is a red circle with !, and its tap sends the message again.
The table's code home is DELIVERY_GLYPHS in leviculum-ui
(leviculum-ui/src/delivery.rs, since 2026-10-25, 984), one row per state
with its glyph, tone, weight and ASCII fallback; its tests hold the rules
above (a tick only on a confirmation, green only on read, every glyph two
cells, only the working states animate). The
spinner rows draw the shared loading spinner of leviculum-ui/src/spinner.rs,
the one lnomad shows, so its frames are the ones the table lists. The
tones are resolved against the palette by the frontend. Since 1042 that
palette is the token table of leviculum-ui/src/tokens.rs, a colour per
tone for each theme and tier (since 1232 three: pending grey, read green,
failed red), measured against our own block's tint and
its selected tint because a mark only ever sits in our own block: the one
dark-pane palette before it put the yellow at 1.7:1 on a white pane. In
16 colours a mark takes its block's text colour, and the glyph alone
carries the state, as it does in monochrome.
loquax draws it since 2026-10-25 (994), and maps the router's states
onto the rows in loquax::ui::delivery_of: Generating and Outbound are
queued ◷, Sending is in flight, Sent is ◷ (on a client of a home
node ✓, loquax::ui::shown_delivery: the home is the reader's mailbox),
AwaitingCollection is ✓, Delivered is ✓✓, Rejected, Failed and
Cancelled are the red !. The stamping row has no router state yet: the
engine mines without saying so. While a send's runner is still working, a
giving-up state of one of its legs is not drawn, because --via auto
cancels a stranded direct leg and carries the same text to a propagation node; the
! appears when the runner reports it gave up.
A direct leg whose message went onto a link to the peer (Sending) and
got no proof inside the leg's time is unproven, not failed (1002): the
peer answered the link, so it is reachable, and a propagation node's copy would reach
it a second time. The reference never re-sends such a message through a
propagation node on its own either; it waits for the proof and retries on
a new link (reference/LXMF/LXMF/LXMRouter.py:2796,
reference/LXMF/LXMF/LXMessage.py:616-621). So the row shows the clock
and stays there: only a proof (✓✓) or a refusal (!) moves it, while the
router's own retries go on underneath. Lew's test against a third-party
client that receives and never proves turned a delivered message red and
uploaded it to a foreign node before this.
While a send waits, its row names the leg and how long it has been on it,
me (direct 12 s): or me (via propagation node 40 s):, so a spinner that turns
for a while has its reason on screen. $LNMSG_HOME/tui.log holds the same
story in words, at info for Loquax's targets (RUST_LOG replaces the
filter): one SEND leg= to= state= elapsed_ms= line per step of each leg
(path_wait, queued, sending, sent, proof, no_proof, failed),
PATH found to= hops= requests= wait_ms= or PATH not_found, and one
RPC path_table line per call to the daemon with its result. Leaving
gives a running send up to a second to read what the engine already said,
so a script that quits on the proof still logs the leg's sending and
proof (1014); a send still waiting on the network is dropped after it.
A toast too long for one row wraps at the words to up to three rows, the
box growing upward from the footer, and cuts what is left with …: a send
that failed both ways names both legs' reasons on an 80-column screen.
The timeline itself:
14:02:11 queued
14:02:11 no route known, asked the network
14:02:19 route found, 3 hops
14:02:20 link established
14:02:21 sent, 412 bytes
14:02:26 delivery proof received
This is close to free, since the library already emits every one of those transitions, and it turns "why is this taking so long" from a support question into something the user can read.
3. Proposals, not requirements
Everything in this section is a proposal rather than a decision, and several of these will not survive contact with a real user.
Cost before commitment
Show what a message will cost before it is sent, next to the send action:
412 bytes ~7 s airtime at the slowest hop no stamp required
The pieces exist. leviculum_core::rnode::airtime_ms
(leviculum-core/src/rnode.rs:1107) and packet_airtime_ms
(leviculum-core/src/rnode.rs:1701) are public, interfaces report a
bitrate (leviculum-std/src/interfaces/mod.rs:697-699) computed from
spreading factor, coding rate and bandwidth
(compute_bitrate, leviculum-std/src/interfaces/rnode.rs:3441), and
fetch_remote_status (leviculum-std/src/remote_status.rs:187) retrieves
the interface list from the daemon, which is how lnstatus works. Note two
honesty constraints: fetch_remote_status needs the management authkey,
and the status surface reports bitrate but not the raw radio parameters,
so an estimate from bytes * 8 / bitrate is the best available and must be
labelled as an estimate.
When the peer advertises a stamp cost, the estimate must include the
proof-of-work, and that number has to be measured first: the crate
contains no benchmarks, and the cost model (2^cost hashes plus a 3000-round
workblock, leviculum-lxmf/src/constants.rs:53,
leviculum-lxmf/src/stamp.rs:458-466) predicts scaling but not
milliseconds on a Pi.
Offline as a state, not a failure
An offline-first client should look deliberate rather than broken. Two concrete moves:
- A single posture line that says what the program can do right now: "3 peers reachable directly, propagation node 4m ago, 2 messages waiting to send". Not a red error banner; a statement of fact.
- Queued messages shown in the conversation, in place, greyed, with
their reason ("waiting for a route", "computing proof-of-work, about a
minute"). A message the user wrote should never vanish into a queue they
cannot see. The library gives progress and next-attempt time per entry
(
OutboundEntry,leviculum-lxmf/src/router/outbound.rs:58-72).
The mouse as a first-class citizen
Built 2026-10-26 for loquax (1036); section 1, "Built 2026-10-26, the
mouse", says how.
lnomad enables mouse capture unconditionally with no toggle
(leviculum-ui-ratatui/src/terminal.rs:73-85, the capture it takes by
CrosstermTerminal::new) and handles neither drag nor selection
(lnomad/src/app/event.rs:201). In a browser that costs you the terminal's own
copy-paste; in a messenger, where copying message text is a constant, it is
worse.
Proposal: handle drag selection ourselves over the message IR, so selecting
text across wrapped lines and across message boundaries works and copies
via OSC 52 (leviculum-ui/src/clipboard.rs:14-42, lnomad's own until 1036
shared it, which works over SSH). Plus a
--no-mouse flag and a runtime toggle for people who want the terminal's
own selection back. The StyledChar IR already carries per-cell ownership
(leviculum-ui/src/style.rs:95-108), so the hit-testing is a small extension
of visible_links rather than new machinery.
Terminal QR for paper messages and for your own address
PaperMessage::to_uri() produces an lxm:// URI
(leviculum-lxmf/src/paper.rs:172) and the crate stops there. A QR code
rendered in Unicode half blocks is a well-trodden trick, and lnomad
already has the half-block ladder for images. That gives an air-gapped send
path: compose, render, photograph, and the recipient scans it. Also useful
for showing your own address to someone sitting next to you, which NomadNet
does (Ctrl-P in the conversation list).
Constraint: PAPER_MDU is 2210 bytes
(leviculum-lxmf/src/constants.rs:46), which is near the practical limit of
what a QR code can hold and certainly beyond what a phone camera reads off
a terminal at normal font sizes. The UI must say when a message is too big
to be a QR and offer the URI as text instead.
A "what changed while I was away" view
On start, after the first sync, one screen summarising what arrived, grouped by conversation, with the option to mark all read or step through them. Every mail client has this; no Reticulum client does. It fits the usage pattern exactly, because the whole point of the propagation node is that the user was away.
Micron in messages
If FIELD_RENDERER says micron (reference/LXMF/LXMF/LXMF.py:100), render
it with leviculum-micron (leviculum-micron/src/lib.rs:33-35) and
lnomad's renderer. If it says markdown, we already depend on
pulldown-cmark at workspace level (Cargo.toml:82). This is a capability
the workspace has and nobody has spent, and it costs a match statement.
Sending micron is the more interesting half: a compose box with a preview toggle, in a client whose sister program is a micron browser.