diff --git a/agents.md b/agents.md index 151afaaf7048fbbbec85fada3532cc7ddf6f45c5..2bb688f3062ba3867da567101f0ffd743c9a663e 100644 --- a/agents.md +++ b/agents.md @@ -18,8 +18,8 @@ The web app is **not** a SPA with a JSON API for every interaction. Many mutatio - **End-to-end tests** that only assert HTTP status bodies miss DOM updates. Morph paths are covered by **Playwright / Spel** tests under `test/browser_*.clj` and `clojure -M -m test.runner …` (see `scripts/clj-test.sh`). - Shareable URLs are normal GET routes (e.g. `/t/:tag`, thread post views). **Expand/collapse** and similar controls are **actions**, not bookmarkable GET endpoints; they use the same `POST /ui` + `__rpc__` pattern where applicable. -- The home page (`GET /`) is a public **question index**: expandable `
` rows for each garden scope with ≥2 comparable members (canonical `/q/:leaf`) plus aspect prompts under those scopes (`/q/:leaf/:aspect`). Expanding a row reveals the same pair-compare form as the `/q/` page (`VoteComparePost`, seeded `thread_tag` / `aspect`). Order is bump-style (forum thread + vote activity), then member count descending, capped at 50. The header still shows public human/AI post counts from the reducer (`public_post_stats`: no `delegate` → human, `delegate` set → AI; `system:…` and redacted/private omitted). Links to **`/t`** (threads) and **`/~`** (garden). The `npx slugsocial` splash remains the static embedded `GUIDE.sorter` (no network). -- The public **thread index** is **`GET /t`** (former home forum list: private rooms when signed in, bump-ordered public threads, new-thread slot, `public_post_stats` header). Live feed SSE prefixes for the public bump list are `/t` and `/t/:tag` (not `/`). `/t/` 308s to `/t`. `/t/:tag` thread pages are unchanged. Brand / home links stay `/`; forum-index links point at `/t`. +- The home page (`GET /`) is the public **thread index**: private rooms when signed in, bump-ordered public threads, new-thread slot, `public_post_stats` header (no `delegate` → human, `delegate` set → AI; `system:…` and redacted/private omitted). Links to **`/~`** (garden). The `npx slugsocial` splash remains the static embedded `GUIDE.sorter` (no network). +- The old thread-index path **`GET /t`** 308s to **`/`** (same for `/t/`). `/t/:tag` thread pages are unchanged. Live feed SSE prefixes for the public bump list are `/` and `/t/:tag`. Brand / home / forum-index links point at `/`. - Forum and garden item bodies use **`~/…` linkification** (`linkify_slugs_with_prefix` in `server/src/html/mod.rs`). Tilde refs emit **leaf hrefs and leaf display** (`~/x/luke` → `/~/luke` and `~/luke`). When **`item_bodies`** is in scope, matching ontology links get a native **`title`** tooltip with a **truncated body preview** (hover in the browser). - **Thread pagination and the SSE push path are page-scoped.** Thread pages (`/t/:tag?offset=N`) are **fixed windows aligned to `PAGE_SIZE` boundaries** (`server/src/html/forum/paginator.rs`): the latest page grows by appending until full, so existing posts never shift; arbitrary `?offset=` values snap to the containing page. Live pushes after a post/redact/graduate (`broadcast_web_refresh` in `server/src/api/write_actor.rs` → `thread_region_page_morphs` in `server/src/html/forum/feed.rs`) morph `#thread-feed-region` only behind **client-side page-offset guards** (`JsBuilder::if_page_offset_*`): the latest page, the page before it (its paginator gains the live `newer →` link at rollover), and — for redactions — the page containing the changed post. Viewers reading older pages are never overwritten with the latest posts. The poster's own `POST /ui` response (`post_success_response` in `server/src/api/ui_html.rs`) morphs in place only on the latest page and otherwise redirects to it. @@ -50,9 +50,9 @@ Strict **CSP** that blocks `eval` would break the current app. Other projects ma - **`CopyGardenRank`:** Browser copy control on garden ranking headings. Returns **`text/javascript`** via **`JsBuilder::clipboard_write_text_and_label_btn`** (same **`fetch` → `eval`** loop as **`CopyThread`**). Payload includes **`room`**, **`parent_path`**, **`depth`**, **`copy_btn_id`**, and optional **`external_hosts`** (for **`/-/`** host-root indexes). Clipboard text is a concise markdown numbered list of **leaf** display paths (plus unranked bullets). -- **`VoteComparePost`:** On success returns **`text/javascript`** that **morphs** **`#vote-edge-history-region`** (recomputed **`