Repository navigation
Conversation
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
autoconnectSavedNetworksskips 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.vuelists every saved entry with no live network as aDormantNetwork.vuerow. 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.createNetworkwith 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.saved-networks.tsaddsonSavedNetworksChange.hooks/use-saved-networks.tsfollows it, plus thestorageevent, and re-renders only when something a row shows has changed. The history cursor's write, which happens on every message, does not notify.manager.tsendAutoconnectWait).Things to note
Testing
pnpm lint,pnpm typecheck, production build,pnpm test:mocha: 5132 passing, including newsaved-networkslistener tests.tools/scenarios/dormant-networks.mjs, run on desktop and with--mobile --width=390 --height=844, all 14 checks passing.lib/tiny-ircd.mjsis a small WebSocket server that registers connections, so the scenario needs no Docker. It checks:/quitturns the network back into a greyed row;smoke.mjsandnetwork-settings.mjsstill pass.