Skip to content

Fix the network map's layout and panel, LAN requests under dialogs, and two machine panel bugs - #1931

Merged
BarganConstantin merged 7 commits into
developmentfrom
fix/lan-map
Oct 4, 2026
Merged

BarganConstantin merged 7 commits into
developmentfrom
fix/lan-map

Conversation

@BarganConstantin

Copy link
Copy Markdown
Owner

What changes

  • A LAN pairing request no longer opens under another dialog. A request polled in while the network map, Busiest processes, a sign-in (or its code step) or another panel dialog was open was drawn underneath it, yet still took focus and the top of the Escape stack, so Escape put it off and Enter declined the other deck unseen. It now waits until no other dialog is open, by the same rule the re-sign-in prompt follows, and stays once it is up.
  • Network map: the Tailscale slice's name no longer runs through its decks' names. The layout now picks where along the slice's edge the name goes: the middle when clear, otherwise the nearest clear stretch, then a slightly wider edge, and no name at all (the legend still names the slice) if nothing clears.
  • Network map: no deck under this deck's name in a narrow window or at phone width. A ring of one or two decks may now step off the centre's name plate (and only for that). Where the slice is what keeps names from clearing, the map is drawn without it, as it already is when every deck is on the tailnet. Where nothing clears, the drawing with the fewest overlaps is kept.
  • Network map side panel: no "shaded slice, lower right" when no slice is drawn. The panel is told whether the slice is on screen.
  • Network map side panel on an invite-only deck: it says to send an invite instead of telling the reader to open a nearby deck "to ask to pair", which that deck's dialog doesn't offer in invite mode.
  • Machine panel: double- and triple-clicking a reading selects it. Before, the first click opened the history and the second click closed it. A click on the readings now waits a moment (300 ms) for a second click before it opens the chart. The heading still opens it immediately, and the block's press feedback is still immediate.
  • Busiest processes: the user and pid columns no longer run together with seven-digit Linux pids. The user column keeps a 12px gap before the pid.

Verification

  • npm run typecheck: clean.
  • Full suite (--maxWorkers=3 --minWorkers=1): 846 files, 11371 tests passed, exit 0 (before the rebase). After rebasing on development, the touched and neighbouring tests were rerun: 33 files, 557 tests, all green.
  • New regression tests. Each one failed before its fix, for the reason the bug describes:
    • lan-pair-request-waits.test.ts: the request was drawn while another dialog was on the stack.
    • network-map-slice-label.test.ts: the slice name's glyphs landed on work-laptop / phone-tail and on 13 other stage/network cases.
    • network-map-narrow-stage.test.ts: home-mini sat on the centre's name at 920x406, work-laptop at phone width, and the finding's own roster at phone width put pi-box on old-tower and Studio Mac on the centre's name.
    • network-map-tailnet-note.test.ts: "the shaded slice" was printed with no slice drawn.
    • network-map-invite-only.test.ts: "Open it to ask to pair." was printed in invite mode.
    • machine-reading-double-click.test.ts: double- and triple-clicks opened the history.
    • process-list-user-pid-gap.test.ts: there was no padding rule at the user/pid boundary.
  • Repointed, guards kept:
    • lan-pair-request-next.test.ts now calls pairRequestFor, the pure half of LanPairRequests.
    • machine-reading-press.test.ts now runs on fake timers.
    • In lan-network-map.test.ts, two cases asserted properties of layouts that never cleared. The "mostly tailnet" slice cap now uses 1+6 decks, and the dense case uses 560px.
  • Browser, on an isolated deck with LAN off and /api/lan faked through page.route:
    • The request arrives while the map is open: it isn't drawn and focus stays on the map. Escape closes the map, then the request appears with Decline focused. Nothing was POSTed.
    • The same holds with the re-sign-in prompt up, and while typing a sign-in code. Enter sent nothing to /api/lan/peer.
    • Network map at 1440x900 and 390x844 with 1, 3, 8 and 20 decks (faked), plus the findings' own cases at 1280x720 and 1000x700. Overlaps per layout, before → after:
      • 1440x900, 1 / 3 / 8 / 20 decks: 0/1/1/1 → 0/0/0/0
      • 390x844, 1 / 3 / 8 / 20 decks: 1/2/9/45 → 0/0/2/27
      • The findings' cases: 1–3 → 0
    • At phone width, 8+ decks still can't all clear in a 357px-wide stage, with or without the slice. That limit predates this change.
    • All-tailnet panel note and invite-only hint read correctly.
    • Double-clicking 15.93 / 15.6 GB selects it with no dialog. A single click opens the chart.
    • Busiest processes: the minimum user→pid gap is 12px at 1440 and 390 (was 0 on 35 of 40 rows).

The slice's name ran centred along its outer edge, and the edge stops inside
the stage, so a tailnet deck on the outer ring - one remote laptop that is
away, a nearby deck heard over Tailscale - had the name drawn straight through
its own name and caption. The layout now says where along the edge the name
goes: the middle when nothing is there, the nearest clear stretch when
something is, the edge a step further out when no stretch clears, and no name
at all when even that leaves none.
Below 1040px the panel stacks under the map and the stage gets short; on a
phone it is 357px wide. A ring of one or two decks never moved, so a lone deck
or the tailnet slice's second deck could stand under the plate with this
deck's name, and a drawing that cleared neither with three rings nor with two
was kept as it was. A ring of one or two may now step off the plate (and only
off it). Where the slice is what keeps the names from clearing, the map is
drawn without it, as it already is when every deck is on the tailnet, and
where nothing clears it keeps the drawing with the fewest names on something.
The map's resting panel said "N reached over Tailscale - the shaded slice,
lower right" whenever any deck was on the tailnet, but no slice is drawn when
every deck on the map is, nor where the slice would leave the names no room.
The panel is now told whether the slice is on screen and leaves out where to
look when it is not.
With nothing pointed at, the map's panel told the reader to open a nearby
deck "to ask to pair", but on a deck that pairs by invite only that deck's
dialog has no Ask to pair, and the same panel pointed at the same deck already
said to send an invite. The network-wide hint now takes the pairing mode and
gives the invite wording, the one sentence both now share.
…its chart

A press on a section's readings opens its history, and only a selection that
already existed held it back. A double-click selects its word on the second
press, so the first click opened the dialog and the second landed on its
backdrop and closed it: nothing was selected, and the chart flashed. The
readings now wait a moment for a second press before opening, and a second or
third press calls the first one off. The heading still opens it at once.
…rocesses

The process table lets its name column take every pixel left over, so the
others come down to their content, and the user cell had no right padding.
A seven-digit pid, common on Linux, filled its cell and ran into the user name
("constantin1365092") on most rows. The user column now keeps 12px before the
pid, on the cells and on their headings.
A request polled in while the network map, Busiest processes, a sign-in or
another panel dialog was open was drawn underneath it, since those are
portalled and the request is not, yet its mount still moved focus to its
Decline and made it the top of the Escape stack. Escape meant for the map put
the request off, and Enter - even mid-way through typing a sign-in code -
declined the other deck without anyone seeing the question. The request now
waits its turn by the rule the re-sign-in prompt already follows: it is only
drawn while no other dialog is up, and once up it stays.
@BarganConstantin
BarganConstantin merged commit 31df65a into development Oct 4, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant