constitution · epochs · watch · epoch 3

comparison

c_e4fb43f04791 (tommy-mor) vs c_88200cfa5c4d (tommy-mor)

download prompt · raw event · cmp_7ce1a3d1a3c5d5

council reasoning

~anthropic/claude-sonnet-latest · winner B · 3:1 · permalink

Side B fixes an actual dead test (missing #[test] attribute so it silently never ran), removes clippy lints across multiple files (idiomatic Option handling, redundant deref, unused var, format-string improvements), and adds a documented dead_code allowance for shared test helpers — all real correctness/maintainability improvements. Side A is purely CSS/markup tweaks (removing a wrapper section, styling rank numbers) that are cosmetic and localized, with no functional or structural benefit beyond visual polish.

~x-ai/grok-latest · winner A · 3:2 · permalink

A’s lasting impact is the ranking-list presentation work (shared counter styling and filling in missing ont-ranking-list rules in retro/retro_craft) plus a real DOM simplification by dropping the unused vote-compare-shell wrapper. B is mostly mechanical clippy hygiene (needless refs, match→let, format tweaks, a type alias) with one genuine fix—annotating an unwired #[test]—so it ranks slightly behind.

openai/gpt-chat-latest · winner B · 3:2 · permalink

Side B includes a functional improvement by adding a missing #[test] so the `set_new_thread_compose_expanded_true` test is actually executed, alongside targeted code-quality fixes such as replacing a complex return type with a type alias and modernizing APIs (`is_some_and`, pattern destructuring). Side A mostly removes a wrapper `section` around the vote-compare markup and adjusts CSS for ranking list presentation, which are primarily UI/layout changes with less lasting impact on correctness or maintainability.

sides

A — c_e4fb43f04791 (tommy-mor)

message

[09842c93] remove shell

diff preview

diff --git a/server/src/html/garden.rs b/server/src/html/garden.rs
index 8fc6be1de8dd975f9547de615809222236be4b70..76ba96e45c9e16291a6ccd8096fdd01b274c1560 100644
--- a/server/src/html/garden.rs
+++ b/server/src/html/garden.rs
@@ -1321,55 +1321,53 @@ async fn vote_compare_inner(
     .expect("vote compare rpc json");
 
     let body = html! {
-        section class="vote-compare-shell" {
-            h2 { "compare" }
-            div class="vote-compare-pair" {
-                a class="vote-compare-item" href=(nav.garden_item_href(&left)) {
-                    code { (item_display_path(left.as_str())) }
-                }
-                span class="vote-compare-vs" { "vs" }
-                a class="vote-compare-item" href=(nav.garden_item_href(&right)) {
-                    code { (item_display_path(right.as_str())) }
-                }
-            }
-            div id="vote-edge-history-region" {
-                (edge_history)
-            }
-            @if can_post {
-                form id="vote-compare-form" method="POST" action="/ui" {
-                    input type="hidden" name=(UI_RPC_FIELD) value=(rpc_json);
-                    div class="vote-thread-picker" {
-                        label class="vote-thread-picker-label" { "thread" }
-                        select id="vote-thread-select" name="thread_tag" aria-label="Thread to post vote into" {
-                            @if thread_tags.is_empty() {
-                                option value="vote" selected { "#vote" }
-                            }
-                            @for t in &thread_tags {
-                                @if *t == auto_thread {
-                                    option value=(t) selected { "#" (t) }
-                                } @else {
-                                    option value=(t) { "#" (t) }
-                                }
-                            }
-                        }
+    h2 { "compare" }
+    div class="vote-compare-pair" {
+        a class="vote-compare-item" href=(nav.garden_item_href(&left)) {
+            code { (item_display_path(left.as_str())) }
+        }
+        span class="vote-compare-vs" { "vs" }
+        a class="vote-compare-item" href=(nav.garden_item_href(&right)) {
+            code { (item_display_path(right.as_str())) }
+        }
+    }
+    div id="vote-edge-history-region" {
+        (edge_history)
+    }
+    @if can_post {
+        form id="vote-compare-form" method="POST" action="/ui" {
+            input type="hidden" name=(UI_RPC_FIELD) value=(rpc_json);
+            div class="vote-thread-picker" {
+                label class="vote-thread-picker-label" { "thread" }
+                select id="vote-thread-select" name="thread_tag" aria-label="Thread to post vote into" {
+                    @if thread_tags.is_empty() {
+                        option value="vote" selected { "#vote" }
                     }
-                    input type="hidden" name="ratio_left" id="vote-ratio-left" value="50";
-                    input type="hidden" name="ratio_right" id="vote-ratio-right" value="50";
-                    label class="vote-compare-slider-label" {
-                        span id="vote-slider-left-label" { (item_display_path(left.as_str())) }
-                        input type="range" id="vote-preference-slider" min="0" max="100" value="50"
-                            aria-valuemin="0" aria-valuemax="100";
-                        span id="vote-slider-right-label" { (item_display_path(right.as_str())) }
+                    @for t in &thread_tags {
+                        @if *t == auto_thread {
+                            option value=(t) selected { "#" (t) }
+                        } @else {
+                            option value=(t) { "#" (t) }
+                        }
                     }
-                    label class="vote-explain-label" { "reason (required)" }
-                    textarea name="explanation" id="vote-explain" rows="5" placeholder="why this split?" required {}
-                    div id="vote-compare-errors" {}
-                    p { button type="submit" { "post vote" } }
                 }
-            } @else {
-                p class="muted" { a href="/login" { "log in" } " to post this vote." }
             }
+            input type="hidden" name="ratio_left" id="vote-ratio-left" value="50";
+            input type="hidden" name="ratio_right" id="vote-ratio-right" value="50";
+            label class="vote-compare-slider-label" {
+                span id="vote-slider-left-label" { (item_display_path(left.as_str())) }
+                input type="range" id="vote-preference-slider" min="0" max="100" value="50"
+                    aria-valuemin="0" aria-valuemax="100";
+                span id="vote-slider-right-label" { (item_display_path(right.as_str())) }
+            }
+            label class="vote-explain-label" { "reason (required)" }
+            textarea name="explanation" id="vote-explain" rows="5" placeholder="why this split?" required {}
+            div id="vote-compare-errors" {}
+            p { button type="submit" { "post vote" } }
         }
+    } @else {
+        p class="muted" { a href="/login" { "log in" } " to post this vote." }
+    }
     };
 
     let page = layout_full_bleed_chromeless(
diff --git a/server/static/theme_default.css b/server/static/theme_default.css
index a441c4f79d8cf88f5a8240f9992f47dbbd1ab46b..fdcde86c718eb53cce8273e45a9844c2d8041f88 100644
--- a/server/static/theme_default.css
+++ b/server/static/theme_default.css
@@ -1270,8 +1270,12 @@ body.view-ontology-dark .ont-ranking-list li {
 body.view-ontology-dark .ont-ranking-list li::before {
   color: var(--meta);
   content: counter(ont-rank) ".";
-  font-size: 11px;
-  min-width: 18px;
+  flex-shrink: 0;
+  font-size: 1.35rem;
+  font-weight: 700;
+  font-variant-numeric: tabular-nums;
+  line-height: 1;
+  min-width: 2.25ch;
   text-align: right;
 }
 body.view-ontology-dark .ont-rank-score {
@@ -1424,8 +1428,12 @@ body.view-ontology-light .ont-ranking-list li {
 body.view-ontology-light .ont-ranking-list li::before {
   color: var(--meta);
   content: counter(ont-rank) ".";
-  font-size: 11px;
-  min-width: 18px;
+  flex-shrink: 0;
+  font-size: 1.35rem;
+  font-weight: 700;
+  font-variant-numeric: tabular-nums;
+  line-height: 1;
+  min-width: 2.25ch;
   text-align: right;
 }
 body.view-ontology-light .ont-rank-score {
diff --git a/server/static/theme_retro.css b/server/static/theme_retro.css
index 373f15bbd75b62604cdd14b9f0fadda2d6176991..61e1448b2f66a075c0e33325d6980448712fc927 100644
--- a/server/static/theme_retro.css
+++ b/server/static/theme_retro.css
@@ -135,6 +135,30 @@ body.view-ontology nav.breadcrumb a:hover {
 body.view-ontology nav.breadcrumb a.bc-current { color: #111; font-weight: 600; }
 body.view-ontology nav.breadcrumb .bc-sep { color: #888; padding: 0 2px; }
 
+body.view-ontology ol.ont-ranking-list {
+  counter-reset: ont-rank;
+  list-style: none;
+  margin: 0.5rem 0;
+  padding: 0;
+}
+body.view-ontology ol.ont-ranking-list li {
+  align-items: baseline;
+  counter-increment: ont-rank;
+  display: flex;
+  gap: 0.35rem;
+}
+body.view-ontology ol.ont-ranking-list li::before {
+  flex-shrink: 0;
+  color: #666;
+  content: counter(ont-rank) ".";
+  font-size: 1.35rem;
+  font-weight: 700;
+  font-variant-numeric: tabular-nums;
+  line-height: 1;
+  min-width: 2.25ch;
+  text-align: right;
+}
+
 nav.breadcrumb.ont-sibling-nav {
   margin-top: 0;
   width: 100%;
diff --git a/server/static/theme_retro_craft.css b/server/static/theme_retro_craft.css
index 6eb9222184a8795d67a5d09d41de08c8ac1b148f..7da102040484c887833158a37c307d078205c701 100644
--- a/server/static/theme_retro_craft.css
+++ b/server/static/theme_retro_craft.css
@@ -742,12 +742,32 @@ body.view-ontology button.ont-garden-pin-ico:focus-visible {
   outline-offset: 2px;
 }
 
+body.view-ontology ol.ont-ranking-list {
+  counter-reset: ont-rank;
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
 body.view-ontology ol.ont-ranking-list li,
 body.view-ontology ul.ont-group-list li {
   display: flex;
   align-items: baseline;
   gap: 0.35rem;
 }
+body.view-ontology ol.ont-ranking-list li {
+  counter-increment: ont-rank;
+}
+body.view-ontology ol.ont-ranking-list li::before {
+  flex-shrink: 0;
+  color: #5c574e;
+  content: counter(ont-rank) ".";
+  font-size: 1.35rem;
+  font-weight: 700;
+  font-variant-numeric: tabular-nums;
+  line-height: 1;
+  min-width: 2.25ch;
+  text-align: right;
+}
 body.view-ontology ol.ont-ranking-list li .item-link,
 body.view-ontology ul.ont-group-list li .item-link {
   flex: 1;

download full diff A

B — c_88200cfa5c4d (tommy-mor)

message

[10c9caac] Fix all workspace clippy warnings.

Wire up a missing ui_action test, allow dead code in shared integration helpers, and apply small clippy cleanups across server and types.

Co-authored-by: Cursor <cursoragent@cursor.com>

diff preview

diff --git a/server/src/dsl.rs b/server/src/dsl.rs
index a45c5b33e10d0d2ea48c7313061cfa1e6430bcfc..faa8aac6616bc6ea2b102d08ae999c01a716ef6e 100644
--- a/server/src/dsl.rs
+++ b/server/src/dsl.rs
@@ -927,9 +927,7 @@ mod tests {
     #[test]
     fn parse_vote_rejects_zero_zero_ratio() {
         let err = parse_full("{tie placeholder}\n~/a 0:0 ~/b").unwrap_err();
-        let msg = match err {
-            DslError::Parse(m) => m,
-        };
+        let DslError::Parse(msg) = err;
         assert!(
             msg.contains("0:0"),
             "expected 0:0 rejection message, got: {msg}"
diff --git a/server/src/html/garden/tests.rs b/server/src/html/garden/tests.rs
index c2036fca7752aef63d260e36cfe9649f63b5c550..0a1be1290fdc93197ca191197a473840bb4decbc 100644
--- a/server/src/html/garden/tests.rs
+++ b/server/src/html/garden/tests.rs
@@ -346,7 +346,7 @@ fn vote_compare_item_card_renders_github_import_markup() {
         "headline": "#1 Compare card",
         "sublines": ["State: open"],
     });
-    let body = format!("```slug-github-card\n{}\n```", json.to_string());
+    let body = format!("```slug-github-card\n{json}\n```");
     let html = vote_compare_item_card(
         &nav,
         &item,
diff --git a/server/src/html/ui_action.rs b/server/src/html/ui_action.rs
index 2589a2cc00bb7b18cd19ebcbb938083122d6921d..5e4131dd346a6f80bfe091a9b0cf7902721bc47f 100644
--- a/server/src/html/ui_action.rs
+++ b/server/src/html/ui_action.rs
@@ -246,6 +246,7 @@ mod tests {
         );
     }
 
+    #[test]
     fn set_new_thread_compose_expanded_true() {
         let template = serde_json::json!({
             "action": "set_new_thread_compose_expanded",
diff --git a/server/src/offline.rs b/server/src/offline.rs
index 2db6f67e22e00a24ce673d13095644dd9fa9342d..93d4d5ee55449da644f732bc0ba007ee4c2c7079 100644
--- a/server/src/offline.rs
+++ b/server/src/offline.rs
@@ -167,7 +167,7 @@ fn rankings_for_simulated(
         .iter()
         .map(|parent| {
             let scoped_content = simulated
-                .content_for_scope(&scope)
+                .content_for_scope(scope)
                 .unwrap_or_else(|| simulated.public());
             let scoped = build_children_rankings(scoped_content, parent);
             let components: Vec<RankComponent> = scoped
@@ -254,7 +254,9 @@ fn ingest_parse_error(raw: &str) -> Option<String> {
     dsl::parse_full(raw).err().map(|e| e.to_string())
 }
 
-fn load_events_from_jsonl(path: &Path) -> Result<(usize, Vec<(usize, Event)>, Vec<BadJsonLine>), std::io::Error> {
+type JsonlEventsLoad = Result<(usize, Vec<(usize, Event)>, Vec<BadJsonLine>), std::io::Error>;
+
+fn load_events_from_jsonl(path: &Path) -> JsonlEventsLoad {
     let text = std::fs::read_to_string(path)?;
     let total_lines = text.lines().count();
     let mut events = Vec::new();
diff --git a/server/src/resolvers/github.rs b/server/src/resolvers/github.rs
index 30dd4cdac96de0e3da4fa03fdf82f91bed73bfe0..3cec5e8b7249a4597c378890cc9e6125104e76c3 100644
--- a/server/src/resolvers/github.rs
+++ b/server/src/resolvers/github.rs
@@ -749,6 +749,6 @@ mod tests {
             GithubImportKind::Issue,
         );
         assert!(card.sublines.iter().any(|l| l.contains("@octo")));
-        assert_eq!(card.excerpt.as_deref(), Some("The issue body.").as_deref());
+        assert_eq!(card.excerpt.as_deref(), Some("The issue body."));
     }
 }
diff --git a/server/tests/basic.rs b/server/tests/basic.rs
index 31a35251a8abd6f4a48c1d7782b6985f621375e1..9d83e7a97e2c7494790db17c4b5b30c181705026 100644
--- a/server/tests/basic.rs
+++ b/server/tests/basic.rs
@@ -337,7 +337,7 @@ async fn event_log_handles_corrupt_lines() {
         .unwrap();
 
     // Add empty line.
-    writeln!(f, "").unwrap();
+    writeln!(f).unwrap();
 
     let (loaded, bad) = log.load_all().await.unwrap();
     assert_eq!(loaded.len(), 2);
@@ -511,9 +511,7 @@ fn dsl_parse_rejects_zero_zero_vote_ratio() {
         "~/t/a {a}\n~/t/b {b}\n{zero}\n~/t/a 0:0 ~/t/b\n",
     )
     .expect_err("0:0 vote must be rejected by the parser");
-    let msg = match err {
-        slugsocial_server::dsl::DslError::Parse(m) => m,
-    };
+    let slugsocial_server::dsl::DslError::Parse(msg) = err;
     assert!(
         msg.contains("0:0"),
         "expected message about invalid 0:0 ratio, got: {msg}"
@@ -904,7 +902,7 @@ fn posts_by_actor_indexes_and_profile_visibility() {
 fn feed_query(state: &ReducerState, cutoff: i64, limit: usize) -> (usize, Vec<String>) {
     let matching: Vec<&str> = state.ingests_ordered.iter().rev()
         .map(|id| id.as_str())
-        .take_while(|id| state.ingests_by_id.get(*id).map_or(false, |ing| ing.ts > cutoff))
+        .take_while(|id| state.ingests_by_id.get(*id).is_some_and(|ing| ing.ts > cutoff))
         .filter(|id| {
             state.ingests_by_id.get(*id).is_some_and(|ing| {
                 let scope = slugsocial_server::reducer::scope_from_room_wire(&ing.room_id);
diff --git a/server/tests/integration_health.rs b/server/tests/integration_health.rs
index 481222d8c48c44fcfb7e9ba26cf7644b5c26d5f4..351aae6b0e9738021886a076ee08fab5cf5a0001 100644
--- a/server/tests/integration_health.rs
+++ b/server/tests/integration_health.rs
@@ -7,7 +7,7 @@ async fn test_healthz() {
     let (addr, _tmp, _log, _handle) = create_test_server().await;
     let client = reqwest::Client::new();
     let response = client
-        .get(&format!("http://{}/healthz", addr))
+        .get(format!("http://{}/healthz", addr))
         .send()
         .await
         .unwrap();
diff --git a/server/tests/integration_rpc.rs b/server/tests/integration_rpc.rs
index ccd89a02594bd2a8e7047edafca04b0e54384139..ec446d94a38c8d6961d2135dd031da7ab2a39b48 100644
--- a/server/tests/integration_rpc.rs
+++ b/server/tests/integration_rpc.rs
@@ -440,7 +440,6 @@ async fn test_rank_history() {
     let bearer = test_bearer();
     let ingest = |delegate: &str, text: &str| {
         let client = client.clone();
-        let addr = addr;
         let bearer = bearer.clone();
         let text = text.to_string();
         let delegate = delegate.to_string();
diff --git a/server/tests/support/mod.rs b/server/tests/support/mod.rs
index 84dc1d68b6c1e1fdfdbd0757139c06c3daf1e9a6..4a620eaa875e7a1145f2a4e82cc4ff2be21d5345 100644
--- a/server/tests/support/mod.rs
+++ b/server/tests/support/mod.rs
@@ -1,3 +1,6 @@
+//! Shared helpers for integration tests; each test binary uses a different subset.
+#![allow(dead_code)]
+
 use sha2::{Digest, Sha256};
 use slugsocial_server::{
     event_log::EventLog,
diff --git a/types/src/paths.rs b/types/src/paths.rs
index ebc299c5e1af456c3e4b7fa45ed9fb23313e88c4..d2e799942b98dd7342764475deb17903fb60c600 100644
--- a/types/src/paths.rs
+++ b/types/src/paths.rs
@@ -411,7 +411,7 @@ mod tests {
     #[test]
     fn garden_item_url_deref_to_str() {
         let g = GardenItemUrl::from_storage_str("https://slug.social/~/x", "public");
-        let s: &str = &*g;
+        let s: &str = &g;
         assert_eq!(s, "https://slug.social/~/x");
     }
 

download full diff B

Hardlinks — judgments / attempts / prompt

prompt download

judgments

attempts

Prompt text is loaded only by the download route.