fix(routes): remove duplicate GET /api/sessions shadowing session_list() #17

Open
will.anderson wants to merge 1 commits from fix/sessions-route-dedup into main
Owner

Summary

  • Removes the stale route_sessions() function that searched engram for session-start — a label never written by the current session_create(). This caused every GET /api/sessions request to return [], making the sidebar appear empty after a daemon restart.
  • Removes the first GET /api/sessions if-block in handle_request that called route_sessions(). The surviving handler (previously dead code) now calls the correct session_list() from sessions.el.
  • Adds DELETE /api/sessions/:id route wired to session_delete().
  • Adds PATCH /api/sessions/:id route wired to session_update_patch().

Test plan

  • GET /api/sessions returns real sessions after daemon restart
  • DELETE /api/sessions/:id removes session from engram
  • PATCH /api/sessions/:id updates title and/or folder
  • Unrelated routes unaffected
## Summary - Removes the stale `route_sessions()` function that searched engram for `session-start` — a label never written by the current `session_create()`. This caused every `GET /api/sessions` request to return `[]`, making the sidebar appear empty after a daemon restart. - Removes the first `GET /api/sessions` if-block in `handle_request` that called `route_sessions()`. The surviving handler (previously dead code) now calls the correct `session_list()` from `sessions.el`. - Adds `DELETE /api/sessions/:id` route wired to `session_delete()`. - Adds `PATCH /api/sessions/:id` route wired to `session_update_patch()`. ## Test plan - [ ] `GET /api/sessions` returns real sessions after daemon restart - [ ] `DELETE /api/sessions/:id` removes session from engram - [ ] `PATCH /api/sessions/:id` updates title and/or folder - [ ] Unrelated routes unaffected
will.anderson added 1 commit 2026-06-15 18:04:09 +00:00
fix(routes): remove duplicate GET /api/sessions that shadowed session_list()
Neuron Soul CI / build (pull_request) Failing after 9m52s
c43d3e6ca8
The first registration called route_sessions() which searched for a
'session-start' label that no longer exists, returning an empty array
on every list request and making the sidebar appear empty after restart.
The second registration (dead code) called the correct session_list().

Removes route_sessions() entirely and the stale first route block.
Also wires up session_delete() and session_update_patch() — both existed
in sessions.el but had no HTTP routes — via new DELETE and PATCH blocks.
Some required checks failed
Neuron Soul CI / build (pull_request) Failing after 9m52s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/sessions-route-dedup:fix/sessions-route-dedup
git checkout fix/sessions-route-dedup
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#17