[WEB-2146] fix: issue peek overview activity mutation#5284
[WEB-2146] fix: issue peek overview activity mutation#5284anmolsinghbhatia wants to merge 2 commits intopreviewfrom
Conversation
WalkthroughThe modifications introduce enhanced control over issue management within the application. By adding optional boolean parameters, such as Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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 ofupdateIssueto include theshouldSyncparameter.The
updateIssuefunction has been modified to include an optionalshouldSyncparameter. However, the usage of this function across the codebase does not consistently reflect this change. Please update all instances to include theshouldSyncparameter where applicable.
- Files to update:
web/core/store/issue/issue-details/sub_issues.store.tsweb/core/store/issue/issue-details/root.store.tsweb/core/store/issue/issue-details/link.store.tsweb/core/store/issue/issue-details/issue.store.tsweb/core/store/issue/issue-details/attachment.store.tsweb/core/store/issue/project/issue.store.tsweb/core/store/issue/profile/issue.store.tsweb/core/store/issue/project-views/issue.store.tsweb/core/store/issue/workspace/issue.store.tsweb/core/store/issue/issue.store.tsweb/core/store/inbox/inbox-issue.store.tsweb/core/store/issue/draft/issue.store.tsweb/core/store/issue/helpers/base-issues.store.tsweb/core/store/issue/module/issue.store.tsweb/core/store/issue/cycle/issue.store.tsweb/core/hooks/use-issues-actions.tsxweb/core/hooks/use-group-dragndrop.tsweb/core/components/issues/peek-overview/root.tsxweb/core/components/issues/issue-layouts/utils.tsxweb/core/components/issues/issue-layouts/spreadsheet/spreadsheet-table.tsxweb/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsxweb/core/components/issues/issue-layouts/spreadsheet/issue-row.tsxweb/core/components/issues/issue-layouts/spreadsheet/issue-column.tsxweb/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsxweb/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsxweb/core/components/issues/issue-layouts/properties/all-properties.tsxweb/core/components/issues/issue-detail/root.tsxweb/core/components/issues/issue-layouts/kanban/base-kanban-root.tsxweb/core/components/issues/issue-layouts/kanban/block.tsxweb/core/components/issues/issue-layouts/kanban/swimlanes.tsxweb/core/components/issues/issue-layouts/kanban/kanban-group.tsxweb/core/components/issues/issue-layouts/kanban/blocks-list.tsxweb/core/components/issues/issue-layouts/list/list-group.tsxweb/core/components/issues/issue-layouts/list/default.tsxweb/core/components/issues/issue-layouts/list/blocks-list.tsxweb/core/components/issues/issue-layouts/list/block.tsxweb/core/components/issues/issue-layouts/list/block-root.tsxweb/core/components/issues/issue-detail/label/root.tsxweb/core/components/issues/issue-detail/label/select/root.tsxweb/core/components/issues/issue-detail/label/label-list-item.tsxweb/core/components/issues/issue-detail/label/create-label.tsxweb/core/components/issues/issue-layouts/calendar/utils.tsweb/core/components/issues/issue-layouts/calendar/quick-add-issue-form.tsxweb/core/components/issues/issue-layouts/gantt/base-gantt-root.tsxweb/core/components/issues/issue-modal/modal.tsxweb/core/components/issues/issue-detail-widgets/relations/helper.tsxweb/core/components/inbox/content/issue-root.tsxweb/core/components/command-palette/actions/issue-actions/change-priority.tsxweb/core/components/command-palette/actions/issue-actions/change-state.tsxweb/core/components/command-palette/actions/issue-actions/change-assignee.tsxweb/core/components/command-palette/actions/issue-actions/actions-list.tsxAnalysis chain
LGTM! But verify the function usage in the codebase.
The addition of the optional
shouldSyncparameter enhances the flexibility of theupdateIssuemethod. Ensure that all function calls toupdateIssuematch 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
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
trueparameter to theupdateIssuemethod call is consistent with the PR objectives.
164-164: LGTM!The addition of the
trueparameter to theaddCycleToIssuemethod call is consistent with the PR objectives.
193-193: LGTM!The addition of the
trueparameter to theaddIssueToCyclemethod call is consistent with the PR objectives.
222-222: LGTM!The addition of the
trueparameter to theremoveIssueFromCyclemethod call is consistent with the PR objectives.
284-290: LGTM!The addition of the
trueparameter to theremoveIssuesFromModulemethod 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
shouldSyncparameter enhances the flexibility of theaddIssueToCyclemethod.
87-93: LGTM!The addition of the optional
shouldSyncparameter enhances the flexibility of theremoveIssueFromCyclemethod.
94-99: LGTM!The addition of the optional
shouldSyncparameter enhances the flexibility of theaddCycleToIssuemethod.
114-115: LGTM!The addition of the optional
shouldSyncparameter enhances the flexibility of theremoveIssuesFromModulemethod.
122-123: LGTM!The addition of the optional
shouldSyncparameter enhances the flexibility of thechangeModulesInIssuemethod.
| this.issueUpdate(workspaceSlug, projectId, issueId, { cycle_id: null }, false); | ||
| this.issueUpdate(workspaceSlug, projectId, issueId, { cycle_id: null }, shouldSync); | ||
| } catch (error) { | ||
| throw error; |
There was a problem hiding this comment.
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.
| 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)
|
Closing in favour of #5289 |
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
Bug Fixes
Documentation