{"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[1531154d] dequeue -> vec\n\nSide A — unified diff (full patch):\ndiff --git a/server/src/projection_apply.rs b/server/src/projection_apply.rs\nindex 9c8990a8af927f35d3344c8d0872a516aba56b86..ad404bacb8bcdd5ae0e682cff97f974fd44528ea 100644\n--- a/server/src/projection_apply.rs\n+++ b/server/src/projection_apply.rs\n@@ -6,8 +6,6 @@\n //! batch as the (non-idempotent) edge merges guarantees exactly-once application\n //! across replay.\n \n-use std::collections::BTreeSet;\n-\n use crate::{\n event_log::EventLogError,\n events::{Event, EventRecord},\n@@ -44,7 +42,6 @@ pub fn apply_records(\n \n let db = projection_store.db();\n let mut batch = db.batch();\n- let mut vote_parents: BTreeSet = BTreeSet::new();\n let mut last_seq = 0u64;\n \n for record in records {\n@@ -70,7 +67,6 @@ pub fn apply_records(\n *ts,\n )\n .map_err(|e| EventLogError::Apply(e.to_string()))?;\n- vote_parents.insert(parent);\n }\n Event::NodeEnsured { id } => {\n let parsed = parse_event_id(id)?;\n@@ -85,11 +81,5 @@ pub fn apply_records(\n .commit_with(durable::Durability::DisableWal)\n .map_err(|e| EventLogError::Apply(e.to_string()))?;\n \n- for parent in vote_parents {\n- projection_store\n- .trim_recent_votes(&parent)\n- .map_err(|e| EventLogError::Apply(e.to_string()))?;\n- }\n-\n Ok(())\n }\ndiff --git a/server/src/projection_store.rs b/server/src/projection_store.rs\nindex 8576d671f351004426207894ac35594ddb0f70cf..9a8953d010029d3639dc3987687554bab8b7663e 100644\n--- a/server/src/projection_store.rs\n+++ b/server/src/projection_store.rs\n@@ -18,7 +18,7 @@ use crate::{\n \n const PROJECTION_CURSOR_KEY: &str = \"cursor\";\n const PROJECTION_SCHEMA_KEY: &str = \"schema_version\";\n-const PROJECTION_SCHEMA_VERSION: u64 = 3;\n+const PROJECTION_SCHEMA_VERSION: u64 = 4;\n \n #[derive(Debug, thiserror::Error)]\n pub enum ProjectionStoreError {\n@@ -142,16 +142,6 @@ impl ProjectionStore {\n Ok(tree)\n }\n \n- /// Cap a node's recent-vote window after applying votes (best-effort, blind).\n- pub(crate) fn trim_recent_votes(&self, parent: &ItemId) -> Result<(), ProjectionStoreError> {\n- node(parent).recent_votes().truncate_back(\n- &self.db,\n- crate::storage_schema::RECENT_VOTES_CAP,\n- Durability::DisableWal,\n- )?;\n- Ok(())\n- }\n-\n /// Cache Reddit display content outside the event log (must be evicted per policy).\n pub fn put_ephemeral_content(\n &self,\ndiff --git a/server/src/reducer.rs b/server/src/reducer.rs\nindex 0c75c85150bb9e5f578bbadf58b3e43f8a80be4b..759918b8c0eb8f8bf1ed0911d8877adaa55c8ea6 100644\n--- a/server/src/reducer.rs\n+++ b/server/src/reducer.rs\n@@ -1,4 +1,4 @@\n-use std::collections::{HashMap, HashSet, VecDeque};\n+use std::collections::{HashMap, HashSet};\n \n use serde::{Deserialize, Serialize};\n \n@@ -52,7 +52,7 @@ pub struct GroupState {\n pub idx_to_item: Vec,\n pub edges: HashMap<(usize, usize), f64>,\n pub voted_pairs: HashSet<(usize, usize)>,\n- pub recent_votes: VecDeque,\n+ pub recent_votes: Vec,\n }\n \n impl GroupState {\n@@ -62,7 +62,7 @@ impl GroupState {\n idx_to_item: Vec::new(),\n edges: HashMap::new(),\n voted_pairs: HashSet::new(),\n- recent_votes: VecDeque::with_capacity(200),\n+ recent_votes: Vec::new(),\n }\n }\n \n@@ -111,10 +111,7 @@ impl GroupState {\n self.add_edge_weight(b_idx, a_idx, w_a);\n self.add_edge_weight(a_idx, b_idx, w_b);\n \n- self.recent_votes.push_front(vote);\n- while self.recent_votes.len() > 200 {\n- self.recent_votes.pop_back();\n- }\n+ self.recent_votes.push(vote);\n }\n }\n \ndiff --git a/server/src/storage_dto.rs b/server/src/storage_dto.rs\nindex 9dfb13c53efe4389277625a6ab3bfc18f566a453..3fd6db5cb909ac4896bd8a3ecace796de5f08781 100644\n--- a/server/src/storage_dto.rs\n+++ b/server/src/storage_dto.rs\n@@ -39,7 +39,7 @@ pub struct StoredEntityDataV1 {\n pub link_url: Option,\n }\n \n-/// One vote stored in a node's `recent_votes` deque.\n+/// One vote stored in a node's `recent_votes` list.\n #[derive(Debug, Clone, Serialize, Deserialize)]\n pub struct StoredVoteV1 {\n pub version: u32,\ndiff --git a/server/src/storage_schema.rs b/server/src/storage_schema.rs\nindex bd26e665e084b95b10fdfff091c31e8dc84d07b8..5d2bb1d56927fb61c7c6d2d8602bd6882327f862 100644\n--- a/server/src/storage_schema.rs\n+++ b/server/src/storage_schema.rs\n@@ -2,13 +2,13 @@\n //! durable collections instead of one blob per node.\n //!\n //! A vote updates a handful of keys: a few edge-weight merges, a voted-pair flag,\n-//! a recent-vote deque push, and child-link set entries. The in-memory\n+//! a recent-vote list append, and child-link set entries. The in-memory\n //! [`crate::reducer::GroupState`] is reconstructed from these keys on read for\n //! rank-centrality.\n \n use std::collections::{BTreeSet, HashMap, HashSet};\n \n-use durable::{Batch, Db, Deque, Durable, Leaf, Map, Sum};\n+use durable::{Batch, Db, Durable, Leaf, List, Map, Sum};\n \n use crate::{\n path_types::ItemId,\n@@ -38,8 +38,8 @@ pub struct NodeSchema {\n pub edges: Map>,\n /// Voted pairs `(min, max) -> true`.\n pub voted_pairs: Map>,\n- /// Recent votes, newest at the front (capped on write).\n- pub recent_votes: Deque>,\n+ /// Recent votes, append-only oldest-first (cap applied on read).\n+ pub recent_votes: List>,\n /// When ephemeral Reddit display content was last fetched (ms); absent after eviction.\n pub fetched_at: Leaf,\n }\n@@ -55,7 +55,7 @@ pub struct Store {\n pub view_meta: Map>,\n }\n \n-/// Cap on the per-node recent-vote window (matches the in-memory reducer).\n+/// Max recent votes returned when loading a node (query-time cap only).\n pub const RECENT_VOTES_CAP: u64 = 200;\n \n fn id_key(id: &ItemId) -> String {\n@@ -148,11 +148,14 @@ fn build_group_state(\n }\n }\n \n- // Deque is front=newest; in-memory VecDeque is also front=newest.\n- let mut recent_votes = std::collections::VecDeque::new();\n- for stored in np.recent_votes().iter(db)? {\n- recent_votes.push_back(decode_vote(stored).map_err(durable::Error::Deserialize)?);\n- }\n+ // List is index order (oldest first); keep the newest RECENT_VOTES_CAP entries.\n+ let stored = np.recent_votes().iter(db)?;\n+ let cap = RECENT_VOTES_CAP as usize;\n+ let start = stored.len().saturating_sub(cap);\n+ let recent_votes = stored[start..]\n+ .iter()\n+ .map(|s| decode_vote(s.clone()).map_err(durable::Error::Deserialize))\n+ .collect::, _>>()?;\n \n Ok(GroupState {\n item_to_idx,\n@@ -248,7 +251,7 @@ pub fn vote_writes(\n };\n batch.write(pnode.voted_pairs().key(&(lo, hi)).set(&true));\n \n- // Recent votes (newest at front).\n+ // Recent votes (append-only; cap on read).\n let stored = encode_vote(&VoteData {\n ts,\n a: a_id,\n@@ -260,7 +263,7 @@ pub fn vote_writes(\n delegate: None,\n thread_tag: \"default\".to_string(),\n });\n- batch.push_front(&pnode.recent_votes(), &stored)?;\n+ batch.push(&pnode.recent_votes(), &stored)?;\n Ok(())\n }\n \n@@ -314,6 +317,35 @@ mod tests {\n assert!(load_node_state(&db, &parent).unwrap().is_none());\n }\n \n+ #[test]\n+ fn load_caps_recent_votes_at_query_time() {\n+ let dir = tempfile::tempdir().unwrap();\n+ let db = Db::open(dir.path()).unwrap();\n+ let parent = ItemId::root();\n+\n+ let mut batch = db.batch();\n+ for i in 0..RECENT_VOTES_CAP + 10 {\n+ vote_writes(&mut batch, &parent, \"alpha\", \"beta\", 1, 0, i as i64).unwrap();\n+ }\n+ batch.commit().unwrap();\n+\n+ assert_eq!(\n+ node(&parent).recent_votes().len(&db).unwrap(),\n+ RECENT_VOTES_CAP + 10\n+ );\n+\n+ let node_state = load_node_state(&db, &parent).unwrap().unwrap();\n+ assert_eq!(node_state.local_ranking.recent_votes.len(), RECENT_VOTES_CAP as usize);\n+ assert_eq!(\n+ node_state.local_ranking.recent_votes.first().map(|v| v.ts),\n+ Some(10)\n+ );\n+ assert_eq!(\n+ node_state.local_ranking.recent_votes.last().map(|v| v.ts),\n+ Some(RECENT_VOTES_CAP as i64 + 9)\n+ );\n+ }\n+\n #[test]\n fn missing_node_is_none() {\n let dir = tempfile::tempdir().unwrap();\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"}