Skip to content

Commit 8e63f80

Browse files
committed
fix(forking): expand configured edit cards
1 parent ca8551f commit 8e63f80

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/sim/ee/workspace-forking/components/fork-sync/fork-sync-view.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ function DependentSelector({
239239

240240
interface DependentWorkflowCardProps {
241241
workflow: WorkflowDependents
242+
initiallyExpanded: boolean
242243
target: string
243244
parentChanged: boolean
244245
/** True when the parent is resolved by COPY - the selectors browse the SOURCE parent. */
@@ -253,10 +254,12 @@ interface DependentWorkflowCardProps {
253254
* One workflow's dependent fields as a collapsible card (the same `CollapsibleCard` the table
254255
* workflow sidebar's input mapping and the enrichment config use): the header names the
255256
* workflow; the body groups fields under block → optional tool → plain field label.
256-
* Cards holding a required field start expanded - a required field is what gates Sync.
257+
* Cards holding a required field start expanded because that field gates Sync. Cards first
258+
* revealed by explicit edit mode also start expanded so the edit action exposes its controls.
257259
*/
258260
function DependentWorkflowCard({
259261
workflow,
262+
initiallyExpanded,
260263
target,
261264
parentChanged,
262265
copying,
@@ -266,7 +269,9 @@ function DependentWorkflowCard({
266269
setReconfig,
267270
}: DependentWorkflowCardProps) {
268271
const [collapsed, setCollapsed] = useState(
269-
() => !workflow.blocks.some((block) => block.configurableFields.some((field) => field.required))
272+
() =>
273+
!initiallyExpanded &&
274+
!workflow.blocks.some((block) => block.configurableFields.some((field) => field.required))
270275
)
271276
return (
272277
<CollapsibleCard
@@ -463,6 +468,7 @@ function MappingEntry({ controller, group, entry }: MappingEntryProps) {
463468
<DependentWorkflowCard
464469
key={workflow.workflowId}
465470
workflow={workflow}
471+
initiallyExpanded={showConfigured}
466472
target={target}
467473
parentChanged={parentChanged}
468474
copying={copying}

0 commit comments

Comments
 (0)