Skip to content

TT-7618 cleanup offlineproject records when user is removed from team or if t… - #746

Merged
sarahentzel merged 6 commits into
developfrom
TT-7618
Oct 8, 2026
Merged

sarahentzel merged 6 commits into
developfrom
TT-7618

Conversation

@sarahentzel

Copy link
Copy Markdown
Collaborator

…eam or project is deleted

Copilot AI 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.

🟡 Changes recommended

The checksum-repair synchronization path passes no user identity, preventing membership deletions from cleaning offline-project records.

1 open finding
What changed in this PR

Cleans stale Orbit offlineproject records when projects, teams, or the current user’s memberships are deleted.

Changes:

  • Adds shared offline-project cleanup helpers.
  • Integrates cleanup into synchronization and user-removal flows.
  • Restores URL-derived plan context and adds regression tests.
File Description
web/​src/​hoc/​processDataChanges.ts Cleans offline records during remote deletions.
web/​src/​hoc/​processDataChanges.offline.test.ts Tests synchronized deletion scenarios.
web/​src/​crud/​useUrlContext.ts Restores plan state from URL context.
web/​src/​crud/​user.ts Cleans snapshots when the current user leaves teams.
web/​src/​crud/​user.removeFromOrg.test.ts Tests user-removal cleanup behavior.
web/​src/​crud/​useOfflnProjDelete.ts Uses the shared deletion helper.
web/​src/​crud/​offlineProjectDelete.ts Implements offline-record selection and deletion.
web/​src/​crud/​offlineProjectDelete.test.ts Tests membership-to-project resolution.
web/​src/​components/​UserTable.tsx Supplies cleanup to team-member removal.
web/​src/​components/​ProfileDialog.tsx Supplies cleanup to profile removal.
web/​src/​components/​ProfileDialog.test.tsx Mocks the added deletion hook.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment on lines +370 to +372
offlineProjectIds.push(
...offlineProjectIdsForDeleted(memory, user, table.type, localId)
);
@sarahentzel
sarahentzel marked this pull request as ready for review October 8, 2026 15:07
@gtryus gtryus changed the title cleanup offlineproject records when user is removed from team or if t… TT-7618 cleanup offlineproject records when user is removed from team or if t… Oct 8, 2026
@sarahentzel
sarahentzel merged commit bcf17a9 into develop Oct 8, 2026
2 checks passed
@sarahentzel
sarahentzel deleted the TT-7618 branch October 8, 2026 18:08
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.

3 participants