Skip to content

Sidebar: show saved networks that are not connected - #226

Draft
rdrake wants to merge 1 commit into
evilnet:developfrom
rdrake:sidebar-saved-networks-upstream
Draft

rdrake wants to merge 1 commit into
evilnet:developfrom
rdrake:sidebar-saved-networks-upstream

Conversation

@rdrake

@rdrake rdrake commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

What

Saved networks this page has not connected now stay in the sidebar, greyed, under the live ones. One tap connects them.

Why

A network added through the connect form with the defaults has autoconnect off: the form's checkbox starts unticked, and autoconnectSavedNetworks skips the entry. After a restart, such a network existed only in Settings → Networks, so from the sidebar it looked deleted. The same happened to a network whose SASL password was not remembered, and to one closed with /quit.

How

  • NetworkList.vue lists every saved entry with no live network as a DormantNetwork.vue row. The row uses the lobby's layout at 0.55 opacity (0.8 under Increase Contrast) and shows "Not connected" or "Needs password", the edit pencil and the nick.
  • A tap calls createNetwork with the entry as it is stored at that moment, the same call Settings → Networks' Connect makes, and the live row replaces the greyed one. When the password was not kept, the tap opens the connect form filled from the entry (/connect?savedLink=<uuid>) so the user can type it.
  • When nothing is live but networks are saved, the greyed rows appear where the "not connected" text used to be.
  • saved-networks.ts adds onSavedNetworksChange. hooks/use-saved-networks.ts follows it, plus the storage event, and re-renders only when something a row shows has changed. The history cursor's write, which happens on every message, does not notify.
  • Networks that boot is about to autoconnect are not drawn greyed in the moment before they dial. If boot stops to wait on a link the user has to approve, they are drawn (manager.ts endAutoconnectWait).
  • Greyed rows sit outside the drag-and-drop list and the jump-to results.

Things to note

  • Greyed rows are ordered by most recent use, not by the stored network order.
  • Tabs are independent clients, so a network that another tab has connected shows as not connected in this one. Settings → Networks already behaves this way.

Testing

  • pnpm lint, pnpm typecheck, production build, pnpm test:mocha: 5132 passing, including new saved-networks listener tests.
  • New browser scenario tools/scenarios/dormant-networks.mjs, run on desktop and with --mobile --width=390 --height=844, all 14 checks passing. lib/tiny-ircd.mjs is a small WebSocket server that registers connections, so the scenario needs no Docker. It checks:
    • the greyed rows and their order;
    • a tap connects and the greyed row is replaced;
    • /quit turns the network back into a greyed row;
    • the password case opens the connect form and dials nothing;
    • with nothing live, the greyed rows replace the empty text;
    • no console errors.
  • smoke.mjs and network-settings.mjs still pass.

This branch was successfully deployed

1 active deployment
github-pages — 75c264d2 Deployed Nov 8, 2026 by rdrake via deploy #770
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