Side A fixes real application behavior (correct sibling-grouping logic for unranked items) and adds a targeted regression test validating the new grouping semantics. Side B is a useful but narrow CI/test-config simplification (collapsing two enumerated kaocha suites into one glob-based suite) with no logic or test coverage changes, and even introduces a stray indentation inconsistency in the edn file.
constitution · epochs · watch · epoch 3
c_3403e5929da7 (tommy-mor) vs c_28dfd8015c8a (tommy-mor)
download prompt · raw event · cmp_3123dca6806550
council reasoning
A fixes real sibling-nav behavior (each unranked item becomes its own group) and locks it in with a focused regression test; that is lasting product/UI correctness. B only simplifies tests.edn from hand-listed suites to one ns-pattern—helpful DX, but config hygiene with less direct lasting impact than A’s behavior change.
Side A changes application behavior by treating each unranked sibling as its own navigation group instead of aggregating all unranked items together, matching the documented grouping semantics, and it adds a regression test covering the new behavior. Side B improves test configuration by auto-discovering all test namespaces, reducing maintenance overhead, but it does not change the project's runtime behavior.
sides
A — c_3403e5929da7 (tommy-mor)
message
[65bce99f] sibling groups #130
diff preview
diff --git a/server/src/html/garden.rs b/server/src/html/garden.rs
index 82c1b4b4f36ea13a906035a1789ba893222b3695..e3c56d124ab7b0fa08c7f9ae736103e6b7cf5862 100644
--- a/server/src/html/garden.rs
+++ b/server/src/html/garden.rs
@@ -837,7 +837,8 @@ struct SiblingNavGroup {
links: Vec<SiblingNavLink>,
}
-/// Siblings under the same parent, grouped like child rankings (components then isolates).
+/// Siblings under the same parent: one group per ranking component (ordered list), then one
+/// group per isolated unranked sibling (each shows rank `1`, separated like components).
#[derive(Debug, Clone)]
struct SiblingNavBar {
groups: Vec<SiblingNavGroup>,
@@ -890,15 +891,12 @@ fn build_sibling_nav(
groups.push(SiblingNavGroup { links });
}
}
- if !rankings.unranked_items.is_empty() {
- let links: Vec<SiblingNavLink> = rankings
- .unranked_items
- .iter()
- .map(|u| SiblingNavLink {
+ for u in &rankings.unranked_items {
+ groups.push(SiblingNavGroup {
+ links: vec![SiblingNavLink {
path: u.clone().normalized_storage().to_storage_string(),
- })
- .collect();
- groups.push(SiblingNavGroup { links });
+ }],
+ });
}
let sibling_total: usize = groups.iter().map(|g| g.links.len()).sum();
if sibling_total <= 1 {
@@ -1541,6 +1539,29 @@ mod tests {
assert_eq!(nav.groups[1].links.len(), 1);
}
+ #[test]
+ fn sibling_nav_splits_each_unranked_into_its_own_group() {
+ let mut reduced = ReducerState::default();
+ apply_ingest(
+ &mut reduced,
+ 1,
+ "@00000000-0000-0000-0000-000000000000:test:local/test\n\
+ ~/topic {topic body}\n\
+ ~/topic/a {alpha}\n\
+ ~/topic/b {beta}\n\
+ ~/topic/c {gamma}\n\
+ ~/topic/d {delta}\n\
+ {a beats b}\n ~/topic/a 2:1 ~/topic/b\n",
+ );
+
+ let model = build_item_page_view_model(&reduced, &ScopeId::Public, "~/topic/a");
+ let nav = model.sibling_nav.expect("expected sibling nav");
+ assert_eq!(nav.groups.len(), 3);
+ assert_eq!(nav.groups[0].links.len(), 2);
+ assert_eq!(nav.groups[1].links.len(), 1);
+ assert_eq!(nav.groups[2].links.len(), 1);
+ }
+
#[test]
fn item_page_model_builds_ranked_child_components() {
let mut reduced = ReducerState::default();
B — c_28dfd8015c8a (tommy-mor)
message
[0bebe819] Unify kaocha test discovery to one auto-discovered suite. Replace the two hand-enumerated suites (:http-integration, :browser) with a single :all suite that picks up every test.* namespace under test/. New test files now run automatically without touching tests.edn — needed for the test.ranking namespace added alongside the #146 fix, and for any future tests. Both ./TEST.sh and CI (.github/workflows/ci.yml) invoke `clojure -M:kaocha`, so both pick up the new suite without changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
diff preview
diff --git a/tests.edn b/tests.edn
index 5e2b0433a66c51806d08ef38d691259cfccd1fe0..e51ffcc81eeae6f41c85d1bfc5ba32f592cc5818 100644
--- a/tests.edn
+++ b/tests.edn
@@ -1,30 +1,14 @@
#kaocha/v1
-{:tests
- [{:id :http-integration
- :test-paths ["test"]
- :source-paths ["."]
- :ns-patterns ["^test\\.integration$"
- "^test\\.auth$"
- "^test\\.grants$"
- "^test\\.invites$"
- "^test\\.room-list$"]
- :kaocha.filter/skip-meta [:skip]
- :parallel? false}
- {:id :browser
- :test-paths ["test"]
- :source-paths ["."]
- :ns-patterns ["^test\\.browser-sse$"
- "^test\\.browser-ui-morph$"
- "^test\\.browser-post-redact$"
- "^test\\.browser-room-delete$"
- "^test\\.browser-public-garden$"
- "^test\\.browser-redact-thread-index$"
- "^test\\.browser-garden-pin$"
- "^test\\.browser-vote-compare$"
- "^test\\.browser-github-resolver$"]
- :kaocha.filter/skip-meta [:skip]
- :parallel? false}]
- :plugins [:kaocha.plugin/junit-xml]
- :kaocha.plugin.junit-xml/target-file "target/kaocha-junit.xml"
- :kaocha.plugin.junit-xml/add-location-metadata? true
- :reporter kaocha.report.progress/report}
+ {:tests
+ [{:id :all
+ :test-paths ["test"]
+ :source-paths ["."]
+ ;; Pick up every test.* namespace under test/. New files don't need to be
+ ;; enumerated here — drop them in test/ with `(ns test.foo …)` and they run.
+ :ns-patterns ["^test\\..+"]
+ :kaocha.filter/skip-meta [:skip]
+ :parallel? false}]
+ :plugins [:kaocha.plugin/junit-xml]
+ :kaocha.plugin.junit-xml/target-file "target/kaocha-junit.xml"
+ :kaocha.plugin.junit-xml/add-location-metadata? true
+ :reporter kaocha.report.progress/report}
Hardlinks — judgments / attempts / prompt
judgments
attempts
Prompt text is loaded only by the download route.