Skip to content

Unmount spreadsheetContent entirely when node is invalid#4076

Open
ayolab wants to merge 3 commits into
mainfrom
ayolab/unmount-spreadsheetContent-entirely-on-disable
Open

Unmount spreadsheetContent entirely when node is invalid#4076
ayolab wants to merge 3 commits into
mainfrom
ayolab/unmount-spreadsheetContent-entirely-on-disable

Conversation

@ayolab

@ayolab ayolab commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ayolab, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: be517bc8-dd2b-4a07-b398-c8ee72b80dca

📥 Commits

Reviewing files that changed from the base of the PR and between f417110 and 189ffa9.

📒 Files selected for processing (1)
  • src/components/spreadsheet-view/spreadsheet/spreadsheet-content/spreadsheet-content.tsx
📝 Walkthrough

Walkthrough

The disabled prop and its invalid-node Alert UI are removed from SpreadsheetContent, which now always renders the equipment table. Spreadsheet now conditionally renders a warning Alert when disabled, otherwise renders SpreadsheetContent without the disabled prop.

Changes

Invalid node UI relocation

Layer / File(s) Summary
Remove disabled handling from SpreadsheetContent
src/components/spreadsheet-view/spreadsheet/spreadsheet-content/spreadsheet-content.tsx
Drops the disabled prop from SpreadsheetContentProps, removes its destructuring, deletes the invalidNode style and the isGridReady-resetting useEffect, and renders EquipmentTable inside Box unconditionally instead of branching on disabled.
Add disabled-driven Alert in Spreadsheet
src/components/spreadsheet-view/spreadsheet/spreadsheet.tsx
Imports Alert and FormattedMessage, adds positioning styles, and conditionally renders an "InvalidNode" Alert when disabled or SpreadsheetContent (no longer passed a disabled prop) otherwise.

Suggested reviewers: souissimai, basseche

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so there is no meaningful summary to assess. Add a brief description of the invalid-node spreadsheet rendering change and its intended behavior.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: SpreadsheetContent is no longer rendered when the node is invalid.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coderabbitai coderabbitai 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.

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 `@src/components/spreadsheet-view/spreadsheet/spreadsheet.tsx`:
- Around line 33-40: The local styles object for SpreadsheetView is currently
untyped, causing invalidNode.position to widen and potentially break the Alert
sx prop type-check. Update the styles definition in spreadsheet.tsx to match
spreadsheet-content.tsx by importing MuiStyles and declaring the object with as
const satisfies MuiStyles, so styles.invalidNode keeps the correct literal types
for use in Alert.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d50a8f3-87df-4306-b683-a266b8a2bb77

📥 Commits

Reviewing files that changed from the base of the PR and between 5fb8819 and 1aca457.

📒 Files selected for processing (2)
  • src/components/spreadsheet-view/spreadsheet/spreadsheet-content/spreadsheet-content.tsx
  • src/components/spreadsheet-view/spreadsheet/spreadsheet.tsx

Comment thread src/components/spreadsheet-view/spreadsheet/spreadsheet.tsx
Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
@ayolab ayolab force-pushed the ayolab/unmount-spreadsheetContent-entirely-on-disable branch from 1aca457 to 78ed8ae Compare July 3, 2026 10:35
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@ayolab ayolab requested a review from sBouzols July 7, 2026 06:25
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.

1 participant