Skip to content

CS-408 [Bug] - org chart image doesn't update after upload, delete, or replace#3362

Merged
Marfuen merged 4 commits into
mainfrom
chas/org-chart-update
Jul 14, 2026
Merged

CS-408 [Bug] - org chart image doesn't update after upload, delete, or replace#3362
Marfuen merged 4 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; isolate SWR refresh failures with try/catch so actions still succeed.
    • Wire UploadOrgChartDialog onUploaded to useOrgChart().mutate via OrgChartTabContent.

Written for commit 00013f8. 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 14, 2026 1:49pm
comp-framework-editor Ready Ready Preview, Comment Jul 14, 2026 1:49pm
portal Ready Ready Preview, Comment Jul 14, 2026 1:49pm

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

@chasprowebdev chasprowebdev self-assigned this Jul 9, 2026
@Marfuen
Marfuen merged commit 421826b into main Jul 14, 2026
7 of 10 checks passed
@Marfuen
Marfuen deleted the chas/org-chart-update branch July 14, 2026 13:46
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.102.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

3 participants