Skip to content

fix(admin): Improve org merge completion message clarity#937

Merged
bokelley merged 4 commits intomainfrom
bokelley/pia-celtra-fix
Feb 2, 2026
Merged

fix(admin): Improve org merge completion message clarity#937
bokelley merged 4 commits intomainfrom
bokelley/pia-celtra-fix

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Feb 2, 2026

Summary

  • Improves the org merge completion message to show duplicates skipped count
  • Confirms secondary organization was deleted even when 0 records moved
  • Adds defensive coding for API response handling

Problem

The merge UI showed "0 records moved" which was misleading when all records were duplicates but the merge still accomplished its goal (deleting the secondary org).

Before: "0 records moved"
After: "6 duplicates skipped, secondary organization deleted"

Test plan

  • Build passes (npm run build)
  • Tests pass (npm test)
  • UI loads correctly in dev environment
  • Code review approved

Fixes #933

🤖 Generated with Claude Code

bokelley and others added 4 commits February 2, 2026 10:11
The merge UI previously showed "0 records moved" which was misleading
when all records were duplicates. Now shows duplicates skipped count
and confirms secondary organization deletion.

Fixes #933

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The domain-users endpoint only fetched the first page of WorkOS
memberships (default 10), causing users beyond page 1 to incorrectly
appear as "Potential Members" even when already members.

Now paginates through all memberships with limit=100 per page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The merge was only deleting from local DB, causing orgs to reappear
when syncFromWorkOS ran on server restart. Now also deletes the
secondary organization from WorkOS after the local merge completes.

If WorkOS deletion fails, the local merge still succeeds but a warning
is included in the response.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously all personal workspace merges were blocked. Now:
- Allow: personal INTO company (user joins company)
- Allow: personal INTO personal (consolidate duplicates)
- Block: company INTO personal (would lose company identity)

This fixes scenarios like Pia's Workspace → Celtra.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit cd7558a into main Feb 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AAO Website - Organization admin access issue: personal workspaces blocking company profile management

1 participant