Skip to content

Conversation

@vamsikrishnamathala
Copy link
Member

@vamsikrishnamathala vamsikrishnamathala commented Jan 15, 2026

Description

This update fixes the count update issue at Intake page sidebar.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

#8473

Summary by CodeRabbit

Release Notes

  • Refactor
    • Reorganized internal store architecture for improved code maintainability and separation of concerns.

✏️ Tip: You can customize this high-level summary in your review settings.

@vamsikrishnamathala vamsikrishnamathala self-assigned this Jan 15, 2026
@vamsikrishnamathala vamsikrishnamathala added the 🐛bug Something isn't working label Jan 15, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

The inbox issue store was refactored to depend on two specialized stores (IIssueRootStore and IProjectInboxStore) instead of a monolithic CoreRootStore. All InboxIssueStore instantiations and internal store references were updated correspondingly to use the new dependencies.

Changes

Cohort / File(s) Summary
Store Dependency Refactoring
apps/web/core/store/inbox/inbox-issue.store.ts, apps/web/core/store/inbox/project-inbox.store.ts
InboxIssueStore constructor refactored to accept two separate stores (IIssueRootStore, IProjectInboxStore) instead of CoreRootStore. Internal references to this.store updated to use this.issueStore. All instantiation sites in project-inbox.store.ts updated to pass this.store.issue and this as parameters.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Two stores now dance where one once stood,
Splitting concerns the way a code should!
References refactored, neat and tight,
Dependencies flow just right. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete. While the description mentions fixing a count update issue at the Intake page sidebar and correctly identifies it as a bug fix, it lacks critical details such as root cause analysis, implementation specifics, test scenarios, and relevant issue references. Add detailed explanation of the count update issue, how the refactoring fixes it, and include test scenarios demonstrating the fix. Also provide more context on the store refactoring changes and link to related issues.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the intake open work count issue, matching the refactoring of InboxIssueStore dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@makeplane
Copy link

makeplane bot commented Jan 15, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/core/store/inbox/inbox-issue.store.ts (1)

55-61: projectInboxStore is injected but never used.

The projectInboxStore parameter is passed to the constructor but never referenced in any method. Given the PR objective is to fix the "Intake open work count" issue, this dependency should likely be used to trigger count updates when inbox issue status changes (e.g., in updateInboxIssueStatus, updateInboxIssueDuplicateTo). Either complete the implementation by using this store, or remove the unused parameter.

🧹 Nitpick comments (1)
apps/web/core/store/inbox/inbox-issue.store.ts (1)

16-17: Consider using import type for type-only imports.

Since IIssueRootStore and IProjectInboxStore are only used as type annotations, consider using import type to ensure they are erased during compilation. As per coding guidelines, this respects the verbatimModuleSyntax flag.

💡 Suggested change
-import type { IIssueRootStore } from "../issue/root.store";
-import type { IProjectInboxStore } from "./project-inbox.store";
+import type { IIssueRootStore } from "../issue/root.store.ts";
+import type { IProjectInboxStore } from "./project-inbox.store.ts";

Note: If your TypeScript configuration doesn't require .ts extensions in imports, the current import paths are acceptable.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa1b4a1 and a391366.

📒 Files selected for processing (2)
  • apps/web/core/store/inbox/inbox-issue.store.ts
  • apps/web/core/store/inbox/project-inbox.store.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • apps/web/core/store/inbox/project-inbox.store.ts
  • apps/web/core/store/inbox/inbox-issue.store.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Enable TypeScript strict mode and ensure all files are fully typed

Files:

  • apps/web/core/store/inbox/project-inbox.store.ts
  • apps/web/core/store/inbox/inbox-issue.store.ts
**/*.{js,jsx,ts,tsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use Prettier with Tailwind plugin for code formatting, run pnpm fix:format

Files:

  • apps/web/core/store/inbox/project-inbox.store.ts
  • apps/web/core/store/inbox/inbox-issue.store.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,jsx,ts,tsx}: Use ESLint with shared config across packages, adhering to max warnings limits per package
Use camelCase for variable and function names, PascalCase for components and types
Use try-catch with proper error types and log errors appropriately

Files:

  • apps/web/core/store/inbox/project-inbox.store.ts
  • apps/web/core/store/inbox/inbox-issue.store.ts
🧠 Learnings (2)
📚 Learning: 2025-06-16T07:23:39.497Z
Learnt from: vamsikrishnamathala
Repo: makeplane/plane PR: 7214
File: web/core/store/issue/helpers/base-issues.store.ts:117-117
Timestamp: 2025-06-16T07:23:39.497Z
Learning: In the updateIssueDates method of BaseIssuesStore (web/core/store/issue/helpers/base-issues.store.ts), the projectId parameter is intentionally made optional to support override implementations in subclasses. The base implementation requires projectId and includes an early return check, but making it optional allows derived classes to override the method with different parameter requirements.

Applied to files:

  • apps/web/core/store/inbox/project-inbox.store.ts
  • apps/web/core/store/inbox/inbox-issue.store.ts
📚 Learning: 2025-12-12T15:20:36.542Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T15:20:36.542Z
Learning: Applies to packages/shared-state/**/*.{ts,tsx} : Maintain MobX stores in `packages/shared-state` using reactive patterns

Applied to files:

  • apps/web/core/store/inbox/inbox-issue.store.ts
🧬 Code graph analysis (2)
apps/web/core/store/inbox/project-inbox.store.ts (1)
apps/web/core/store/inbox/inbox-issue.store.ts (1)
  • InboxIssueStore (38-230)
apps/web/core/store/inbox/inbox-issue.store.ts (2)
apps/web/core/store/issue/root.store.ts (1)
  • IIssueRootStore (48-114)
apps/web/core/store/inbox/project-inbox.store.ts (1)
  • IProjectInboxStore (32-77)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
apps/web/core/store/inbox/project-inbox.store.ts (2)

250-254: LGTM!

The InboxIssueStore instantiation correctly passes this.store.issue (IIssueRootStore) and this (IProjectInboxStore) to match the updated constructor signature.


464-468: LGTM!

Consistent with the other InboxIssueStore instantiation, correctly passing the required store dependencies.

apps/web/core/store/inbox/inbox-issue.store.ts (3)

109-112: LGTM!

Correctly uses this.issueStore.issues.addIssue to sync the accepted issue to the local store.


197-210: LGTM!

Correctly uses this.issueStore.issueDetail for cycle and module operations, maintaining the original functionality with the refactored dependency.


222-229: LGTM!

Correctly uses this.issueStore.issueDetail.fetchActivities for fetching issue activity.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants