Skip to content

Fix: Intake open count not updating after accept, decline, or duplicate - #8474

Open
a-faqahmad wants to merge 1 commit into
makeplane:previewfrom
a-faqahmad:fix/intake-open-count-sync
Open

Fix: Intake open count not updating after accept, decline, or duplicate#8474
a-faqahmad wants to merge 1 commit into
makeplane:previewfrom
a-faqahmad:fix/intake-open-count-sync

Conversation

@a-faqahmad

@a-faqahmad a-faqahmad commented Dec 30, 2025

Copy link
Copy Markdown

This pull request updates the inbox issue actions in inbox-issue-header.tsx to ensure that the inbox issue list is always refreshed after key actions (accept, decline, duplicate). This helps keep the UI in sync with the latest data after any status changes.

Inbox issue list refresh improvements:

  • The fetchInboxIssues function from useProjectInbox is now imported and used to refresh the issue list after accepting, declining, or marking an issue as duplicate.
  • After accepting, declining, or marking an issue as duplicate, fetchInboxIssues is called to reload the inbox issues, ensuring the UI reflects the latest state. [1] [2]

Fixes #8473


Note

Ensures the intake inbox stays in sync after key actions.

  • Import and invoke fetchInboxIssues from useProjectInbox after accept, decline, and mark as duplicate actions in inbox-issue-header.tsx to refresh the list (with "filter-loading"), wrapped in try/catch with console logging
  • No changes to snooze/delete flows or navigation

Written by Cursor Bugbot for commit fb92856. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Bug Fixes

    • Improved workspace setup so seeded projects, issues, pages, cycles, modules, labels, and views are created reliably.
    • Ensured the system-generated workspace member is added before initial data is created.
  • Chores

    • Added temporary automation files and generated workspace metadata to ignore rules.
    • Applied minor formatting updates to configuration files.

Copilot AI review requested due to automatic review settings December 30, 2025 14:09
@CLAassistant

CLAassistant commented Dec 30, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Dec 30, 2025

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The workspace seed task now creates a bot workspace member and explicitly saves seeded records with automatic user assignment disabled. The change also adds ignore rules and formatting-only updates across configuration files.

Changes

Workspace seed persistence

Layer / File(s) Summary
Workspace membership and seeded records
apps/api/plane/bgtasks/workspace_seed_task.py
The seed task creates a WorkspaceMember for the generated bot user. Projects, states, labels, issues, pages, cycles, modules, and issue views now use explicit saves with automatic user assignment disabled.

Repository cleanup

Layer / File(s) Summary
Ignore rules and formatting updates
.gitignore, apps/api/plane/app/views/workspace/base.py, apps/*/postcss.config.js, packages/*/postcss.config.js
The repository ignores temporary push files and branch_structure.json. Configuration files receive whitespace-only formatting updates. Workspace creation lookup formatting changes without runtime behavior changes.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: mguptahub

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The summarized changes do not include inbox issue refresh logic, so the objective for issue #8473 is not demonstrated. Add the required inbox issue changes that call fetchInboxIssues after accept, decline, and duplicate actions, then verify the open count updates.
Out of Scope Changes check ⚠️ Warning The changes modify workspace seeding, PostCSS formatting, and .gitignore entries, which are unrelated to the linked Intake issue. Remove unrelated workspace seeding, PostCSS formatting, and .gitignore changes, or link issues that justify those changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the intended fix for the stale Intake open count after accept, decline, or duplicate actions.
Description check ✅ Passed The description explains the intended fix and references issue #8473, but it omits the selected change type and test scenarios.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/intake-open-count-sync
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes a bug where the inbox issue count was not updating after performing accept, decline, or duplicate actions on inbox issues. The fix ensures the inbox issue list is refreshed after these status changes to keep the UI synchronized with the latest data.

Key changes:

  • Added fetchInboxIssues to the destructured hooks from useProjectInbox
  • Inserted fetchInboxIssues calls after accept, decline, and duplicate status updates to refresh the inbox list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a37e5e2 and 5d0f435.

📒 Files selected for processing (1)
  • apps/web/core/components/inbox/content/inbox-issue-header.tsx
🧰 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/components/inbox/content/inbox-issue-header.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Enable TypeScript strict mode and ensure all files are fully typed

Files:

  • apps/web/core/components/inbox/content/inbox-issue-header.tsx
**/*.{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/components/inbox/content/inbox-issue-header.tsx
**/*.{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/components/inbox/content/inbox-issue-header.tsx
🧬 Code graph analysis (1)
apps/web/core/components/inbox/content/inbox-issue-header.tsx (1)
apps/space/core/store/publish/publish.store.ts (1)
  • workspaceSlug (93-95)
⏰ 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). (3)
  • GitHub Check: Agent
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (1)
apps/web/core/components/inbox/content/inbox-issue-header.tsx (1)

62-62: LGTM! Function extraction is correct.

The fetchInboxIssues function is properly extracted from the hook and will be used to refresh the inbox list after actions.

Comment thread apps/web/core/components/inbox/content/inbox-issue-header.tsx
Comment thread apps/web/core/components/inbox/content/inbox-issue-header.tsx
Comment thread apps/web/core/components/inbox/content/inbox-issue-header.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread apps/web/core/components/inbox/content/inbox-issue-header.tsx Outdated
Comment thread apps/web/core/components/inbox/content/inbox-issue-header.tsx Outdated
@a-faqahmad a-faqahmad changed the title Bug: Intake open count not updating after accept, decline, or duplicate Fix: Intake open count not updating after accept, decline, or duplicate Dec 30, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/api/plane/bgtasks/workspace_seed_task.py`:
- Around line 281-288: Update seeded record creation in the workspace seed task
to use explicit audit-preserving saves for WorkspaceMember, IssueSequence,
IssueActivity, IssueLabel, CycleIssue, and ModuleIssue. Construct each affected
instance instead of using manager-level create calls, then invoke save with
bot_user.id as created_by_id and disable_auto_set_user=True; preserve the
existing field values and relationships.
🪄 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 Plus

Run ID: fdcb3d95-746b-4480-b588-9f07bf0f5ff4

📥 Commits

Reviewing files that changed from the base of the PR and between fb92856 and 2d6b71f.

📒 Files selected for processing (10)
  • .gitignore
  • apps/admin/postcss.config.js
  • apps/api/plane/app/views/workspace/base.py
  • apps/api/plane/bgtasks/workspace_seed_task.py
  • apps/space/postcss.config.js
  • apps/web/postcss.config.js
  • packages/editor/postcss.config.js
  • packages/propel/postcss.config.js
  • packages/tailwind-config/postcss.config.js
  • packages/ui/postcss.config.js

Comment on lines +281 to +288
issue = Issue(
**issue_seed,
state_id=states_map[state_id],
project_id=project_map[project_id],
workspace=workspace,
created_by_id=bot_user.id,
)
issue.save(created_by_id=bot_user.id, disable_auto_set_user=True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 8 \
  'class BaseModel|class WorkspaceMember|def save|disable_auto_set_user|get_current_user' \
  apps/api/plane

rg -n -C 3 \
  'WorkspaceMember\.objects\.create|IssueSequence\.objects\.create|IssueActivity\.objects\.create|IssueLabel\.objects\.create|CycleIssue\.objects\.create|ModuleIssue\.objects\.create' \
  apps/api/plane/bgtasks/workspace_seed_task.py

Repository: makeplane/plane

Length of output: 50371


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workspace seed task relevant lines =="
sed -n '240,545p' apps/api/plane/bgtasks/workspace_seed_task.py

echo
echo "== BaseModel save =="
sed -n '1,45p' apps/api/plane/db/models/base.py

echo
echo "== WorkspaceMember model save inheritance =="
sed -n '188,212p' apps/api/plane/db/models/workspace.py

echo
echo "== Manager-based create occurrences in workspace_seed_task.py =="
rg -n -C 3 \
  '(IssueSequence|IssueActivity|IssueLabel|CycleIssue|ModuleIssue|WorkspaceMember)\.objects\.create' \
  apps/api/plane/bgtasks/workspace_seed_task.py

echo
echo "== Models save overrides relevant to create relationships =="
sed -n '145,215p' apps/api/plane/db/models/issue.py
sed -n '1,105p' apps/api/plane/db/models/label.py
sed -n '60,110p' apps/api/plane/db/models/cycle.py
sed -n '90,135p' apps/api/plane/db/models/module.py

Repository: makeplane/plane

Length of output: 23438


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== candidate files matching IssueSequence/IssueActivity/IssueLabel models =="
fd -i 'issue.*\.py|label.*\.py|cycle.*\.py|module.*\.py|workspace.*\.py' apps/api/plane/db/models | sed -n '1,120p'

echo
echo "== class definitions and custom saves for related seed models =="
for f in apps/api/plane/db/models/issue.py apps/api/plane/db/models/label.py apps/api/plane/db/models/cycle.py apps/api/plane/db/models/module.py apps/api/plane/db/models/workspace.py; do
  echo "--- $f"
  rg -n -C 6 'class IssueSequence|class IssueActivity|class IssueLabel|class CycleIssue|class ModuleIssue|def save\(.*disable_auto_set_user|class .*BaseModel|class ProjectBaseModel' "$f"
done

echo
echo "== custom save usages in seed task =="
rg -n -C 2 '\.save\(created_by_id|disable_auto_set_user|objects\.create\(' apps/api/plane/bgtasks/workspace_seed_task.py

Repository: makeplane/plane

Length of output: 22254


Use the explicit audit-preserving save path for all seeded records.

WorkspaceMember.objects.create at lines 531-536 and the manager-level related issue record creation at lines 289-335 run BaseModel.save() without disable_auto_set_user=True. During seeded data creation, these models fall back to get_current_user() for created_by_id.

Construct the affected records and call save(created_by_id=bot_user.id, disable_auto_set_user=True) for WorkspaceMember, IssueSequence, IssueActivity, IssueLabel, CycleIssue, and ModuleIssue.

🤖 Prompt for 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.

In `@apps/api/plane/bgtasks/workspace_seed_task.py` around lines 281 - 288, Update
seeded record creation in the workspace seed task to use explicit
audit-preserving saves for WorkspaceMember, IssueSequence, IssueActivity,
IssueLabel, CycleIssue, and ModuleIssue. Construct each affected instance
instead of using manager-level create calls, then invoke save with bot_user.id
as created_by_id and disable_auto_set_user=True; preserve the existing field
values and relationships.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Intake open count not updating after accept, decline, or duplicate

4 participants