Commit Graph
11 Commits
Author SHA1 Message Date
Jean-Pierre MartineauandClaude Fable 5 4aef3e7b82 Tests: one way to read a screen
Eleven files defined the same _plain (plus test_chat's _strip_ansi and
test_timemachine's renderable flavour), and two of the copies had
already diverged into join-without-strip. tests/conftest.plain is now
the single strip-and-join reader — a list of lines or a bare string —
and every file imports it; the local variants keep their names so call
sites stay put (housekeeping H-003).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 23:12:24 -04:00
Jean-Pierre MartineauandClaude Opus 5 7b3fdff84e Live feed: the way out, where every list keeps it
The feed was the one screen in the app with no Back row. Esc worked, but
the exit group is not a shortcut — it is the app's standard closing
furniture, and a screen that lists rows and offers none reads as a screen
you have to already know how to leave.

So the cursor gains a stop past the oldest packet: a blank separator and
the bare word Back, exactly the shape back_rows() gives a select list,
drawn by hand because the feed is a rendered screen rather than a list of
choices. It is pinned chrome, struck from the viewport before the feed
windows into what is left — so it sits at the foot of the screen however
far the packets have scrolled, and the body still never scrolls as a
whole. Enter on it resolves what Esc resolves.

That makes the cursor one index over len(feed) + 1 stops, which collapses
three special cases into a clamp: the "nothing highlighted" state the
page keys used to slide the bare window in is now simply "the cursor is
on Back", and an empty feed opens with the only stop it has already
highlighted. End lands on the list's last row, as it does on every other
list — the oldest packet is one ↑ up from there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 19:27:33 -04:00
Jean-Pierre MartineauandClaude Opus 5 01ca242c98 Live feed: the lane is about the packet, whatever the packet is about
The NODE lane suited the two classes that name a node and left every
other one reading a dash. On this mesh that is half the traffic: the
direct messages, requests, responses, returned paths, acks and traces
that relay past us naming no origin. So the lane asks each class its own
question instead, and the header says SUBJECT — the word that stays true
down the whole column.

An advert or a telemetry frame is still about its node. A channel text is
about its channel, named by the key whose MAC confirms the frame — never
by the fingerprint alone, which 256 buckets make no proof at all; a
channel we hold no key for reads as that fingerprint and says so. A
direct message, request, response, returned path or anonymous request is
about the two nodes it travels between, drawn sender → recipient on the
hop-sequence widget, so endpoints read exactly as route hops do: resolved
names, key-derived hues, our own node white the moment a frame is
addressed to us. Too wide, and the sender drops to its hash — the frame
is addressed, so the addressee is the half worth the cells. An ack is
about the message it answers, a trace about its tag. And an unsigned
channel post is filed under its channel rather than the bare word
"channel", which named nothing.

Half of that was unreadable before because nobody had opened the frame.
The companion hands every overheard packet to the library, which decodes
the body for exactly two classes — advert and channel text — and leaves
the rest as bytes. Those bytes are not opaque: MeshCore addresses a frame
in the first few of them, and core/frames.py now reads them, class by
class, against the layouts the protocol's own docs/payloads.md publishes.
The trace tag is the little-endian uint32 the firmware writes, so it
reads as the same number a trace reply reports; an ack's checksum keeps
wire order, the form the companion reports its own delivery acks in. Two
checks guard every decode, because a wrong slice yields not an error but
a plausible-looking hash: the frame's payload version must be v1 (the
header reserves two bits for a v2 that widens both hash and MAC), and the
body must be long enough for the layout its class promises. Either
failing yields nothing at all.

The feed opens seeded from history, so any of this that lived only in a
live event's raw payload would leave the opening screen blank — the same
problem the channel-text crypto trio had. Same answer: three columns
(dest/src/tag), written on capture and restored to the very keys the
event used, so a replayed frame and a fresh one read identically all the
way up. Older rows carry NULL until re-heard.

The viewer gained the matching rows: to, from, tag, acks, and a channel
for a datagram — whose body is not text, but whose MAC still names it.

Verified against the MeshCore protocol documentation and firmware source,
then corroborated on the air: every frame captured off the radio has a
body length that decomposes exactly into its documented layout, an
anonymous request's 51 bytes (1 + 32 + 2 + one AES block) included.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 19:11:07 -04:00
Jean-Pierre MartineauandClaude Opus 5 64ac7dc2ed Live feed: column headers over the lanes, the app's own cursor
Two bits of chrome the screen had been going without.

A column header, pinned above the rows. It needs none of the base
screen's sticky-header machinery: the feed windows inside the space the
chrome leaves, so the body never scrolls and the header cannot travel off
the top of it. Nothing here sorts — a feed is a stream and its one order
is the status line's to state — so no column carries the contact list's
sort triangle or its lit active-column style. These are signposts, not
controls.

Getting a label to sit over its values meant the row and the header
having to agree about the lanes, so both now measure them from one set of
constants. That turned up a real defect: the RSSI lane rendered 11 cells
when a packet carried a reading and 10 when it didn't, so rows were
ragged by one and the class-label threshold was a cell short — at exactly
its own width the row lost its last character. Both readings now
right-align their number in a shared field, their labels right-align over
the same field, and an empty lane pads to what it would have filled.

And the highlight is the app's own at last: ❯ over a brand row, as every
select list draws it, in place of the ▸/accent this one screen had
invented. The lanes keep their colours over the tint — those are the
content; the pointer is what says "this row".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 03:35:52 -04:00
Jean-Pierre MartineauandClaude Opus 5 db68a17e23 Live feed: the route is Enter's job, not a lane's
Drop the via chain from the feed row. Whatever the fixed lanes left it
was a handful of cells, so a route never actually arrived — it arrived
elided to a stub that named one hop and hinted at the rest, which is the
least useful form a route can take. A route is a shape rather than a
lane, and the packet viewer already draws it properly one keypress away:
a wrapped path line over the route graph, with the room to say the whole
thing. So the feed says what arrived and how well it was heard; Enter
says how it got here.

What that buys is the whole row fitting a 72-column screen — 69 cells,
class label included. The label was being dropped on exactly the screens
where it mattered most, to make room for a route that never fitted
either; now nothing competes for those cells and the class reads in words
down to the width where it genuinely can't.

←→ stays: it just has less to do, firing only on a terminal too narrow
for the lanes themselves, and its footer atom appears only there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 03:18:57 -04:00
Jean-Pierre Martineau c2c10aef33 Revert "Live feed: one trailing lane, for whatever the row is about"
This reverts commit 5a6bb3c8f4bba295dc78c288963bd19a893d8802.
2026-07-28 03:14:47 -04:00
Jean-Pierre MartineauandClaude Opus 5 f2330e5372 Live feed: one trailing lane, for whatever the row is about
The dashes were the symptom; the fixed node column was the disease. Most
of what a real mesh carries is relayed flood traffic that names no origin
at all — on live traffic roughly five rows in six — so an 18-cell node
column sat empty down the whole screen while the route, the one thing
those frames do say, was crushed against the right edge. Worse, the cells
it held hostage were exactly the ones the class label needed, so at 72
columns the label was dropped and the row degraded to an icon beside a
column of dashes.

So the node column is gone. Time, class and reception stay fixed; after
them comes one lane holding whatever the row is actually about — a node
that named itself followed by its detail, or, when nobody did, the via
chain given the whole width. The lane still opens at a fixed column, so
names remain scannable down the screen; what changed is that a nameless
row spends those cells on its route instead of on a placeholder.

At 72 columns that buys back both things at once: the class label now
reads in words, and a flood's route gets more room than it has ever had.
A name is capped rather than padded, so a short one hands its spare cells
straight to the route behind it. Nothing stands in for a node that isn't
there — a message with no sender prefix now reads as its conversation
alone rather than the bare word "channel", which also stops a direct
message being mislabelled as one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 03:13:14 -04:00
Jean-Pierre MartineauandClaude Opus 5 3de4f8d9f9 Live feed: file a packet under what it is, and say it once
The class lane and the node lane were saying the same thing. `packet`
names only the event family a frame arrived in, so a relayed flood —
which carries no origin, and so has no node to name — fell through to a
stand-in that showed its parsed payload class. The row read
`📦 packet  channel text`: a generic bucket beside the actual class, laid
out as though they were two facts.

The viewer had already settled this — `class_chrome()` headlines its card
with `📻 CHANNEL TEXT`, not `PACKET`. That decision now lives in
`class_marks()`, which both surfaces read: the card shouts it, the feed's
lane takes it in plain case. So a raw frame files under 📻 channel text /
🎯 trace / 📩 direct message, and even on a terminal too narrow for the
label the icon alone finally says which class it is.

With the class named once, the node lane goes back to being about the
node — and an origin-less flood admits it with a dash instead of
borrowing the class a second time. ANON_REQ's gloss becomes `anon
request`, the spelling the standards already use, which also lets the
lane hold every class whole at 14 cells.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 02:50:03 -04:00
Jean-Pierre MartineauandClaude Opus 5 50a3322b84 Live feed: rows slide sideways; the viewer's via folds
Three surfaces, one thread — a route should be readable where it is,
not only where it fits.

The feed's highlighted row now scrolls horizontally under ←→ (the
app-wide hscroll convention: the ▸ pointer lane pinned, the shift
abandoned the moment the selection moves on, the footer atom surfaced
only while the row overflows). A selected row carries its relay chain
whole so the scroll has something to reveal; every other row keeps
eliding its middle hops, so both ends of the route stay in view.

The packet viewer's `via` row leaves `path_text` for THE path line, and
folds instead of running off: a PathLine handed to Rich now renders
itself as the wrapped shape at whatever cell width the layout works out,
so a value whose lane is decided by the *other* rows' labels no longer
has to compute that width twice. Hops break at their own boundaries and
hang under the value block.

And the viewer's `from` row leads with the shared node-type mark — ★ us,
▲ repeater, ■ room, ◉ sensor, ● node, ○ when neither the packet nor the
contacts can type it — so a sender reads as the same kind of thing here
as it does on the map, in the contact list, and in the route graph three
rows down.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 00:16:22 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 733a68857c Contacts: rename the mislabeled Nodes feature; sharpen node vs contact
The "Nodes" menu was a contacts roster mislabeled — it lists the device's
contacts (get_contacts), which upstream meshcore calls "contact" too. Rename
throughout, no CLI alias:

- tools/nodes.py -> tools/contacts.py (ContactsTool, `meshterm contacts`)
- ui/nodes_screen.py -> ui/contacts_screen.py (ContactsScreen/open_contacts)
- ui/nodelist.py -> ui/contactlist.py (ContactListScreen/ContactRow)
- widgets: NodesSort->ContactsSort, nodes_table->contacts_table

Courier's recipient is a contact you address, so its prose and CLI arg
(`courier queue CONTACT ...`) follow; persisted node_key/node_name stay.

The reception/hardware layer keeps "node" — HeardNode, heard_nodes(),
observations.node, trace_hops.node, map/atlas participants, node types, admin
targets, and the Time Machine's reception picker (its "Nodes" heading stands).
CLAUDE.md's lexicon is rewritten to the refined definitions: node = any mesh
radio; contact = a node your device knows (discovered or added).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 11:42:11 -04:00
Jean-Pierre MartineauandClaude Fable 5 79410c4f16 Live feed: the dashboard's packet stream, promoted to the menu
The feed panel moves out of the dashboard into its own first-class Mesh
tool, right below it: a full-screen newest-first stream with the same
row lanes, highlight walking, and Enter-into-the-packet-viewer, wired
to the hub by its opener exactly as the dashboard is. The dashboard
becomes pure overview — activity, traffic, RF health — scrolling as
one body, and sheds the viewer-only plumbing (prefix bytes, channels,
self name, node types) it only carried for the feed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 00:52:45 -04:00