Skip to content

fix(forking): keep dependent overrides editable - #6776

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/fork-dependent-overrides
Aug 17, 2026
Merged

fix(forking): keep dependent overrides editable#6776
icecrasher321 merged 2 commits into
stagingfrom
codex/fork-dependent-overrides

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • keep saved dependent mappings explicitly editable without making valid mappings noisy
  • preserve canonical dependency chains per Agent tool instance so identical tools cannot invalidate each other
  • keep optional and LLM-fillable inputs editable but nonblocking

Type of Change

  • Bug fix

Testing

  • bunx vitest run ee/workspace-forking/components/fork-sync/dependent-value.test.ts ee/workspace-forking/lib/mapping/dependent-reconfigs.test.ts lib/api/contracts/workspace-fork.test.ts
  • bun run lint
  • bun run type-check
  • bun run check:audits
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging

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)

@vercel

vercel Bot commented Aug 17, 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 17, 2026 5:07pm

Request Review

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches fork sync mapping and dependent re-pick logic used when promoting workspaces; incorrect scoping could leave stale child values or hide required fields, but changes are localized with expanded tests.

Overview
Fixes fork sync dependent-field handling so duplicate nested tool instances (e.g. two Jira tools on one Agent) keep separate dependency chains instead of cross-invalidating each other.

Data model: Nested tool params now carry optional dependencyScope (e.g. tools[0]) on ForkDependentReconfig. Collection enables full in-block chaining for nested tools (replacing the old chaining: false shortcut) and stamps each instance with its scope.

Logic: applyDependentRepick, getActionableDependentFields, and selector chain state only link providers/consumers within the same dependencyScope. A new getDisplayedDependentFields separates what Sync gates (actionable required/missing fields) from what the UI shows when the user toggles edit mode.

UI: Mapping entries add an Edit configuration chip when the parent is resolved and there are hidden configured fields. That reveals all active selectors under the parent without changing sync blockers; workflow cards opened via edit start expanded. Tool grouping in cards keys off dependencyScope so identically named tools stay distinct.

Reviewed by Cursor Bugbot for commit 8e63f80. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR keeps saved dependent mappings editable while separating nested dependency chains by tool instance.

  • Adds explicit edit mode for configured, optional, and LLM-fillable dependent selectors.
  • Expands cards first revealed through the edit action.
  • Scopes provider lookup, selector context, grouping, and descendant invalidation to each nested tool instance.
  • Extends the fork contract and focused tests with stable dependency-scope metadata.

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/fork-sync/fork-sync-view.tsx The edit action now mounts optional-only configuration cards in an expanded state, resolving the previously reported ineffective-click behavior.
apps/sim/ee/workspace-forking/components/fork-sync/dependent-value.ts Display filtering is separated from Sync actionability, and dependency traversal is constrained to the active tool-instance scope.
apps/sim/ee/workspace-forking/lib/mapping/dependent-reconfigs.ts Nested tool dependents now receive stable instance scopes and retain canonical provider and consumer relationships.
apps/sim/lib/api/contracts/workspace-fork.ts The dependent-reconfiguration contract adds optional dependency-scope metadata for nested tool instances.

Reviews (2): Last reviewed commit: "fix(forking): expand configured edit car..." | Re-trigger 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 8e63f80. Configure here.

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321
icecrasher321 merged commit 2732ab7 into staging Aug 17, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/fork-dependent-overrides branch August 17, 2026 20:12
waleedlatif1 added a commit that referenced this pull request Aug 17, 2026
#6776 landed on staging as a competing fix for the same fork-sync
defects this branch addressed. Take its work wholesale and keep only the
part of ours it does not cover.

Kept from upstream (#6776): the `sameDependencyScope` cascade guard,
`getDisplayedDependentFields` with the "Edit configuration" chip,
per-scope provider indexing, the `blockChainState(block, field, ...)`
scope filter, and the `dependent-reconfigs` / `workspace-fork` contract
changes that emit `dependencyScope` and per-scope context keys for
nested tool params.

Kept from this branch: `DEPENDENT_CLEARED_BY_PARENT` and
`submittedDependentValue`. The scope guard decides WHICH descendants a
re-pick invalidates; the sentinel decides HOW an invalidated one is
represented, and those are different layers. Without the sentinel the
cascade still writes `''` into the reconfig map and
`buildDependentValues` still submits it, so a hidden optional dependent's
stored target value is destroyed by a parent re-pick the user never
applied to it. The scope guard does not close this: two top-level block
subblocks both have `dependencyScope === undefined`, so it is a no-op
there. #6776 also widens the exposure by emitting context keys for
nested tool params that previously could never be cascaded onto.

Also kept: the `previousValue` no-op guard in `applyDependentRepick` (a
separate bug - re-selecting the value a field already shows must not
invalidate its descendants) and the post-sync reset in `use-fork-sync`.

Dropped from this branch: the sticky-visibility predicate in
`isDependentConfigurationActionable` and its three tests. It and
upstream's edit chip are two mechanisms for one visibility problem, and
it is unnecessary - a marked REQUIRED field reads as `''` through
`effectiveDependentValue`, so the existing `required && value === ''`
arm keeps it on screen and keeps it gating Sync. Only marked OPTIONAL
fields drop out of the default view, and those are omitted from the
payload, so hiding them costs nothing; the edit chip brings them back.

Reconciled the cascade assertions in `dependent-value.test.ts` to the
sentinel, including upstream's nested-tool-instance case.
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