Commit Graph
248 Commits
Author SHA1 Message Date
Jean-Pierre MartineauandClaude Opus 5 8fdd7572bd Message paths: hold the fan's shape still across the selection
The dialog ranked layers by selection (priority 3 for the picked path, 2 for the
rest), so every ↑↓ re-elected the spine and re-laid the whole graph out. Rank by
first-heard order instead and move `emphasis`, the way the node detail's Routes
tab already does — the geometry is fixed by evidence, only the white lane moves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 18:12:46 -04:00
Jean-Pierre MartineauandClaude Fable 5 18b1e034fd Node detail: light route labels through coalesced hop ids
The Routes tab mutes every label off the selected route, testing
membership against the route's raw draw hops. But the path graph folds a
short hop into the wide id it can only be among the drawn routes (a
1-byte trace hop beside the same relay's full contact id), so a route
recorded at the short width greyed the very marker its white line rides
through — TSFCT SUTTON-680M's bf→8e→3d route muted YUL-Cartierville.
Decide membership in the graph's own id space instead, by running the
layers through the same coalesce the widget applies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 17:26:39 -04:00
Jean-Pierre MartineauandClaude Fable 5 ceab414ca9 Path graph: bypass a skipped relay through a virtual waypoint
A route that skips a relay another route rides (the A-B-C-D spine
beside the shorter A-C-D) drew its skip edge as a level run straight
through the skipped marker's cell — and under emphasis the subset's
white repainted the spine's own run, so the skipped relay read as
selected (Furthur -> YUL-Cartierville lighting C14903).

_bypass_vias now bends any edge that would run level through a marker
strictly between its ends — by construction a node that edge skips —
around it, through an unmarked via point in the skipped node's own
column on the innermost genuinely free lane: no seated marker, no other
route's level run through that cell, and a lane outside the band only
while _band_rows still fits max_rows (the same budget the detour fold
answers to). No room anywhere keeps the honest level pass-over. _route
threads the vias with its usual level-or-shift grammar, so the bypass
eases out, sits level dead over the marker it clears, and eases back.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 17:07:50 -04:00
Jean-Pierre MartineauandClaude Sonnet 5 5ff8eae74b Node detail: fix tab-strip corners, dim inactive tabs, one rule colour
- Swap the active tab's bottom corners: the flat rule turning up into
  the tab's wall is west+north (╯), and turning back down out of it is
  north+east (╰) — had these backwards.
- The left margin belongs to the tab boxes, not the bottom rule: the
  rule is one continuous line, so it now runs the full width including
  through the margin instead of being indented with the tabs.
- Inactive tab outlines move from "muted" to the dimmer "faint" shade.
- The whole bottom rule is now a single colour (accent, the active
  tab's) rather than mixing accent/faint segments — it's one line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 14:02:52 -04:00
Jean-Pierre MartineauandClaude Sonnet 5 d1c2df61c9 Node detail: flatten unselected tabs into a continuous underline
Only the active tab now breaks the bottom rule (up, across open, back
down); inactive tabs sit flush against it with no corners or seams of
their own, so they read as behind/in-the-dark rather than each having
their own raised box. Top border and its z-order layering (active tab
always wins both corners) are unchanged. Adds a 2-column left margin
when the width has slack for it.

Tab switching moves off the shared Left/Right handler onto Tab/Shift+Tab
only, freeing the arrow keys for other use on this screen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 13:53:02 -04:00
Jean-Pierre MartineauandClaude Sonnet 5 76125f7402 Node detail: box every tab, layer corners by z-order
All tabs now render as full boxes at all times (muted by default,
accent when active) instead of only the active one — so every tab's
width is fixed regardless of selection, and labels never shift
column when the active tab changes. Tabs share a single vertical at
each seam; the shared corner "opens" only at the strip's leading
edge and at the active tab's own left edge, "closing" (ceding to the
tab on its left) everywhere else, so the active tab reads as lifted
in front of its neighbours.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 13:33:35 -04:00
Jean-Pierre MartineauandClaude Sonnet 5 a0f91f3b9c Node detail: box the active tab in the tab strip
Since the strip already spent a blank line above and its own line,
box the active tab in accent-coloured rounded corners with its
bottom edge opening into a full-width rule, instead of a plain
── Label ── heading, now that a third line is on the table anyway.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 13:13:14 -04:00
Jean-Pierre MartineauandClaude Fable 5 b7daa6cb0d Path graph: nest detours on their own lane, fold only when rows are tight
The detour fold ran unconditionally, so a route heard as a sibling plus
an inserted relay always dropped that relay onto the sibling's lane —
and the sibling's straight run drew right over a marker it never visits
(the real YUL-Poly fan collapsed to one flat line through three routes,
with label muting as the only cue). Now the whole fan is measured
against the row budget before the shape is committed: while the rows
allow, a detour nests — its relay takes the lane just outside its
sibling's, on the same flank (a depth floor plus a side tie in the
pack/balance passes), so the sibling visibly skips it and the detour
reads as the wider arc it is. Only a viewport too short for the extra
lane folds detours onto the sibling's lane, weakest first, re-measuring
after each — the last resort, never the default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 11:43:09 -04:00
Jean-Pierre MartineauandClaude Fable 5 bf992979ef Revert the share card QR experiments — back to half-blocks
Braille (one dot per module) would not scan, and the quadrant mosaic
reads worse on screen than the plain half-block form. The original
qr_text render scans and stays.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 10:53:16 -04:00
Jean-Pierre MartineauandClaude Fable 5 a00fbe5639 Share card: quadrant-mosaic QR — braille would not scan
One braille dot per module drew smallest but starves the scanner of
ink (each dot carries its white surround), and phones would not read
it. Quadrant mosaics keep every dark module a solid quarter-cell —
the same ink geometry that made the half-block form scannable — at
half its width: 27x27 cells for a contact URL instead of 53x27.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 10:48:10 -04:00
Jean-Pierre MartineauandClaude Fable 5 f6306170ed Share card: render the QR in braille, one dot per module
A braille cell packs a 2x4 block of modules, so the code draws at half
the width and a quarter of the height of the half-block form (27x14 vs
53x27 for a contact URL) — small enough for the 40-column PicoCalc
panel. Simulated-camera decode tests pass with dot fills down to 50%,
since a phone's blur merges the dots into blobs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 10:37:55 -04:00
Jean-Pierre MartineauandClaude Fable 5 25527356a4 Node detail: Share contact card on the Info tab
The advert menu's own-node contact card generalises into
show_contact_card (QR code over the raw meshcore://contact/add link,
in one floating view); the Info tab gains a 📱 Share contact row that
pops it for the page's node. Offered only when the full 32-byte key is
known — a prefix-only heard node has nothing scannable to encode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 10:28:33 -04:00
Jean-Pierre MartineauandClaude Fable 5 2d6e20ba2e Node detail: fold the vitals into an Info tab
The identity block was eating the stage's vertical budget on every tab.
The pinned chrome shrinks to the one-line identity header + tab strip;
the vitals rows (key, heard, packets, signal, where), the location
preview, and the Open full map / Time machine actions all move into a
new Info tab (replacing the Map tab — the preview now grows into
whatever rows the tab spares). The Routes tab spends the freed lines on
its graph and route list, and the strip costs a single line of air (the
graph's own top padding provides it).

Opening the full map from the page now also seeds the map's find filter
with the node's name, so it opens centred on the node *and* lit among
the rest — exactly as if the user had typed the find.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 09:59:15 -04:00
Jean-Pierre MartineauandClaude Fable 5 8193ac3823 Node detail: pin the stage, window the route list
The page no longer scrolls as one strip — which could carry the route
graph off the screen while the selection below was still driving it.
The identity block, tab strip, and stage are now pinned; the graph's
row ceiling is struck per render against the viewport (compressing its
lanes before anything would overflow), a faint rule closes the stage,
and the route list windows itself into the leftover lines with the
shared ↑/↓ n-more edge markers, whole hanging-wrapped rows at a time.

Enter on a route row now arms a trace on that route directly (the rows
wear the opens-further-prompts …); the dedicated Trace action survives
only as the auto-route stand-in when there is no evidence to list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 03:32:35 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 0e746f2722 Node detail: open the full map centred on the node
The Map tab's inline preview centres on the node's own fix ("… centred here"),
but its "Open full map" action called open_map with only the markers — so the
full map fell back to the persisted global view (wherever the map was last
left) or a fit-to-all-nodes frame, landing somewhere other than the node the
preview had just shown.

open_map gains an optional focus=(lat, lon): given it, the map opens on that
point at the preview's zoom (min(13, max_zoom)) and — mirroring how
LocationPickScreen uses its transient `initial` — deliberately wires no
on_view_change, so a focused peek never overwrites the user's saved global
map_view, even as it is panned. The node detail passes the node's own
coordinates, the same spot the preview is centred on.

Tests drive the real open_map both ways: focused (centres on the node, leaves
the saved view untouched after a pan/zoom) and plain (still restores and
persists the global view).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 23:15:14 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 3c38b366cf Contacts: purge stale contacts by how long since last heard
Add a "🗑 Purge stale contacts…" action at the foot of the Contacts list. It
offers an age ladder (1 week → 1 year, plus a never-heard bucket), each rung
showing a live count of how many contacts it would sweep, so the impact is
visible before choosing; the pick is gated behind a typed "delete" confirm.

A purge deletes each contact from the device table (new Device.remove_contact,
over the meshcore remove_contact command) and forgets it from the cross-session
contact store so a firmware-less bridge doesn't merge it back — but only the
contact is dropped: each node's reception history in MeshTerm is untouched, and
our own pinned node is never a candidate. The contacts cache is invalidated and
the list rebuilt so swept contacts are gone from it.

ContactListScreen gains a `tail` param (symmetric to `lead`) for the action and
Back rows; age bucketing (stale_past / never_heard) is factored out pure and
tested, alongside MockDevice.remove_contact and the screen's tail composition.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 21:22:34 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 94e81a1b82 Contacts: remember heard contacts across sessions
A firmware-less radio bridge holds its contact table only in RAM, so the Contacts
screen and the chat recipient list come up empty (or only as sparse as this
session's adverts) after the bridge restarts, even though you were messaging those
nodes last time. Record every contact MeshTerm reads, keyed by the device's own
public key, and union any the device is no longer reporting back into the list at
the one read chokepoint both lists share (DeviceState.contacts()).

No device write is needed: a direct message addresses a node by a prefix of its
public key, which the remembered contact carries, so a restored contact is
messageable without being written back onto the device. The union is inert where
it isn't needed — a firmware radio reports its whole table, so nothing is added,
no device-type check required — and recording never removes a contact on an empty
read, so a bridge that just restarted doesn't wipe what it knew.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 20:59:34 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 842a58a515 Settings: remember MeshTerm-changed settings across sessions
A firmware-less radio bridge holds its configuration only in RAM, so the node
name, radio parameters, and tuning set through MeshTerm are back to firmware
defaults when the bridge process restarts. Record every setting changed through
MeshTerm (editor, config CLI, and TOML restore all funnel through _apply_setting),
keyed by the device's own public key.

Unlike channels — silently replayed because filling an empty slot overwrites
nothing — a setting is a single canonical value, so replaying a stale one could
clobber a change made elsewhere. So the store never writes on its own: on connect
it detects drift between what it remembers and what the device reports, and a
startup offer lets the operator restore the saved values, adopt the device's
current ones, or stop remembering the device (the "don't ask again" exit). The
offer is quiet unless a connected device actually drifts, so a firmware radio you
don't manage through MeshTerm is never interrupted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 20:59:00 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 711621d69e Channels: remember MeshTerm-created channels across sessions
A firmware-less radio bridge holds its channels only in RAM, so every one is
lost when the bridge restarts — the Channels page came up empty each session
even after you added channels. MeshTerm read channels live from the device and
never remembered them.

Add a durable, per-device channel store (<config_dir>/channels.json, keyed by
the device's public key) that records every channel written through MeshTerm.
On connect, reconcile() replays any remembered channel the device isn't
reporting into a free slot — filling gaps, never overwriting an occupied slot.

The gate is provenance, not device type: only channels you wrote through
MeshTerm are recorded, so a firmware radio you never edit through MeshTerm keeps
an empty record and does a single identity probe on connect (untouched). A
bridge, where every channel is necessarily created through MeshTerm, gets its
whole set back. Every mutation (create/join/import/edit/reorder/clear) now flows
through a single write_channel() boundary that keeps the store faithful.

Verified end to end against the live SPI bridge: write a channel, clear it off
the device to mimic a restart, reconnect in a fresh session, and reconcile
restores it with the right key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 18:20:49 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 c3d712eff5 Channels: offer to add the standard Public channel when absent
An add-action restores MeshCore's built-in fixed-key Public channel on the
next free slot, shown only while no slot already carries the well-known
secret. Leads with the 🌐 globe to distinguish it from the name-derived
# Public channel row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 04:15:58 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 4bce531465 Device picker: list configured TCP profiles in the enumerator
A [profiles.*] TCP entry in config.toml was reachable only via
`meshterm -p <alias>` — the interactive picker built its list from the
live scan plus TCP devices remembered in the DeviceStore, never from the
user's own config. So a hand-authored network companion stayed invisible
until after it had been connected to once.

Fold configured TCP profiles into the picker the same way remembered ones
are: _profile_tcp_devices() rebuilds each into a DiscoveredDevice carrying
its alias as the DEVICE-column name, deduped by stable_id so an endpoint
that's also scanned or remembered keeps its richer row. An unconfirmed
profile shows the muted "network companion" tag and turns "MeshCore
device" once its smoke test passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 03:32:31 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 2561313a16 Node detail: contract a bidirectional repeater knot to one super-node
Three or more repeaters that relay each other in every order are a
strongly-connected component the left-to-right flow graph can't order. The
bidir-pair merge collapsed all of them onto one column, where their markers and
labels piled up illegibly (labels rammed into the trunk line, the ordering
lost). A two-node pair draws fine as a vertical; three-plus does not.

Contract each such knot to a single super-node — the standard SCC-condensation
move, the one honest way to seat a cycle in a DAG layout. pathgraph gains
`bidir_clusters`, which finds the 3+ mutually-linked groups; node detail
rewrites every route's draw sequence so a knot's members become one synthetic
cluster stop, drawn as a single marker labelled by count and shared type
("3 repeaters", or "n nodes" when mixed). Only the graph geometry contracts —
each route row and its trace spec keep every member named in order, so the list
under the graph still carries the exact ordering the marker folds away, and a
trace still arms on the real path. The tidy two-node pair is left exactly as it
was.

Also completes _collapse's emphasis handling: routes made identical by the
contraction now fold to one line that lights when either of its rows is
selected, keeping the strongest priority for geometry and the emphasised copy's
colour for the highlight.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 20:54:36 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 348de1c0af Path graph: hold the layout still when the highlight moves
Selecting a different route on the Node detail Routes tab relaid the whole fan:
priority drove both the geometry (which route is the spine, who owns a shared
relay, the lane packing) and the highlight, and the caller raised the selected
route's priority — so changing the pick seized the centre lane and shuffled
every marker.

Split the two. PathLayer gains an `emphasis` field that governs only the draw
colour and z-order (the highlighted route drawn on top, winning any shared
cell); `priority` alone fixes the geometry. Node detail now pins priority to a
fixed evidence order (route 0, the best-evidence route, is always the spine)
and varies only emphasis with the selection, so the picture stays put and just
repaints — the selected route white, the rest grey, off-route labels muted.
Emphasis wins a shared edge over a higher-priority spine, so a highlighted
alternative paints its whole run rather than dropping out where it overlaps.

The Message paths caller is untouched (emphasis defaults to 0, so its colour
still falls to priority exactly as before).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 20:38:13 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 a770f559cd Node detail: make the Back row leave, like Esc
Committing the Back action resolved a bare "back" token, but the opener's
action loop only breaks on CANCEL (or None) and has no "back" branch — so it
fell through and simply re-showed the page. Back appeared inert while Esc
worked. Resolve CANCEL for the Back row so it leaves the screen on the same
path Esc does, back to the contact list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 20:34:15 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 8d8193b6b1 Node detail: a tabbed stage with a switchable route list
The page stacked the location preview and the route graph down one long
scroll, and the graph was inert — no way to pick which route it lit. Give
it a tabbed stage instead: a one-line strip (new widgets.tab_strip) pages
Map and Routes one full-height view at a time, switched with ←→ (Tab /
Shift+Tab backup; BackTab now dispatches as "shift_tab"). Tabs are
adaptive — only views with content show, a lone tab collapses to a lit
heading, and our own fix-less node falls back to a bare action list.

The Routes tab folds the old route/suggest info rows into a selectable
route list (best marked ★ best, the firmware's device route, then the
good observed alternatives), each spelled contact→relays→us through the
path widget with a hanging wrap. ↑↓ over the rows drives the graph: the
picked route lights white while the rest go grey and every node off it
fades its label to grey (a per-render label_rgb_of closure — the pathgraph
widget stays generic). A dedicated 🎯 Trace this route row opens the trace
flow armed on whichever route is selected (nothing transmits here).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 19:01:10 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 57d413ba42 Topology: find routes with Yen's, not a flooding frontier
Opening the Node detail page for a well-connected contact could hang for
tens of seconds. The cost was topology._best_routes: a best-first walk over
partial paths to the target. On a densely-heard graph every wandering prefix
through the core is cheaper than the one weak link a distant node sits behind,
so the frontier floods the core — millions of dead-end prefixes — before it
ever reaches the target. Measured against the live DB, a single node took 28 s
(4.4M heap pushes), and scenarios() runs twice per page open.

Replace it with Yen's k-shortest-loopless-paths: find the shortest route once
by Dijkstra, then derive each next-shortest by rerouting around one edge of the
last. The work is polynomial in the graph size however dense the core. Verified
against the old search over the real DB: identical k-cheapest costs on all 148
nodes it could finish, and the worst node drops from 28 s to 22 ms (~1250x),
with the full 5 alternatives still found. Tie-ordering among equal-cost paths
may differ, which is moot — scenarios() re-scores every candidate by weakest
link anyway.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 02:17:08 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 b928ae19a3 Path graph: balance alternative flanks so fans draw tighter
Column-packing already collapsed a per-path lane down to the rows a
column actually needs, but it left each node on the *side* of the spine
its jog-order lane fell on. The jog order seats relay-sharing routes
adjacent, which piles column-sharing routes onto the same flank — so a
five-route fan through at most two nodes per column still drew five lanes
whenever one column stacked two above the spine and another stacked two
below, the band being as tall as the deeper flank plus the other.

Balance the flanks instead: 2-colour the alternatives (above/below) to
flatten the deeper flank, so a same-column pair splits across the spine
and the band shrinks to spine-plus-one-each-side. A hard ceiling keeps
balancing from ever drawing a taller band than the jog order would — a
column that genuinely stacks three nodes forces one flank two deep, and
padding the opposite flank to match it (prettier, but a row taller) is
refused. A graph the jog order already draws flat keeps its airy layout
rather than lopsiding a row shorter, since its one-sided alternative has
the same deepest flank and loses the balance tie-break.

Across the live topology this tightens 23 graphs (one by two lanes, e.g.
7bc505 5 -> 3) and leaves 78 unchanged, none taller. The best spine stays
straight where the flanks come out even and leans only gently otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 01:04:16 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 5c6052884a Path graph: pack lanes by column so sparse fans draw tight
A lane per route stacked the band as tall as the graph had routes, even
where the routes barely overlapped: TSFCT SUTTON-680M's five observed
routes drew five lanes deep though at no column did more than two nodes
coexist. A lane is a whole-width row, but two routes need distinct rows
only in the columns where they both carry a node — endpoint to endpoint
every route already shares the origin and us.

So after _assign_lanes seats the routes (best centred, sharing routes
adjacent), _compress_lanes squeezes them: each node keeps its side of the
best spine but slides to the innermost free row in its own column. A
column with one off-spine node claims one flanking row however many routes
fan past it; only a column where routes genuinely stack pays for deeper
rows. SUTTON now draws three lanes / ten rows instead of five / sixteen.

The best path's nodes stay on the spine, so it still runs straight through
the centred endpoints; the even/odd endpoint-centring is untouched (its
single-column shapes can't compress). Adds pack/stack tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 00:14:32 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 8f6fa6b6ae Path graph: centre the endpoints on a row-quantized lane layout
The origin and destination rode the best path's discrete lane, which for
an even lane count is the upper of the two central lanes — so they, and
the spine, sat half a lane above centre. Anchor them at the band's
geometric centre (max_lane / 2.0) instead: identical to the best lane
for odd counts (spine stays dead straight), the midpoint of the two
central lanes for even counts.

Back that with a row-quantized vertical layout so the centring is exact.
Lanes now sit on integer text rows a fixed pitch apart (_LANE_PITCH_ROWS
= 3, two blank padding rows per gap) rather than a continuous dot step;
on an even count the two central lanes are opened one extra row apart, so
the endpoints land on the exact middle row between them instead of a
fractional row that snapped off centre. The band's top is anchored to a
cell-mid row so integer lane rows land dead-on with no per-lane snap
drift.

The public lane_step (dots) parameter becomes lane_pitch (rows); the
node-detail override is dropped so that page shares the 2-row pitch,
keeping only its larger max_rows for busy nodes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 23:47:33 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 25922efb0b Path graph: keep a both-ways pair from jamming the x-balance
A pair walked in both directions is a 2-cycle in the edge set; the
longest-path relaxation loops through it and inflates every downstream
depth toward the node-count cap, dragging other relays hard against the
ends (a one-hop relay landed at x=0.09 instead of its natural 0.33).
Rank balanced_x over the graph with each such pair merged to one
representative — the acyclic flow the picture really is; the pair, drawn
as a single vertical, rightly shares an x anyway.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 22:14:42 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 8b64b39513 Path graph: keep edge-pinned relay labels from vanishing
A relay a balanced rank pins near a canvas edge centred its long label
off-canvas, placed nothing, and — unlike an endpoint — had no inward-slide
or side-placement fallback, so its marker went silently unlabelled. Give
every node the endpoint's inward-anchor clamp and marker_label fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 21:59:02 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 891487e928 Path graph: multilane-highway flow, bezier lane changes, no doubled edges
Every node now sits on a level platform: an edge leaves level, shifts
once, arrives level, so an off-lane relay reads as a flat-topped
trapezium instead of a pointed peak or valley. The shift itself is a
cubic-bezier S-curve with horizontal tangents at both ends, easing out
of one platform and settling into the next with no corner anywhere.

Every edge is keyed by its unordered node pair and drawn exactly once,
killing the doubled/offset lines that came from a pair walked in both
directions. That bidirectional pair is the sole edge drawn as a bare
straight segment (near-vertical when the layout stacks the markers) —
the one place an up-and-down line is the honest picture.

A direction arrow embeds in the trunk just before us, so the whole
graph reads as a directed run node → us.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 21:06:26 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 9cf5a9cc78 Node detail: draw routes inbound (node → us), keep only good ones
The route graph on the node page is built from observation data — every
route it knows was received, not sent — so it now reads left to right in
that inbound direction: the contact on the left, our star on the right.
Renames the section "Routes heard" and the caption "node → you, as heard",
dropping the "path to node" framing that over-claimed a direction observed
paths may not hold in reverse.

Only good alternatives are drawn now, not every chain ever heard: an
observed route earns a grey lane only when its evidence is fresh (its
stalest hop heard within ~4 evidence half-lives) and not a far-weaker
outlier (score within a quarter of the strongest observed). The
best-evidence route still rides white regardless, and a bare direct
neighbour keeps its zero-hop line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 01:22:28 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 56f4346ad8 Contacts test: Enter now resolves the highlighted node
Track the Node detail wiring: Enter is no longer inert, it hands the
whole Contact record on (open_contacts opens its detail page), and each
row carries the Contact itself. Esc still leaves with CANCEL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 02:06:18 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 598b272483 Emoji width: carve wide-VS16 exceptions back out of the narrowing
A width-1 terminal isn't uniform: the ☀️ probe paints in one cell but
🛩️ (U+1F6E9 VS16) paints in two, so blanket-narrowing VS16 sequences
pulls the airplane's chat-row border a column short and smears the line.
Add a curated wide set (_DEFAULT_WIDE_VS16, MESHTERM_WIDE_EMOJI) — the
mirror of the lone-narrow allowlist — that forces those base codepoints
back to two in both width authorities, selector still skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 01:29:41 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 3ac43b7c35 Node graph: a layered redrawing, one marker per node, names throughout
The contact page's route graph fanned every path as a free lane from the two
endpoints and averaged shared relays together, so a well-connected node drew as
an acute tangle of near-overlapping lines. Worse, the same physical node could
appear twice: a 1-byte trace hop (27) standing beside its own wide contact id
(27d4396a2967) whenever the short hash was too ambiguous to widen — YUL-Poly
drew YUL-UpperSalaberry as two separate markers.

Redraw the route graph as a layered left-to-right graph (pathgraph.py):

* longest-path ranks put every node in the column of its hop distance, so each
  edge steps strictly forward and a relay shared by several routes is drawn once;
* an edge that skips a column routes through invisible waypoints, bending around
  the nodes between its ends instead of slicing through them;
* nodes are ordered to cut crossings (barycentre sweeps) then spread down the
  full height with their ys pulled toward their neighbours' (PAVA packing), which
  straightens each route into a lane and opens the branch angles up;
* first-appearance ordering keeps the layout identical on every repaint.

Kill the double-drawn node at two levels. build_topology now coalesces an
under-specified id into the one longer node it can only be (27 -> 27d4396a2967),
folding their links — fixing the atlas and the scenario ranker too, not just this
graph — while leaving a genuinely ambiguous stub (c5 -> two nodes) alone. The
widget then closes the same gap locally across its own layers, catching a hash
that is ambiguous against the whole contact list but unmistakable among these
paths (be -> be1d1c1dbc4b).

On the node detail page specifically: name every node, not just the two ends
(a relay reads by its contact name, unknown ones keep the honest hash byte), and
draw the target with its own map glyph (repeater, room, sensor) to match the
header. us stays on the left, the target on the right.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 00:47:23 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 62a2d76e8c Node detail: a full-screen page for each contact, reached by Enter
Pressing Enter on a contact now opens its whole story on one page instead of
a bare row: identity (name in its hue, key with the routing hash lit, type,
first/last heard, packet tally, reception SNR/RSSI), an inline location
preview centred on the node (a small static basemap via the new MiniMap), the
observed routes to it, and an action list (trace armed with the suggested best
path, open full map, time machine). Contacts owns the show/open/reshow loop;
topology.suggested answers "the best evidence-backed way to reach this node",
wired ahead of the firmware route in the trace arming precedence. Timemachine
and Trace grew the entry points the page opens.

Four fixes fell out of driving it on real hardware:

Slow open. Each located-node page built a fresh BasemapSource and resolved its
TileJSON -- a blocking HTTPS round-trip (~100ms, up to the 12s timeout on a bad
link) -- on every open. Hold one source for the session (ctx.basemap_source),
shared by the map, the picker, and the preview, and warm it behind the menu at
login, so the resolve is paid once, off the navigation path.

Black map. A companion advertising nonsense coordinates (Homestead reports
lat -97, lon -1042) flung the viewport off the world, leaving the map a screen
of empty/water fill that reads as solid black -- both from "open full map" and
from filtering to it and framing. The old guard only caught the 0/0 no-GPS
null island; the new geo.usable_fix() rejects any out-of-range fix too, applied
to the map markers and the location preview alike. Verified on-device: of 265
located contacts, only Homestead drops.

Path to node. The route/suggest rows render through THE path widget with a
1-byte hash in parentheses (a "name (3d)" tag), so they cross-read hop for hop
against the route graph's byte labels.

Route graph. Draw us on the left and the target on the right (us to target,
"how we reach it", left to right) via a local endpoint swap that leaves the
shared route_graph_style untouched for its other callers, and give the fan a
generous lane step and row budget so a well-connected node's candidate paths
spread into separate, legible tracks instead of a cramped tangle -- the height
stays adaptive, so a one- or two-route node still draws compact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 23:41:52 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 198111095a Atlas graph: flatten the fan arc so the rim leaves fill the width
The neighbour fan drew on a true circle, so only the due-east leaf reached
the far side; the top/bottom leaves curled back toward the focus (~0.31 of
the reach), wasting the right corners. Decouple a leaf's east reach from its
vertical spread — the reach now traces a flatter arc (_FAN_X_FLATTEN of the
fan angle) — so rim leaves land well east and the fan spreads across the
width. The setback still scales with fan size, so small near-due-east fans
don't ease back.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 22:45:09 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 f113e6a784 Atlas graph: light the whole route to the selected link
Selecting a link only brightened that one hop's edge; the path that reaches it
read no differently from the rest of the fan. Draw the route to the selection —
its own edge plus the approach the walk took into the focus (came_from → focus)
— at top priority and full strength, shedding the evidence-age fade the other
edges keep, so it reads as one lit thread running west through the focus to the
selected neighbour east. The age stays legible in the row's age column.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 21:46:51 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 e5aa5810dc Atlas graph: name nodes in full, clamping labels to the room actually there
Fan and focus labels ellipsized at a flat cap (12 cells for a fan node, 16 for
the focus/selection) even when the canvas had ample room beside the marker, so
"YUL-Polytechnique" read "YUL-Polytechniq…" with half the row empty to its
right. Clamp each label to the cells genuinely free between its marker and the
canvas edge instead — a shared _clip helper feeds both the generous cap and
the per-marker room — and widen the east gutter so the fan sits a little west
of the edge, giving even the tightest due-east marker space to name itself.
A long name now loses letters only when it truly won't fit; the list below
still carries the fullest name regardless.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 21:44:02 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 bd13b117ce Atlas links list: shrink the key, not the name, when a row is tight
The links (and match) rows sized a flexing name lane against a fixed 12-hex
key lane, so a long contact name lost letters while the whole id sat there
untouchable. Flip the priority: size the name lane to content first, then let
the key lane fill what's left — and when the two together outrun the row, the
key gives ground first, shrinking on a byte boundary down to a floor that
still shows its whole lit hash plus a "…". Only once the key is at that floor
does a long name start to clip. The name is the last thing truncated, and the
hash never is.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 21:38:15 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 380133a6e0 Map: drop 0/0 'null island' fixes so a lone match can't frame all-black
A companion with no GPS lock advertises latitude and longitude both zero.
Contact.has_location treats that as located, so gather_markers plotted the
node at null island in the mid-Atlantic. The default frame (fraction=0.5)
trims the far outlier away, hiding it — but filtering the find down to that
one node and pressing Enter frames only it, dropping the whole view onto open
ocean: a screen of solid dark water fill that reads as all black.

Share the 0/0 guard _self_marker already applied to our own node with the
contact and heard-node markers, so a both-near-zero fix counts as no fix at
all and never reaches the map.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 21:30:12 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 969989ab45 Node hues: a 256-colour spectrum keyed on the first byte
Node-identity colouring drew from an 8-entry palette, folding the first
key byte down with `% 8` so ~32 keys shared each hue and a handful of
nodes on screen often collided. Map the first byte straight onto the HSV
wheel instead — 0x00 red, sweeping the full spectrum to 0xff — at a fixed
saturation/value (0.65/0.95) tuned to stay vivid and readable on the dark
theme across every hue. All 256 first-byte values now give 256 distinct
hues.

Only node identity changes: node_style was the sole consumer of the old
NAME_COLORS palette, which is removed. The rest of the theme (brand,
status, SNR, battery, you-white) is untouched. Keying stays on the first
byte alone, so a 2-hex path hop and a full 64-hex key still agree — one
node, one colour everywhere. Red is no longer reserved out of the node
spectrum (0x00 = red), but node names are always bold and in name lanes,
distinct from the err-styled status marks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 20:53:10 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 1c89956d08 Map: Enter zooms in on a single filtered node
Pressing Enter with the find filter down to one node recentered on it but
always at the fit's neutral default zoom (14) — no extent to frame — which
could sit more zoomed-out than the current view. Frame a lone match (or
several at one spot) at a street-level closeness instead, capped at the
tile source's max so it never over-zooms onto blank tiles. Multi-node
framing is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 18:40:36 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 1b20989e6c Filters: ignore leading and trailing spaces
Every type-to-filter surface — the shared select list, the map's node
find, the atlas find, and the path composer's hop entry — now refuses a
leading space (the query never begins with whitespace) and strips the
query when matching (so a trailing space is ignored). Spaces still count
mid-query, so a multi-word name like "Homestead R&D" filters fine; only
"  Homestead" and "Homestead   " are prevented from mattering.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 16:22:47 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 ee8731e4d4 Atlas links list: widen the name, show the whole hash
The neighbour/match rows capped the name at a fixed 16 cells and drew the
key lane just 6 wide — a 2-byte prefix with an ellipsis. Size the name
lane to content instead (flexing up to whatever the fixed lanes leave, so
a long name shows as much of itself as the row can spare), and widen the
key lane to the full 12-hex canonical id with no ellipsis — the node's
whole hash, its addressed prefix still lit in the node's hue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 16:19:39 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 3d11aba32c Atlas: drop the ^R graph rebuild
The atlas snapshotted the evidence graph at open and re-read it from
storage on ^R. In practice that reload earned nothing — the graph is a
reading of already-stored evidence, and reopening the screen picks up
anything new — so remove the feature: the `retry` handler, the
`_do_rebuild` helper, the `rebuild` constructor argument, and the now
single-use `build()` closure in `open_atlas`. The global ^R binding stays
(Chat still uses it to retry a failed message).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 16:16:20 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 e46d286b13 Atlas focus line: name with its parenthesized hash
The current-node line drew the name followed by a bare 12-hex slice of the
key and then spelled out the node type. Drop the type atom — the leading
glyph already carries it — and render the identity as name (hash): the
addressed path-hash in parentheses, its digits lit in the node's hue. A
keyless own-node ("local") has no hash, so the parenthetical is omitted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 16:14:07 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 0f97c0d752 Atlas breadcrumbs: key-coloured, loop-truncated, tail-anchored
Three changes to the walk trail:

- Each name now carries its node's own key-derived hue (ours the white
  you-style, a nameless node muted), the focus bold — instead of a flat
  muted/bold trail.
- Walking to a node already on the trail truncates the stack to that
  node's first appearance, dropping the loop we walked to get back there
  rather than recording the round trip (this also subsumes the old
  step-back-through-the-west-node special case).
- When the trail outgrows the line the head is dropped behind a leading
  "…" rather than the tail being cut, so the focus and the steps that led
  to it stay visible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 16:12:26 -04:00
Jean-Pierre MartineauandClaude Opus 4.8 ee85286330 Chat: Ctrl-V pastes into a message, behind an amber confirm
Pasted text never reached a screen: the key dispatch forwarded only single
printable characters, so a bracketed paste (what a terminal sends for
Ctrl-V) was dropped whole. Route a multi-character run to a new "paste"
action instead, and add a Ctrl-V binding that reads the OS clipboard for
terminals that deliver the key literally rather than as a bracketed paste.

In chat, a paste is confirmed before it lands: a chat message goes out over
the air, so an amber Cancel/Paste dialog ("Paste N characters into your
message?") guards it — the disruptive (danger) tier, not data loss. On
confirm the run drops into the compose line, newlines folded to spaces
(a message is one line) and the byte gauge flagging an over-budget result
exactly as typing past the limit already does. Plain text prompts gain
silent multi-character paste through the shared line editor; only chat adds
the confirm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 14:21:02 -04:00