Skip to content

fix(web): show sub-work items on the parent in local - #9804

Open
RealBhupesh wants to merge 1 commit into
makeplane:previewfrom
RealBhupesh:fix/show-sub-work-items-local
Open

fix(web): show sub-work items on the parent in local#9804
RealBhupesh wants to merge 1 commit into
makeplane:previewfrom
RealBhupesh:fix/show-sub-work-items-local

Conversation

@RealBhupesh

@RealBhupesh RealBhupesh commented Sep 9, 2026

Copy link
Copy Markdown

Description

Sub-work items added to a parent did not appear under the collapsible in local. `setSubIssueHelpers` toggles array membership, and React Strict Mode runs the mount fetch twice. The second completion removed `issue_visibility`, so the list stayed empty even though the fetch succeeded.

This skips a second in-flight fetch, only adds visibility when it is missing, and clears the preview loader with the same toggle (empty string was a no-op).

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)

N/A — full local Plane stack was not run. The reporter already isolated the `issue_visibility` gate in `sub-issues/content.tsx`.

Test Scenarios

  • Local dev: add a sub-work item to a parent; it appears under the collapsible without a refresh
  • Expand/collapse nested sub-items still works
  • Cloud/production (no Strict Mode double-mount) still shows sub-items

References

Fixes #9612

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes
    • Improved sub-issue loading to prevent duplicate fetches.
    • Prevented redundant updates when an issue is already visible.
    • Improved loading-state cleanup to avoid clearing unrelated state.

setSubIssueHelpers toggles membership, and React Strict Mode runs the
mount fetch twice, so the second completion removed issue_visibility
and hid the list. Skip in-flight fetches and only add visibility once.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 9, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~1 changed · 🔴 -0 removed · 1 flow · 1 file · commit d40cd58


Architecture

Architecture diagram for makeplane/plane at d40cd58

1 component touched across 3 lanes.

Open the interactive canvas


Data flow

Data flow diagram for makeplane/plane at d40cd58

Sub-issues fetch sequence

Open the interactive canvas


Drill down
Client Applications — 1 component
🟡 CHANGED Plane Web App

Next.js frontend application rendering the issue detail workspace and sub-issue widgets.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."

🪧 More tips
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • GitHub will not let you zoom an image in a comment. The link under each diagram opens it on an interactive canvas, where you can zoom, pan and step through the flow.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.
  • PR Lens is free for open source. A star on the repository is what keeps it going.
  • Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Come say hi on Discord

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 867d5156-c249-472e-afd9-d1ff31b91133

📥 Commits

Reviewing files that changed from the base of the PR and between 1fec307 and d40cd58.

📒 Files selected for processing (1)
  • apps/web/core/components/issues/issue-detail-widgets/sub-issues/content.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The sub-issue fetch handler now prevents duplicate fetches, avoids redundant visibility updates, and preserves loader state during cleanup.

Changes

Sub-issue fetch handling

Layer / File(s) Summary
Fetch guards and state cleanup
apps/web/core/components/issues/issue-detail-widgets/sub-issues/content.tsx
handleFetchSubIssues skips requests when the parent issue is visible or already loading. It conditionally updates issue_visibility and clears preview_loader only when set.

Priority: ➖ Normal

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

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d40cd

This change restores visibility of sub-items under parent issues while avoiding duplicate fetches and unnecessary loader or visibility updates. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing local display of sub-work items on the parent issue.
Description check ✅ Passed The description includes all template sections, explains the bug and fix, identifies the change as a bug fix, and references issue #9612. Test scenarios are listed, although they were not run.
Linked Issues check ✅ Passed The changes address issue #9612 by preventing duplicate in-flight fetches, preserving parent visibility, and fixing preview loader cleanup. These changes directly target the local sub-item display fai…
Out of Scope Changes check ✅ Passed The changes are limited to sub-issue fetching and visibility handling in the relevant component. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
🧪 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.

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]: Sub-item is not showing in ticket in local

1 participant