Skip to content

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
mainfrom
chas/org-chart-update
Open

CS-408 [Bug] - org chart image doesn't update after upload, delete, or replace#3362
github-actions[bot] wants to merge 3 commits into
mainfrom
chas/org-chart-update

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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().mutate via an onChartChange callback. Fixes stale data in the org chart view and removes router.refresh() (CS-408).

  • Bug Fixes
    • Thread onChartChange through OrgChartContent, OrgChartEmptyState, OrgChartImageView, OrgChartEditor, and UploadOrgChartDialog.
    • Trigger onChartChange after upload, delete, replace, and save; wrap calls in try/catch so SWR refresh failures don’t affect user actions.
    • Wire UploadOrgChartDialog onUploaded to useOrgChart().mutate via OrgChartTabContent.

Written for commit 7f733c6. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 7, 2026 3:46pm
comp-framework-editor Ready Ready Preview, Comment Jul 7, 2026 3:46pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Jul 7, 2026 3:46pm

Request Review

@chasprowebdev chasprowebdev changed the title [dev] [chasprowebdev] chas/org-chart-update CS-408 [Bug] - org chart image doesn't update after upload, delete, or replace Jul 7, 2026
@linear

linear Bot commented Jul 7, 2026

Copy link
Copy Markdown

CS-408

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 issues found across 5 files

Confidence score: 3/5

  • In apps/app/src/app/(app)/[orgId]/people/org-chart/components/OrgChartContent.tsx, onChartChange (SWR mutate) is not passed to OrgChartEditor, so editor saves may not refresh parent cache and users can see stale org chart data after successful edits — wire onChartChange through the editor save path before merging.
  • In apps/app/src/app/(app)/[orgId]/people/org-chart/components/UploadOrgChartDialog.tsx, await onUploaded() is inside the same try as 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 thrown onChartChange() 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

Comment thread apps/app/src/app/(app)/[orgId]/people/org-chart/components/OrgChartImageView.tsx Outdated
@chasprowebdev

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@cubic-dev-ai

cubic-dev-ai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

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.

1 participant