You are a constitutional council ranking individual git commits for ownership allocation. Compare these two commits. Decide which contributed more lasting value to the project. Judge substance, not spectacle: - Prefer correct, lasting design and real bugfixes over churn, formatting, renames, or generated noise. - Prefer clarity and necessity over sheer line count. A small precise change can beat a large diffuse one. - Do not favor a side merely because its patch is longer or noisier. - Weight what the change does for the project, not the contributor's name. Return ONLY a JSON object: {"winner": "A" or "B", "ratio": "N:M", "explanation": "..."} The explanation must cite concrete differences in the patches (1-3 sentences). Side A — contributor: tommy-mor Side A — commit message: [e8fdeacf] nice Side A — unified diff (full patch): diff --git a/.gitignore b/.gitignore index 73e8f22cf0d39c706e7cdce5e39f1903a0f9181b..4c7073f9fac0c30fd2050d79a60ef447af58ebeb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .DS_Store data/ repomix-output.xml +dev-data/ diff --git a/bb.edn b/bb.edn index 1e8ec120921761a9a4f28f36578efb1567407cb3..43cc60c9461466e0f7cb08cfea5c600edf95a662 100644 --- a/bb.edn +++ b/bb.edn @@ -9,11 +9,10 @@ :task (do (deref (p/process ["mkdir" "-p" "dev-data"] {:inherit true})) (deref (p/process ["cargo" "watch" - "-x" "run -p server" + "-x" "run -p sorter2-server" "-w" "server/"] {:inherit true :env (merge (into {} (System/getenv)) - {"SLUG_DATA_DIR" "dev-data" - "SLUG_KEYS" "dev:dev" - "PORT" "8080" - "RUST_LOG" "info"})})))}}} + {"SORTER2_DATA_DIR" "dev-data" + "PORT" "8080" + "RUST_LOG" "info"})})))}}} diff --git a/server/src/html/mod.rs b/server/src/html/mod.rs index 322dffefeaa3b8560c1c2b2f70ba8e5a8c555022..0acba3ac745f23be473243e0a9b9cc6e57e8d86f 100644 --- a/server/src/html/mod.rs +++ b/server/src/html/mod.rs @@ -232,7 +232,8 @@ pub fn input_panel(query: &str, error: Option<&str>) -> Markup { html! { section id="parser-panel" class="demo-panel" { form method="post" action="/ui" id="parser-form" { - textarea + input + type="text" name="query" id="parser-input" rows="3" diff --git a/server/static/sorter.css b/server/static/sorter.css index 04f4fabdea3de7c3bc54805d0d3d9e0cea6eeefd..a648e88a57290346b1069868134a212b180def52 100644 --- a/server/static/sorter.css +++ b/server/static/sorter.css @@ -34,29 +34,20 @@ body { font-size: 0.75rem; } -.demo-panel { - max-width: 40rem; - margin: 4rem auto 2rem; - padding: 2rem; - background: var(--panel); - border: 1px solid var(--border); - border-radius: 8px; -} - -.demo-panel h1 { - margin-top: 0; -} - .btn-primary { background: var(--accent); color: #0f1115; - border: none; + border-style: outset; + border-width: 3px; padding: 0.5rem 1rem; - border-radius: 4px; font-size: 1rem; cursor: pointer; } +.btn-primary:active { + border-style: inset; +} + .btn-primary:hover { filter: brightness(1.1); } @@ -103,11 +94,15 @@ code { color: var(--muted); } +#parser-panel { + display: flex; + flex-direction: column; +} + #parser-input { - width: 100%; + width: 90%; padding: 0.5rem; border: 1px solid var(--border); - border-radius: 4px; background: var(--bg); color: var(--fg); font-size: 1rem; @@ -115,7 +110,12 @@ code { resize: vertical; } +#parser-input:focus-visible { + outline: 0; +} + #parser-form .btn-primary { + width: 10%; margin-top: 0.5rem; } Side B — contributor: tommy-mor Side B — commit message: [e999c571] nit Side B — unified diff (full patch): diff --git a/server/src/html/forum.rs b/server/src/html/forum.rs index 815fc6529062b103553644fc15e516334aec2b88..9d9eae409e9df24d6946a6f8782da9b1d536fe3c 100644 --- a/server/src/html/forum.rs +++ b/server/src/html/forum.rs @@ -980,12 +980,6 @@ pub async fn room_page( h3 { "threads" } (render_thread_feed(Some(&nav), "room-thread-feed", &rows, now)) @if show_new { - div class="thread-feed-toolbar" { - form method="POST" action="/ui" { - input type="hidden" name=(UI_RPC_FIELD) value=(expand_room_new_thread_rpc_value(&nav)); - button type="submit" class="section-add-btn" { "+" } - } - } div id="room-new-thread-ui-slot" { (new_thread_form_for_room(&nav, true, false)) } @@ -1015,11 +1009,10 @@ fn new_thread_form_for_room(nav: &ThreadNav, show: bool, compose_expanded: bool) form method="POST" action="/ui" { input type="hidden" name=(UI_RPC_FIELD) value=(rpc_close); button type="submit" class="form-toggle" aria-expanded="true" { - "hide new thread form" + "-" } } section class="compose" id="room-new-thread-compose" { - h3 { "new thread in this room" } div id="room-new-thread-errors" {} form id="room-new-thread-form" method="POST" action="/ui" data-check-action="/ui" data-check-rpc=(template_json_compact(&json!({ "action": "check_ingest", @@ -1037,8 +1030,7 @@ fn new_thread_form_for_room(nav: &ThreadNav, show: bool, compose_expanded: bool) "error_target": "room-new-thread-errors", "form_id": "room-new-thread-form", })).unwrap()); - label for="room-new-tag" { "thread tag" } - input type="text" id="room-new-tag" name="thread_tag" pattern="[a-z0-9_\\-]{1,64}" required; + input type="text" id="room-new-tag" name="thread_tag" pattern="[a-z0-9_\\-]{1,64}" required placeholder="thread-topic-slug-here"; textarea name="text" rows="4" placeholder="First post body…" required {} p { button type="submit" { "post" } } } @@ -1047,7 +1039,7 @@ fn new_thread_form_for_room(nav: &ThreadNav, show: bool, compose_expanded: bool) form method="POST" action="/ui" { input type="hidden" name=(UI_RPC_FIELD) value=(rpc_open); button type="submit" class="form-toggle" aria-expanded="false" { - "new thread in this room" + "+" } } }