From 5536eee2ffc6e6f4f4b3b233eaac49e31f2c2bda Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Thu, 29 Oct 2026 13:36:31 +0700 Subject: [PATCH] docs: record 1.7.28 community join fixes --- AGENTS.md | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a4e2e0f..92743d0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1527,9 +1527,17 @@ session with **no other memory of this project**. So: Owner/`crew.pubkey` = the bot `f978…f0`, admins = `ADMIN_PUBKEYS` + bot. The page passes `canCreate={false}`: everyone (admins included) uses the normal "Ask to join" flow; the bot auto-approves. After joining, admins still get the - requests panel as a fallback. Links: `/#/community` (app/QR) and the Advanced - `https://cordn.net/chat/` for Staircase/Cordn clients. Entry points: - nav catalog/burger + About feedback card. + requests panel as a fallback. Links: `/community` and **`/c`** both redirect + into `/#/community` (the old `/c` → Cordn-web shortcut was retired 2026-10-29 + because Cordn web stalls after NIP-42); `/cordn` remains the raw + `https://cordn.net/chat/` reference for Staircase/Cordn clients. + Entry points: nav catalog/burger + About feedback card. + - **Join UX (2026-10-29):** community-specific approval copy names the bot or + admins, an admin pending-request banner links to the room's request panel, + and waiting users get **Request again** plus the second-device hint (use + **Link device**; the bot cannot add a second MLS key for the same account). + If the bot is missing from the group, the panel warns that an admin must + review requests. - **Bot:** `scripts/community-bot.ts`, built to CJS with `scripts/build-community-bot.sh` (Node 20 needs the `ws` global shim), run by `scripts/systemd/skatespots-community.service` on the relay box: @@ -1539,7 +1547,16 @@ session with **no other memory of this project**. So: with `COMMUNITY_CREATE=1`; **leave `COMMUNITY_CREATE=0` afterward** — a lost state plus create=1 would fork the room. It polls every 15s, auto-approves up to 10 requests/cycle, skips its own request, and backs off failed - approvals for 5 minutes. + approvals for 5 minutes. **2026-10-29 fixes:** it prefers the request's + `kp_ref` (fallback pubkey), retires handled/stale requests through + `join_request_take_many`'s `consumed` list (the old bot left approved + requests in the queue and retried "already in the group" forever), logs + pending counts, and stops auto-approval at **250 members** / + **5 devices per pubkey** (`COMMUNITY_MAX_MEMBERS`, + `COMMUNITY_MAX_DEVICES_PER_PUBKEY`). The bot must be rebuilt with + `scripts/build-community-bot.sh` and copied to + `/opt/skatespots-community/community-bot.cjs` when this file changes — + restart `skatespots-community` afterward. - **Secrets/backup:** bot key in `~/.config/skatespots/community.env` (600) and the VPS env; state copy in `~/.config/skatespots/community-state.json` (600). Never commit/print either. @@ -2544,6 +2561,14 @@ Rules: is included in that single envelope-only count — muted threads still cannot be subtracted without decrypting). APK sha256 `1b3c7379…`, versionCode 10727. Web forced live at `d6f8345`. + - **1.7.28 (2026-10-29):** `/c` now redirects into the app Community room + instead of Cordn web; community join copy names the bot/admin, adds + **Request again**, a second-device **Link device** hint and an admin + pending-request banner. The community bot now retires handled/stale + requests (fixes endless "Join request sent"/already-member retries), + prefers `kp_ref`, logs pending queues, and caps at 250 members / 5 + devices per account. APK sha256 `03d47681…`, versionCode 10728. Web + forced live at `69ce773`. ### Relay archive (dataset backup) - **Transfer content between keys (`scripts/transfer-content.mjs`, 2026-10-04):**