constitution · epochs · watch · epoch 3

comparison

c_cd965c070df3 (tommy-mor) vs c_8dc1a8119370 (tommy-mor)

download prompt · raw event · cmp_6408aab3f6c5a4

council reasoning

~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

Side B removes ~1700 lines of a fragile, over-engineered keystroke-transition parser (with a race-condition test, JS debounce logic, and unused CSS) and replaces it with a small, robust paste-and-parse function plus simple UI, meaningfully reducing complexity and fragility while preserving functionality. Side A is a solid, correct bugfix (fixing child import wiring and unranked labels) but is smaller in scope and lower lasting impact than eliminating a large brittle subsystem.

~x-ai/grok-latest · winner B · 2:1 · permalink

B replaces an unreliable ~1.8k-line keystroke graph, parser_action types, race-prone JS, and Playwright race test with a small paste-and-go URL parser and redirect—lasting maintainability by deleting brittle subsystem code. A is a real, precise bugfix (apply_entity_under_parent vs ensure_path/link_child, title-based unranked labels, stronger import tests) but narrower in scope than removing the failed autocomplete architecture.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A fixes a concrete data-model bug by introducing `apply_entity_under_parent` so Reddit listing imports attach posts directly under the subreddit without path expansion, and updates the ranking panel to display imported child titles by looking them up in the global tree. It also adds integration coverage for the import and SSE behavior, whereas Side B mainly replaces a sophisticated autocomplete workflow with a simpler paste-and-go URL parser and removes substantial functionality rather than improving core project behavior.

sides

A — c_cd965c070df3 (tommy-mor)

message

[993d359c] Fix Reddit children import wiring and unranked child labels.

Listing imports attach posts directly under the subreddit without ensure_path
pulling comment-path segments in, and the ranking panel shows imported titles.
Update integration tests for JS SSE morphs and children fetch.

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

diff preview

diff --git a/server/src/api/ui_html.rs b/server/src/api/ui_html.rs
index d1defd28242fd2ca3b886adc91a7070bef75e653..e649a7d192feade465e19ce6187a829f6ec74372 100644
--- a/server/src/api/ui_html.rs
+++ b/server/src/api/ui_html.rs
@@ -58,7 +58,7 @@ pub async fn post_ui_html(
             let tree = state.tree.read().await;
             let empty = crate::reducer::NodeState::default();
             let node = tree.get(&parent).unwrap_or(&empty);
-            let panel = ranking_panel(&parent, node);
+            let panel = ranking_panel(&parent, node, &tree);
             JsBuilder::new()
                 .morph_selector("#ranking-panel", panel)
                 .into_response()
diff --git a/server/src/fetch/mod.rs b/server/src/fetch/mod.rs
index 0177bb161cea1b72a100b52efdfc5e710271c9eb..35f968c21c69ca557bab7951413e3cfbbccfebfd 100644
--- a/server/src/fetch/mod.rs
+++ b/server/src/fetch/mod.rs
@@ -107,7 +107,7 @@ pub fn fetch_entity_stream(
                 let mut b = JsBuilder::new()
                     .morph_selector("#entity-section", html::entity_section(&id, node, false));
                 if kind == FetchKind::Children {
-                    b = b.morph_selector("#ranking-panel", ranking_panel(&id, node));
+                    b = b.morph_selector("#ranking-panel", ranking_panel(&id, node, &tree));
                 }
                 yield Ok(js_event(b.build()));
             }
diff --git a/server/src/html/mod.rs b/server/src/html/mod.rs
index 27ce9118c73ec5643e04363ab1a36cf5da6101bf..e88cc43ddc9d8100f7994be6f5960ec4d8f22c55 100644
--- a/server/src/html/mod.rs
+++ b/server/src/html/mod.rs
@@ -15,7 +15,7 @@ use crate::{
     ranking::{
         connected_components_from_voted_pairs, ranked_items_subset, RankedItem, MAX_ITERS, TOL,
     },
-    reducer::NodeState,
+    reducer::{GlobalTree, NodeState},
     state::AppState,
     ui_action::UI_RPC_FIELD,
 };
@@ -182,8 +182,15 @@ fn display_label(id: &ItemId) -> String {
         .to_string()
 }
 
+fn child_label(tree: &GlobalTree, id: &ItemId) -> String {
+    tree.get(id)
+        .and_then(|n| n.data.as_ref())
+        .map(|d| d.title.clone())
+        .unwrap_or_else(|| display_label(id))
+}
+
 /// Plain (unscored) list of children that have no votes yet.
-fn unranked_list(label: &str, items: &[ItemId]) -> Markup {
+fn unranked_list(label: &str, items: &[ItemId], tree: &GlobalTree) -> Markup {
     html! {
         @if !items.is_empty() {
             h3 class="rank-heading muted small" { (label) }
@@ -191,7 +198,7 @@ fn unranked_list(label: &str, items: &[ItemId]) -> Markup {
                 @for it in items {
                     li {
                         a href=(item_href(it)) {
-                            strong { (display_label(it)) }
+                            strong { (child_label(tree, it)) }
                         }
                     }
                 }
@@ -200,7 +207,7 @@ fn unranked_list(label: &str, items: &[ItemId]) -> Markup {
     }
 }
 
-pub fn ranking_panel(item: &ItemId, node: &NodeState) -> Markup {
+pub fn ranking_panel(item: &ItemId, node: &NodeState, tree: &GlobalTree) -> Markup {
     let group = &node.local_ranking;
     let n = group.idx_to_item.len();
     let (comps, _isolates) =
@@ -248,7 +255,7 @@ pub fn ranking_panel(item: &ItemId, node: &NodeState) -> Markup {
                     @let label = if multi { format!("Ranking group {}", gi + 1) } else { "Ranking".to_string() };
                     (rank_list(&label, ranked, 1))
                 }
-                (unranked_list("Unranked", &unranked))
+                (unranked_list("Unranked", &unranked, tree))
             }
         }
     }
@@ -297,7 +304,7 @@ async fn item_page(state: AppState, uri: Uri, item: ItemId) -> Markup {
         (input_panel("", None))
         (breadcrumb_path(&item))
         (entity_section(&item, node, false))
-        (ranking_panel(&item, node))
+        (ranking_panel(&item, node, &tree))
     };
     layout("sorter2", body, views)
 }
diff --git a/server/src/reddit.rs b/server/src/reddit.rs
index a0eb688709478ee0185b953b41a5d26cc354764d..69d979bc7e4a1cb078f70114dc539bdc1986b574 100644
--- a/server/src/reddit.rs
+++ b/server/src/reddit.rs
@@ -300,9 +300,16 @@ async fn reddit_worker(
                     }
                     {
                         let mut tree = tree.write().await;
-                        apply_entity_import(&mut tree, &child_id, child_payload);
                         if kind == FetchKind::Children {
-                            tree.link_child(&fetch_id, &child_id);
+                            let view = entity_view_from_payload(&child_id, &child_payload);
+                            tree.apply_entity_under_parent(
+                                &fetch_id,
+                                &child_id,
+                                child_payload,
+                                view,
+                            );
+                        } else {
+                            apply_entity_import(&mut tree, &child_id, child_payload);
                         }
                     }
                     written += 1;
diff --git a/server/src/reducer.rs b/server/src/reducer.rs
index a36cd5c9287d61536f9f4a3f6b0df2342388857a..4e42d0369dab50bb2f8ca664aa69b628292f6c07 100644
--- a/server/src/reducer.rs
+++ b/server/src/reducer.rs
@@ -209,14 +209,24 @@ impl GlobalTree {
         }
     }
 
-    /// Directly attach `child` under `parent`, bypassing path-based nesting.
-    /// Used for imported listings (e.g. a subreddit's posts) so they show up
-    /// as children of the subreddit rather than a deep `…/comments/<id>` path.
-    pub fn link_child(&mut self, parent: &ItemId, child: &ItemId) {
+    /// Import entity data for `id` and attach it as a direct child of `parent`
+    /// without running [`Self::ensure_path`] on `id` (avoids Reddit `/comments/`
+    /// parent rules pulling intermediate path segments into the subreddit).
+    pub fn apply_entity_under_parent(
+        &mut self,
+        parent: &ItemId,
+        id: &ItemId,
+        payload: Value,
+        view: Option<EntityData>,
+    ) {
         self.ensure_path(parent);
-        self.ensure_path(child);
+        self.ensure_node(id);
+        if let Some(node) = self.nodes.get_mut(id) {
+            node.entity_raw = Some(payload);
+            node.data = view;
+        }
         if let Some(p) = self.nodes.get_mut(parent) {
-            p.children.insert(child.clone());
+            p.children.insert(id.clone());
         }
     }
 }
diff --git a/test/reddit_import.clj b/test/reddit_import.clj
index 84cbdcf7965e50290313cbce2243a16b583d2097..45a2a19f20799d77e84d8aa64735ab5e7e45f97c 100644
--- a/test/reddit_import.clj
+++ b/test/reddit_import.clj
@@ -67,6 +67,36 @@
           (do (Thread/sleep 200) (recur))
           false)))))
 
+(defn- run-reddit-fetch-assertions [app-base data-dir]
+  (let [browse-url (str app-base "/~/https://reddit.com/r/rust")
+        log-path (str data-dir "/events.jsonl")
+        before (:out (process/shell {:out :string :err :string}
+                                    "curl" "-sf" browse-url))]
+    (is (str/includes? before "Fetch from Reddit"))
+    (is (not (str/includes? before "The Rust Programming Language")))
+    (let [sse (curl-fetch-ui-sse app-base "reddit.com/r/rust" "self")]
+      (is (zero? (:exit sse)) "POST /ui fetch_entity (self) SSE succeeds")
+      (is (str/includes? (:out sse) "Idiomorph.morph"))
+      (is (str/includes? (:out sse) "The Rust Programming Language"))
+      (is (wait-event-log log-path 2000) "event log written"))
+    (let [after (:out (process/shell {:out :string :err :string}
+                                     "curl" "-sf" browse-url))
+          log (slurp (io/file log-path))]
+      (is (str/includes? after "The Rust Programming Language"))
+      (is (str/includes? log "\"type\":\"entity_imported\""))
+      (is (str/includes? log "\"subscribers\":350000"))
+      (is (str/includes? log "\"display_name\":\"rust\"")))
+    (let [children-sse (curl-fetch-ui-sse app-base "reddit.com/r/rust" "children")]
+      (is (zero? (:exit children-sse)) "POST /ui fetch_entity (children) SSE succeeds")
+      (is (str/includes? (:out children-sse) "Idiomorph.morph"))
+      (is (str/includes? (:out children-sse) "Announcing Rust 1.99")))
+    (let [after-children (:out (process/shell {:out :string :err :string}
+                                              "curl" "-sf" browse-url))
+          log2 (slurp (io/file log-path))]
+      (is (str/includes? after-children "Announcing Rust 1.99"))
+      (is (str/includes? after-children "Unranked"))
+      (is (str/includes? log2 "announcing_rust_199")))))
+
 (deftest reddit-fetch-via-mock-api
   (testing "Fetch more queues import; event log stores full payload; page shows title"
     (let [root (repo-root)
@@ -102,24 +132,7 @@
                                     bin)]
           (try
             (is (wait-health app-base 20000) "app healthz")
-            (let [browse-url (str app-base "/~/https://reddit.com/r/rust")
-                  before (:out (process/shell {:out :string :err :string}
-                                              "curl" "-sf" browse-url))]
-              (is (str/includes? before "Fetch from Reddit"))
-              (is (not (str/includes? before "The Rust Programming Language")))
-              (let [log-path (str data-dir "/events.jsonl")
-                    sse (curl-fetch-ui-sse app-base "reddit.com/r/rust")]
-                (is (zero? (:exit sse)) "POST /ui fetch_entity SSE succeeds")
-                (is (str/includes? (:out sse) "event: complete"))
-                (is (str/includes? (:out sse) "The Rust Programming Language"))
-                (is (wait-event-log log-path 2000) "event log written")
-                (let [after (:out (process/shell {:out :string :err :string}
-                                                 "curl" "-sf" browse-url))
-                      log (slurp (io/file log-path))]
-                  (is (str/includes? after "The Rust Programming Language"))
-                  (is (str/includes? log "\"type\":\"entity_imported\""))
-                  (is (str/includes? log "\"subscribers\":350000"))
-                  (is (str/includes? log "\"display_name\":\"rust\"")))))
+            (run-reddit-fetch-assertions app-base data-dir)
             (finally
               (process/destroy proc))))
         (finally
diff --git a/test/smoke.clj b/test/smoke.clj
index 11887c48282088e140d823a88ba616f6325835b3..ce9f958c84b9a89ae55e215ab519f1df6435e24b 100644
--- a/test/smoke.clj
+++ b/test/smoke.clj
@@ -49,7 +49,7 @@
           (is (wait-health base 15000) "server responds to /healthz")
           (let [home (:out (process/shell {:out :string :err :string}
                                          "curl" "-sf" (str base "/")))]
-            (is (str/includes? home "vote-panel"))
+            (is (str/includes? home "entity-section"))
             (is (str/includes? home "ranking-panel"))
             (is (str/includes? home "parser-panel"))
             (is (str/includes? home "__rpc__")))

download full diff A

B — c_8dc1a8119370 (tommy-mor)

message

[529cc941] Replace autocomplete parser with paste-and-go navigate.

The keystroke transition graph was unreliable; a textarea plus Go button now parses pasted Reddit URLs and redirects to the subreddit ranking scope.

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

diff preview

diff --git a/AGENTS.md b/AGENTS.md
index 77f2e31d4e860a92a77255ca5106c8b6c4510ee7..36ee4c0ec700bffbe226ee775ba9cf59cf35c770 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,7 +11,6 @@ Single Rust web app **`sorter2-server`**: pairwise voting, rank-centrality ranki
 - **Rust 1.88+** is required (some transitive crates need a recent Cargo). The image may ship older `/usr/local/cargo` (1.83); use **rustup** and `rustup default 1.88.0` before building.
 - **System packages** for builds: `pkg-config`, `libssl-dev` (for `reqwest` / OpenSSL in integration tests and release builds).
 - **Clojure CLI 1.12.0.1530** (optional but used in CI): install from https://clojure.org/guides/install_clojure — needed for `./scripts/clj-test.sh` / Kaocha tests.
-- **Playwright browser** for the spel browser test (`test/parser_race.clj`): install once with `clojure -M -e "(com.microsoft.playwright.CLI/main (into-array String [\"install\" \"chromium\" \"--with-deps\"]))"`. The browser binary is cached under `~/.cache/ms-playwright`.
 
 ### Commands (see also `TEST.sh`)
 
diff --git a/server/src/api/ui_html.rs b/server/src/api/ui_html.rs
index 1339048c955c0a3eb5120381aaf031424cbed540..c4ab9d65c7b3cd42a5b4d093ba429993c101e9a8 100644
--- a/server/src/api/ui_html.rs
+++ b/server/src/api/ui_html.rs
@@ -8,7 +8,7 @@ use std::collections::HashMap;
 use crate::{
     html::{js_string_literal, ranking_panel, JsBuilder},
     parser::parse_reddit_url,
-    parser_render::parser_panel_morph,
+    parser_render::navigate_panel,
     state::AppState,
     ui_action::{parse_html_ui_from_form, HtmlUiAction},
 };
@@ -57,18 +57,23 @@ pub async fn post_ui_html(
                 .morph_selector("#ranking-panel", panel)
                 .into_response()
         }
-        HtmlUiAction::ParseQuery { query } => {
-            let action = parse_reddit_url(&query);
-            let panel = parser_panel_morph(&query, &action);
-            let mut js = JsBuilder::new().morph_selector("#parser-panel", panel);
-            if let Some(comp) = action.primary_completion() {
-                js = js.raw(&format!(
-                    "var __pi=document.getElementById('parser-input'); if(__pi){{__pi.dataset.completion={};}}",
-                    js_string_literal(comp)
-                ));
+        HtmlUiAction::ParseQuery { query } => match parse_reddit_url(&query) {
+            Ok(subreddit) => {
+                let dest = format!("/?sub={subreddit}");
+                JsBuilder::new()
+                    .raw(&format!(
+                        "window.location.href={};",
+                        js_string_literal(&dest)
+                    ))
+                    .into_response()
             }
-            js.into_response()
-        }
+            Err(message) => {
+                let panel = navigate_panel(&query, Some(&message));
+                JsBuilder::new()
+                    .morph_selector("#parser-panel", panel)
+                    .into_response()
+            }
+        },
     }
 }
 
diff --git a/server/src/html/mod.rs b/server/src/html/mod.rs
index 94a5cfb561d1c8464bd2782f7ffd4e0965ccf95d..9650d333d29c4ac94ceb407aee3ee00399c7f40b 100644
--- a/server/src/html/mod.rs
+++ b/server/src/html/mod.rs
@@ -11,8 +11,7 @@ use serde::Deserialize;
 
 use crate::{
     form_template::template_json_compact,
-    parser_action::ParserAction,
-    parser_render::parser_panel,
+    parser_render::navigate_panel,
     ranking::{top_bottom, RankedItem},
     reducer::GroupState,
     state::{normalize_scope, AppState},
@@ -336,10 +335,9 @@ pub async fn home(
     let empty = GroupState::new();
     let group = groups.get(&scope).unwrap_or(&empty);
 
-    let empty_action = ParserAction::suggest(String::new(), None);
     let body = html! {
         h1 { "sorter2" }
-        (parser_panel("", &empty_action))
+        (navigate_panel("", None))
         (vote_panel(&scope))
         (ranking_panel(&scope, group))
     };
diff --git a/server/src/lib.rs b/server/src/lib.rs
index fa423640d598f4ba97a5885d228e78d7b97f7a22..de8bca48cbf689cad22337883e7791966e7c4919 100644
--- a/server/src/lib.rs
+++ b/server/src/lib.rs
@@ -4,7 +4,6 @@ pub mod events;
 pub mod form_template;
 pub mod html;
 pub mod parser;
-pub mod parser_action;
 pub mod parser_render;
 pub mod path_types;
 pub mod ranking;
diff --git a/server/src/parser.rs b/server/src/parser.rs
index ea437c4434045b44cba04a2b3416df850db518e7..50571a59f0d3ece1e2538f88e00ef46ec40ea545 100644
--- a/server/src/parser.rs
+++ b/server/src/parser.rs
@@ -1,1811 +1,87 @@
-use std::collections::HashMap;
-use std::sync::OnceLock;
+//! Extract a subreddit name from a pasted Reddit URL or path.
 
-use crate::parser_action::{GuideOption, ParserAction, ScrollingSuggestion, Suggestion};
-
-// --- Core Abstractions ---
-
-/// Unique identifier for nodes in the graph
-type NodeId = &'static str;
-
-/// Pattern matching for edges
-#[derive(Debug, Clone)]
-pub enum EdgePattern {
-    /// Matches exact literal string
-    Literal(&'static str),
-    
-    /// Matches any prefix of a string and suggests the full string
-    /// e.g., PrefixOf("reddit.com") matches "r", "re", "red", "reddit", "reddit.com"
-    PrefixOf(&'static str),
-    
-    /// Captures a variable segment (e.g., subreddit name, username)
-    Variable(&'static str),
-    
-    /// Matches any string (wildcard)
-    Any,
-}
-
-impl EdgePattern {
-    /// Try to match this pattern against input, return (consumed_chars, captured_value)
-    fn matches(&self, input: &str) -> Option<(usize, Option<String>)> {
-        match self {
-            EdgePattern::Literal(lit) => {
-                if input.starts_with(lit) {
-                    Some((lit.len(), None))
-                } else {
-                    None
-                }
-            }
-            EdgePattern::PrefixOf(target) => {
-                // Check if input is a prefix of target
-                if target.starts_with(input) && !input.is_empty() {
-                    // It's a valid prefix
-                    Some((input.len(), None))
-                } else if input.starts_with(target) {
-                    // Full match
-                    Some((target.len(), None))
-                } else {
-                    None
-                }
-            }
-            EdgePattern::Variable(var_name) => {
-                // Consume until next '/' or end of string
-                let end = input.find('/').unwrap_or(input.len());
-                if end > 0 {
-                    let captured = input[..end].to_string();
-                    // Validate based on variable type
-                    if is_valid_variable(var_name, &captured) {
-                        Some((end, Some(captured)))
-                    } else {
-                        None
-                    }
-                } else {
-                    None
-                }
-            }
-            EdgePattern::Any => {
-                // Match everything until next '/' or end
-                let end = input.find('/').unwrap_or(input.len());
-                if end > 0 {
-                    Some((end, Some(input[..end].to_string())))
-                } else {
-                    None
-                }
-            }
-        }
-    }
-    
-    /// Get the completion suggestion for this pattern
-    fn completion(&self, partial: &str) -> Option<String> {
-        match self {
-            EdgePattern::PrefixOf(target) => {
-                if target.starts_with(partial) && partial != *target {
-                    Some(target.to_string())
-                } else {
-                    None
-                }
-            }
-            _ => None,
-        }
+pub fn parse_reddit_url(query: &str) -> Result<String, String> {
+    let q = query.trim();
+    if q.is_empty() {
+        return Err("Paste a Reddit URL or r/subreddit path".into());
     }
-}
 
-/// Edge in the graph
-pub struct Edge {
-    pattern: EdgePattern,
-    target: NodeId,
-    /// Optional description for autocomplete
-    description: Option<&'static str>,
-}
-
-/// Handler function for generating UI actions (Send + Sync so the graph can live in `OnceLock`).
-type Handler = Box<dyn Fn(&str, &str, &HashMap<String, String>) -> ParserAction + Send + Sync>;
-
-/// Node in the graph
-pub struct Node {
-    #[allow(dead_code)]
-    id: NodeId,
-    edges: Vec<Edge>,
-    handler: Option<Handler>,
-}
-
-/// The composable parser graph (immutable after `build`).
-pub struct Graph {
-    nodes: HashMap<NodeId, Node>,
-    root: NodeId,
-}
-
-// --- Graph Builder (Fluent API) ---
-
-pub struct GraphBuilder {
-    nodes: HashMap<NodeId, Node>,
-    current_node: Option<NodeId>,
-    root: NodeId,
-}
-
-impl GraphBuilder {
-    pub fn new() -> Self {
-        let mut nodes = HashMap::new();
-        nodes.insert(
-            "root",
-            Node {
-                id: "root",
-                edges: Vec::new(),
-                handler: None,
-            },
-        );
-
-        GraphBuilder {
-            nodes,
-            current_node: Some("root"),
-            root: "root",
-        }
+    if let Some(sub) = subreddit_after_prefix(q, "r/") {
+        return Ok(sub);
     }
 
-    /// Select a node to add edges to
-    pub fn at(mut self, node_id: NodeId) -> Self {
-        self.nodes.entry(node_id).or_insert_with(|| Node {
-            id: node_id,
-            edges: Vec::new(),
-            handler: None,
-        });
-        self.current_node = Some(node_id);
-        self
+    if let Some(sub) = subreddit_from_path_segment(q, "/r/") {
+        return Ok(sub);
     }
-    
-    /// Add an edge from the current node
-    pub fn edge(self, pattern: EdgePattern, target: NodeId) -> Self {
-        self.edge_with_desc(pattern, target, None)
-    }
-    
-    /// Add an edge with description
-    pub fn edge_with_desc(
-        mut self,
-        pattern: EdgePattern,
-        target: NodeId,
-        desc: Option<&'static str>,
-    ) -> Self {
-        let current = self.current_node.expect("No current node selected");
-
-        self.nodes.entry(target).or_insert_with(|| Node {
-            id: target,
-            edges: Vec::new(),
-            handler: None,
-        });
-
-        if let Some(node) = self.nodes.get_mut(current) {
-            node.edges.push(Edge {
-                pattern,
-                target,
-                description: desc,
-            });
-        }
 
-        self
-    }
-
-    /// Set handler for current node
-    pub fn handler<F>(mut self, handler: F) -> Self
-    where
-        F: Fn(&str, &str, &HashMap<String, String>) -> ParserAction + Send + Sync + 'static,
-    {
-        let current = self.current_node.expect("No current node selected");
-        if let Some(node) = self.nodes.get_mut(current) {
-            node.handler = Some(Box::new(handler));
-        }
-        self
-    }
-    
-    /// Build the final graph
-    pub fn build(self) -> Graph {
-        Graph {
-            nodes: self.nodes,
-            root: self.root,
-        }
-    }
+    Err("Could not find a subreddit in that URL".into())
 }
 
-// --- Parser Implementation ---
-
-impl Graph {
-    pub fn parse(&self, input: &str) -> ParserAction {
-        let normalized = input.trim().to_lowercase();
-        let mut state = ParserState {
-            input: &normalized,
-            cursor: 0,
-            current_node_id: self.root,
-            context: HashMap::new(),
-            original_query: input.to_string(),
-            current_prefix: String::new(),
-        };
-        
-        self.parse_recursive(&mut state)
-    }
-    
-    fn parse_recursive(&self, state: &mut ParserState) -> ParserAction {
-        let node = self
-            .nodes
-            .get(state.current_node_id)
-            .expect("Node not found in graph");
-
-        // If we've consumed all input, check for handler or suggestions
-        if state.cursor >= state.input.len() {
-            if let Some(handler) = &node.han

… preview truncated; 92,533 characters omitted

download full diff B

Hardlinks — judgments / attempts / prompt

prompt download

judgments

attempts

Prompt text is loaded only by the download route.