Skip to content

[WEB-2146] fix: issue peek overview activity mutation#5284

Closed
anmolsinghbhatia wants to merge 2 commits intopreviewfrom
fix-issue-peek-overview-activity
Closed

[WEB-2146] fix: issue peek overview activity mutation#5284
anmolsinghbhatia wants to merge 2 commits intopreviewfrom
fix-issue-peek-overview-activity

Conversation

@anmolsinghbhatia
Copy link
Collaborator

@anmolsinghbhatia anmolsinghbhatia commented Aug 1, 2024

Changes:

This PR fixes a bug in the peek overview activity where updating an issue did not properly trigger a mutation, requiring a reload to see the changes. The necessary adjustments have been made to ensure that updates now reflect correctly without needing a reload.

Reference:

[WEB-2146]

Summary by CodeRabbit

  • New Features

    • Enhanced issue management with new optional parameters allowing for improved synchronization control during updates and removals.
    • Added flexibility in handling issues within cycles and modules through optional synchronization flags.
  • Bug Fixes

    • Refined issue update processes to ensure proper synchronization behaviors based on new parameters.
  • Documentation

    • Updated method signatures in the API documentation to reflect new optional parameters for enhanced clarity.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 1, 2024

Walkthrough

The modifications introduce enhanced control over issue management within the application. By adding optional boolean parameters, such as shouldSync and others, the changes allow developers to fine-tune synchronization behavior for various operations related to issues, cycles, and modules. This shift aims to improve performance and flexibility while maintaining the original functionality of the methods involved.

Changes

Files Change Summary
web/core/components/issues/peek-overview/root.tsx Added a boolean parameter to multiple issue-related methods to improve functionality and control flow.
web/core/store/issue/helpers/base-issues.store.ts Introduced shouldSync parameter to enhance issue synchronization control in various methods.
web/core/store/issue/project/issue.store.ts Updated updateIssue method signature to include shouldSync for improved synchronization handling.

Poem

🐇 In fields of code, we hop and play,
New flags and tweaks brighten our day!
With syncs in tow, we dance with glee,
Managing issues, oh so free!
So let’s rejoice, let changes unfold,
A tale of progress, joy to behold! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@anmolsinghbhatia anmolsinghbhatia marked this pull request as ready for review August 1, 2024 12:51
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: 1

Outside diff range, codebase verification and nitpick comments (1)
web/core/store/issue/project/issue.store.ts (1)

40-46: Update all instances of updateIssue to include the shouldSync parameter.

The updateIssue function has been modified to include an optional shouldSync parameter. However, the usage of this function across the codebase does not consistently reflect this change. Please update all instances to include the shouldSync parameter where applicable.

  • Files to update:
    • web/core/store/issue/issue-details/sub_issues.store.ts
    • web/core/store/issue/issue-details/root.store.ts
    • web/core/store/issue/issue-details/link.store.ts
    • web/core/store/issue/issue-details/issue.store.ts
    • web/core/store/issue/issue-details/attachment.store.ts
    • web/core/store/issue/project/issue.store.ts
    • web/core/store/issue/profile/issue.store.ts
    • web/core/store/issue/project-views/issue.store.ts
    • web/core/store/issue/workspace/issue.store.ts
    • web/core/store/issue/issue.store.ts
    • web/core/store/inbox/inbox-issue.store.ts
    • web/core/store/issue/draft/issue.store.ts
    • web/core/store/issue/helpers/base-issues.store.ts
    • web/core/store/issue/module/issue.store.ts
    • web/core/store/issue/cycle/issue.store.ts
    • web/core/hooks/use-issues-actions.tsx
    • web/core/hooks/use-group-dragndrop.ts
    • web/core/components/issues/peek-overview/root.tsx
    • web/core/components/issues/issue-layouts/utils.tsx
    • web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-table.tsx
    • web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx
    • web/core/components/issues/issue-layouts/spreadsheet/issue-row.tsx
    • web/core/components/issues/issue-layouts/spreadsheet/issue-column.tsx
    • web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx
    • web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx
    • web/core/components/issues/issue-layouts/properties/all-properties.tsx
    • web/core/components/issues/issue-detail/root.tsx
    • web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx
    • web/core/components/issues/issue-layouts/kanban/block.tsx
    • web/core/components/issues/issue-layouts/kanban/swimlanes.tsx
    • web/core/components/issues/issue-layouts/kanban/kanban-group.tsx
    • web/core/components/issues/issue-layouts/kanban/blocks-list.tsx
    • web/core/components/issues/issue-layouts/list/list-group.tsx
    • web/core/components/issues/issue-layouts/list/default.tsx
    • web/core/components/issues/issue-layouts/list/blocks-list.tsx
    • web/core/components/issues/issue-layouts/list/block.tsx
    • web/core/components/issues/issue-layouts/list/block-root.tsx
    • web/core/components/issues/issue-detail/label/root.tsx
    • web/core/components/issues/issue-detail/label/select/root.tsx
    • web/core/components/issues/issue-detail/label/label-list-item.tsx
    • web/core/components/issues/issue-detail/label/create-label.tsx
    • web/core/components/issues/issue-layouts/calendar/utils.ts
    • web/core/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx
    • web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx
    • web/core/components/issues/issue-modal/modal.tsx
    • web/core/components/issues/issue-detail-widgets/relations/helper.tsx
    • web/core/components/inbox/content/issue-root.tsx
    • web/core/components/command-palette/actions/issue-actions/change-priority.tsx
    • web/core/components/command-palette/actions/issue-actions/change-state.tsx
    • web/core/components/command-palette/actions/issue-actions/change-assignee.tsx
    • web/core/components/command-palette/actions/issue-actions/actions-list.tsx
Analysis chain

LGTM! But verify the function usage in the codebase.

The addition of the optional shouldSync parameter enhances the flexibility of the updateIssue method. Ensure that all function calls to updateIssue match the new signature.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `updateIssue` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type typescript -A 5 $'updateIssue'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify all function calls to `updateIssue` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type ts -A 5 $'updateIssue'

Length of output: 131744


Script:

#!/bin/bash
# Description: Verify all function calls to `updateIssue` include the new `shouldSync` parameter.

# Test: Search for the function usage including the `shouldSync` parameter. Expect: Occurrences of the new signature.
rg --type ts 'updateIssue\(.*shouldSync'

Length of output: 42


Script:

#!/bin/bash
# Description: Verify all function calls to `updateIssue` and manually check for the `shouldSync` parameter.

# Test: Search for all instances of the `updateIssue` function. Expect: Review the context of each instance.
rg --type ts 'updateIssue'

Length of output: 30813

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c89fe9a and 3e60d39.

Files selected for processing (3)
  • web/core/components/issues/peek-overview/root.tsx (6 hunks)
  • web/core/store/issue/helpers/base-issues.store.ts (14 hunks)
  • web/core/store/issue/project/issue.store.ts (1 hunks)
Additional context used
Biome
web/core/store/issue/helpers/base-issues.store.ts

[error] 912-912: The catch clause that only rethrows the original error is redundant.

These unnecessary catch clauses can be confusing. It is recommended to remove them.

(lint/complexity/noUselessCatch)

Additional comments not posted (10)
web/core/components/issues/peek-overview/root.tsx (5)

69-69: LGTM!

The addition of the true parameter to the updateIssue method call is consistent with the PR objectives.


164-164: LGTM!

The addition of the true parameter to the addCycleToIssue method call is consistent with the PR objectives.


193-193: LGTM!

The addition of the true parameter to the addIssueToCycle method call is consistent with the PR objectives.


222-222: LGTM!

The addition of the true parameter to the removeIssueFromCycle method call is consistent with the PR objectives.


284-290: LGTM!

The addition of the true parameter to the removeIssuesFromModule method call is consistent with the PR objectives.

web/core/store/issue/helpers/base-issues.store.ts (5)

84-86: LGTM!

The addition of the optional shouldSync parameter enhances the flexibility of the addIssueToCycle method.


87-93: LGTM!

The addition of the optional shouldSync parameter enhances the flexibility of the removeIssueFromCycle method.


94-99: LGTM!

The addition of the optional shouldSync parameter enhances the flexibility of the addCycleToIssue method.


114-115: LGTM!

The addition of the optional shouldSync parameter enhances the flexibility of the removeIssuesFromModule method.


122-123: LGTM!

The addition of the optional shouldSync parameter enhances the flexibility of the changeModulesInIssue method.

this.issueUpdate(workspaceSlug, projectId, issueId, { cycle_id: null }, false);
this.issueUpdate(workspaceSlug, projectId, issueId, { cycle_id: null }, shouldSync);
} catch (error) {
throw error;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove redundant catch clause.

The catch clause that only rethrows the original error is redundant and can be removed to simplify the code.

-    } catch (error) {
-      throw error;
    }
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
throw error;
Tools
Biome

[error] 912-912: The catch clause that only rethrows the original error is redundant.

These unnecessary catch clauses can be confusing. It is recommended to remove them.

(lint/complexity/noUselessCatch)

@rahulramesha
Copy link
Contributor

Closing in favour of #5289

@sriramveeraghanta sriramveeraghanta deleted the fix-issue-peek-overview-activity branch February 10, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants