Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(ui): dispatch /api/symbol-history before the /api/symbol* wildcard

Martin Vogelb808eec5141b
diff --git a/src/ui/http_server.c b/src/ui/http_server.c
index b29c142da..2eb63eabe 100644
--- a/src/ui/http_server.c
+++ b/src/ui/http_server.c
@@ -2450,6 +2450,13 @@ static void dispatch_request(cbm_http_server_t *srv, cbm_http_conn_t *c,
return;
}
+ /* GET /api/symbol-history → per-symbol git log -L evidence.
+ * MUST precede /api/symbol*, whose wildcard would swallow it. */
+ if (is_get && cbm_http_path_match(req->path, "/api/symbol-history*")) {
+ handle_atlas_symbol_history(c, req);
+ return;
+ }
+
/* GET /api/symbol → CBM Atlas symbol bundle */
if (is_get && cbm_http_path_match(req->path, "/api/symbol*")) {
handle_atlas_symbol(c, req);
@@ -2504,12 +2511,6 @@ static void dispatch_request(cbm_http_server_t *srv, cbm_http_conn_t *c,
return;
}
- /* GET /api/symbol-history → per-symbol git log -L evidence */
- if (is_get && cbm_http_path_match(req->path, "/api/symbol-history*")) {
- handle_atlas_symbol_history(c, req);
- return;
- }
-
/* GET /api/flows → CBM Atlas flow list */
if (is_get && cbm_http_path_match(req->path, "/api/flows*")) {
handle_atlas_flows(c, req);