You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configure navigation fails to save: "Request body is not valid JSON" #456
Toggling any item on a workspace's Configure navigation page (/workspaces/:id/nav-config) fails when the workspace has saved board columns. The toast reads:
Could not save navigation settings: Request body is not valid JSON
The toggle does not save, so the navigation can't be changed from the UI.
Steps to reproduce
Use a workspace whose board configuration has columns.
Open Configure navigation from the gear next to Tools in the workspace sidebar.
Turn any item on or off.
Cause
persistCurrent in frontend/src/lib/workspaces/NavigationConfigPage.svelte sends the columns back as GET returned them:
columns: config?.columns||[],
Those are BoardColumn objects, which include board_configuration_id, created_at and updated_at. The PUT decodes into BoardColumnRequest, which has none of those fields, and internal/restapi/v2/request.go decodes with DisallowUnknownFields(). Every decode failure there is reported as "Request body is not valid JSON", so the message doesn't point at the real problem.
Suggested fix
Map the columns to the request fields on that page, as buildBoardConfigurationPayload in frontend/src/lib/features/collections/boardConfigPayload.js already does:
Separately, the decoder could return a clearer message for an unknown field. That would have made this easy to spot.
Evidence
Sending the same PUT to /api/v2/workspaces/:id/board-configuration from the browser console with the columns mapped as above returned success, and the navigation item appeared. We run v0.9.3 (1f796601). The code above is unchanged on main at 54eaef9.
Activity
feat: board-configuration merge patch (#456) and attachment visibilit…