eleven / messenger Public

web: drop the create-screen region picker — region auto-assigns (#1085)

Reverts the create-time region dropdown (#1084). Product decision: a member
creating a space should NOT choose its region — it is auto-assigned (the
backend already routes an omitted region to the default). Changing where a space
lives becomes a space-admin action on the space itself, not a choice at birth.

The backend region routing (#1083) stays: create still auto-assigns, list fans
out, and management routes by host. Only the home create-screen picker is
removed, so creation is back to a single "Slide to create".
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Paul Campbell d31a51c338efcac8b96beae9bea5d342d471cd14 parent 779fe8a
2 files changed, +1 −51
  • home/web/pages/index.html +0 −14
  • home/web/static/home.js +1 −37
diff --git a/home/web/pages/index.html b/home/web/pages/index.html
index 62f5840..6b27dc9 100644
--- a/home/web/pages/index.html
+++ b/home/web/pages/index.html
@@ -87,13 +87,6 @@
line-height: 1.2; letter-spacing: -0.015em; margin: 20px 0 4px;
}
.create-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
- /* Region picker (only shown for a multi-region home server) — a quiet inline
- control, not a headline: "Region [ Ireland ]". */
- .create-region { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 24px; font-size: 13px; color: var(--muted); }
- .create-region select {
- font: inherit; font-size: 13px; color: var(--ink); background: transparent;
- border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; cursor: pointer;
- }
/* The stage: dust + confetti behind the card, full-viewport. */
#stage-dust { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
main.card { position: relative; z-index: 1; will-change: transform; }
@@ -512,13 +505,6 @@
<div id="create-pitch">
<h2 class="create-title">Slide to create</h2>
<p class="create-sub">Your new space will be created immediately.</p>
- <!-- Region picker: only shown when this home server provisions per country
- (GET /api/features → regions). One region (or none) auto-assigns and
- this stays hidden. -->
- <p id="create-region" class="create-region hidden">
- <label for="region-select">Region</label>
- <select id="region-select"></select>
- </p>
<!-- The goes-to-eleven fader (fader.js): slide 1→10, hold the pull for a
beat and it snaps to eleven — which fires the real create. -->
<div class="strip">
diff --git a/home/web/static/home.js b/home/web/static/home.js
index fec73e5..7179b7e 100644
--- a/home/web/static/home.js
+++ b/home/web/static/home.js
@@ -87,11 +87,6 @@ function fmtBytes(n) {
// /api/features). The create-a-space controls only appear when it's both
// enabled here and you're signed in.
let spacesEnabled = false;
-// Per-country provisioning (GET /api/features): regions is [{code,name}] and
-// regionChoice is the default the picker starts on. Empty/one region → the
-// picker stays hidden and creation auto-assigns server-side.
-let regions = [];
-let regionChoice = "";
// provisioned: host → row from GET /api/spaces — which listed spaces THIS
// account created, plus their entitlement. billingEnabled mirrors the
// provisioner's flag; both drive the quiet Upgrade affordance + Supporter
@@ -1008,29 +1003,6 @@ async function openPortal(host, btn) {
// ---- create a new space -------------------------------------------------------
-// populateRegionPicker fills the create screen's region <select> from
-// /api/features. Built as DOM nodes (never innerHTML). Shown only for 2+
-// regions — one region, or a single-region home server, auto-assigns and the
-// control stays hidden.
-function populateRegionPicker() {
- const wrap = $("create-region");
- const sel = $("region-select");
- if (!wrap || !sel) return;
- sel.textContent = "";
- if (regions.length < 2) {
- wrap.classList.add("hidden");
- return;
- }
- for (const r of regions) {
- const opt = document.createElement("option");
- opt.value = r.code;
- opt.textContent = r.name || r.code;
- if (r.code === regionChoice) opt.selected = true;
- sel.appendChild(opt);
- }
- wrap.classList.remove("hidden");
-}
-
// requestSpace is the real create call, fired by the fader the moment it snaps
// to eleven: POST /api/spaces (link-token auth) — it returns only once the
// server has confirmed the space is live and reachable, so the fader's build
@@ -1042,15 +1014,10 @@ async function requestSpace() {
// and grind it out right here, during the fader's build phase — the CPU
// burn IS the "Hold on…" moment. bits 0 = no gate, nothing to solve.
const proof = await solveCreateChallenge();
- // The owner's region choice rides alongside the proof (empty = auto-assign
- // server-side). The picker only exists for a home server with 2+ regions.
- const payload = proof || {};
- const sel = $("region-select");
- if (regions.length > 1 && sel && sel.value) payload.region = sel.value;
const res = await fetch("/api/spaces", {
method: "POST",
headers: { Authorization: "Bearer " + state.token, "Content-Type": "application/json" },
- body: JSON.stringify(payload),
+ body: JSON.stringify(proof || {}),
});
const body = await res.json().catch(() => ({}));
if (!res.ok) {
@@ -1621,9 +1588,6 @@ $("space-search").addEventListener("input", () => { if (vault) showVault(); });
apiJSON("/api/features")
.then((f) => {
spacesEnabled = !!f.spaces;
- regions = Array.isArray(f.regions) ? f.regions : [];
- regionChoice = f.default_region || (regions[0] && regions[0].code) || "";
- populateRegionPicker();
// The no-account demo path (shown signed-out, where it matters).
$("demo-offer").classList.toggle("hidden", !f.demo);
if (vault) $("open-create").classList.toggle("hidden", !canCreateSpace());