pub async fn handle_muxspect_layout(
__arg0: State<AppState>,
__arg1: Query<MuxspectLayoutQuery>,
) -> impl IntoResponseExpand description
GET /api/v1/muxspect/layout[?tab_id=X] — the persisted layout tree for
every tab (or one), plus the layout doctor’s verdict on each.
Why this exists: layout state was previously only inspectable by reading
db_layout out of SQLite by hand and walking the JSON, which is what
diagnosing the cross-split minimize bugs (#2848, #2850, #2855) actually
required. This applies muxspect’s existing “what is this instance doing
right now” contract to layout.
It reports the PERSISTED tree, a genuinely different question from what
the frontend currently renders: validate_layout_invariants normally runs
at reducer write-time, so running it on demand here also catches
corruption already sitting on disk, including trees written by older
versions that never ran the check.
Read-only, like every route in this module except dock clear.