Repository navigation
refactor: convert the admin insights-projects and collections stores to setup stores (CM-1571) - #5005
Conversation
…to setup stores (CM-1571) Refs linuxfoundation/lfx-cdp-insights-ops#271 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
PR SummaryLow Risk Overview Store ids, exported hook names ( Reviewed by Cursor Bugbot for commit 90023ee. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
The refactor preserves existing behavior, with no identified compatibility issues or affected $reset() callers.
0 open findings
What changed in this PR
Migrates the admin insights-projects and collections stores to Pinia setup stores while preserving existing consumers.
Changes:
- Consolidates state and actions into two MIT-licensed setup-store files.
- Preserves store IDs, action APIs, and initial values.
- Retains barrel exports and removes obsolete modules.
| File | Description |
|---|---|
| frontend/src/modules/admin/modules/insights-projects/pinia/state.ts | Removes legacy state module. |
| frontend/src/modules/admin/modules/insights-projects/pinia/insights-projects.store.ts | Implements the projects setup store. |
| frontend/src/modules/admin/modules/insights-projects/pinia/index.ts | Re-exports the setup store. |
| frontend/src/modules/admin/modules/insights-projects/pinia/actions.ts | Removes consolidated actions. |
| frontend/src/modules/admin/modules/collections/pinia/state.ts | Removes legacy state module. |
| frontend/src/modules/admin/modules/collections/pinia/index.ts | Re-exports the setup store. |
| frontend/src/modules/admin/modules/collections/pinia/collections.store.ts | Implements the collections setup store. |
| frontend/src/modules/admin/modules/collections/pinia/actions.ts | Removes consolidated actions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Summary
Converts the admin insights-projects and collections stores to Pinia setup stores. Store ids, APIs and initial values are unchanged, and both files carry MIT headers.
$reset()is not available on setup stores. Nothing calls it.useCollectionsStorehas no consumers today; CM-1633 covers that.Closes linuxfoundation/lfx-cdp-insights-ops#271