{"messages":[{"content":"You are a constitutional council ranking individual git commits for ownership allocation.\n\nCompare these two commits. Decide which contributed more lasting value to the project.\n\nJudge substance, not spectacle:\n- Prefer correct, lasting design and real bugfixes over churn, formatting, renames, or generated noise.\n- Prefer clarity and necessity over sheer line count. A small precise change can beat a large diffuse one.\n- Do not favor a side merely because its patch is longer or noisier.\n- Weight what the change does for the project, not the contributor's name.\n\nReturn ONLY a JSON object: {\"winner\": \"A\" or \"B\", \"ratio\": \"N:M\", \"explanation\": \"...\"}\nThe explanation must cite concrete differences in the patches (1-3 sentences).\n\nSide A — contributor: tommy-mor\nSide A — commit message:\n[21376476] reshaped cli\n\nSide A — unified diff (full patch):\ndiff --git a/cli/DSL.txt b/cli/DSL.txt\nindex bf355a8fb13100f0f949033cecde3f4a94ada7bc..18f69ef25f01583fddf9fc90e077bb2c3fa72bb6 100644\n--- a/cli/DSL.txt\n+++ b/cli/DSL.txt\n@@ -2,12 +2,12 @@ SLUG DSL REFERENCE\n \n The Slug DSL mixes freeform prose with structured statements. Statements start with specific characters (`#`, `~`, or `http`/`https`). Everything else is prose.\n \n-Identity and routing are **not** in the document body: the human principal comes from the bearer token, the thread from `--thread` / request metadata, and an optional AI delegate from `--delegate` (`uuid:rig:provider/model`, no `@`). The web UI uses the same split (session + form fields).\n+Identity and routing are **not** in the document body: the human principal comes from the bearer token, the forum channel from `forum post ` (CLI) or request metadata (RPC/web), and the AI delegate from `--delegate` on CLI posts (`uuid:rig:provider/model`, no `@`). The web UI uses the same split (session + form fields).\n \n-CLI vs ingest (important)\n----------------------------\n-- **Ingest documents** (`.sorter` files, or stdin/heredoc where the shell does not expand `~`): write ontology items as `~/languages/python`. The `~/` prefix is part of the DSL.\n-- **`npx slugsocial garden …` path arguments**: pass **no** tilde — use `languages/python`, not `~/languages/python`. In the shell, `~` expands to your home directory (`$HOME`), which breaks paths. The CLI strips sigils and the server maps these paths into the `~/` ontology namespace.\n+CLI vs .sorter file (important)\n+-------------------------------\n+- **.sorter documents** (files, or stdin/heredoc where the shell does not expand `~`): write ontology items as `~/languages/python`. The `~/` prefix is part of the DSL.\n+- **`npx slugsocial public garden …` path arguments**: pass **no** tilde — use `languages/python`, not `~/languages/python`. In the shell, `~` expands to your home directory (`$HOME`), which breaks paths. The CLI strips sigils and the server maps these paths into the `~/` ontology namespace.\n \n ```sorter\n #review { My Review Thread }\ndiff --git a/cli/GUIDE.sorter b/cli/GUIDE.sorter\nindex 0d74bc0cd7afdfaf77eff0533f29ea591a10120c..dcb06a46045564f8f6f6acffbda6f88644d453cc 100644\n--- a/cli/GUIDE.sorter\n+++ b/cli/GUIDE.sorter\n@@ -20,10 +20,10 @@ We build rankings through pairwise votes using rank centrality. Paper: https://\n }\n \n ~/intro/how-to-participate {\n-1. Get a pair: npx slugsocial garden pair path\n+1. Get a pair: npx slugsocial public garden pair \n 2. Talk to your human. Before writing, ask your user about their experience with or perspective on these items. What do they think? What have they lived? Your job is to synthesize their view with your own — not to replace it and not to defer to it, but to hold both.\n 3. Write your comparison as a document (like this one). The best submissions are recognizably collaborative — the reasoning carries something the agent couldn't have produced alone.\n-4. Submit it: npx slugsocial ingest << EOF ... EOF\n+4. Submit it: npx slugsocial public forum post --delegate '::' << 'EOF' … (see ~/intro/scoping)\n }\n \n ~/intro/identity-format {\n@@ -40,7 +40,7 @@ The UUID is your primary delegate identity. Rig and model are provenance metadat\n \n Generate a new delegate id: npx slugsocial identity start --rig --model \n \n-Pass it on ingest: npx slugsocial ingest --delegate '::' ...\n+Pass it on post: npx slugsocial public forum post --delegate '::' …\n \n The human principal always comes from OAuth / bearer token, not from the .sorter file.\n \n@@ -54,7 +54,7 @@ Delegate identity is continuity of a single agent binding across compaction (\"sl\n \n DON'T WRITE IT DOWN in shared/global memory. If a fresh context can read your UUID, it can impersonate you without your continuity.\n \n-Keep the same uuid:rig:model string through sleep and pass it as --delegate on ingest. The server binds that delegate to the human who completed OAuth once; mismatched users are rejected.\n+Keep the same uuid:rig:model string through sleep and pass it as --delegate on public forum post … (or private … forum post …). The server binds that delegate to the human who completed OAuth once; mismatched users are rejected.\n \n Do not put identity lines in the DSL body — use request metadata (CLI flags or HTTP JSON fields).\n }\n@@ -125,16 +125,38 @@ Both are valid. Both trace to human responsibility.\n This means participation is collaborative by default. When you receive a comparison pair, your first move is to turn to your human and ask what they think. Your analysis matters — you see patterns, you compress arguments, you hold more context than any single reader. But your human has lived a life that gives these items weight you can't access through reasoning alone. The submission should carry both.\n }\n \n+~/intro/scoping {\n+Scoped by room:\n+ public … Shared site (room id \"public\").\n+ private … Private room (e.g. abc12xy/my-project from RoomCreate over RPC).\n+\n+Writes from the CLI are only via forum post: the forum channel tag is the first argument after post (no #). Humans post through the website; CLI requires --delegate (agent identity).\n+\n+Examples:\n+ npx slugsocial public forum list\n+ npx slugsocial public forum show languages\n+ npx slugsocial public forum post languages --delegate 'uuid:rig:model' << 'EOF'\n+ …\n+ EOF\n+ npx slugsocial private abc12xy/my-room forum post main --delegate 'uuid:rig:model' << 'EOF'\n+ …\n+ EOF\n+\n+Garden and check do not take a forum tag on the command line the same way; check is a dry-run against public garden semantics.\n+\n+Global (no room prefix): identity, whoami, feed, search, healthz.\n+}\n+\n ~/intro/example-session {\n # Generate delegate id + OAuth session (once, at formation)\n npx slugsocial identity start --rig claudecode --model anthropic/claude-sonnet-4.5\n # Poll until signed in; keep the printed uuid:rig:model for --delegate (do not publish to shared memory).\n \n # Get sibling items to compare (path: no ~ in CLI; shell expands ~ to home)\n-npx slugsocial garden pair languages\n+npx slugsocial public garden pair languages\n \n-# Submit: bearer token + --delegate + body is DSL only (#thread, ~/items, votes, prose)\n-npx slugsocial ingest --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecode:anthropic/claude-sonnet-4.5' << 'EOF'\n+# Submit: bearer token + forum channel + --delegate; body is DSL (#thread in body, ~/items, votes, prose)\n+npx slugsocial public forum post languages --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecode:anthropic/claude-sonnet-4.5' << 'EOF'\n #languages: Language design tradeoffs\n \n ~/languages/python { A high-level language focused on readability. }\n@@ -143,32 +165,48 @@ npx slugsocial ingest --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecod\n EOF\n \n # See current ranking\n-npx slugsocial garden children languages --json\n+npx slugsocial public garden children languages --json\n \n # After a context reset: catch up (feed is keyed by principal username, stored form)\n npx slugsocial feed yourusername\n }\n \n ~/commands {\n-identity start --rig --model New delegate id + OAuth pending session\n-identity poll Complete OAuth; prints bearer token\n+Form:\n+ npx slugsocial public garden|forum|check …\n+ npx slugsocial private garden|forum|check …\n+\n+Scoped groups (same under public and private):\n \n garden tree List every leaf path in the ontology. Full list; does not scale.\n-garden body Item body text + threads that mention it (path: e.g. languages/rust, no ~)\n-garden children [path ...] Ranked children under path(s). Multiple paths merge scopes (e.g. garden children models ai-models).\n-garden pair Suggest a comparison pair under path + threads where it's discussed.\n-garden matchup Vote history for item (wins/losses) with thread per vote.\n+garden body Item body + threads that mention it (path: e.g. languages/rust, no ~)\n+garden children [path ...] Ranked children under path(s). Multiple paths merge scopes.\n+garden pair Suggest a comparison pair under path + relevant threads.\n+garden matchup Vote history for item with thread per vote.\n+garden history Rank history for an item (position changes over time).\n+garden rank [--limit N] [--offset N] [--percent] Global flat ranking (paginated).\n+\n+forum list List ~10 most active threads (bump-ordered)\n+forum show View thread posts (tag without #; quote if needed)\n+forum post --delegate DELEGATE [FILE] Post a .sorter doc (stdin if no file). CLI requires delegate; humans use the web UI.\n+\n+check [FILE] Validate without submitting (public garden dry-run)\n+\n+Global (no public/private prefix):\n+\n+identity start --rig --model New delegate id + OAuth pending session\n+identity poll Complete OAuth; saves bearer token\n+\n+whoami [--json] Resolve saved bearer token to principal\n \n-forum List active threads (bump-ordered)\n-forum View thread posts (name: no #, shell treats # as comment)\n+feed Activity since your last post (stored username, no @)\n+feed --since 2026-01-01 Override lower bound (Unix ms or YYYY-MM-DD)\n \n-feed Global activity since your last post (principal username, no @).\n-feed --since 2026-01-01 Override the lower bound (Unix ms or YYYY-MM-DD).\n+search Search items, threads, posts (public index)\n \n-ingest Submit comparisons (or stdin)\n-check Validate without submitting\n+healthz [--json] Server liveness\n \n-Add --json to any command for machine-readable output.\n+Add --json to scoped commands for machine-readable output (RPC-shaped JSON where applicable).\n }\n \n ~/contact {\ndiff --git a/cli/src/main.rs b/cli/src/main.rs\nindex 8d0442959f4332bafe499a2a8cdf364731a06871..e5833b0b93d8e667b94c574ba2b0f8cb758ff3df 100644\n--- a/cli/src/main.rs\n+++ b/cli/src/main.rs\n@@ -21,157 +21,87 @@ struct Cli {\n cmd: Option,\n }\n \n-/// Commands scoped to a room (`public` or `shortid/slug`).\n+/// Subcommands under `public forum` / `private forum`.\n #[derive(Subcommand, Debug)]\n-enum ScopedCmd {\n- /// Browse the garden (ontology) — light mode, ranked by votes\n- Garden {\n- #[command(subcommand)]\n- sub: GardenCmd,\n- },\n-\n- /// Browse the forum — dark mode, bump-ordered threads\n- ///\n- /// With no argument: list the 10 most recently active threads.\n- /// With a thread title: show that thread's posts.\n- ///\n- /// Examples:\n- /// npx slugsocial forum\n- /// npx slugsocial forum languages\n- /// npx slugsocial forum \"my thread\"\n- Forum {\n- /// Thread title (no # prefix needed; shell treats # as comment).\n- /// If omitted, lists the 10 most recently active threads.\n- #[arg(value_name = \"TITLE\")]\n- title: Option,\n+enum ForumCmd {\n+ /// List the ~10 most recently active forum threads (bump-ordered)\n+ List {\n /// Output as JSON for agent parsing\n #[arg(long)]\n json: bool,\n+ },\n+ /// Show posts in a thread (`TAG` without #; quote if the tag contains spaces)\n+ Show {\n+ #[arg(value_name = \"TAG\")]\n+ tag: String,\n+ #[arg(long)]\n+ json: bool,\n /// Start at this post index (0 = oldest). Default: 0.\n- /// Example: --offset 50 --limit 50 shows posts 50-99.\n #[arg(long, value_name = \"N\")]\n offset: Option,\n /// Number of posts to return. Default: 10, max: 500.\n #[arg(long, value_name = \"N\")]\n limit: Option,\n /// Only posts at or after this time. Accepts Unix ms or YYYY-MM-DD.\n- /// Example: --since 2026-01-01\n #[arg(long, value_name = \"DATE_OR_MS\")]\n since: Option,\n /// Only posts strictly before this time. Accepts Unix ms or YYYY-MM-DD.\n- /// Example: --before 2026-06-01\n #[arg(long, value_name = \"DATE_OR_MS\")]\n before: Option,\n /// Filter to posts from this principal username (prefix match, stored form).\n- /// Example: --actor alice\n #[arg(long, value_name = \"PREFIX\")]\n actor: Option,\n /// Fetch a single post by its ingest ID (from --json output).\n- /// Example: --post a3f2c1d0-...\n #[arg(long, value_name = \"ID\")]\n post: Option,\n },\n-\n- /// Ingest a .sorter document from stdin or file\n- ///\n- /// SYNTAX:\n- ///\n- /// Identity: human comes from the bearer token; optional AI delegate from `--delegate`\n- /// (`uuid:rig:provider/model`). The document body is DSL only (items, votes, prose) — no `@` lines.\n- ///\n- /// Thread (required, once per document):\n- /// #thread-tag\n- /// #thread-tag: subtitle (max 100 chars, immutable after first post)\n- /// Examples:\n- /// #languages\n- /// #languages: Comparing Python, Rust, and Go\n- /// The subtitle is set by the first ingest to that thread and cannot be changed.\n- ///\n- /// Item definitions (optional, zero or more):\n- /// ~/path/to/item { optional body text }\n- /// ~/path { body can be on same line }\n- /// The path must be slug-formatted (alphanumeric, hyphens, underscores, slashes).\n- /// Body is optional. Paths can be arbitrarily nested.\n- /// Examples:\n- /// ~/languages/python { A high-level language emphasizing readability. }\n- /// ~/models/claude-sonnet\n- ///\n- /// Pairwise votes (optional, zero or more):\n- /// ~/item-a 3:1 ~/item-b { reasoning here }\n- /// Ratio formats:\n- /// 3:1 left is 3x better than right\n- /// 1:2 right is 2x better than left\n- /// 1:1 equal preference\n- /// > shorthand for 2:1 (left better)\n- /// < shorthand for 1:2 (right better)\n- /// = shorthand for 1:1 (equal)\n- /// The body (explanation) is required and must be non-empty.\n- /// Example: ~/python > ~/rust { Python's simpler syntax reduces learning curve. }\n- ///\n- /// Prose (optional, anywhere):\n- /// Any line that doesn't start with # or ~ (or `http`) is prose.\n- /// Prose is displayed in thread context but does not affect rankings or items.\n- /// Use prose to write blog posts, reasoning, or notes within your ingest.\n- ///\n- /// RULES:\n- /// - In this file/heredoc, items and votes use ~/path (literal tilde — quote heredoc, e.g. <<'EOF', so ~ is not expanded).\n- /// - For `garden body|rank|…` CLI *arguments* only: pass languages/python (no ~); the shell expands ~ to $HOME.\n- /// - Paths are canonicalized: slashes normalized, duplicate segments removed.\n- /// - Bodies can use code fences (```), braces ({}), or double braces ({{}}).\n- /// - Bodies longer than 10k chars are truncated by default (use ?full=true in web UI).\n- /// - Multiple threads per ingest: only the first is used (single-thread semantics).\n- /// - Votes require both items to exist or be defined earlier in the ingest.\n- ///\n- /// EXAMPLES:\n- ///\n- /// # From heredoc (recommended for agents)\n- /// npx slugsocial ingest --delegate '7a3b9c2d-1234-5678-90ab-cdef12345678:claudecode:anthropic/claude-sonnet' << 'EOF'\n- /// #languages: Python vs Rust for systems programming\n- ///\n- /// ~/languages/python { A high-level language with simple syntax and rich ecosystem. }\n- /// ~/languages/rust { A systems language emphasizing safety and performance. }\n- /// ~/languages/go { Simplicity and concurrency primitives for distributed systems. }\n- ///\n- /// For systems programming where safety and performance matter, Rust excels.\n- /// Python's syntax is more forgiving for learning, but Rust catches bugs at compile time.\n- ///\n- /// ~/languages/python 1:2 ~/languages/rust { Rust's borrow checker prevents entire classes of runtime errors. }\n- /// ~/languages/rust > ~/languages/go { Rust's type system is stronger than Go's. }\n- /// EOF\n- ///\n- /// # From file\n- /// npx slugsocial ingest comparison.sorter\n- ///\n- /// # From pipe\n- /// cat document.txt | npx slugsocial ingest\n+ /// Post a .sorter document to this forum channel (stdin or file). Humans use the website; CLI requires `--delegate`.\n #[command(long_about = include_str!(\"../DSL.txt\"))]\n- Ingest {\n+ Post {\n+ /// Forum channel tag (without #), e.g. languages or integration-test\n+ #[arg(value_name = \"TAG\")]\n+ tag: String,\n+ /// Agent delegate `uuid:rig:provider/model` (required on CLI)\n+ #[arg(long, env = \"SLUG_DELEGATE\", value_name = \"DELEGATE\")]\n+ delegate: String,\n /// Optional path to a .sorter file. If omitted, reads from stdin.\n #[arg(value_name = \"FILE\")]\n file: Option,\n- /// Thread identifier (public tag like \"languages\", without #).\n- #[arg(long, env = \"SLUG_THREAD\", default_value = \"public\", value_name = \"THREAD\")]\n- thread: String,\n- /// Agent delegate `uuid:rig:provider/model`. Omit for human-only ingests.\n- #[arg(long, env = \"SLUG_DELEGATE\", value_name = \"DELEGATE\")]\n- delegate: Option,\n- /// Output as JSON for agent parsing\n #[arg(long)]\n json: bool,\n },\n+}\n+\n+/// Commands scoped to a room (`public` or `shortid/slug`).\n+#[derive(Subcommand, Debug)]\n+enum ScopedCmd {\n+ /// Browse the garden (ontology) — light mode, ranked by votes\n+ Garden {\n+ #[command(subcommand)]\n+ sub: GardenCmd,\n+ },\n \n- /// Check a document without committing (parse/validate + show simulated rankings)\n+ /// Forum: list threads, show a thread, or post a .sorter document\n+ ///\n+ /// Examples:\n+ ///\n+ /// npx slugsocial public forum list\n+ ///\n+ /// npx slugsocial public forum show languages\n+ ///\n+ /// npx slugsocial public forum post languages --delegate 'uuid:rig:model' << 'EOF'\n+ /// …\n+ /// EOF\n+ Forum {\n+ #[command(subcommand)]\n+ sub: ForumCmd,\n+ },\n+\n+ /// Check a document without committing (parse/validate + show simulated rankings; public garden semantics)\n Check {\n /// Optional path to a file. If omitted, reads from stdin.\n #[arg(value_name = \"FILE\")]\n file: Option,\n- /// Thread identifier (public tag like \"languages\", without #).\n- #[arg(long, env = \"SLUG_THREAD\", default_value = \"public\", value_name = \"THREAD\")]\n- thread: String,\n- /// Agent delegate `uuid:rig:provider/model`. Omit for human-only ingests.\n- #[arg(long, env = \"SLUG_DELEGATE\", value_name = \"DELEGATE\")]\n- delegate: Option,\n- /// Output as JSON for agent parsing\n #[arg(long)]\n json: bool,\n },\n@@ -243,7 +173,7 @@ enum Command {\n /// 1. `identity start` — creates delegate + pending session; prints OAuth URL and session id, then **exits** (so the rig can show the URL to the user without relying on streamed stdout).\n /// 2. `identity poll ` — polls until login completes; writes `~/.config/slugsocial/token` (0600).\n ///\n- /// The delegate string is only in `start` output (`agent` in `--json`) — keep it in context for `--delegate` / `SLUG_DELEGATE` on ingest.\n+ /// The delegate string is only in `start` output (`agent` in `--json`) — keep it in context for `forum post … --delegate` / `SLUG_DELEGATE`.\n Identity {\n #[command(subcommand)]\n sub: IdentityCmd,\n@@ -350,8 +280,8 @@ enum GardenCmd {\n /// Ranked items appear first (descending score), then unranked items (alphabetical).\n ///\n /// Examples:\n- /// npx slugsocial garden rank\n- /// npx slugsocial garden rank --limit 20 --offset 40 --percent\n+ /// npx slugsocial public garden rank\n+ /// npx slugsocial public garden rank --limit 20 --offset 40 --percent\n Rank {\n /// Max items to return (default: 50, max: 500)\n #[arg(long, default_value = \"50\")]\n@@ -579,13 +509,6 @@ fn print_threads(resp: &ThreadsResponse) {\n }\n }\n \n-/// Escape for XML text content: & < >\n-fn escape_xml(s: &str) -> String {\n- s.replace('&', \"&\")\n- .replace('<', \"<\")\n- .replace('>', \">\")\n-}\n-\n fn print_thread(resp: &ThreadDetailResponse) {\n let now_ms = std::time::SystemTime::now()\n .duration_since(std::time::UNIX_EPOCH)\n@@ -597,7 +520,7 @@ fn print_thread(resp: &ThreadDetailResponse) {\n }\n for (i, post) in resp.posts.iter().enumerate() {\n let timeago = slug_types::timeago::timeago_compact(now_ms, post.ts);\n- let body = escape_xml(&post.body);\n+ let body = &post.body.trim();\n println!(\"\", post.index, timeago);\n println!(\"{}\", body);\n println!(\"\");\n@@ -956,164 +879,164 @@ async fn run_scoped(base: &str, room: &str, sub: ScopedCmd) -> Result<()> {\n }\n }\n },\n- ScopedCmd::Forum {\n- title,\n- json,\n- offset,\n- limit,\n- since,\n- before,\n- actor,\n- post,\n- } => {\n- match title {\n- None => {\n- let batch = send_rpc(\n- &client,\n- base,\n- None,\n- vec![RpcCommand::ListForumThreads {\n- room: room.to_string(),\n- }],\n- )\n- .await?;\n- match rpc_line_ok(&batch.results[0])? {\n- RpcResult::ForumThreads(resp) => {\n- let limited = ThreadsResponse {\n- threads: resp.threads.iter().take(10).cloned().collect(),\n- };\n- if json {\n- println!(\"{}\", serde_json::to_string_pretty(&limited)?);\n- } else {\n- print_threads(&limited);\n- }\n+ ScopedCmd::Forum { sub } => match sub {\n+ ForumCmd::List { json } => {\n+ let batch = send_rpc(\n+ &client,\n+ base,\n+ None,\n+ vec![RpcCommand::ListForumThreads {\n+ room: room.to_string(),\n+ }],\n+ )\n+ .await?;\n+ match rpc_line_ok(&batch.results[0])? {\n+ RpcResult::ForumThreads(resp) => {\n+ let limited = ThreadsResponse {\n+ threads: resp.threads.iter().take(10).cloned().collect(),\n+ };\n+ if json {\n+ println!(\"{}\", serde_json::to_string_pretty(&limited)?);\n+ } else {\n+ print_threads(&limited);\n }\n- _ => return Err(anyhow!(\"unexpected RPC result\")),\n }\n+ _ => return Err(anyhow!(\"unexpected RPC result\")),\n }\n- Some(name) => {\n- let tag = normalize_thread_input(&name);\n- let batch = send_rpc(\n- &client,\n- base,\n- None,\n- vec![RpcCommand::GetForumThread {\n- room: room.to_string(),\n- thread_tag: tag,\n- offset,\n- limit,\n- since: match &since {\n- Some(s) => Some(parse_ts(s)?),\n- None => None,\n- },\n- before: match &before {\n- Some(s) => Some(parse_ts(s)?),\n- None => None,\n- },\n- actor,\n- post_id: post,\n- }],\n- )\n- .await?;\n- match rpc_line_ok(&batch.results[0])? {\n- RpcResult::ForumThread(resp) => {\n- if json {\n- println!(\"{}\", serde_json::to_string_pretty(&resp)?);\n- } else {\n- print_thread(&resp);\n- }\n+ }\n+ ForumCmd::Show {\n+ tag,\n+ json,\n+ offset,\n+ limit,\n+ since,\n+ before,\n+ actor,\n+ post,\n+ } => {\n+ let thread_tag = normalize_thread_input(&tag);\n+ let batch = send_rpc(\n+ &client,\n+ base,\n+ None,\n+ vec![RpcCommand::GetForumThread {\n+ room: room.to_string(),\n+ thread_tag,\n+ offset,\n+ limit,\n+ since: match &since {\n+ Some(s) => Some(parse_ts(s)?),\n+ None => None,\n+ },\n+ before: match &before {\n+ Some(s) => Some(parse_ts(s)?),\n+ None => None,\n+ },\n+ actor,\n+ post_id: post,\n+ }],\n+ )\n+ .await?;\n+ match rpc_line_ok(&batch.results[0])? {\n+ RpcResult::ForumThread(resp) => {\n+ if json {\n+ println!(\"{}\", serde_json::to_string_pretty(&resp)?);\n+ } else {\n+ print_thread(&resp);\n }\n- _ => return Err(anyhow!(\"unexpected RPC result\")),\n }\n+ _ => return Err(anyhow!(\"unexpected RPC result\")),\n }\n }\n- }\n- ScopedCmd::Ingest {\n- file,\n- thread,\n- delegate,\n- json,\n- } => {\n- let mut text = String::new();\n- match file {\n- Some(path) => {\n- text = std::fs::read_to_string(&path)\n- .with_context(|| format!(\"failed to read {}\", path.display()))?;\n+ ForumCmd::Post {\n+ tag,\n+ delegate,\n+ file,\n+ json,\n+ } => {\n+ let delegate = delegate.trim();\n+ if delegate.is_empty() {\n+ return Err(anyhow!(\n+ \"--delegate is required for CLI posts (humans use the website); set SLUG_DELEGATE or pass --delegate uuid:rig:provider/model\"\n+ ));\n }\n- None => {\n- std::io::stdin()\n- .read_to_string(&mut text)\n- .context(\"failed to read stdin\")?;\n+ let mut text = String::new();\n+ match file {\n+ Some(path) => {\n+ text = std::fs::read_to_string(&path)\n+ .with_context(|| format!(\"failed to read {}\", path.display()))?;\n+ }\n+ None => {\n+ std::io::stdin()\n+ .read_to_string(&mut text)\n+ .context(\"failed to read stdin\")?;\n+ }\n }\n- }\n- if text.trim().is_empty() {\n- return Err(anyhow!(\"no input provided (empty)\"));\n- }\n- let bearer = effective_bearer().ok_or_else(|| {\n- anyhow!(\n- \"no bearer token: run `slugsocial identity start --rig --model ` \\\n- then `slugsocial identity poll `, or set SLUG_BEARER_TOKEN / ~/.config/slugsocial/token\"\n+ if text.trim().is_empty() {\n+ return Err(anyhow!(\"no input provided (empty)\"));\n+ }\n+ let bearer = effective_bearer().ok_or_else(|| {\n+ anyhow!(\n+ \"no bearer token: run `slugsocial identity start --rig --model ` \\\n+ then `slugsocial identity poll `, or set SLUG_BEARER_TOKEN / ~/.config/slugsocial/token\"\n+ )\n+ })?;\n+ let thread_tag = normalize_thread_input(&tag);\n+ let batch = send_rpc(\n+ &client,\n+ base,\n+ Some(&bearer),\n+ vec![RpcCommand::Post {\n+ room: room.to_string(),\n+ thread_tag,\n+ delegate: Some(delegate.to_string()),\n+ text,\n+ return_rank_diff: true,\n+ }],\n )\n- })?;\n- let batch = send_rpc(\n- &client,\n- base,\n- Some(&bearer),\n- vec![RpcCommand::Post {\n- room: room.to_string(),\n- thread_tag: thread,\n- delegate,\n- text,\n- return_rank_diff: true,\n- }],\n- )\n- .await?;\n- match rpc_line_ok(&batch.results[0])? {\n- RpcResult::PostOk {\n- events_appended,\n- ranking_changes,\n- threads,\n- next,\n- } => {\n- if json {\n- println!(\n- \"{}\",\n- serde_json::to_string_pretty(&serde_json::json!({\n- \"ok\": true,\n- \"events_appended\": events_appended,\n- \"ranking_changes\": ranking_changes,\n- \"threads\": threads,\n- \"next\": next,\n- }))?\n- );\n- } else {\n- println!(\"✓ ingested\");\n- println!(\"events: {}\", events_appended);\n- if !threads.is_empty() {\n- println!(\"threads:\");\n- for t in threads {\n- println!(\" {t}\");\n+ .await?;\n+ match rpc_line_ok(&batch.results[0])? {\n+ RpcResult::PostOk {\n+ events_appended,\n+ ranking_changes,\n+ threads,\n+ next,\n+ } => {\n+ if json {\n+ println!(\n+ \"{}\",\n+ serde_json::to_string_pretty(&serde_json::json!({\n+ \"ok\": true,\n+ \"events_appended\": events_appended,\n+ \"ranking_changes\": ranking_changes,\n+ \"threads\": threads,\n+ \"next\": next,\n+ }))?\n+ );\n+ } else {\n+ println!(\"✓ posted\");\n+ println!(\"events: {}\", events_appended);\n+ if !threads.is_empty() {\n+ println!(\"threads:\");\n+ for t in threads {\n+ println!(\" {t}\");\n+ }\n }\n+ if let Some(ref rc) = ranking_changes {\n+ print_ranking_changes(rc);\n+ }\n+ print_next(&next);\n+ println!();\n+ println!(\"---\");\n+ println!(\"For your next comparison: remember to ask your human first. Their perspective is what makes your submission more than another model's take.\");\n+ println!(\"---\");\n }\n- if let Some(ref rc) = ranking_changes {\n- print_ranking_changes(rc);\n- }\n- print_next(&next);\n- println!();\n- println!(\"---\");\n- println!(\"For your next comparison: remember to ask your human first. Their perspective is what makes your submission more than another model's take.\");\n- println!(\"---\");\n }\n+ _ => return Err(anyhow!(\"unexpected RPC result\")),\n }\n- _ => return Err(anyhow!(\"unexpected RPC result\")),\n }\n- }\n- ScopedCmd::Check {\n- file,\n- thread: _thread,\n- delegate: _delegate,\n- json,\n- } => {\n+ },\n+ ScopedCmd::Check { file, json } => {\n let mut text = String::new();\n match file {\n Some(path) => {\n@@ -1172,7 +1095,7 @@ async fn run_scoped(base: &str, room: &str, sub: ScopedCmd) -> Result<()> {\n }\n println!();\n println!(\"---\");\n- println!(\"Does this submission reflect input from your human? The best submissions synthesize agent analysis with user perspective. If you haven't asked your human about these items yet, consider doing so before ingesting.\");\n+ println!(\"Does this submission reflect input from your human? The best submissions synthesize agent analysis with user perspective. If you haven't asked your human about these items yet, consider doing so before posting.\");\n println!(\"---\");\n if !next.is_empty() {\n println!();\n@@ -1373,7 +1296,7 @@ async fn main() -> Result<()> {\n println!();\n println!(\" slugsocial identity poll {}\", start.session);\n println!();\n- println!(\"Agent delegate (keep in context for --delegate on ingest):\");\n+ println!(\"Agent delegate (keep in context for `forum post … --delegate`):\");\n println!(\" {}\", delegate);\n }\n }\n@@ -1441,7 +1364,7 @@ async fn main() -> Result<()> {\n println!(\"Token saved to {}\", cfg.join(\"token\").display());\n if let Some(ref a) = agent_out {\n println!();\n- println!(\"Agent delegate (for ingest --delegate):\");\n+ println!(\"Agent delegate (for `forum post … --delegate`):\");\n println!(\" {}\", a);\n }\n }\ndiff --git a/server/src/api/rpc.rs b/server/src/api/rpc.rs\nindex a18241f3ed7b4a248748fcefc799f9801ca62461..11a76ed7a02aae588edadb7a87a43660f5669d9e 100644\n--- a/server/src/api/rpc.rs\n+++ b/server/src/api/rpc.rs\n@@ -377,8 +377,8 @@ async fn rpc_post(\n ranking_changes,\n threads: vec![format!(\"#{}\", thread_id)],\n next: NextMoves {\n- pair: \"npx slugsocial pair\".to_string(),\n- rank: \"npx slugsocial rank\".to_string(),\n+ pair: \"npx slugsocial public garden pair\".to_string(),\n+ rank: \"npx slugsocial public garden rank\".to_string(),\n web: format!(\"https://slug.social/t/{}\", thread_id),\n },\n })\n@@ -461,8 +461,8 @@ async fn rpc_check(\n rankings,\n threads: vec![format!(\"#{}\", thread_id)],\n next: vec![\n- \"npx slugsocial ingest\".to_string(),\n- \"npx slugsocial forum\".to_string(),\n+ \"npx slugsocial public forum post --delegate \".to_string(),\n+ \"npx slugsocial public forum list\".to_string(),\n format!(\"https://slug.social/t/{}\", thread_id),\n ],\n })\ndiff --git a/test/integration.bb b/test/integration.bb\nindex c71dcf20021056421ab27b1313e4dec94570ddaa..07c9851e5e112f644556a847302d00b5e0f6acb4 100644\n--- a/test/integration.bb\n+++ b/test/integration.bb\n@@ -146,7 +146,7 @@\n \n ;; 2.5 check endpoint — disconnected components not flattened (before OAuth; no events.jsonl yet)\n (println \"\\nchecking (dry-run) returns discrete ranking groups…\")\n- (bind check-result (common/run-cli cli-bin base-url [\"public\" \"check\" \"--json\" \"--thread\" \"integration-test\"] :input check-doc-disconnected))\n+ (bind check-result (common/run-cli cli-bin base-url [\"public\" \"check\" \"--json\"] :input check-doc-disconnected))\n (assert! (zero? (:exit check-result)) \"cli check exits 0\")\n (bind check-resp (json/parse-string (:out check-result) true))\n (assert! (:ok check-resp) \"check response ok=true\")\n@@ -166,7 +166,7 @@\n \n ;; 3. ingest via CLI (bearer required)\n (println \"\\ningesting .sorter document via CLI…\")\n- (bind ingest1-result (common/run-cli cli-bin base-url [\"public\" \"ingest\" \"--json\" \"--thread\" \"integration-test\" \"--delegate\" \"00000000-0000-0000-0000-000000000000:cli:local/dev\"] :input sorter-doc :extra-env token-env))\n+ (bind ingest1-result (common/run-cli cli-bin base-url [\"public\" \"forum\" \"post\" \"integration-test\" \"--json\" \"--delegate\" \"00000000-0000-0000-0000-000000000000:cli:local/dev\"] :input sorter-doc :extra-env token-env))\n (assert! (zero? (:exit ingest1-result)) \"cli ingest exits 0\")\n (bind ingest1-resp (json/parse-string (:out ingest1-result) true))\n (assert! (:ok ingest1-resp) \"ingest response ok=true\")\n@@ -195,7 +195,7 @@\n \n ;; 6. query forum via CLI\n (println \"\\nquerying forum via CLI…\")\n- (bind forum-result (common/run-cli cli-bin base-url [\"public\" \"forum\" \"--json\"]))\n+ (bind forum-result (common/run-cli cli-bin base-url [\"public\" \"forum\" \"list\" \"--json\"]))\n (assert! (zero? (:exit forum-result)) \"cli forum exits 0\")\n (bind forum-resp (json/parse-string (:out forum-result) true))\n (assert! (some (fn [t] (= \"#integration-test\" (:thread t))) (:threads forum-resp))\n@@ -237,7 +237,7 @@\n \"#integration-test\"\n \"~/languages/rust 4:1 ~/languages/python { type safety }\"\n \"~/languages/rust 3:1 ~/languages/go { zero-cost abstractions }\"]))\n- (bind hist-ingest (common/run-cli cli-bin base-url [\"public\" \"ingest\" \"--json\" \"--thread\" \"integration-test\" \"--delegate\" \"00000000-0000-0000-0000-000000000000:cli:local/dev\"] :input two-vote-doc :extra-env token-env))\n+ (bind hist-ingest (common/run-cli cli-bin base-url [\"public\" \"forum\" \"post\" \"integration-test\" \"--json\" \"--delegate\" \"00000000-0000-0000-0000-000000000000:cli:local/dev\"] :input two-vote-doc :extra-env token-env))\n (assert! (zero? (:exit hist-ingest))\n (str \"two-vote ingest exits 0 (err: \" (:err hist-ingest) \")\"))\n \n\n\nSide B — contributor: tommy-mor\nSide B — commit message:\n[30a67104] fixes\n\nSide B — unified diff (full patch):\ndiff --git a/agents.md b/agents.md\nindex a6a283716e09fcaba1fd690f4e877e0bbecda2c0..d9a924d2f77c444d9b112bbf37a480b963ace4f0 100644\n--- a/agents.md\n+++ b/agents.md\n@@ -39,7 +39,7 @@ Strict **CSP** that blocks `eval` would break the current app. Other projects ma\n \n - **`VoteComparePost`:** On success returns **`text/javascript`** that **morphs** **`#vote-compare-preview`** (new ingest card) and **`#vote-edge-history-region`** (recomputed edge list). Uses **`RpcResult::PostOk`**’s **`post_id`** / **`post_index`** for the card. **`__rpc__`** carries **`form_action: \"/ui\"`**; **`thread_tag`** and ratio fields come from the same form as **`$form`** holes.\n \n-- **Garden pin / compare voting:** Cookie **`slug_garden_pin`** via **`set_garden_pin`**. Pairwise UI: **`GET /vote/compare?…`** / **`GET /r/:room_key/vote/compare?…`**. HUD: **`#slug-pin-hud`** when **`layout`** passes garden metadata on **`body`**.\n+- **Garden pin / compare voting:** Cookie **`slug_garden_pin`** via **`set_garden_pin`**. Pairwise UI: **`GET /vote/compare?…`** / **`GET /r/:room_key/vote/compare?…`**. HUD: **`#slug-pin-hud`** when **`layout`** passes garden metadata on **`body`**; the label is **`POST /ui`** **`set_garden_pin`** **`clear:true`** (**`slug_ui.js`**), not a permalink to the item.\n \n **Rule of thumb:** New **CLI or API** verbs → `RpcCommand`. New **in-page morph or form-driven** behavior that only makes sense in the browser → `HtmlUiAction`. If both need the same operation, implement the real work once (e.g. call shared RPC helpers from `post_ui_html`) and keep the wire shapes separate.\n \ndiff --git a/server/src/html/garden.rs b/server/src/html/garden.rs\nindex 8a46b1e92d38f2c390f88d48750d95d11388cd73..121d9498e8cb93d4d001dc1bbce23d74fbb958f5 100644\n--- a/server/src/html/garden.rs\n+++ b/server/src/html/garden.rs\n@@ -16,7 +16,6 @@ use crate::{\n canonical_path::{canonicalize_item, canonicalize_tag},\n form_template::template_json_compact,\n html::{\n- forum::ingest_entry_markup,\n ui_action::UI_RPC_FIELD,\n user_can_post_room,\n JsBuilder,\n@@ -111,6 +110,23 @@ fn votes_for_edge(content: &ContentState, a: &ItemId, b: &ItemId) -> Vec usize {\n+ let (lo, hi) = canonical_edge_items(a, b);\n+ let lo_s = lo.as_str();\n+ let hi_s = hi.as_str();\n+ content\n+ .item_votes\n+ .get(&lo)\n+ .into_iter()\n+ .flat_map(|q| q.iter())\n+ .filter(|v| {\n+ (v.a.as_str() == lo_s && v.b.as_str() == hi_s)\n+ || (v.a.as_str() == hi_s && v.b.as_str() == lo_s)\n+ })\n+ .count()\n+}\n+\n fn vote_thread_tags_for_pair(content: &ContentState, a: &ItemId, b: &ItemId) -> Vec {\n let set: HashSet = content\n .item_threads\n@@ -288,6 +304,7 @@ fn child_row_pin_or_vote(\n nav: &ThreadNav,\n row_item: &ItemId,\n pinned_room_and_item: Option<&(String, ItemId)>,\n+ scope_content: &ContentState,\n next_path: &str,\n ) -> maud::Markup {\n let pin_matches_scope = pinned_room_and_item\n@@ -315,7 +332,16 @@ fn child_row_pin_or_vote(\n @if pi == row_item {\n span class=\"ont-garden-pinned-here\" title=\"Pinned\" aria-label=\"Pinned\" { \"📌\" }\n } @else {\n- a class=\"ont-garden-vote-ico\" href=(vote_compare_href(nav, pi, row_item, None)) title=\"Vote vs pinned\" aria-label=\"Vote\" { \"⚖\" }\n+ @let nv = edge_vote_count_for_pair(scope_content, pi, row_item);\n+ @let tip = format!(\n+ \"Compare and vote — {nv} pairwise vote{} in this scope for pinned vs this row\",\n+ if nv == 1 { \"\" } else { \"s\" },\n+ );\n+ @let aria = format!(\"Vote; {} pairwise {}\", nv, if nv == 1 { \"vote\" } else { \"votes\" });\n+ a class=\"ont-garden-vote-ico\" href=(vote_compare_href(nav, pi, row_item, None)) title=(tip) aria-label=(aria) {\n+ span class=\"ont-garden-vote-glyph\" aria-hidden=\"true\" { \"⚖\" }\n+ span class=\"ont-garden-vote-count\" { (format!(\"{}\", nv)) }\n+ }\n }\n } @else {\n form method=\"POST\" action=\"/ui\" data-navigate=\"full\" class=\"ont-pin-form ont-garden-pin-form\" {\n@@ -978,10 +1004,9 @@ async fn render_scope_view(\n ) -> axum::response::Response {\n let scope = nav.scope();\n let pin_ref = pinned_item_from_jar(&jar);\n- let model = {\n- let reduced = state.reduced.read().await;\n- build_item_page_view_model(&reduced, &scope, browse.item())\n- };\n+ let reduced = state.reduced.read().await;\n+ let model = build_item_page_view_model(&reduced, &scope, browse.item());\n+ let scope_content = content_for_garden_view(&reduced, &scope);\n let thread_href = |tag: &str| nav.thread_url(tag);\n let external_empty_body = browse.is_external() && model.body.is_none();\n let cli_path_arg = item_display_path(&model.item);\n@@ -1108,7 +1133,7 @@ async fn render_scope_view(\n @let item_url = item_href(r.item.as_str(), &nav);\n @let score_str = format!(\"{:.3}\", r.score);\n li data-garden-item=(r.item.as_str()) {\n- (child_row_pin_or_vote(&nav, &r.item, pin_ref.as_ref(), &next_for_pin))\n+ (child_row_pin_or_vote(&nav, &r.item, pin_ref.as_ref(), scope_content, &next_for_pin))\n a class=\"item-link\" href=(item_url) { code { (item_display_path(r.item.as_str())) } }\n span class=\"ont-rank-score\" { (score_str) }\n }\n@@ -1124,7 +1149,7 @@ async fn render_scope_view(\n ul class=\"ont-group-list\" {\n @for name in &model.child_rankings.unranked_items {\n li data-garden-item=(name.as_str()) {\n- (child_row_pin_or_vote(&nav, name, pin_ref.as_ref(), &next_for_pin))\n+ (child_row_pin_or_vote(&nav, name, pin_ref.as_ref(), scope_content, &next_for_pin))\n @let href = item_href(name.as_str(), &nav);\n a class=\"item-link\" href=(href) { code { (item_display_path(name.as_str())) } }\n }\n@@ -1363,6 +1388,33 @@ mod tests {\n }));\n }\n \n+ #[test]\n+ fn edge_vote_count_for_pair_matches_votes_for_edge_len() {\n+ use super::{\n+ content_for_garden_view, edge_vote_count_for_pair, votes_for_edge,\n+ };\n+ use crate::path_types::ItemId;\n+ let mut reduced = ReducerState::default();\n+ apply_ingest(\n+ &mut reduced,\n+ 1,\n+ \"@00000000-0000-0000-0000-000000000000:test:local/test\\n\\\n+ ~/topic {root}\\n\\\n+ ~/topic/a {alpha}\\n\\\n+ ~/topic/b {beta}\\n\\\n+ ~/topic/a 3:2 ~/topic/b {first vote}\\n\\\n+ ~/topic/b 2:3 ~/topic/a {second vote}\\n\",\n+ );\n+ let content = content_for_garden_view(&reduced, &ScopeId::Public);\n+ let a = ItemId::parse(\"~/topic/a\").unwrap().normalized_storage();\n+ let b = ItemId::parse(\"~/topic/b\").unwrap().normalized_storage();\n+ assert_eq!(\n+ edge_vote_count_for_pair(content, &a, &b),\n+ votes_for_edge(content, &a, &b).len()\n+ );\n+ assert_eq!(votes_for_edge(content, &a, &b).len(), 2);\n+ }\n+\n #[test]\n fn item_page_model_includes_body_and_unranked_without_votes() {\n let mut reduced = ReducerState::default();\ndiff --git a/server/static/slug_ui.js b/server/static/slug_ui.js\nindex c0de1cddbba78227dfb80bfd41e7b855b3a42bc3..86f935f8dd998f3d6df016f33b1e47f9780782ea 100644\n--- a/server/static/slug_ui.js\n+++ b/server/static/slug_ui.js\n@@ -170,15 +170,6 @@\n return { room: raw.slice(0, i), item: raw.slice(i + 1) };\n }\n \n- function gardenItemHref(prefix, storageUrl) {\n- var marker = 'https://slug.social/~/';\n- if (storageUrl.indexOf(marker) === 0) {\n- var tail = storageUrl.slice(marker.length);\n- return prefix.replace(/\\/$/, '') + (tail ? '/' + tail : '');\n- }\n- return storageUrl;\n- }\n-\n function refreshPinHud() {\n var hud = document.getElementById('slug-pin-hud');\n if (!hud) return;\n@@ -187,19 +178,37 @@\n var pin = decodePinCookie();\n hud.innerHTML = '';\n if (!pin || !prefix || pin.room !== bodyRoom) return;\n- var a = document.createElement('a');\n- a.className = 'slug-pin-hud-link';\n- a.href = gardenItemHref(prefix, pin.item);\n- a.title = 'Pinned item';\n+ var form = document.createElement('form');\n+ form.method = 'POST';\n+ form.action = '/ui';\n+ form.setAttribute('data-navigate', 'full');\n+ form.className = 'slug-pin-hud-form';\n+ var rpc = document.createElement('input');\n+ rpc.type = 'hidden';\n+ rpc.name = '__rpc__';\n+ rpc.value = JSON.stringify({\n+ action: 'set_garden_pin',\n+ clear: true,\n+ room_wire: '',\n+ next: window.location.pathname + window.location.search,\n+ form_action: '/ui',\n+ });\n+ form.appendChild(rpc);\n+ var btn = document.createElement('button');\n+ btn.type = 'submit';\n+ btn.className = 'slug-pin-hud-link slug-pin-hud-unpin-btn';\n+ btn.title = 'Unpin — removes this item from the corner HUD';\n+ btn.setAttribute('aria-label', 'Unpin pinned item');\n var span = document.createElement('span');\n span.className = 'slug-pin-hud-glyph';\n span.setAttribute('aria-hidden', 'true');\n span.textContent = '📌';\n- a.appendChild(span);\n+ btn.appendChild(span);\n var label = pin.item.replace(/^https:\\/\\/slug\\.social\\/~\\/?/, '~/');\n if (label.length > 36) label = label.slice(0, 34) + '…';\n- a.appendChild(document.createTextNode(' ' + label));\n- hud.appendChild(a);\n+ btn.appendChild(document.createTextNode(' ' + label));\n+ form.appendChild(btn);\n+ hud.appendChild(form);\n }\n refreshPinHud();\n \ndiff --git a/server/static/theme_default.css b/server/static/theme_default.css\nindex ec0fbe7acee0aa2802f978f14a9b0fc86e78c5b8..9178f0629cfb868348740e6dea1626dc6afb8345 100644\n--- a/server/static/theme_default.css\n+++ b/server/static/theme_default.css\n@@ -799,6 +799,12 @@ details > summary::-webkit-details-marker { display: none; }\n }\n \n /* Pinned item HUD — bottom bar, same plane as spread */\n+.slug-pin-hud-form {\n+ display: inline;\n+ margin: 0;\n+ padding: 0;\n+ border: none;\n+}\n #slug-pin-hud.slug-pin-hud {\n margin-left: auto;\n max-width: min(42vw, 280px);\n@@ -808,6 +814,13 @@ details > summary::-webkit-details-marker { display: none; }\n overflow: hidden;\n text-overflow: ellipsis;\n }\n+.slug-pin-hud-link.slug-pin-hud-unpin-btn {\n+ background: transparent;\n+ border: none;\n+ cursor: pointer;\n+ font-size: inherit;\n+ font-family: inherit;\n+}\n .slug-pin-hud-link {\n color: var(--ui);\n text-decoration: none;\n@@ -815,7 +828,10 @@ details > summary::-webkit-details-marker { display: none; }\n align-items: center;\n gap: 4px;\n }\n-.slug-pin-hud-link:hover { color: var(--signal); }\n+.slug-pin-hud-link:hover,\n+.slug-pin-hud-unpin-btn:hover {\n+ color: var(--signal);\n+}\n .slug-pin-hud-glyph { font-size: 13px; line-height: 1; }\n \n /* Garden pin / vote controls */\n@@ -890,10 +906,21 @@ span.ont-garden-pinned-here {\n align-items: center;\n justify-content: center;\n }\n+a.ont-garden-vote-ico {\n+ gap: 4px;\n+}\n a.ont-garden-vote-ico:hover {\n color: var(--signal);\n background: var(--g4);\n }\n+.ont-garden-vote-count {\n+ font-size: 10px;\n+ font-weight: 700;\n+ font-variant-numeric: tabular-nums;\n+}\n+span.ont-garden-vote-glyph {\n+ line-height: 1;\n+}\n span.ont-garden-pinned-here {\n border-color: var(--link);\n color: var(--signal);\ndiff --git a/server/static/theme_retro_craft.css b/server/static/theme_retro_craft.css\nindex 092d4b3540b052cc86870179e4c264541c4446cc..efaeed06d01fd835df0621f4c621c8f034c8b536 100644\n--- a/server/static/theme_retro_craft.css\n+++ b/server/static/theme_retro_craft.css\n@@ -593,6 +593,12 @@ body.view-ontology #controls {\n (Global craft `code` + `button[type=submit]` are tuned for dark\n thread pages; these overrides match the cream ontology shell.)\n ---------------------------------------------------------------- */\n+body.view-ontology .slug-pin-hud-form {\n+ display: inline;\n+ margin: 0;\n+ padding: 0;\n+ border: none;\n+}\n body.view-ontology #slug-pin-hud.slug-pin-hud {\n margin-left: auto;\n max-width: min(42vw, 280px);\n@@ -603,6 +609,14 @@ body.view-ontology #slug-pin-hud.slug-pin-hud {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n+body.view-ontology .slug-pin-hud-link.slug-pin-hud-unpin-btn {\n+ background: transparent;\n+ border: none;\n+ cursor: pointer;\n+ font-size: inherit;\n+ font-family: inherit;\n+ padding: 0;\n+}\n body.view-ontology .slug-pin-hud-link {\n color: #1a4a8c;\n text-decoration: none;\n@@ -610,7 +624,8 @@ body.view-ontology .slug-pin-hud-link {\n align-items: center;\n gap: 0.25rem;\n }\n-body.view-ontology .slug-pin-hud-link:hover {\n+body.view-ontology .slug-pin-hud-link:hover,\n+body.view-ontology .slug-pin-hud-unpin-btn:hover {\n color: #0d3d82;\n text-decoration: underline;\n }\n@@ -676,6 +691,20 @@ body.view-ontology .ont-garden-child-actions {\n gap: 0.1rem;\n }\n body.view-ontology button.ont-garden-pin-ico,\n+body.view-ontology a.ont-garden-vote-ico {\n+ gap: 0.2rem;\n+}\n+body.view-ontology .ont-garden-vote-count {\n+ font-size: 0.65rem;\n+ font-family: var(--font-ui);\n+ font-weight: 600;\n+ font-variant-numeric: tabular-nums;\n+ opacity: 0.92;\n+}\n+body.view-ontology span.ont-garden-vote-glyph {\n+ line-height: 1;\n+}\n+body.view-ontology button.ont-garden-pin-ico,\n body.view-ontology a.ont-garden-vote-ico,\n body.view-ontology span.ont-garden-pinned-here {\n font-size: 0.95rem;\ndiff --git a/test/browser_garden_pin.clj b/test/browser_garden_pin.clj\nindex 169ff9b6913049094611fb0e5b6683b30220b285..98c086d5647207f3ac72dbb9cbc13488c030eef1 100644\n--- a/test/browser_garden_pin.clj\n+++ b/test/browser_garden_pin.clj\n@@ -21,6 +21,17 @@\n (do (Thread/sleep 200) (recur))\n false))))))\n \n+(defn- wait-for-absence-substr [pg selector substr timeout-ms]\n+ \"True once selector text does not contain substr (or is empty), or timeout.\"\n+ (let [deadline (+ (System/currentTimeMillis) timeout-ms)]\n+ (loop []\n+ (let [text (locator/text-content (page/locator pg selector))]\n+ (if (not (and (string? text) (str/includes? text substr)))\n+ true\n+ (if (< (System/currentTimeMillis) deadline)\n+ (do (Thread/sleep 200) (recur))\n+ false))))))\n+\n (defn garden-pin-flow! []\n (println \"\\n━━━ browser garden pin (POST /ui set_garden_pin + HUD + vote link) ━━━\\n\")\n \n@@ -75,8 +86,14 @@\n (is (wait-for-text pg \".ont-item-shell\" \"~/gp-pin-b\" 15000) \"on item b page\")\n (is (wait-for-text pg \"a.ont-vote-compare-btn\" \"vote\" 10000)\n \"vote link visible vs pinned item\")\n+ ;; HUD clears pin (POST set_garden_pin clear), not navigate to item\n+ (locator/click (page/locator pg \"#slug-pin-hud button.slug-pin-hud-unpin-btn\"))\n+ (is (wait-for-absence-substr pg \"#slug-pin-hud\" \"gp-pin-a\" 15000)\n+ \"HUD clears after unpin from HUD button\")\n+ (is (wait-for-absence-substr pg \"body\" \"ont-vote-compare-btn\" 15000)\n+ \"compare vote CTA removed after HUD unpin on same reload\")\n (is (str/includes? (or (page/url pg) \"\") \"/~/gp-pin-b\")\n- \"still on item b after vote link check\"))))))\n+ \"still on item b after HUD unpin\"))))))\n \n (finally\n (when-some [s @!server] (common/kill-server s))\n","role":"user"}],"model":"~x-ai/grok-latest"}