Skip to content

Mount the Brain IdeaLoom lists view and fix its save payload - #5363

Merged
atomantic merged 2 commits into
mainfrom
claim/issue-5337
Aug 29, 2026
Merged

Mount the Brain IdeaLoom lists view and fix its save payload#5363
atomantic merged 2 commits into
mainfrom
claim/issue-5337

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Finishes the IdeaLoom lists slice that #5349 left orphaned: IdeaLoomLists shipped with no caller, so Brain > Ideas still rendered only native idea records and nothing in the running app could open the lists panel.

  • Brain > Ideas now presents its two models as two sibling views — Brain ideas (federated idea records) and IdeaLoom lists (machine-local ordered lists) — with the active view addressed by ?view=lists so it is shareable, bookmarkable, and reachable from ⌘K and voice. The lists view gets its own nav-manifest entry, matching how the other query-param sub-views are registered.
  • Saving a list could not work as written. The list API is strict and accepts exactly title/prompt/category/status/help/ideas, while the panel spread the whole draft record back at it, so every edit round-tripped as a 400 on the record metadata (id, schemaVersion, timestamps, importer-owned sync state). Saves now project the draft onto the schema's fields, and the required prompt/category are gated in the form with a message naming the missing field.
  • Completing a list is one click that persists through the same validated save, so it can no longer silently drop unsaved edits.
  • Integration state is reported honestly: an enabled integration with no vault selected, and a settings fetch that failed, each read as their own notice instead of both looking like "vault sync is disabled". None of them gate local editing.
  • Both views drive the query string through the shared useUrlParams hook rather than re-rolling the merge-and-prune loop on react-router's closure-stale functional updater.

Server-side scope (#5336) is untouched; the only server change is the nav-manifest entry.

Test plan

  • client/src/components/brain/tabs/IdeasTab.test.jsx (new) — the tab defaults to the native view, opens the lists view straight from the URL, records the selected view in the URL rather than local state, clears the list selection when switching back, and guards against the component being orphaned again.
  • client/src/components/brain/IdeaLoomLists.test.jsx — extended to cover the exact save payload (schema keys only, no record metadata), the required-field message, one-click completion preserving unsaved edits, inline-confirm delete, the no-vault-selected notice, and an unread-settings fetch not masquerading as a disabled integration.
  • cd client && npm test — 807 files / 10192 tests pass; npm run lint clean.
  • cd server && npm test — 1721 files / 35366 tests pass (covers navManifest.test.js and palette.test.js).

Closes #5337

The IdeaLoom list panel shipped with no caller: Brain > Ideas still rendered
only the native idea records, so nothing in the running app could open it.
Ideas now presents its two models as two sibling views — "Brain ideas" (the
federated idea records) and "IdeaLoom lists" (machine-local ordered lists) —
with the active view addressed by `?view=lists` so it is shareable and
reachable from the command palette and voice.

Saving a list also could not work as written. The list API is strict and
accepts exactly title/prompt/category/status/help/ideas, while the panel
spread the whole draft record back at it, so every edit round-tripped as a
400 on the record metadata (id, schemaVersion, timestamps, importer-owned
sync state). Saves now project the draft onto the schema's fields, and the
required prompt/category are gated in the form with a message that names the
missing field rather than surfacing a generic validation failure.

Completing a list is a single click that persists through the same validated
save, so it can no longer silently drop unsaved edits, and an enabled
integration with no vault selected now reads as its own notice instead of
looking like a healthy configuration.
- A failed settings fetch no longer renders as "vault sync is disabled": an
  unread configuration gets its own notice instead of asserting a state we
  never read.
- Both Ideas views drive the query string through the shared `useUrlParams`
  hook rather than re-rolling the merge-and-prune loop on react-router's
  closure-stale functional updater, and a view flip replaces rather than
  pushes so Back leaves the page instead of replaying every pill click.
- Give the IdeaLoom lists view its own nav-manifest entry, the way the other
  query-param sub-views have one. Keywords on the parent Ideas row only ever
  landed the user on the native view; voice `ui_navigate` could not reach the
  lists at all.
@atomantic
atomantic merged commit 110750f into main Aug 29, 2026
7 checks passed
@atomantic
atomantic deleted the claim/issue-5337 branch August 29, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build the Brain IdeaLoom lists UI and local editing workflow

1 participant