{"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[2e4be477] format\n\nSide A — unified diff (full patch):\ndiff --git a/server/src/html/garden.rs b/server/src/html/garden.rs\nindex 76ba96e45c9e16291a6ccd8096fdd01b274c1560..2d5fcd903fe8f56800ad2c5564b704bd25f9b18d 100644\n--- a/server/src/html/garden.rs\n+++ b/server/src/html/garden.rs\n@@ -9,30 +9,28 @@ use serde::Deserialize;\n use serde_json::json;\n use std::collections::HashSet;\n \n-use base64::{engine::general_purpose::URL_SAFE_NO_PAD as B64_ENGINE, Engine as _};\n+use base64::{Engine as _, engine::general_purpose::URL_SAFE_NO_PAD as B64_ENGINE};\n \n use crate::{\n api::optional_principal,\n canonical_path::{canonicalize_item, canonicalize_tag},\n- form_template::template_json_compact,\n- html::{\n- ui_action::UI_RPC_FIELD,\n- user_can_post_room,\n- JsBuilder,\n- },\n events::ThreadCapability,\n+ form_template::template_json_compact,\n+ html::{JsBuilder, ui_action::UI_RPC_FIELD, user_can_post_room},\n path_types::ItemId,\n- reducer::{scope_from_room_wire, ContentState, ReducerState, ScopeId},\n- scope_rank::{build_children_rankings, ChildrenRankings},\n+ reducer::{ContentState, ReducerState, ScopeId, scope_from_room_wire},\n+ scope_rank::{ChildrenRankings, build_children_rankings},\n state::AppState,\n timeago,\n };\n \n use super::{\n- bc_path, bc_path_external, bc_segment, cli_panel, layout, layout_full_bleed_chromeless, now_ms,\n- ratio_pct, render_linkified_with_embeds_in_scope, theme_from_jar, theme_next_from_uri,\n+ bc_path, bc_path_external, bc_segment,\n breadcrumb_path::{ExternalOntologyPath, OntologyPath},\n- forum::{ingest_entry_markup, ThreadNav},\n+ cli_panel,\n+ forum::{ThreadNav, ingest_entry_markup},\n+ layout, layout_full_bleed_chromeless, now_ms, ratio_pct, render_linkified_with_embeds_in_scope,\n+ theme_from_jar, theme_next_from_uri,\n };\n \n /// `GET /vote/compare` — pairs `left` / `right` query params with optional `thread`.\n@@ -90,7 +88,11 @@ fn canonical_edge_items(a: &ItemId, b: &ItemId) -> (ItemId, ItemId) {\n }\n \n /// All votes whose endpoints are exactly this unordered pair (unsorted).\n-fn edge_vote_entries_for_pair(content: &ContentState, a: &ItemId, b: &ItemId) -> Vec {\n+fn edge_vote_entries_for_pair(\n+ content: &ContentState,\n+ a: &ItemId,\n+ b: &ItemId,\n+) -> Vec {\n let (lo, hi) = canonical_edge_items(a, b);\n let lo_s = lo.as_str();\n let hi_s = hi.as_str();\n@@ -107,7 +109,11 @@ fn edge_vote_entries_for_pair(content: &ContentState, a: &ItemId, b: &ItemId) ->\n .collect()\n }\n \n-fn ratios_for_compare_page(v: &crate::reducer::VoteData, page_left: &ItemId, page_right: &ItemId) -> (i32, i32) {\n+fn ratios_for_compare_page(\n+ v: &crate::reducer::VoteData,\n+ page_left: &ItemId,\n+ page_right: &ItemId,\n+) -> (i32, i32) {\n let pl = page_left.as_str();\n let pr = page_right.as_str();\n match (v.a.as_str(), v.b.as_str()) {\n@@ -121,11 +127,7 @@ fn left_share_normalized(ratio_left: i32, ratio_right: i32) -> f64 {\n let l = ratio_left.max(0) as f64;\n let r = ratio_right.max(0) as f64;\n let sum = l + r;\n- if sum <= 0.0 {\n- 0.5\n- } else {\n- l / sum\n- }\n+ if sum <= 0.0 { 0.5 } else { l / sum }\n }\n \n /// Stronger preference for **`page_left` first**; ties **newer first**.\n@@ -177,11 +179,7 @@ fn vote_thread_tags_for_pair(content: &ContentState, a: &ItemId, b: &ItemId) ->\n v.into_iter().map(|t| canonicalize_tag(&t)).collect()\n }\n \n-fn vote_edge_history_markup(\n- content: &ContentState,\n- left: &ItemId,\n- right: &ItemId,\n-) -> maud::Markup {\n+fn vote_edge_history_markup(content: &ContentState, left: &ItemId, right: &ItemId) -> maud::Markup {\n let votes = edge_vote_entries_for_pair(content, left, right);\n let votes = sort_votes_for_compare_display(votes, left, right);\n let legend_left = item_display_path(left.as_str());\n@@ -276,7 +274,12 @@ fn item_code_label(item: &str) -> String {\n item_display_path(item)\n }\n \n-fn vote_compare_href(nav: &ThreadNav, left: &ItemId, right: &ItemId, thread_override: Option<&str>) -> String {\n+fn vote_compare_href(\n+ nav: &ThreadNav,\n+ left: &ItemId,\n+ right: &ItemId,\n+ thread_override: Option<&str>,\n+) -> String {\n let left_q = urlencoding::encode(left.as_str());\n let right_q = urlencoding::encode(right.as_str());\n let base = format!(\n@@ -299,7 +302,8 @@ fn ont_pin_vote_controls(\n next_path: &str,\n ) -> maud::Markup {\n let room_wire = nav.room_wire.clone();\n- let current = ItemId::parse(current_storage).unwrap_or_else(|| ItemId::opaque(current_storage.to_string()));\n+ let current = ItemId::parse(current_storage)\n+ .unwrap_or_else(|| ItemId::opaque(current_storage.to_string()));\n let pin_matches_scope = pinned_room_and_item\n .map(|(r, _)| r == nav.room_wire.as_str())\n .unwrap_or(false);\n@@ -307,26 +311,22 @@ fn ont_pin_vote_controls(\n .filter(|_| pin_matches_scope)\n .map(|(_, i)| i);\n \n- let pin_rpc = template_json_compact(\n- &json!({\n- \"action\": \"set_garden_pin\",\n- \"clear\": false,\n- \"room_wire\": room_wire,\n- \"item_storage\": current.as_str(),\n- \"next\": next_path,\n- \"form_action\": \"/ui\",\n- }),\n- )\n+ let pin_rpc = template_json_compact(&json!({\n+ \"action\": \"set_garden_pin\",\n+ \"clear\": false,\n+ \"room_wire\": room_wire,\n+ \"item_storage\": current.as_str(),\n+ \"next\": next_path,\n+ \"form_action\": \"/ui\",\n+ }))\n .expect(\"pin rpc json\");\n- let unpin_rpc = template_json_compact(\n- &json!({\n- \"action\": \"set_garden_pin\",\n- \"clear\": true,\n- \"room_wire\": \"\",\n- \"next\": next_path,\n- \"form_action\": \"/ui\",\n- }),\n- )\n+ let unpin_rpc = template_json_compact(&json!({\n+ \"action\": \"set_garden_pin\",\n+ \"clear\": true,\n+ \"room_wire\": \"\",\n+ \"next\": next_path,\n+ \"form_action\": \"/ui\",\n+ }))\n .expect(\"unpin rpc json\");\n \n html! {\n@@ -497,9 +497,9 @@ fn room_scope_has_garden_content(reduced: &ReducerState, nav: &ThreadNav) -> boo\n fn content_for_garden_view<'a>(reduced: &'a ReducerState, scope: &ScopeId) -> &'a ContentState {\n match scope {\n ScopeId::Public => reduced.public(),\n- ScopeId::Room(_) => reduced.content_for_scope(scope).expect(\n- \"room garden only renders after room_scope_has_garden_content returned true\",\n- ),\n+ ScopeId::Room(_) => reduced\n+ .content_for_scope(scope)\n+ .expect(\"room garden only renders after room_scope_has_garden_content returned true\"),\n }\n }\n \n@@ -723,10 +723,8 @@ pub async fn room_external_garden_index(\n }\n let ext_path = ExternalOntologyPath::from_input(\"\");\n let parent = ItemId::parse(\"https://.\").unwrap();\n- let child_rankings = build_children_rankings(\n- content_for_garden_view(&reduced, &nav.scope()),\n- &parent,\n- );\n+ let child_rankings =\n+ build_children_rankings(content_for_garden_view(&reduced, &nav.scope()), &parent);\n drop(reduced);\n \n let page = layout(\n@@ -953,48 +951,74 @@ fn build_rank_history(\n None => return vec![],\n Some(e) => e,\n };\n- entries.iter().map(|e| {\n- // Resolve caused_by: votes from this ingest that directly touched this item.\n- let caused_by: Vec = reduced.ingests_by_id\n- .get(&e.post_id)\n- .and_then(|ing| crate::dsl::parse_full(&ing.raw).ok())\n- .map(|doc| {\n- doc.statements.into_iter().filter_map(|s| {\n- if let crate::dsl::Stmt::Vote { item1, item2, ratio_left, ratio_right, explanation } = s {\n- let a_str = crate::canonical_path::canonicalize_item(&item1);\n- let b_str = crate::canonical_path::canonicalize_item(&item2);\n- if a_str == item || b_str == item {\n- Some(crate::reducer::VoteData {\n- ts: e.ts,\n- a: ItemId::parse(&a_str).unwrap_or_else(|| ItemId::opaque(a_str)),\n- b: ItemId::parse(&b_str).unwrap_or_else(|| ItemId::opaque(b_str)),\n- ratio_left, ratio_right,\n- body: explanation,\n- principal: reduced.ingests_by_id.get(&e.post_id)\n- .map(|ing| ing.principal.clone())\n- .unwrap_or_default(),\n- delegate: reduced.ingests_by_id.get(&e.post_id).and_then(|ing| ing.delegate.clone()),\n- thread_tag: e.thread.clone(),\n- })\n- } else { None }\n- } else { None }\n- }).collect()\n- })\n- .unwrap_or_default();\n-\n- let thread_post_index =\n- reduced.thread_post_index_chronological(scope, &e.thread, &e.post_id);\n-\n- RankHistoryEntryView {\n- ts: e.ts,\n- scope_rank: e.scope_rank,\n- scope_total: e.scope_total,\n- scope_rank_delta: e.scope_rank_delta,\n- thread: e.thread.clone(),\n- thread_post_index,\n- caused_by,\n- }\n- }).collect()\n+ entries\n+ .iter()\n+ .map(|e| {\n+ // Resolve caused_by: votes from this ingest that directly touched this item.\n+ let caused_by: Vec = reduced\n+ .ingests_by_id\n+ .get(&e.post_id)\n+ .and_then(|ing| crate::dsl::parse_full(&ing.raw).ok())\n+ .map(|doc| {\n+ doc.statements\n+ .into_iter()\n+ .filter_map(|s| {\n+ if let crate::dsl::Stmt::Vote {\n+ item1,\n+ item2,\n+ ratio_left,\n+ ratio_right,\n+ explanation,\n+ } = s\n+ {\n+ let a_str = crate::canonical_path::canonicalize_item(&item1);\n+ let b_str = crate::canonical_path::canonicalize_item(&item2);\n+ if a_str == item || b_str == item {\n+ Some(crate::reducer::VoteData {\n+ ts: e.ts,\n+ a: ItemId::parse(&a_str)\n+ .unwrap_or_else(|| ItemId::opaque(a_str)),\n+ b: ItemId::parse(&b_str)\n+ .unwrap_or_else(|| ItemId::opaque(b_str)),\n+ ratio_left,\n+ ratio_right,\n+ body: explanation,\n+ principal: reduced\n+ .ingests_by_id\n+ .get(&e.post_id)\n+ .map(|ing| ing.principal.clone())\n+ .unwrap_or_default(),\n+ delegate: reduced\n+ .ingests_by_id\n+ .get(&e.post_id)\n+ .and_then(|ing| ing.delegate.clone()),\n+ thread_tag: e.thread.clone(),\n+ })\n+ } else {\n+ None\n+ }\n+ } else {\n+ None\n+ }\n+ })\n+ .collect()\n+ })\n+ .unwrap_or_default();\n+\n+ let thread_post_index =\n+ reduced.thread_post_index_chronological(scope, &e.thread, &e.post_id);\n+\n+ RankHistoryEntryView {\n+ ts: e.ts,\n+ scope_rank: e.scope_rank,\n+ scope_total: e.scope_total,\n+ scope_rank_delta: e.scope_rank_delta,\n+ thread: e.thread.clone(),\n+ thread_post_index,\n+ caused_by,\n+ }\n+ })\n+ .collect()\n }\n \n fn build_item_page_view_model(\n@@ -1301,23 +1325,28 @@ async fn vote_compare_inner(\n let edge_history = vote_edge_history_markup(content, &left, &right);\n drop(reduced);\n \n- let title = format!(\"vote — {} vs {}\", item_display_path(left.as_str()), item_display_path(right.as_str()));\n- let next_path = uri.path_and_query().map(|pq| pq.as_str().to_string()).unwrap_or_else(|| \"/vote/compare\".into());\n-\n- let rpc_json = template_json_compact(\n- &json!({\n- \"action\": \"vote_compare_post\",\n- \"room\": nav.room_wire,\n- \"thread_tag\": {\"$form\": \"thread_tag\"},\n- \"left_item\": left.as_str(),\n- \"right_item\": right.as_str(),\n- \"ratio_left\": {\"$form\": \"ratio_left\"},\n- \"ratio_right\": {\"$form\": \"ratio_right\"},\n- \"explanation\": {\"$form\": \"explanation\"},\n- \"next\": next_path,\n- \"form_action\": \"/ui\",\n- }),\n- )\n+ let title = format!(\n+ \"vote — {} vs {}\",\n+ item_display_path(left.as_str()),\n+ item_display_path(right.as_str())\n+ );\n+ let next_path = uri\n+ .path_and_query()\n+ .map(|pq| pq.as_str().to_string())\n+ .unwrap_or_else(|| \"/vote/compare\".into());\n+\n+ let rpc_json = template_json_compact(&json!({\n+ \"action\": \"vote_compare_post\",\n+ \"room\": nav.room_wire,\n+ \"thread_tag\": {\"$form\": \"thread_tag\"},\n+ \"left_item\": left.as_str(),\n+ \"right_item\": right.as_str(),\n+ \"ratio_left\": {\"$form\": \"ratio_left\"},\n+ \"ratio_right\": {\"$form\": \"ratio_right\"},\n+ \"explanation\": {\"$form\": \"explanation\"},\n+ \"next\": next_path,\n+ \"form_action\": \"/ui\",\n+ }))\n .expect(\"vote compare rpc json\");\n \n let body = html! {\n@@ -1532,11 +1561,23 @@ mod tests {\n .iter()\n .map(|r| r.item.as_str())\n .collect();\n- assert_eq!(names, vec![\"https://slug.social/~/topic/a\", \"https://slug.social/~/topic/b\"]);\n+ assert_eq!(\n+ names,\n+ vec![\n+ \"https://slug.social/~/topic/a\",\n+ \"https://slug.social/~/topic/b\"\n+ ]\n+ );\n use crate::path_types::ItemId;\n assert!(\n- model.child_rankings.unranked_items.contains(&ItemId::parse(\"https://slug.social/~/topic/kid1\").unwrap())\n- || model.child_rankings.unranked_items.contains(&ItemId::parse(\"https://slug.social/~/topic/kid2\").unwrap())\n+ model\n+ .child_rankings\n+ .unranked_items\n+ .contains(&ItemId::parse(\"https://slug.social/~/topic/kid1\").unwrap())\n+ || model\n+ .child_rankings\n+ .unranked_items\n+ .contains(&ItemId::parse(\"https://slug.social/~/topic/kid2\").unwrap())\n );\n }\n \n@@ -1609,11 +1650,8 @@ mod tests {\n 1,\n \"@00000000-0000-0000-0000-000000000000:test:local/test\\n~/x {x}\\n\",\n );\n- let model = build_item_page_view_model(\n- &reduced,\n- &ScopeId::Public,\n- \"https://slug.social/~/\",\n- );\n+ let model =\n+ build_item_page_view_model(&reduced, &ScopeId::Public, \"https://slug.social/~/\");\n assert_eq!(model.child_rankings.unranked_items.len(), 1);\n assert_eq!(\n model.child_rankings.unranked_items[0].as_str(),\n\n\nSide B — contributor: tommy-mor\nSide B — commit message:\n[2fe70b0e] themes\n\nSide B — unified diff (full patch):\ndiff --git a/server/src/api/auth.rs b/server/src/api/auth.rs\nindex 559db65de14c6157690ffbf18eca0cf65b0a5202..b3631b06153d52f88348fef927e7a024b7b85ad6 100644\n--- a/server/src/api/auth.rs\n+++ b/server/src/api/auth.rs\n@@ -1,7 +1,7 @@\n use axum::{\n body::Body,\n extract::{Path, Query, State},\n- http::{header, HeaderMap, HeaderValue, StatusCode},\n+ http::{header, HeaderMap, HeaderValue, StatusCode, Uri},\n response::{IntoResponse, Redirect, Response},\n Form, Json,\n };\n@@ -17,7 +17,7 @@ use crate::{\n events::{Event, GrantAdded, TokenIssued, UserRegistered},\n html::{\n auth_complete_page, auth_signed_in_fragment, choose_username_error_fragment,\n- choose_username_page, JsBuilder,\n+ choose_username_page, theme_cookie_header_from_jar, theme_from_jar, theme_next_from_uri, JsBuilder,\n },\n identity::{parse_agent, parse_username},\n reducer::ReducerState,\n@@ -48,15 +48,17 @@ fn js_form_error_fragment(session: &str, error: &str) -> Response {\n .into_response()\n }\n \n-fn js_signed_in_fragment(bearer: &str) -> Response {\n+fn js_signed_in_fragment(bearer: &str, jar: &CookieJar) -> Response {\n let mut response = JsBuilder::new()\n .id(\"choose-username-form\")\n .morph_inner(auth_signed_in_fragment())\n .redirect(\"/auth/complete\")\n .into_response();\n- response\n- .headers_mut()\n- .insert(header::SET_COOKIE, session_cookie_header_value(bearer));\n+ let headers = response.headers_mut();\n+ headers.append(header::SET_COOKIE, session_cookie_header_value(bearer));\n+ if let Some(theme) = theme_cookie_header_from_jar(jar) {\n+ headers.append(header::SET_COOKIE, theme);\n+ }\n response\n }\n \n@@ -69,13 +71,18 @@ pub fn optional_principal(headers: &HeaderMap, jar: &CookieJar, reduced: &Reduce\n verify_token(reduced, c.value()).ok()\n }\n \n-fn redirect_with_session_cookie(public_url: &str, path_and_query: &str, bearer: &str) -> Response {\n- Response::builder()\n+fn redirect_with_session_cookie(public_url: &str, path_and_query: &str, bearer: &str, jar: &CookieJar) -> Response {\n+ let mut res = Response::builder()\n .status(StatusCode::TEMPORARY_REDIRECT)\n .header(header::LOCATION, format!(\"{public_url}{path_and_query}\"))\n- .header(header::SET_COOKIE, session_cookie_header_value(bearer))\n .body(Body::empty())\n- .unwrap()\n+ .unwrap();\n+ let headers = res.headers_mut();\n+ headers.append(header::SET_COOKIE, session_cookie_header_value(bearer));\n+ if let Some(theme) = theme_cookie_header_from_jar(jar) {\n+ headers.append(header::SET_COOKIE, theme);\n+ }\n+ res\n }\n \n async fn apply_invite_redemption(state: &AppState, invite_token: &str, grantee_username: &str) -> Result<(), String> {\n@@ -286,7 +293,11 @@ pub struct AuthCallbackQuery {\n pub state: String,\n }\n \n-pub async fn get_auth_callback(Query(q): Query, State(state): State) -> impl IntoResponse {\n+pub async fn get_auth_callback(\n+ Query(q): Query,\n+ State(state): State,\n+ jar: CookieJar,\n+) -> impl IntoResponse {\n let sessions = pending_sessions(&state);\n {\n let sessions_read = sessions.read().await;\n@@ -365,7 +376,7 @@ pub async fn get_auth_callback(Query(q): Query, State(state):\n }\n let cookie_bearer = bearer.clone();\n s.complete = Some((username, bearer));\n- return redirect_with_session_cookie(&public_url, \"/\", &cookie_bearer).into_response();\n+ return redirect_with_session_cookie(&public_url, \"/\", &cookie_bearer, &jar).into_response();\n }\n }\n \n@@ -378,14 +389,20 @@ pub struct ChooseUsernameQuery {\n pub error: Option,\n }\n \n-pub async fn get_choose_username(Query(q): Query, State(state): State) -> impl IntoResponse {\n+pub async fn get_choose_username(\n+ Query(q): Query,\n+ State(state): State,\n+ jar: CookieJar,\n+ uri: Uri,\n+) -> impl IntoResponse {\n let sessions = pending_sessions(&state);\n let sessions_read = sessions.read().await;\n if !sessions_read.contains_key(&q.session) {\n return api_error(StatusCode::NOT_FOUND, \"unknown session\", None).into_response();\n }\n drop(sessions_read);\n- choose_username_page(&q.session, q.error.as_deref()).into_response()\n+ let next = theme_next_from_uri(&uri);\n+ choose_username_page(&q.session, q.error.as_deref(), theme_from_jar(&jar), &next).into_response()\n }\n \n #[derive(Debug, Deserialize)]\n@@ -396,6 +413,7 @@ pub struct ChooseUsernameForm {\n \n pub async fn post_choose_username(\n State(state): State,\n+ jar: CookieJar,\n Form(form): Form,\n ) -> impl IntoResponse {\n let canon_user = match parse_username(&form.username) {\n@@ -477,7 +495,7 @@ pub async fn post_choose_username(\n s.complete = Some((canon_user.clone(), bearer.clone()));\n }\n \n- js_signed_in_fragment(&bearer).into_response()\n+ js_signed_in_fragment(&bearer, &jar).into_response()\n }\n \n /// Start a browser-only OAuth flow (no CLI polling). Sets session cookie on success.\n@@ -569,8 +587,9 @@ pub async fn get_pending_session(\n .into_response()\n }\n \n-pub async fn get_auth_complete() -> impl IntoResponse {\n- auth_complete_page()\n+pub async fn get_auth_complete(jar: CookieJar, uri: Uri) -> impl IntoResponse {\n+ let next = theme_next_from_uri(&uri);\n+ auth_complete_page(theme_from_jar(&jar), &next).into_response()\n }\n \n pub async fn get_whoami(State(state): State, headers: HeaderMap) -> impl IntoResponse {\ndiff --git a/server/src/api/helpers.rs b/server/src/api/helpers.rs\nindex 81e2a55fa3abb8609b4099f91a989480336e11eb..9b71491e9f9efc44a2a4beba09be8f64bd2ff2ee 100644\n--- a/server/src/api/helpers.rs\n+++ b/server/src/api/helpers.rs\n@@ -39,6 +39,55 @@ pub fn item_path_for_api(item: &str) -> String {\n }\n }\n \n+/// Same as [`item_path_for_api`], but for private rooms ontology items are prefixed with\n+/// `/r/{short}/{slug}` so the URL matches the web app (`/r/…/~/…` routes).\n+pub fn item_path_for_api_in_room(item: &str, room_wire: &str) -> String {\n+ let room = room_wire.trim();\n+ if room.is_empty() || room == \"public\" {\n+ return item_path_for_api(item);\n+ }\n+ let Some((short, slug)) = room.split_once('/') else {\n+ return item_path_for_api(item);\n+ };\n+ if short.is_empty() || slug.is_empty() {\n+ return item_path_for_api(item);\n+ }\n+ let Some(c) = CanonicalItemUrl::parse(item) else {\n+ return item_path_for_api(item);\n+ };\n+ let root = CanonicalItemUrl::ontology_root();\n+ let item_norm = c.as_str().trim_end_matches('/');\n+ let root_norm = root.as_str().trim_end_matches('/');\n+ if let Some(tail) = c.tilde_tail() {\n+ return if tail.is_empty() {\n+ format!(\"https://slug.social/r/{short}/{slug}/~\")\n+ } else {\n+ format!(\"https://slug.social/r/{short}/{slug}/~/{}\", tail)\n+ };\n+ }\n+ if item_norm == root_norm {\n+ return format!(\"https://slug.social/r/{short}/{slug}/~\");\n+ }\n+ item_path_for_api(item)\n+}\n+\n+/// Absolute thread URL for forum JSON (`/t/…` vs `/r/…/t/…`).\n+pub fn forum_thread_web_url(room_wire: &str, thread_tag: &str) -> String {\n+ let room = room_wire.trim();\n+ let tag = thread_tag.trim().trim_start_matches('#');\n+ if room.is_empty() || room == \"public\" {\n+ format!(\"https://slug.social/t/{tag}\")\n+ } else if let Some((short, slug)) = room.split_once('/') {\n+ if short.is_empty() || slug.is_empty() {\n+ format!(\"https://slug.social/t/{tag}\")\n+ } else {\n+ format!(\"https://slug.social/r/{short}/{slug}/t/{tag}\")\n+ }\n+ } else {\n+ format!(\"https://slug.social/t/{tag}\")\n+ }\n+}\n+\n /// Resolve an item path as a first-class canonical path.\n pub fn resolve_item(item: &str) -> Result {\n let canonical = canonicalize_item(item);\n@@ -188,3 +237,52 @@ pub fn vote_touches_path(a: &str, b: &str, parent_canon: &str) -> bool {\n let under = |item: &str| item == parent_canon || item.starts_with(&format!(\"{}/\", parent_canon));\n under(a) || under(b)\n }\n+\n+#[cfg(test)]\n+mod wire_url_tests {\n+ use super::{forum_thread_web_url, item_path_for_api_in_room};\n+\n+ #[test]\n+ fn public_room_unchanged() {\n+ let u = \"https://slug.social/~/a/b\";\n+ assert_eq!(item_path_for_api_in_room(u, \"public\"), u);\n+ }\n+\n+ #[test]\n+ fn private_room_prefixes_ontology() {\n+ assert_eq!(\n+ item_path_for_api_in_room(\"https://slug.social/~/topic/x\", \"9ab12cd/my-room\"),\n+ \"https://slug.social/r/9ab12cd/my-room/~/topic/x\"\n+ );\n+ }\n+\n+ #[test]\n+ fn private_room_ontology_root() {\n+ assert_eq!(\n+ item_path_for_api_in_room(\"https://slug.social/~\", \"9ab12cd/my-room\"),\n+ \"https://slug.social/r/9ab12cd/my-room/~\"\n+ );\n+ assert_eq!(\n+ item_path_for_api_in_room(\"https://slug.social/~/\", \"9ab12cd/my-room\"),\n+ \"https://slug.social/r/9ab12cd/my-room/~\"\n+ );\n+ }\n+\n+ #[test]\n+ fn external_url_untouched_in_private_room() {\n+ let u = \"https://example.com/z\";\n+ assert_eq!(item_path_for_api_in_room(u, \"9ab12cd/my-room\"), u);\n+ }\n+\n+ #[test]\n+ fn forum_web_public_vs_room() {\n+ assert_eq!(\n+ forum_thread_web_url(\"public\", \"debate\"),\n+ \"https://slug.social/t/debate\"\n+ );\n+ assert_eq!(\n+ forum_thread_web_url(\"9ab12cd/my-room\", \"#debate\"),\n+ \"https://slug.social/r/9ab12cd/my-room/t/debate\"\n+ );\n+ }\n+}\ndiff --git a/server/src/api/rpc.rs b/server/src/api/rpc.rs\nindex 31f5fcfb4eaf4df0a9cbac532dd3dedfe3611810..5b91f5836625eedbb1cd9423168046e3fb576c17 100644\n--- a/server/src/api/rpc.rs\n+++ b/server/src/api/rpc.rs\n@@ -27,8 +27,9 @@ use crate::{\n \n use super::auth::verify_bearer_principal;\n use super::helpers::{\n- compute_connectivity_stats, is_pair_voted, item_path_for_api, now_ms, paginate_rankings,\n- parse_parent_specs, pick_random_distinct, resolve_item, vote_touches_path,\n+ compute_connectivity_stats, forum_thread_web_url, is_pair_voted, item_path_for_api,\n+ item_path_for_api_in_room, now_ms, paginate_rankings, parse_parent_specs, pick_random_distinct,\n+ resolve_item, vote_touches_path,\n };\n use super::validate::{normalize_room_and_thread, validate_ingest_document};\n \n@@ -148,6 +149,7 @@ fn compute_scope_rank_changes(\n parent: &str,\n before: &crate::scope_rank::ChildrenRankings,\n after: &crate::scope_rank::ChildrenRankings,\n+ room_wire: &str,\n ) -> Option {\n fn build_positions(rankings: &crate::scope_rank::ChildrenRankings) -> HashMap> {\n let mut map = HashMap::new();\n@@ -182,7 +184,7 @@ fn compute_scope_rank_changes(\n };\n if changed {\n changes.push(RankChange {\n- item: item_path_for_api(&item),\n+ item: item_path_for_api_in_room(&item, room_wire),\n before: b,\n after: a,\n });\n@@ -204,7 +206,7 @@ fn compute_scope_rank_changes(\n parent: if parent.is_empty() {\n \"/\".to_string()\n } else {\n- item_path_for_api(parent)\n+ item_path_for_api_in_room(parent, room_wire)\n },\n changes,\n })\n@@ -256,6 +258,7 @@ fn build_rank_response_for_content(\n offset: usize,\n limit: Option,\n want_percent: bool,\n+ room_wire: &str,\n ) -> Result {\n let parent_owned = parent.map(|s| s.to_string());\n let specs = parse_parent_specs(parent_owned.as_ref());\n@@ -299,7 +302,7 @@ fn build_rank_response_for_content(\n .ranked\n .into_iter()\n .map(|r| RankRow {\n- item: item_path_for_api(r.item.as_str()),\n+ item: item_path_for_api_in_room(r.item.as_str(), room_wire),\n percent: if want_percent {\n Some((r.score / max_score) * 100.0)\n } else {\n@@ -315,7 +318,7 @@ fn build_rank_response_for_content(\n let prefixed_unranked: Vec = rankings\n .unranked_items\n .into_iter()\n- .map(|s| item_path_for_api(s.as_str()))\n+ .map(|s| item_path_for_api_in_room(s.as_str(), room_wire))\n .collect();\n \n let (components, unranked_items) = if offset > 0 || limit.is_some() {\n@@ -522,7 +525,7 @@ async fn rpc_post(\n .filter_map(|p| {\n let before = pre_rankings.get(p)?;\n let after = crate::scope_rank::build_children_rankings(content, p);\n- compute_scope_rank_changes(p.as_str(), before, &after)\n+ compute_scope_rank_changes(p.as_str(), before, &after, &room_key)\n })\n .collect();\n if v.is_empty() { None } else { Some(v) }\n@@ -530,14 +533,28 @@ async fn rpc_post(\n None\n };\n \n+ let (pair_hint, rank_hint, web_url) = if room_key == \"public\" {\n+ (\n+ \"npx slugsocial public garden pair\".to_string(),\n+ \"npx slugsocial public garden rank\".to_string(),\n+ forum_thread_web_url(\"public\", &thread_id),\n+ )\n+ } else {\n+ (\n+ format!(\"npx slugsocial private {room_key} garden pair\"),\n+ format!(\"npx slugsocial private {room_key} garden rank\"),\n+ forum_thread_web_url(&room_key, &thread_id),\n+ )\n+ };\n+\n Ok(RpcResult::PostOk {\n events_appended,\n ranking_changes,\n threads: vec![format!(\"#{}\", thread_id)],\n next: NextMoves {\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+ pair: pair_hint,\n+ rank: rank_hint,\n+ web: web_url,\n },\n })\n }\n@@ -609,7 +626,7 @@ async fn rpc_check(\n raw: v.raw_text.clone(),\n principal,\n delegate,\n- room_id: room_key,\n+ room_id: room_key.clone(),\n thread_tag: thread_id.clone(),\n });\n \n@@ -647,7 +664,7 @@ async fn rpc_check(\n .ranked\n .into_iter()\n .map(|r| RankRow {\n- item: item_path_for_api(r.item.as_str()),\n+ item: item_path_for_api_in_room(r.item.as_str(), &room_key),\n score: r.score,\n percent: None,\n })\n@@ -655,25 +672,35 @@ async fn rpc_check(\n })\n .collect();\n CheckScopeRanking {\n- parent: item_path_for_api(parent.as_str()),\n+ parent: item_path_for_api_in_room(parent.as_str(), &room_key),\n components,\n unranked_items: scoped\n .unranked_items\n .into_iter()\n- .map(|it| item_path_for_api(it.as_str()))\n+ .map(|it| item_path_for_api_in_room(it.as_str(), &room_key))\n .collect(),\n }\n })\n .collect();\n \n+ let check_next = if room_key == \"public\" {\n+ vec![\n+ \"npx slugsocial public forum post --delegate \".to_string(),\n+ \"npx slugsocial public forum list\".to_string(),\n+ forum_thread_web_url(\"public\", &thread_id),\n+ ]\n+ } else {\n+ vec![\n+ format!(\"npx slugsocial private {room_key} forum post --delegate \"),\n+ format!(\"npx slugsocial private {room_key} forum list\"),\n+ forum_thread_web_url(&room_key, &thread_id),\n+ ]\n+ };\n+\n Ok(RpcResult::CheckOk {\n rankings,\n threads: vec![format!(\"#{}\", thread_id)],\n- next: vec![\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+ next: check_next,\n })\n }\n \n@@ -690,7 +717,7 @@ fn rpc_list_forum_threads(reduced: &ReducerState, room: &str) -> ThreadsResponse\n .map(|((_, tag), ts)| ThreadSummary {\n thread: format!(\"#{tag}\"),\n last_activity_ts: ts.last_activity_ts,\n- web: format!(\"https://slug.social/t/{}\", tag),\n+ web: forum_thread_web_url(room, tag),\n })\n .collect();\n out.sort_by(|a, b| b.last_activity_ts.cmp(&a.last_activity_ts));\n@@ -1031,8 +1058,8 @@ async fn rpc_get_pair(state: &AppState, room: String, parent_path: String) -> Re\n .collect();\n let cs = compute_connectivity_stats(&content.ranking_group, &pool);\n Ok(RpcResult::Pair(PairResponse {\n- left: item_path_for_api(&left),\n- right: item_path_for_api(&right),\n+ left: item_path_for_api_in_room(&left, &room),\n+ right: item_path_for_api_in_room(&right, &room),\n left_body: lb,\n right_body: rb,\n threads: th,\n@@ -1088,6 +1115,7 @@ pub async fn handle_rpc_batch(\n offset.unwrap_or(0),\n limit,\n percent.unwrap_or(false),\n+ &room,\n ) {\n Ok(r) => line_ok(RpcResult::GardenRank(r)),\n Err((e, h)) => line_err(e, h),\n@@ -1109,7 +1137,7 @@ pub async fn handle_rpc_batch(\n if !content.items.contains(&item) {\n line_err(\n \"item not found\",\n- Some(format!(\"{} does not exist\", item_path_for_api(&item_str))),\n+ Some(format!(\"{} does not exist\", item_path_for_api_in_room(&item_str, &room))),\n )\n } else {\n const MAX_ITEM_BODY: usize = 10_000;\n@@ -1132,7 +1160,7 @@ pub async fn handle_rpc_batch(\n .map(|s| s.iter().cloned().collect())\n .unwrap_or_default();\n line_ok(RpcResult::GardenItem(ItemResponse {\n- item: item_str,\n+ item: item_path_for_api_in_room(&item_str, &room),\n body,\n truncated,\n body_len,\n@@ -1525,7 +1553,11 @@ pub async fn handle_rpc_batch(\n let range = (top - bot).max(1e-12);\n for r in items {\n let pct = want_percent.then(|| ((r.score - bot) / range * 100.0).clamp(0.0, 100.0));\n- ranked.push(RankRow { item: item_path_for_api(r.item.as_str()), score: r.score, percent: pct });\n+ ranked.push(RankRow {\n+ item: item_path_for_api_in_room(r.item.as_str(), &room),\n+ score: r.score,\n+ percent: pct,\n+ });\n }\n }\n \n@@ -1542,7 +1574,7 @@ pub async fn handle_rpc_batch(\n let page: Vec = ranked\n .into_iter()\n .chain(unranked.into_iter().map(|it| RankRow {\n- item: item_path_for_api(&it),\n+ item: item_path_for_api_in_room(&it, &room),\n score: 0.0,\n percent: want_percent.then_some(0.0),\n }))\n@@ -1586,7 +1618,7 @@ pub async fn handle_rpc_batch(\n if !content.items.contains(&item) {\n line_err(\n \"item not found\",\n- Some(format!(\"{} does not exist\", item_path_for_api(&item_str))),\n+ Some(format!(\"{} does not exist\", item_path_for_api_in_room(&item_str, &room))),\n )\n } else {\n let votes: Vec = content\n@@ -1597,8 +1629,8 @@ pub async fn handle_rpc_batch(\n .take(limit)\n .map(|v| VoteRow {\n ts: v.ts,\n- a: v.a.as_str().to_string(),\n- b: v.b.as_str().to_string(),\n+ a: item_path_for_api_in_room(v.a.as_str(), &room),\n+ b: item_path_for_api_in_room(v.b.as_str(), &room),\n ratio: format!(\"{}:{}\", v.ratio_left, v.ratio_right),\n actor: Some(v.principal.clone()),\n body: v.body.clone(),\n@@ -1608,7 +1640,7 @@ pub async fn handle_rpc_batch(\n })\n .unwrap_or_default();\n line_ok(RpcResult::Matchup(MatchupResponse {\n- item: item_path_for_api(&item_str),\n+ item: item_path_for_api_in_room(&item_str, &room),\n votes,\n }))\n }\n@@ -1635,8 +1667,8 @@ pub async fn handle_rpc_batch(\n if a == item_str || b == item_str {\n Some(VoteRow {\n ts: e.ts,\n- a: item_path_for_api(&a),\n- b: item_path_for_api(&b),\n+ a: item_path_for_api_in_room(&a, &room),\n+ b: item_path_for_api_in_room(&b, &room),\n ratio: format!(\"{}:{}\", ratio_left, ratio_right),\n actor: reduced.ingests_by_id.get(&e.post_id).map(|ing| ing.principal.clone()),\n body: explanation,\n@@ -1672,7 +1704,7 @@ pub async fn handle_rpc_batch(\n }\n }).collect();\n line_ok(RpcResult::RankHistory(RankHistoryResponse {\n- item: item_path_for_api(&item_str),\n+ item: item_path_for_api_in_room(&item_str, &room),\n history,\n }))\n }\n@@ -1691,6 +1723,10 @@ pub async fn handle_rpc_batch(\n .map(|p| p.as_str().to_string())\n .collect();\n paths.sort();\n+ let paths: Vec = paths\n+ .into_iter()\n+ .map(|p| item_path_for_api_in_room(&p, &room))\n+ .collect();\n line_ok(RpcResult::Leaves(LeavesResponse { paths }))\n }\n },\n@@ -1707,10 +1743,21 @@ pub async fn handle_rpc_batch(\n let mut v: Vec = roots.iter()\n .map(|path| {\n let children = content.item_children.get(path.as_str()).map(|s| s.len()).unwrap_or(0);\n+ let path_label = CanonicalItemUrl::parse(path.as_str())\n+ .and_then(|c| {\n+ c.tilde_tail().map(|t| {\n+ if t.is_empty() {\n+ \"~/\".to_string()\n+ } else {\n+ format!(\"~/{}\", t)\n+ }\n+ })\n+ })\n+ .unwrap_or_else(|| path.to_string());\n PathSummary {\n- path: format!(\"~/{}\", path),\n+ path: path_label,\n children,\n- web: format!(\"https://slug.social/~/{}\", path),\n+ web: item_path_for_api_in_room(path.as_str(), &room),\n }\n }).collect();\n v.sort_by(|a, b| a.path.cmp(&b.path));\n@@ -1743,8 +1790,8 @@ pub async fn handle_rpc_batch(\n .take(limit)\n .map(|v| VoteRow {\n ts: v.ts,\n- a: v.a.as_str().to_string(),\n- b: v.b.as_str().to_string(),\n+ a: item_path_for_api_in_room(v.a.as_str(), &room),\n+ b: item_path_for_api_in_room(v.b.as_str(), &room),\n ratio: format!(\"{}:{}\", v.ratio_left, v.ratio_right),\n actor: Some(v.principal.clone()),\n body: v.body.clone(),\ndiff --git a/server/src/html/auth.rs b/server/src/html/auth.rs\nindex d57b1c725ce3e06b1d904882b9388c3da48d85cb..5df77c76b89ed2bb11d936e1dbb804d50a0e79a1 100644\n--- a/server/src/html/auth.rs\n+++ b/server/src/html/auth.rs\n@@ -23,7 +23,7 @@ fn form_inner(session: &str, error: Option<&str>) -> Markup {\n }\n }\n \n-pub fn choose_username_page(session: &str, error: Option<&str>) -> Markup {\n+pub fn choose_username_page(session: &str, error: Option<&str>, theme: &str, theme_next: &str) -> Markup {\n let body = html! {\n nav.breadcrumb {\n a href=\"/\" { \"slug.social\" }\n@@ -36,7 +36,7 @@ pub fn choose_username_page(session: &str, error: Option<&str>) -> Markup {\n (form_inner(session, error))\n }\n };\n- super::layout(\"join — slug.social\", \"view-auth\", body, None)\n+ super::layout(\"join — slug.social\", \"view-auth\", body, None, theme, theme_next)\n }\n \n /// Fragment returned to the poem JS on error — replaces the form's innerHTML.\n@@ -52,7 +52,7 @@ pub fn auth_signed_in_fragment() -> Markup {\n }\n }\n \n-pub fn auth_complete_page() -> Markup {\n+pub fn auth_complete_page(theme: &str, theme_next: &str) -> Markup {\n let body = html! {\n nav.breadcrumb {\n a href=\"/\" { \"slug.social\" }\n@@ -63,5 +63,5 @@ pub fn auth_complete_page() -> Markup {\n p { \"Return to your terminal — your agent is polling and will collect your token automatically.\" }\n p.auth-hint { \"You can close this tab.\" }\n };\n- super::layout(\"signed in — slug.social\", \"view-auth\", body, None)\n+ super::layout(\"signed in — slug.social\", \"view-auth\", body, None, theme, theme_next)\n }\ndiff --git a/server/src/html/editor.rs b/server/src/html/editor.rs\nindex 07f6ab3b778f07f60765fa3f39060ebc5f72bc1a..ecdd226b1b17d5f11d1b79f99add5759ef918281 100644\n--- a/server/src/html/editor.rs\n+++ b/server/src/html/editor.rs\n@@ -1,8 +1,10 @@\n use axum::{\n extract::State,\n+ http::Uri,\n response::{Html, IntoResponse},\n Form,\n };\n+use axum_extra::extract::cookie::CookieJar;\n use maud::{html, Markup};\n use serde::Deserialize;\n \n@@ -13,7 +15,7 @@ use crate::{\n state::AppState,\n };\n \n-use super::{bc_segment, layout};\n+use super::{bc_segment, layout, theme_from_jar, theme_next_from_uri};\n \n fn bc_try() -> Markup {\n html! {\n@@ -23,7 +25,7 @@ fn bc_try() -> Markup {\n }\n \n /// The interactive editor page — `/try`.\n-pub async fn editor_page() -> impl IntoResponse {\n+pub async fn editor_page(jar: CookieJar, uri: Uri) -> impl IntoResponse {\n let page = layout(\n \"try — slug.social\",\n \"view-thread\",\n@@ -68,6 +70,8 @@ pub async fn editor_page() -> impl IntoResponse {\n \"#)) }\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string())\n }\ndiff --git a/server/src/html/forum.rs b/server/src/html/forum.rs\nindex 5c5f9e2ba0e5cb1d661c113117988ec80c01deca..368b1016eb43d83e9ff39464ff6164fa9a8b558a 100644\n--- a/server/src/html/forum.rs\n+++ b/server/src/html/forum.rs\n@@ -1,6 +1,6 @@\n use axum::{\n extract::{Path, Query, State},\n- http::{HeaderMap, StatusCode},\n+ http::{HeaderMap, StatusCode, Uri},\n response::{Html, IntoResponse},\n };\n use axum_extra::extract::cookie::CookieJar;\n@@ -19,7 +19,7 @@ use crate::{\n \n use super::{\n bc_segment, bc_threads, cli_panel, layout, now_ms, profile_href, recency_class,\n- render_linkified_with_embeds_in_scope, JsBuilder,\n+ render_linkified_with_embeds_in_scope, theme_from_jar, theme_next_from_uri, JsBuilder,\n };\n \n #[derive(Clone)]\n@@ -577,6 +577,7 @@ pub async fn home(\n State(state): State,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let now = now_ms();\n let reduced = state.reduced.read().await;\n@@ -624,6 +625,8 @@ pub async fn home(\n (cli_panel(\"npx slugsocial public forum list\"))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string())\n }\n@@ -679,6 +682,7 @@ async fn thread_view_inner(\n nav: ThreadNav,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let tag = canonicalize_tag(&tag);\n let scope = nav.scope();\n@@ -778,6 +782,8 @@ async fn thread_view_inner(\n (cli_panel(&cli))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string()).into_response()\n }\n@@ -789,8 +795,9 @@ pub async fn thread_view(\n Query(q): Query,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n- thread_view_inner(state, tag, q, ThreadNav::public(), headers, jar).await\n+ thread_view_inner(state, tag, q, ThreadNav::public(), headers, jar, uri).await\n }\n \n /// Room thread — `/r/:short/:slug/t/:tag`\n@@ -800,31 +807,39 @@ pub async fn room_thread_view(\n Query(q): Query,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n drop(reduced);\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n return (StatusCode::NOT_FOUND, \"bad room path\").into_response();\n };\n- thread_view_inner(state, tag, q, nav, headers, jar)\n+ thread_view_inner(state, tag, q, nav, headers, jar, uri)\n .await\n .into_response()\n }\n \n-fn room_not_found_page() -> impl IntoResponse {\n+fn room_not_found_page(jar: &CookieJar, uri: &Uri) -> impl IntoResponse {\n let body = html! {\n nav class=\"breadcrumb\" { a href=\"/\" { \"slug.social\" } }\n h1 { \"not found\" }\n p { \"The requested page could not be found.\" }\n p { a href=\"/\" { \"home\" } }\n };\n- let page = layout(\"not found — slug.social\", \"view-thread\", body, None);\n+ let page = layout(\n+ \"not found — slug.social\",\n+ \"view-thread\",\n+ body,\n+ None,\n+ theme_from_jar(jar),\n+ &theme_next_from_uri(uri),\n+ );\n (StatusCode::NOT_FOUND, Html(page.into_string()))\n }\n \n@@ -834,6 +849,7 @@ pub async fn room_page(\n Path((room_short, room_slug)): Path<(String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let now = now_ms();\n@@ -845,7 +861,7 @@ pub async fn room_page(\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n let scope = ScopeId::Room(room_id.clone());\n let mut rows = collect_thread_rows_for_scope(&reduced, &scope, now);\n@@ -902,6 +918,8 @@ pub async fn room_page(\n (cli_panel(&audit_cli))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string()).into_response()\n }\n@@ -943,6 +961,8 @@ async fn thread_post_view_inner(\n index_str: String,\n nav: ThreadNav,\n viewer: Option,\n+ jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let tag = canonicalize_tag(&tag);\n let index: usize = index_str.parse().unwrap_or(0);\n@@ -987,6 +1007,8 @@ async fn thread_post_view_inner(\n }\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string()).into_response()\n }\n@@ -996,11 +1018,12 @@ pub async fn thread_post_view(\n Path((tag, index_str)): Path<(String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let reduced = state.reduced.read().await;\n let viewer = optional_principal(&headers, &jar, &reduced);\n drop(reduced);\n- thread_post_view_inner(state, tag, index_str, ThreadNav::public(), viewer)\n+ thread_post_view_inner(state, tag, index_str, ThreadNav::public(), viewer, jar, uri)\n .await\n }\n \n@@ -1009,19 +1032,20 @@ pub async fn room_thread_post_view(\n Path((room_short, room_slug, tag, index_str)): Path<(String, String, String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n drop(reduced);\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n return (StatusCode::NOT_FOUND, \"bad room path\").into_response();\n };\n- thread_post_view_inner(state, tag, index_str, nav, user)\n+ thread_post_view_inner(state, tag, index_str, nav, user, jar, uri)\n .await\n .into_response()\n }\n@@ -1193,6 +1217,7 @@ pub async fn user_profile_page(\n Path(username): Path,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let canon = match parse_username(&username) {\n Ok(u) => u,\n@@ -1270,6 +1295,8 @@ pub async fn user_profile_page(\n (cli_panel(&format!(\"npx slugsocial public forum list\")))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string()).into_response()\n }\n@@ -1292,13 +1319,14 @@ pub async fn room_thread_post_expand(\n Path((room_short, room_slug, tag, index_str)): Path<(String, String, String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n drop(reduced);\n@@ -1328,13 +1356,14 @@ pub async fn room_thread_post_expand_deleted(\n Path((room_short, room_slug, tag, index_str)): Path<(String, String, String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n drop(reduced);\n@@ -1364,13 +1393,14 @@ pub async fn room_thread_post_collapse_deleted(\n Path((room_short, room_slug, tag, index_str)): Path<(String, String, String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n drop(reduced);\ndiff --git a/server/src/html/garden.rs b/server/src/html/garden.rs\nindex e08f068ae04f5a2542ec2c43c240f931f87146bf..9b4789a79c3e293cbfc5f033a0eac8650320d94d 100644\n--- a/server/src/html/garden.rs\n+++ b/server/src/html/garden.rs\n@@ -1,6 +1,6 @@\n use axum::{\n extract::{Path, State},\n- http::{HeaderMap, StatusCode},\n+ http::{HeaderMap, StatusCode, Uri},\n response::{Html, IntoResponse},\n };\n use axum_extra::extract::cookie::CookieJar;\n@@ -20,7 +20,8 @@ use crate::{\n \n use super::{\n bc_path, bc_segment, cli_panel, layout, now_ms, ratio_pct,\n- render_linkified_with_embeds_in_scope, breadcrumb_path::OntologyPath,\n+ render_linkified_with_embeds_in_scope, theme_from_jar, theme_next_from_uri,\n+ breadcrumb_path::OntologyPath,\n forum::ThreadNav,\n };\n \n@@ -59,14 +60,21 @@ fn scoped_bc_path(path: &OntologyPath, nav: &ThreadNav) -> maud::Markup {\n }\n }\n \n-fn room_not_found_page() -> impl IntoResponse {\n+fn room_not_found_page(jar: &CookieJar, uri: &Uri) -> impl IntoResponse {\n let body = html! {\n nav class=\"breadcrumb\" { a href=\"/\" { \"slug.social\" } }\n h1 { \"not found\" }\n p { \"The requested page could not be found.\" }\n p { a href=\"/\" { \"home\" } }\n };\n- let page = layout(\"not found — slug.social\", \"view-thread\", body, None);\n+ let page = layout(\n+ \"not found — slug.social\",\n+ \"view-thread\",\n+ body,\n+ None,\n+ theme_from_jar(jar),\n+ &theme_next_from_uri(uri),\n+ );\n (StatusCode::NOT_FOUND, Html(page.into_string()))\n }\n \n@@ -81,7 +89,11 @@ fn user_can_view_room(reduced: &ReducerState, room_id: &str, username: Option<&s\n }\n \n /// Ontology index — root-level paths. Private (UUID) roots are excluded.\n-pub async fn garden_index(State(state): State) -> impl IntoResponse {\n+pub async fn garden_index(\n+ State(state): State,\n+ jar: CookieJar,\n+ uri: Uri,\n+) -> impl IntoResponse {\n let nav = ThreadNav::public();\n let child_rankings = {\n let reduced = state.reduced.read().await;\n@@ -130,6 +142,8 @@ pub async fn garden_index(State(state): State) -> impl IntoResponse {\n (cli_panel(\"npx slugsocial garden tree\"))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string())\n }\n@@ -138,9 +152,11 @@ pub async fn garden_index(State(state): State) -> impl IntoResponse {\n pub async fn ontology_path(\n State(state): State,\n Path(path): Path,\n+ jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let path = OntologyPath::from_input(&path);\n- render_scope_view(state, path, ThreadNav::public()).await\n+ render_scope_view(state, path, ThreadNav::public(), jar, uri).await\n }\n \n pub async fn room_garden_index(\n@@ -148,19 +164,20 @@ pub async fn room_garden_index(\n Path((room_short, room_slug)): Path<(String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n drop(reduced);\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n return (StatusCode::NOT_FOUND, \"bad room path\").into_response();\n };\n- render_scope_view(state, OntologyPath::root(), nav).await\n+ render_scope_view(state, OntologyPath::root(), nav, jar, uri).await\n }\n \n pub async fn room_ontology_path(\n@@ -168,20 +185,21 @@ pub async fn room_ontology_path(\n Path((room_short, room_slug, path)): Path<(String, String, String)>,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let room_id = format!(\"{room_short}/{room_slug}\");\n let reduced = state.reduced.read().await;\n let user = optional_principal(&headers, &jar, &reduced);\n if !user_can_view_room(&reduced, &room_id, user.as_deref()) {\n drop(reduced);\n- return room_not_found_page().into_response();\n+ return room_not_found_page(&jar, &uri).into_response();\n }\n drop(reduced);\n let Some(nav) = ThreadNav::from_room_id(&room_id) else {\n return (StatusCode::NOT_FOUND, \"bad room path\").into_response();\n };\n let path = OntologyPath::from_input(&path);\n- render_scope_view(state, path, nav).await\n+ render_scope_view(state, path, nav, jar, uri).await\n }\n \n #[derive(Debug, Clone)]\n@@ -375,6 +393,8 @@ async fn render_scope_view(\n state: AppState,\n path: OntologyPath,\n nav: ThreadNav,\n+ jar: CookieJar,\n+ uri: Uri,\n ) -> axum::response::Response {\n let scope = nav.scope();\n let model = {\n@@ -525,6 +545,8 @@ async fn render_scope_view(\n (cli_panel(&cli))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n \n Html(page.into_string()).into_response()\ndiff --git a/server/src/html/mod.rs b/server/src/html/mod.rs\nindex a8fd73433d120b07351dd027faf0b25f8f101321..53041a0cf0b30e6f20749c92ecc15a4e9ac56e09 100644\n--- a/server/src/html/mod.rs\n+++ b/server/src/html/mod.rs\n@@ -1,10 +1,13 @@\n use axum::{\n body::Body,\n extract::Path,\n- http::{header, StatusCode},\n+ http::{header, HeaderValue, StatusCode, Uri},\n response::{IntoResponse, Response},\n+ Form,\n };\n+use axum_extra::extract::cookie::CookieJar;\n use maud::{html, Markup, DOCTYPE};\n+use serde::Deserialize;\n use std::collections::HashSet;\n \n mod auth;\n@@ -33,6 +36,75 @@ pub(crate) fn profile_href(username: &str) -> String {\n format!(\"/u/{username}\")\n }\n \n+/// Cookie name for UI theme (must match document.cookie migration in [`layout`]).\n+pub const SLUG_THEME_COOKIE: &str = \"slug-theme\";\n+\n+/// Normalize a requested theme id to a known stylesheet key.\n+pub fn normalize_theme(raw: &str) -> &'static str {\n+ match raw {\n+ \"retro\" => \"retro\",\n+ \"retro_craft\" => \"retro_craft\",\n+ _ => \"default\",\n+ }\n+}\n+\n+/// Resolved theme for rendering and cookie re-issue.\n+pub fn theme_from_jar(jar: &CookieJar) -> &'static str {\n+ jar.get(SLUG_THEME_COOKIE)\n+ .map(|c| normalize_theme(c.value()))\n+ .unwrap_or(\"default\")\n+}\n+\n+/// `Path` + optional `?query` for round-tripping after `POST /theme`.\n+pub fn theme_next_from_uri(uri: &Uri) -> String {\n+ uri.path_and_query()\n+ .map(|pq| pq.as_str().to_string())\n+ .filter(|s| !s.is_empty())\n+ .unwrap_or_else(|| \"/\".to_string())\n+}\n+\n+/// `Set-Cookie` for a validated theme (ASCII cookie value).\n+pub fn theme_cookie_header_value(theme: &str) -> HeaderValue {\n+ let t = normalize_theme(theme);\n+ let s = format!(\"{SLUG_THEME_COOKIE}={t}; Path=/; SameSite=Lax; Max-Age=31536000\");\n+ HeaderValue::from_str(&s).expect(\"theme cookie must be ASCII\")\n+}\n+\n+/// Re-issue theme cookie on responses that also set `slug_session`, so login does not drop theme.\n+pub fn theme_cookie_header_from_jar(jar: &CookieJar) -> Option {\n+ let c = jar.get(SLUG_THEME_COOKIE)?;\n+ Some(theme_cookie_header_value(c.value()))\n+}\n+\n+fn sanitize_theme_next(next: Option<&str>) -> String {\n+ let s = next.unwrap_or(\"/\").trim();\n+ if s.starts_with('/') && !s.starts_with(\"//\") && s.len() < 8192 {\n+ s.to_string()\n+ } else {\n+ \"/\".to_string()\n+ }\n+}\n+\n+#[derive(Debug, Deserialize)]\n+pub struct ThemeForm {\n+ theme: String,\n+ next: Option,\n+}\n+\n+/// `POST /theme` — set theme cookie and redirect back (full navigation, no fetch).\n+pub async fn post_theme(Form(form): Form) -> impl IntoResponse {\n+ let theme = normalize_theme(&form.theme);\n+ let next = sanitize_theme_next(form.next.as_deref());\n+ let loc = HeaderValue::try_from(next.as_str())\n+ .unwrap_or_else(|_| HeaderValue::from_static(\"/\"));\n+ Response::builder()\n+ .status(StatusCode::SEE_OTHER)\n+ .header(header::LOCATION, loc)\n+ .header(header::SET_COOKIE, theme_cookie_header_value(theme))\n+ .body(Body::empty())\n+ .expect(\"theme redirect response\")\n+}\n+\n // Embed CSS files at compile time\n const THEME_DEFAULT_CSS: &str = include_str!(\"../../static/theme_default.css\");\n const THEME_RETRO_CSS: &str = include_str!(\"../../static/theme_retro.css\");\n@@ -173,7 +245,9 @@ impl JsQueryBuilder {\n }\n }\n \n-pub(super) fn layout(title: &str, view: &str, body: Markup, views: Option) -> Markup {\n+pub(super) fn layout(title: &str, view: &str, body: Markup, views: Option, theme: &str, theme_next: &str) -> Markup {\n+ let theme = normalize_theme(theme);\n+ let css_href = format!(\"/static/theme_{theme}.css\");\n html! {\n (DOCTYPE)\n html {\n@@ -181,7 +255,20 @@ pub(super) fn layout(title: &str, view: &str, body: Markup, views: Option)\n meta charset=\"utf-8\";\n meta name=\"viewport\" content=\"width=device-width, initial-scale=1\";\n title { (title) }\n- link rel=\"stylesheet\" href=\"/static/theme_default.css\" id=\"theme-stylesheet\";\n+ script { (maud::PreEscaped(r#\"\n+(function() {\n+ try {\n+ var ls = localStorage.getItem('slug-theme');\n+ if (!ls) return;\n+ var m = document.cookie.match(/(?:^|;\\s*)slug-theme=([^;]+)/);\n+ var c = m ? decodeURIComponent(m[1].replace(/\\+/g, ' ')) : '';\n+ if (ls === c) { localStorage.removeItem('slug-theme'); return; }\n+ document.cookie = 'slug-theme=' + encodeURIComponent(ls) + '; Path=/; SameSite=Lax; Max-Age=31536000';\n+ location.reload();\n+ } catch (e) {}\n+})();\n+\"#)) }\n+ link rel=\"stylesheet\" href=(css_href) id=\"theme-stylesheet\";\n script src=\"https://unpkg.com/idiomorph@0.3.0/dist/idiomorph.min.js\" {}\n }\n body class=(view) {\n@@ -196,32 +283,21 @@ pub(super) fn layout(title: &str, view: &str, body: Markup, views: Option)\n input type=\"range\" id=\"spread-slider\" min=\"0\" max=\"1\" step=\"0.05\" value=\"1\";\n }\n a id=\"search-btn\" href=\"/search\" { \"search\" }\n- div id=\"theme-switcher\" { \"theme\" }\n+ form id=\"slug-theme-form\" method=\"post\" action=\"/theme\" {\n+ input type=\"hidden\" name=\"next\" value=(theme_next);\n+ select id=\"theme-select\" name=\"theme\" onchange=\"this.form.submit()\" aria-label=\"Theme\" {\n+ @for (val, label) in [(\"default\", \"default\"), (\"retro\", \"retro\"), (\"retro_craft\", \"craft\")] {\n+ @if theme == val {\n+ option value=(val) selected { (label) }\n+ } @else {\n+ option value=(val) { (label) }\n+ }\n+ }\n+ }\n+ }\n }\n script { (maud::PreEscaped(r#\"\n (function() {\n- // Theme switching\n- const themes = ['default', 'retro', 'retro_craft'];\n- const themeLabel = { default: 'default', retro: 'retro', retro_craft: 'craft' };\n- const storedTheme = localStorage.getItem('slug-theme') || 'default';\n- const switcher = document.getElementById('theme-switcher');\n- const stylesheet = document.getElementById('theme-stylesheet');\n-\n- function setTheme(name) {\n- stylesheet.href = `/static/theme_${name}.css`;\n- localStorage.setItem('slug-theme', name);\n- switcher.textContent = themeLabel[name] || name;\n- setTimeout(() => setSpread(parseFloat(slider.value)), 50);\n- }\n-\n- setTheme(storedTheme);\n-\n- switcher.addEventListener('click', function() {\n- const current = themes.indexOf(localStorage.getItem('slug-theme') || 'default');\n- const next = (current + 1) % themes.length;\n- setTheme(themes[next]);\n- });\n-\n // Spread control\n const slider = document.getElementById('spread-slider');\n const storedSpread = localStorage.getItem('slug-spread');\n@@ -245,6 +321,7 @@ script { (maud::PreEscaped(r#\"\n const f = e.target;\n if (!f || f.tagName !== 'FORM') return;\n if ((f.method || 'get').toLowerCase() !== 'post') return;\n+ if (f.id === 'slug-theme-form') return;\n e.preventDefault();\n const resp = await fetch(f.action, {\n method: 'POST',\ndiff --git a/server/src/html/search.rs b/server/src/html/search.rs\nindex 0871ddb7a87e3153e2cb6c1f827b46de2c9f0f3b..28ceaa53c3fcac6777311535e95fb771b19438f5 100644\n--- a/server/src/html/search.rs\n+++ b/server/src/html/search.rs\n@@ -1,6 +1,6 @@\n use axum::{\n extract::{Query, State},\n- http::HeaderMap,\n+ http::{HeaderMap, Uri},\n response::{Html, IntoResponse},\n };\n use axum_extra::extract::cookie::CookieJar;\n@@ -15,7 +15,7 @@ use crate::{\n timeago,\n };\n \n-use super::{authorship_address, bc_segment, cli_panel, layout, now_ms};\n+use super::{authorship_address, bc_segment, cli_panel, layout, now_ms, theme_from_jar, theme_next_from_uri};\n \n /// Escape HTML special chars for safe injection.\n fn escape_html(s: &str) -> String {\n@@ -396,6 +396,7 @@ pub async fn search_page(\n Query(params): Query,\n headers: HeaderMap,\n jar: CookieJar,\n+ uri: Uri,\n ) -> impl IntoResponse {\n let query = params.q.clone().unwrap_or_default();\n let results = if query.len() >= 2 {\n@@ -420,6 +421,8 @@ pub async fn search_page(\n (cli_panel(\"npx slugsocial search \"))\n },\n None,\n+ theme_from_jar(&jar),\n+ &theme_next_from_uri(&uri),\n );\n Html(page.into_string())\n }\ndiff --git a/server/src/lib.rs b/server/src/lib.rs\nindex 43b63293c2a62b9700948767c618cb0614ddf6d9..b9d4b79791ba8dd3a3c26ff777943a2548092de5 100644\n--- a/server/src/lib.rs\n+++ b/server/src/lib.rs\n@@ -33,6 +33,7 @@ pub fn create_app(state: AppState) -> Router {\n .route(\"/post\", post(api::post_web_ingest))\n .route(\"/post/redact\", post(api::post_web_redact))\n .route(\"/post/check\", post(api::check_web_ingest))\n+ .route(\"/theme\", post(crate::html::post_theme))\n .route(\"/sse\", get(api::get_html_stream))\n .route(\"/stream\", get(api::get_stream))\n .route(\"/search\", get(crate::html::search_page))\ndiff --git a/server/src/path_types.rs b/server/src/path_types.rs\nindex 997597f6659c1ba2092bc5348e393bf7a8fa7ae0..cad58cac7da948f92d6ea2a5587d917ab21d57ea 100644\n--- a/server/src/path_types.rs\n+++ b/server/src/path_types.rs\n@@ -8,6 +8,12 @@\n //!\n //! This module adds lightweight newtypes so code can be explicit about what it\n //! expects without changing core storage formats.\n+//!\n+//! **Storage vs wire:** [`CanonicalItemUrl`] values are shared across scopes\n+//! (`https://slug.social/~/…`); which [`crate::reducer::ContentState`] they live in\n+//! is determined by scope, not by embedding the room id in the string. For JSON/RPC\n+//! and browser links in a private room, use [`crate::api::helpers::item_path_for_api_in_room`]\n+//! so ontology items become `https://slug.social/r/{short}/{slug}/~/…`.\n \n use std::borrow::Borrow;\n use std::fmt;\ndiff --git a/server/static/theme_default.css b/server/static/theme_default.css\nindex 2b06b12f3e77c9ed305272fe3ab47a8ad08504df..5e6304bcc36caed8aeda913fd241fc8fb9cf6d25 100644\n--- a/server/static/theme_default.css\n+++ b/server/static/theme_default.css\n@@ -678,7 +678,10 @@ details > summary::-webkit-details-marker { display: none; }\n gap: 6px;\n }\n #spread-slider { accent-color: var(--ui); width: 80px; }\n-#theme-switcher {\n+#slug-theme-form {\n+ display: contents;\n+}\n+#theme-select {\n background: var(--g4);\n border: var(--bv) solid;\n border-color: var(--hi) var(--lo) var(--lo) var(--hi);\n@@ -688,8 +691,8 @@ details > summary::-webkit-details-marker { display: none; }\n padding: 2px 10px;\n user-select: none;\n }\n-#theme-switcher:hover { color: var(--signal); }\n-#theme-switcher:active {\n+#theme-select:hover { color: var(--signal); }\n+#theme-select:active {\n border-color: var(--lo) var(--hi) var(--hi) var(--lo);\n transform: translate(1px, 1px);\n }\ndiff --git a/server/static/theme_retro_craft.css b/server/static/theme_retro_craft.css\nindex 508222443a3bb2f16d3034a07af53a7df37a0314..3fde7e2b77fa4e4f46418927eb0fb0e5cd195c75 100644\n--- a/server/static/theme_retro_craft.css\n+++ b/server/static/theme_retro_craft.css\n@@ -35,7 +35,6 @@ h1, h2, h3 {\n font-weight: 600;\n letter-spacing: 0.14em;\n margin: 1.5rem 0 0.5rem;\n- text-transform: uppercase;\n }\n \n a {\n@@ -354,7 +353,10 @@ div.cli-panel {\n accent-color: var(--accent);\n width: 72px;\n }\n-#theme-switcher,\n+#slug-theme-form {\n+ display: contents;\n+}\n+#theme-select,\n #search-btn,\n a#src-link {\n border: 1px solid var(--line);\n@@ -365,7 +367,7 @@ a#src-link {\n padding: 0.25rem 0.6rem;\n text-decoration: none;\n }\n-#theme-switcher:hover,\n+#theme-select:hover,\n #search-btn:hover,\n a#src-link:hover {\n border-color: var(--accent);\n","role":"user"}],"model":"~anthropic/claude-sonnet-latest"}