Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/flow/chrome_extension/sidepanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,12 @@
card.appendChild(renderConflictBox(halt));
}

// A value conflict can be resolved by entering the correct value, so it
// needs the input too. Only an entity-row conflict has no single value.
if (
halt.kind === 'ungrounded_required_field' ||
(!isConflict && allowedActions.includes('provide_value'))
(halt.kind !== 'prefill_entity_conflict' &&
allowedActions.includes('provide_value'))
) {
card.appendChild(renderOperatorInputBlock(halt));
}
Expand Down
6 changes: 6 additions & 0 deletions packages/flow/tests/test_extension_copilot_sidepanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,12 @@ def test_sidepanel_idle_running_text_input_badge_and_scroll(chrome_copilot):
portal_value="J. Rivera",
dossier_value="Jordan Rivera",
message="Portal prefill differs from grounded dossier.",
# The reconciler's value-conflict halts offer these actions.
allowed_actions=(
HumanDecisionAction.ACCEPT_PORTAL_PREFILL,
HumanDecisionAction.PROVIDE_VALUE,
HumanDecisionAction.FIXED_ON_SCREEN,
HumanDecisionAction.ESCALATE_TO_OWNER,
HumanDecisionAction.ABORT_RUN,
),
),
Expand Down Expand Up @@ -839,6 +843,8 @@ def test_sidepanel_idle_running_text_input_badge_and_scroll(chrome_copilot):
)

val_card = panel_page.locator('.halt-card[data-halt-id="halt-scalar-conflict"]')
# "Submit Value & Continue" on a value conflict needs an input to read from.
assert val_card.locator('input[data-role="operator-input"]').count() == 1
val_card.locator('button[data-action="accept_portal_prefill"]').click()
panel_page.wait_for_function(
"""() => document.querySelector('.halt-card[data-halt-id="halt-scalar-conflict"]')?.dataset.decisionAck === 'true'""",
Expand Down