CS-408 [Bug] - org chart image doesn't update after upload, delete, or replace#3362
Open
github-actions[bot] wants to merge 3 commits into
Open
CS-408 [Bug] - org chart image doesn't update after upload, delete, or replace#3362github-actions[bot] wants to merge 3 commits into
github-actions[bot] wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
3 issues found across 5 files
Confidence score: 3/5
- In
apps/app/src/app/(app)/[orgId]/people/org-chart/components/OrgChartContent.tsx,onChartChange(SWRmutate) is not passed toOrgChartEditor, so editor saves may not refresh parent cache and users can see stale org chart data after successful edits — wireonChartChangethrough the editor save path before merging. - In
apps/app/src/app/(app)/[orgId]/people/org-chart/components/UploadOrgChartDialog.tsx,await onUploaded()is inside the sametryas the upload call, so a successful upload can still surface a failure toast if refresh fails, which is confusing and may trigger duplicate retries — separate upload success handling from refresh error handling (or use distinct messaging). - In
apps/app/src/app/(app)/[orgId]/people/org-chart/components/OrgChartImageView.tsx, a thrownonChartChange()after a successful delete is reported as “Failed to delete org chart,” masking that the delete already completed — split delete and re-fetch error paths so users get accurate feedback and next steps.
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Contributor
|
@cubic-dev-ai please review it. |
Contributor
@chasprowebdev I have started the AI code review. It will take a few minutes to complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated pull request to merge chas/org-chart-update into dev.
It was created by the [Auto Pull Request] action.
Summary by cubic
Make the org chart update instantly after upload, replace, delete, or editor save by calling
useOrgChart().mutatevia anonChartChangecallback. Fixes stale data in the org chart view and removesrouter.refresh()(CS-408).onChartChangethroughOrgChartContent,OrgChartEmptyState,OrgChartImageView,OrgChartEditor, andUploadOrgChartDialog.onChartChangeafter upload, delete, replace, and save; wrap calls in try/catch so SWR refresh failures don’t affect user actions.UploadOrgChartDialogonUploadedtouseOrgChart().mutateviaOrgChartTabContent.Written for commit 7f733c6. Summary will update on new commits.