Repository navigation
refactor: convert the footer, user and activity-type stores to setup stores (CM-1565) - #5004
Conversation
…es (CM-1565) Refs linuxfoundation/lfx-cdp-insights-ops#265 Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
PR SummaryLow Risk Overview The activity-type store is now typed with Footer and user stores follow the same pattern: Reviewed by Cursor Bugbot for commit 5b64ac7. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking regressions or consumer compatibility issues; automated checks were not run.
0 open findings
What changed in this PR
Converts three frontend stores to Pinia setup stores while preserving their existing interfaces.
Changes:
- Consolidates footer and user state and actions into setup stores.
- Migrates the activity-type store to TypeScript with safe initial state.
- Removes the filter’s redundant type cast and migration comment.
| File | Description |
|---|---|
| frontend/src/shared/modules/filters/components/filterTypes/ActivityTypeFilter.vue | Removes redundant cast and comment. |
| frontend/src/modules/user/store/pinia/user.store.ts | Adds user setup store. |
| frontend/src/modules/user/store/pinia/state.ts | Removes separate user state. |
| frontend/src/modules/user/store/pinia/index.ts | Re-exports user setup store. |
| frontend/src/modules/user/store/pinia/actions.ts | Removes separate user actions. |
| frontend/src/modules/layout/pinia/state.ts | Removes separate footer state. |
| frontend/src/modules/layout/pinia/index.ts | Re-exports footer setup store. |
| frontend/src/modules/layout/pinia/footer.store.ts | Adds footer setup store. |
| frontend/src/modules/layout/pinia/actions.ts | Removes separate footer actions. |
| frontend/src/modules/activity/store/type/state.js | Removes JavaScript activity-type state. |
| frontend/src/modules/activity/store/type/index.ts | Adds TypeScript store export. |
| frontend/src/modules/activity/store/type/index.js | Removes JavaScript store definition. |
| frontend/src/modules/activity/store/type/activity-type.store.ts | Adds typed setup store and safe defaults. |
| frontend/src/modules/activity/store/type/actions.js | Removes separate activity-type 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 footer, user and activity-type stores to Pinia setup stores. The activity-type store moves from JavaScript to TypeScript and reuses
ActivityTypes.ts; the cast and marker CM-1531 left in the shared filter are removed, as that marker named this ticket.typesstarts as{ default: {}, custom: {} }instead of{}, so reading it before the first fetch no longer throws.$reset()is not available on setup stores. Nothing calls it.Closes linuxfoundation/lfx-cdp-insights-ops#265