Skip to content

[WEB-6058] chore : add logic to handle save#8614

Open
iam-vipin wants to merge 1 commit intopreviewfrom
fix-intake_save
Open

[WEB-6058] chore : add logic to handle save#8614
iam-vipin wants to merge 1 commit intopreviewfrom
fix-intake_save

Conversation

@iam-vipin
Copy link
Member

@iam-vipin iam-vipin commented Feb 6, 2026

Description

The Intake Work Item was passing swrDescription={issue.description_html} to DescriptionInput, which caused the editor to re-sync content on every MobX store update (including after auto-save). This triggered the SWR sync effect that resets cursor position.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots and Media (if applicable)

Screen.Recording.2026-02-06.at.2.05.36.PM.mov

Test Scenarios

References

Summary by CodeRabbit

  • Refactor
    • Simplified internal component structure for improved maintainability.

@makeplane
Copy link

makeplane bot commented Feb 6, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

A prop swrDescription was removed from the DescriptionInput component and its call site in InboxIssueMainContent. This is a simple component signature change with no functional logic modifications.

Changes

Cohort / File(s) Summary
Prop Removal from DescriptionInput
apps/web/core/components/inbox/content/issue-root.tsx, @/components/editor/rich-text/description-input
Removed swrDescription prop from DescriptionInput component definition and updated call site in InboxIssueMainContent to no longer pass this prop.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A prop takes flight, no longer needed here,
swrDescription bids adieu with cheer!
Leaner code now dances, light and free,
One less line keeps the component spree.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'add logic to handle save' but the actual change is removing a prop that causes unwanted re-syncing, which is not about adding new save logic. Update the title to accurately reflect the change, such as '[WEB-6058] fix: remove swrDescription prop to prevent cursor reset on auto-save' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description adequately explains the issue, root cause, and solution with clear rationale. Type of change is properly marked. However, test scenarios and references sections lack detail.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-intake_save

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the cursor position was being reset in the description editor for Intake Work Items. The issue was caused by passing swrDescription={issue.description_html} to the DescriptionInput component, which triggered unnecessary content re-syncing on every MobX store update (including after auto-save).

Changes:

  • Removed the swrDescription prop from DescriptionInput in InboxIssueMainContent component

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants