{"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[601d3a05] fix(html): drop home toolbar + and ExpandNewThreadForm (single + flow)\n\nPublic home now SSRs #new-thread-ui-slot like room pages: collapsed compose\nfor signed-in users, login hint when logged out. Removes the extra toolbar\nthat morphed the same collapsed state and the expand_new_thread_form action.\n\nMade-with: Cursor\n\nSide A — unified diff (full patch):\ndiff --git a/server/src/api/ui_html.rs b/server/src/api/ui_html.rs\nindex e979053ff1ba8c0e2bf55add0a32b7de11cf1e56..f3ce5cb2ab2f923440a8479d0f1fb4acbba166ca 100644\n--- a/server/src/api/ui_html.rs\n+++ b/server/src/api/ui_html.rs\n@@ -139,51 +139,6 @@ async fn dispatch_ui_action(\n }\n }\n }\n- HtmlUiAction::ExpandNewThreadForm { room_wire } => {\n- let room_wire = room_wire.trim().to_string();\n- if room_wire.is_empty() {\n- return ui_js_warn(\"missing room\").into_response();\n- }\n- if room_wire == \"public\" {\n- let reduced = state.reduced.read().await;\n- let user = session.map(|s| s.username.as_str());\n- drop(reduced);\n- let markup = if user.is_some() {\n- fragment_new_thread_slot(&ThreadNav::public(), true, false)\n- } else {\n- login_to_post_hint_markup()\n- };\n- return JsBuilder::new()\n- .morph_inner_selector(\"#new-thread-ui-slot\", markup)\n- .into_response();\n- }\n- let reduced = state.reduced.read().await;\n- let user = session.map(|s| s.username.as_str());\n- if !reduced.rooms.contains(&room_wire) {\n- drop(reduced);\n- return ui_js_warn(\"room not found\").into_response();\n- }\n- if !user_can_view_room(&reduced, &room_wire, user) {\n- drop(reduced);\n- return ui_js_warn(\"forbidden\").into_response();\n- }\n- let can_post = session\n- .as_ref()\n- .map(|s| user_can_post_room(&reduced, &room_wire, &s.username))\n- .unwrap_or(false);\n- drop(reduced);\n- let Some(nav) = ThreadNav::from_room_id(&room_wire) else {\n- return ui_js_warn(\"bad room\").into_response();\n- };\n- let markup = if can_post {\n- fragment_new_thread_slot(&nav, true, false)\n- } else {\n- login_to_post_hint_markup()\n- };\n- JsBuilder::new()\n- .morph_inner_selector(\"#new-thread-ui-slot\", markup)\n- .into_response()\n- }\n HtmlUiAction::SetRoomMembersExpanded { room_wire, expanded } => {\n let room_wire = room_wire.trim().to_string();\n if room_wire.is_empty() {\ndiff --git a/server/src/html/forum/feed.rs b/server/src/html/forum/feed.rs\nindex 1b4ae7baa3ad4757b74172d7b67f3f2b33d1075d..945bdd6c48bc164e2cf91fd0996c4321b75f5abf 100644\n--- a/server/src/html/forum/feed.rs\n+++ b/server/src/html/forum/feed.rs\n@@ -14,6 +14,7 @@ use crate::timeago;\n \n use super::ingest::ingest_entry_markup;\n use super::nav::ThreadNav;\n+use super::new_thread::{fragment_new_thread_slot, login_to_post_hint_markup};\n use super::page::auth_strip;\n use super::paginator::{render_thread_paginator, PAGE_SIZE};\n use crate::html::{\n@@ -217,9 +218,6 @@ pub async fn home(\n let strip = auth_strip(&headers, &jar, &reduced_read);\n drop(reduced_read);\n \n- use crate::html::ui_action::{HtmlUiAction, UI_RPC_FIELD};\n- use crate::form_template::template_json_compact;\n-\n let page = layout(\n \"slug.social\",\n \"view-thread\",\n@@ -243,15 +241,13 @@ pub async fn home(\n }\n }\n p class=\"muted\" { \"dark = time-ordered · light = vote-ranked\" }\n- div class=\"thread-feed-toolbar\" {\n- form method=\"POST\" action=\"/ui\" {\n- input type=\"hidden\" name=(UI_RPC_FIELD) value=(template_json_compact(&HtmlUiAction::ExpandNewThreadForm {\n- room_wire: \"public\".into(),\n- }).expect(\"static json\"));\n- button type=\"submit\" class=\"section-add-btn\" { \"+\" }\n+ div id=\"new-thread-ui-slot\" {\n+ @if user.is_some() {\n+ (fragment_new_thread_slot(&nav, true, false))\n+ } @else {\n+ (login_to_post_hint_markup())\n }\n }\n- div id=\"new-thread-ui-slot\" {}\n (render_thread_feed(Some(&nav), \"thread-feed\", &public_rows, now))\n (cli_panel(&[\"npx slugsocial public forum list\"]))\n },\ndiff --git a/server/src/html/ui_action.rs b/server/src/html/ui_action.rs\nindex 5031ebfeb928f28e471f23210b8c644654adb7c7..da0c9b3541e8e4988a78768cddef22324755c3f2 100644\n--- a/server/src/html/ui_action.rs\n+++ b/server/src/html/ui_action.rs\n@@ -38,11 +38,6 @@ pub enum HtmlUiAction {\n RedactPost {\n post_id: String,\n },\n- /// Morph `#new-thread-ui-slot` inner to the collapsed compose toggle (or login hint).\n- /// Use `room_wire: \"public\"` for the public forum home; otherwise a private room id (`short/slug`).\n- ExpandNewThreadForm {\n- room_wire: String,\n- },\n /// Morph `#room-members-section` — members list open or collapsed (server-rendered).\n SetRoomMembersExpanded {\n room_wire: String,\n@@ -131,26 +126,6 @@ mod tests {\n );\n }\n \n- #[test]\n- fn expand_new_thread_form_public() {\n- let template = serde_json::json!({\n- \"action\": \"expand_new_thread_form\",\n- \"room_wire\": \"public\",\n- });\n- let mut form = HashMap::new();\n- form.insert(\n- UI_RPC_FIELD.to_string(),\n- serde_json::to_string(&template).unwrap(),\n- );\n- let a = parse_html_ui_from_form(&form).unwrap();\n- assert_eq!(\n- a,\n- HtmlUiAction::ExpandNewThreadForm {\n- room_wire: \"public\".into(),\n- }\n- );\n- }\n-\n #[test]\n fn expand_post_full_round_trip() {\n let template = serde_json::json!({\n\n\nSide B — contributor: tommy-mor\nSide B — commit message:\n[047b82bd] Remove redundant zero-ratio guard from reducer.\n\nZeros are already rejected at the DSL parser and browser handler;\nthe guard in apply_vote was dead code. The negative clamping stays\nsince add_edge_weight already skips weight-0 edges correctly.\n\nCo-Authored-By: Claude Sonnet 4.6 \n\nSide B — unified diff (full patch):\ndiff --git a/server/src/reducer.rs b/server/src/reducer.rs\nindex 0e36979abe0f051493038ff7e652efc7f7a0ac80..efbf7f67ff24c7a2989102fe62879b2794a27c5f 100644\n--- a/server/src/reducer.rs\n+++ b/server/src/reducer.rs\n@@ -112,11 +112,6 @@ impl GroupState {\n if vote.ratio_right < 0 {\n vote.ratio_right = 0;\n }\n- if vote.ratio_left == 0 || vote.ratio_right == 0 {\n- // Zero on either side produces no valid edge; drop before registering items or pair.\n- return;\n- }\n-\n let a_idx = self.ensure_item(&vote.a);\n let b_idx = self.ensure_item(&vote.b);\n \ndiff --git a/server/tests/basic.rs b/server/tests/basic.rs\nindex 08159f4a7f0850fd165817a4a1af4f31ced2ad76..1748769ccf7196b2d81cf556d5368c7e723f6a4e 100644\n--- a/server/tests/basic.rs\n+++ b/server/tests/basic.rs\n@@ -533,7 +533,7 @@ fn dsl_parse_rejects_zero_zero_vote_ratio() {\n #[test]\n fn reducer_negative_ratio_clamped_to_zero() {\n let _state = ReducerState::default();\n- // GroupState::apply_vote clamps negatives to 0; when either side is 0 the vote is dropped.\n+ // apply_vote clamps negatives to 0; add_edge_weight skips zero-weight edges.\n let mut group = GroupState::new();\n group.apply_vote(slugsocial_server::reducer::VoteData {\n ts: 1,\n@@ -546,10 +546,9 @@ fn reducer_negative_ratio_clamped_to_zero() {\n delegate: Some(\"00000000-0000-0000-0000-000000000000:test:local/test\".to_string()),\n thread_tag: \"t\".to_string(),\n });\n- // Nothing registered: zero-clamped vote is dropped before ensure_item.\n- assert!(group.idx_to_item.is_empty());\n+ // Items and pair are registered; edges are absent because weight 0 is skipped.\n+ assert_eq!(group.idx_to_item.len(), 2);\n assert!(group.edges.is_empty());\n- assert!(group.voted_pairs.is_empty());\n }\n \n \n","role":"user"}],"model":"openai/gpt-chat-latest"}