Choose even the first region in the browser; update Docker and Nix

A node now starts without any region (it only helps others connect, and
prints a hint). The owner's sign-in link leads straight to the Regions page
when none is followed, visitors get a notice instead of an empty search, and
status always lists regions as an array.

The Docker image no longer pins Bonn, the NixOS module no longer requires
regions, and the VM test now starts without any, chooses the first region
over the API and checks it survives a restart. README and the init hint
follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 10:41:10 +01:00
co-authored by Claude Sonnet 5.5
parent fd439710df
commit e3d0c12e55
18 changed files with 212 additions and 71 deletions
+25 -1
View File
@@ -392,7 +392,7 @@ test("signing out forgets the token", async () => {
test("the owner picks regions by place name and the node follows them at once", async () => {
open(`#/login/${TOKEN}`);
await page!.waitFor(() => qa(".pane-listings .ocard").length === 2, "the listings");
qa(".pane-listings a").find((a) => a.textContent === "Regions")!.click();
(qa(".pane-listings a").find((a) => a.textContent === "Regions") as HTMLElement).click();
await page!.waitFor(() => q('[name="place"]') !== null, "the regions page");
assert.ok(q(".rp-chips")!.textContent!.includes("u1x"), "what the node follows now");
const search = q<HTMLInputElement>('[name="place"]')!;
@@ -437,3 +437,27 @@ test("without signing in the regions page leads to the sign-in", async () => {
function location_(hash: string): void {
page!.window.location.hash = hash;
}
test("a node without regions: visitors are told, and the owner's login leads to choosing the first region", async () => {
await gw.close();
gw = await startGateway({ listings: [], regions: [] });
gw.owner = node.handler;
open("#/");
await page!.waitFor(() => /follows no region yet/.test(text()), "the notice for visitors");
assert.ok(text().includes("regions: none yet"), "the status line says so");
assert.equal(q(".notice a"), null, "no link for someone who is not signed in");
page!.close();
open(`#/login/${TOKEN}`);
await page!.waitFor(() => q('[name="place"]') !== null, "the regions page, straight after login");
assert.equal(page!.window.location.hash, "#/mine/regions");
assert.ok(q(".rp-chips")!.textContent!.includes("No region chosen yet"));
q<HTMLInputElement>('[name="regions"]')!.value = "u1j";
submit(q("form")!);
await page!.waitFor(() => /Saved/.test(text()), "saved");
assert.ok(text().includes("regions: u1j"), "the status line shows the first region");
const put = node.s.calls.find((c) => c.method === "PUT" && c.path === "/api/v1/regions")!;
assert.equal(put.body, '{"regions":["u1j"]}');
});