Skip to content

fix(forks): name the workspace a sync overwrites instead of "target" - #6822

Merged
icecrasher321 merged 2 commits into
stagingfrom
fix/fork-sync-confirm-names-workspace
Aug 18, 2026
Merged

fix(forks): name the workspace a sync overwrites instead of "target"#6822
icecrasher321 merged 2 commits into
stagingfrom
fix/fork-sync-confirm-names-workspace

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • The fork sync confirm said "Overwrite target workspace" / "The target may have been modified since the last sync". "target" is ambiguous exactly where it matters — the page header shows the parent's name, so an unnamed target reads as the parent even on a pull, which is the side the sync does not write.
  • Root cause: targetWorkspaceName was direction === 'push' ? otherWorkspaceName : 'this workspace' — a hardcoded literal on pull, because the current workspace's name was never plumbed into the sync surface.
  • Thread the workspace name through ForkSyncDetailView into useForkSync so the confirm names the workspace it overwrites: the parent on push, this workspace on pull.
Before After (pull) After (push)
Title Overwrite target workspace Overwrite <this workspace> Overwrite <parent>
Body The target may have been modified since the last sync. Syncing will overwrite any changes there. Syncing will overwrite any changes made in <this workspace> since the last sync. …made in <parent> since the last sync.
  • Restructured the sentence rather than just swapping the noun, so the name never lands sentence-initially — otherwise the not-yet-loaded fallback renders "this workspace may have been modified…". Capitalizing that fallback wasn't an option: three other surfaces render the same value mid-sentence.
  • Those three improve for free, since they read targetWorkspaceName too: the archived-workflows list and dead-webhook-URL list inside the same confirm, and the "Trigger URLs in …" section heading.
  • Also fixed the identical "in the target" wording in the deleted-source mapping hint.
  • Push behavior is unchanged; the Push/Pull toggle helper text is left alone (it sits opposite a named other workspace, so it's already unambiguous).

Type of Change

  • Bug fix

Testing

Tested manually. tsc --noEmit clean, bun run lint clean, all 29 audits pass (check:audits), block-registry check passes, and 604 fork tests pass across 39 files.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 18, 2026 9:47pm

Request Review

@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
User-facing copy and optional prop plumbing only; no sync, mapping, or API behavior changes.

Overview
Fork sync UI copy now names the workspace that gets overwritten on pull and push, instead of vague "target" wording that could be read as the parent shown in the header.

useForkSync takes optional workspaceName and sets targetWorkspaceName to the other workspace on push and workspaceName (with "this workspace" only until the name loads) on pull. ForkSyncDetailView and forks.tsx pass that name through from settings.

The sync confirm modal title becomes Overwrite {name} and the body says changes will be overwritten in that workspace since the last sync. Mapping hints for source-deleted resources, blocking-sync resolution lines via forkBlockerResolution, and the Trigger URLs section heading all use the same targetWorkspaceName. forkBlockerResolution now requires targetWorkspaceName for source-deleted messages so "in the target" cannot creep back in.

Reviewed by Cursor Bugbot for commit 70bdcc4. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR threads the current workspace name into fork-sync state so pull confirmations and related guidance identify the workspace being overwritten.

  • Uses the parent workspace name for pushes and the current workspace name for pulls.
  • Updates overwrite confirmation, cleared-reference guidance, and trigger URL copy.
  • Adds coverage for source-deleted blocker wording.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/ee/workspace-forking/components/forks.tsx Passes the current workspace name into fork sync and uses the resolved target name throughout the overwrite confirmation.
apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.ts Resolves the written workspace name by sync direction, retaining a safe pull fallback while workspace data loads.
apps/sim/ee/workspace-forking/components/fork-sync/fork-sync-view.tsx Replaces ambiguous target wording in mapping and blocker guidance with the controller’s resolved workspace name.
apps/sim/ee/workspace-forking/components/fork-sync/cleared-refs-list.ts Requires the target workspace name when constructing source-deleted blocker resolutions.
apps/sim/ee/workspace-forking/components/fork-sync/cleared-refs-list.test.ts Updates blocker-resolution tests and verifies that source-deleted guidance names the destination workspace.

Reviews (2): Last reviewed commit: "fix(forks): name the target workspace in..." | Re-trigger Greptile

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 70bdcc4. Configure here.

@icecrasher321
icecrasher321 merged commit e522bc4 into staging Aug 18, 2026
30 checks passed
@icecrasher321
icecrasher321 deleted the fix/fork-sync-confirm-names-workspace branch August 18, 2026 21:56
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.

1 participant