Skip to main content

Module projects

Module projects 

Source
Expand description

GET /projects REST route over the fs.list_projects JSON-RPC method (issue #3365).

Why: the GUI’s workstream-first project-picker modal needs a small, read-only, loopback-only roster of candidate projects (ADR-0011 — this daemon binds loopback only, matching every other route in this gateway). Mirrors super::fs‘s shape exactly: a thin handler over crate::fs_browse::protocol::list_projects via [super::respond], never duplicating the scan logic (crate::fs_browse::roster::list_projects) as a bespoke axum handler — see super module docs’ “forking the two surfaces” rationale. What: routes builds a standalone axum::Router<()> (its own ProjectsState carrying just the Arc<Router>, with_state-erased before return, mirroring super::fs::FsState) mapping GET /projects -> fs.list_projects. No query params — the roster takes none. crate::serve::http::build_axum_router merges this into the daemon’s main router alongside POST /rpc, GET /health, GET /fs, and the other REST resource groups — /projects collides with none of them. Test: tests::*.

Functions§

routes
Build the GET /projects route group.