Mount the Brain IdeaLoom lists view and fix its save payload - #5363
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Finishes the IdeaLoom lists slice that #5349 left orphaned:
IdeaLoomListsshipped with no caller, so Brain > Ideas still rendered only native idea records and nothing in the running app could open the lists panel.?view=listsso 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.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-ownedsyncstate). Saves now project the draft onto the schema's fields, and the requiredprompt/categoryare gated in the form with a message naming the missing field.useUrlParamshook 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 thelistselection 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 lintclean.cd server && npm test— 1721 files / 35366 tests pass (coversnavManifest.test.jsandpalette.test.js).Closes #5337