[GIT-254] Refactor: Store consolidation to @core/store#9271
[GIT-254] Refactor: Store consolidation to @core/store#9271codingwolf-at wants to merge 10 commits into
Conversation
…rt paths in the core module
…new base timeline store
…cross the application
…git-254/store-consolidation-core-store
…s across various components
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR makes several core store base classes concrete, rewires root/page/member/timeline stores to the new ChangesStore migration and store contract updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
React Doctor found 24 issues in 9 files · 24 warnings · score 86 / 100 (Great) · vs 24 warnings
Reviewed by React Doctor for commit |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
|
@coderabbitai, review these changes. Most of the files have just been moved, so ignore them and review the rest. We are also cleaning things up as part of this refactor. |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/core/store/member/workspace/workspace-member.store.ts`:
- Around line 326-327: The optimistic revert snapshot in
workspaceMemberInvitations handling is unsafe because spreading
this.workspaceMemberInvitations?.[workspaceSlug] can throw before the try block
when the list is undefined. Update the snapshot logic in updateMemberInvitation
(and any similar workspace-member mutation paths) to default to an empty array
when the lookup is missing, and remove the no-unsafe-optional-chaining
suppression instead of hiding the issue.
In `@apps/web/core/store/pages/extended-base-page.ts`:
- Around line 16-17: The constructor in extended-base-page.ts uses two separate
oxlint-disable-next-line directives in one comment, so the no-unused-vars
suppression is not applied correctly. Update the suppressing comment on the
ExtendedBasePage constructor to use a single oxlint-disable-next-line directive
with a comma-separated list of rules, and keep it attached to the constructor
declaration so both no-useless-constructor and no-unused-vars are disabled
properly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a52579f7-285c-4398-a5b0-fd569e40c17c
📒 Files selected for processing (81)
apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsxapps/web/ce/store/analytics.store.tsapps/web/ce/store/command-palette.store.tsapps/web/ce/store/cycle/index.tsapps/web/ce/store/global-view.store.tsapps/web/ce/store/issue/epic/filter.store.tsapps/web/ce/store/issue/epic/index.tsapps/web/ce/store/issue/epic/issue.store.tsapps/web/ce/store/issue/helpers/base-issue-store.tsapps/web/ce/store/issue/helpers/base-issue.store.tsapps/web/ce/store/issue/helpers/filter-utils.tsapps/web/ce/store/issue/issue-details/root.store.tsapps/web/ce/store/issue/team-project/filter.store.tsapps/web/ce/store/issue/team-project/index.tsapps/web/ce/store/issue/team-project/issue.store.tsapps/web/ce/store/issue/team-views/filter.store.tsapps/web/ce/store/issue/team-views/index.tsapps/web/ce/store/issue/team-views/issue.store.tsapps/web/ce/store/issue/team/filter.store.tsapps/web/ce/store/issue/team/index.tsapps/web/ce/store/issue/team/issue.store.tsapps/web/ce/store/issue/workspace/issue.store.tsapps/web/ce/store/member/project-member.store.tsapps/web/ce/store/power-k.store.tsapps/web/ce/store/project-inbox.store.tsapps/web/ce/store/project-view.store.tsapps/web/ce/store/root.store.tsapps/web/ce/store/state.store.tsapps/web/ce/store/user/permission.store.tsapps/web/ce/store/workspace/index.tsapps/web/core/components/issues/delete-issue-modal.tsxapps/web/core/components/issues/issue-detail-widgets/relations/content.tsxapps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsxapps/web/core/components/issues/issue-detail-widgets/relations/title.tsxapps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsxapps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsxapps/web/core/components/issues/issue-layouts/list/headers/group-by-card.tsxapps/web/core/components/issues/issue-layouts/list/list-group.tsxapps/web/core/components/issues/relations/issue-list.tsxapps/web/core/components/project/create/common-attributes.tsxapps/web/core/hooks/store/estimates/use-estimate.tsapps/web/core/hooks/store/use-analytics.tsapps/web/core/hooks/store/use-command-palette.tsapps/web/core/hooks/store/use-cycle.tsapps/web/core/hooks/store/use-global-view.tsapps/web/core/hooks/store/use-issue-detail.tsapps/web/core/hooks/store/use-issues.tsapps/web/core/hooks/store/use-power-k.tsapps/web/core/hooks/store/use-project-inbox.tsapps/web/core/hooks/store/use-project-state.tsapps/web/core/hooks/store/use-project-view.tsapps/web/core/hooks/store/user/user-permissions.tsapps/web/core/hooks/use-timeline-chart.tsapps/web/core/lib/store-context.tsxapps/web/core/store/analytics.store.tsapps/web/core/store/base-command-palette.store.tsapps/web/core/store/base-power-k.store.tsapps/web/core/store/estimates/estimate.tsapps/web/core/store/estimates/project-estimate.store.tsapps/web/core/store/issue/helpers/base-issues.store.tsapps/web/core/store/issue/helpers/issue-filter-helper.store.tsapps/web/core/store/issue/issue-details/activity.store.tsapps/web/core/store/issue/issue-details/root.store.tsapps/web/core/store/issue/root.store.tsapps/web/core/store/member/index.tsapps/web/core/store/member/project/base-project-member.store.tsapps/web/core/store/member/workspace/workspace-member.store.tsapps/web/core/store/pages/base-page.tsapps/web/core/store/pages/extended-base-page.tsapps/web/core/store/pages/project-page.store.tsapps/web/core/store/pages/project-page.tsapps/web/core/store/root.store.tsapps/web/core/store/state.store.tsapps/web/core/store/timeline/base-timeline.store.tsapps/web/core/store/timeline/issues-timeline.store.tsapps/web/core/store/timeline/modules-timeline.store.tsapps/web/core/store/timeline/timeline.store.tsapps/web/core/store/user/base-permissions.store.tsapps/web/core/store/user/index.tsapps/web/core/store/workspace/index.tsapps/web/tsconfig.json
💤 Files with no reviewable changes (33)
- apps/web/ce/store/analytics.store.ts
- apps/web/ce/store/issue/team-views/issue.store.ts
- apps/web/ce/store/issue/helpers/filter-utils.ts
- apps/web/ce/store/issue/team/filter.store.ts
- apps/web/ce/store/command-palette.store.ts
- apps/web/core/store/estimates/estimate.ts
- apps/web/ce/store/issue/team-views/filter.store.ts
- apps/web/ce/store/issue/helpers/base-issue-store.ts
- apps/web/ce/store/root.store.ts
- apps/web/ce/store/project-inbox.store.ts
- apps/web/ce/store/issue/team/issue.store.ts
- apps/web/ce/store/issue/helpers/base-issue.store.ts
- apps/web/ce/store/issue/epic/issue.store.ts
- apps/web/ce/store/project-view.store.ts
- apps/web/ce/store/issue/team-project/filter.store.ts
- apps/web/ce/store/issue/team-project/index.ts
- apps/web/ce/store/issue/workspace/issue.store.ts
- apps/web/ce/store/member/project-member.store.ts
- apps/web/ce/store/issue/team-views/index.ts
- apps/web/ce/store/workspace/index.ts
- apps/web/ce/store/state.store.ts
- apps/web/ce/store/power-k.store.ts
- apps/web/core/components/issues/delete-issue-modal.tsx
- apps/web/ce/store/issue/team/index.ts
- apps/web/ce/store/user/permission.store.ts
- apps/web/ce/store/issue/epic/filter.store.ts
- apps/web/ce/store/issue/epic/index.ts
- apps/web/ce/store/issue/team-project/issue.store.ts
- apps/web/ce/store/global-view.store.ts
- apps/web/ce/store/issue/issue-details/root.store.ts
- apps/web/tsconfig.json
- apps/web/ce/store/cycle/index.ts
- apps/web/core/components/issues/relations/issue-list.tsx
…git-254/store-consolidation-core-store
| import { useTimeLineRelationOptions } from "@/components/relations"; | ||
| import type { TIssueRelationTypes } from "@plane/types"; | ||
| // local helpers | ||
| import { IssueActivityBlockComponent } from "./"; |
There was a problem hiding this comment.
React Doctor · react-doctor/no-barrel-import (warning)
This ships extra code to your users & slows page load. Import directly from "./helpers/activity-block".
Fix → Import from the direct path: import { Button } from './components/Button' instead of ./components
| // local imports | ||
| import { GroupDragOverlay } from "../group-drag-overlay"; | ||
| import type { TRenderQuickActions } from "../list/list-view-types"; | ||
| import { KanbanQuickAddIssueButton, QuickAddIssueRoot } from "../quick-add"; |
There was a problem hiding this comment.
React Doctor · react-doctor/no-barrel-import (warning)
This ships extra code to your users & slows page load. Import directly from: "../quick-add/button/kanban", "../quick-add/root".
Fix → Import from the direct path: import { Button } from './components/Button' instead of ./components
| // | ||
| // local imports | ||
| import { GroupDragOverlay } from "../group-drag-overlay"; | ||
| import { ListQuickAddIssueButton, QuickAddIssueRoot } from "../quick-add"; |
There was a problem hiding this comment.
React Doctor · react-doctor/no-barrel-import (warning)
This ships extra code to your users & slows page load. Import directly from: "../quick-add/button/list", "../quick-add/root".
Fix → Import from the direct path: import { Button } from './components/Button' instead of ./components
| import { RootStore } from "@/plane-web/store/root.store"; | ||
| import { RootStore } from "@/store/root.store"; | ||
|
|
||
| export let rootStore = new RootStore(); |
There was a problem hiding this comment.
React Doctor · react-doctor/only-export-components (warning)
This file exports non-components, so Fast Refresh can't safely preserve component state.
Fix → Move non-component exports out of component files so Fast Refresh can preserve component state instead of full-reloading.
Description
Moved stores from
apps/web/ce/storetoapps/web/core/storeType of Change
Summary by CodeRabbit
Bug Fixes
Refactor
Chores