Repository navigation
refactor: move the layout store from Vuex to Pinia (CM-1548) - #5001
Conversation
Refs linuxfoundation/lfx-cdp-insights-ops#248 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit aa311cd. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
The migration is straightforward, with no identified functional regressions or remaining consumers of the removed APIs.
0 open findings
What changed in this PR
Migrates layout state from Vuex to Pinia while preserving menu-collapse behavior.
Changes:
- Adds
useLayoutStoreand updates the menu consumer. - Removes the legacy Vuex module and unused resize handling.
- Removes the obsolete layout cycle allowance.
| File | Description |
|---|---|
| frontend/src/modules/layout/pinia/layout.store.ts | Adds Pinia collapse state and toggle action. |
| frontend/src/modules/layout/layout-store.js | Deletes the legacy Vuex store. |
| frontend/src/modules/layout/layout-module.js | Removes Vuex store registration. |
| frontend/src/modules/layout/components/menu/menu.vue | Uses the Pinia layout store. |
| frontend/src/app.vue | Removes unused layout resize handling. |
| frontend/cycles-allowlist.json | Removes the obsolete layout cycle entry. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Moves the layout store from Vuex to a Pinia setup store,
useLayoutStore(menuCollapsedandtoggleMenu). The menu collapse state, its persistence and the toggle behave as before.isMobile, the window resize listener andcollapseMenuare deleted. Nothing read them onmain, so this removes one window resize listener.layout/*mutations, because the store is no longer a Vuex module.layoutline leavescycles-allowlist.json.Closes linuxfoundation/lfx-cdp-insights-ops#248