Skip to content

Disable the agent dialog alongside the rest of the agent path - #97

Open
jorgeMFS wants to merge 1 commit into
mainfrom
disable-agent-dialog-consistently
Open

jorgeMFS wants to merge 1 commit into
mainfrom
disable-agent-dialog-consistently

Conversation

@jorgeMFS

Copy link
Copy Markdown
Collaborator

Merge order

Based on main, stacked on nothing. It touches one region of RecipePanel.js that no other open PR touches — verified clean against both #94 and #95, the latter of which does change this file but in a different region (its hunks are at 615–626 and 644–668).

The defect

The agent path is in three parts, and only two were disabled:

RecipePanel.js:652     the function definition   commented out
RecipePanel.js:791-795 the button that opens it  commented out (inside {/* */})
RecipePanel.js:799-822 the dialog and its Run    LIVE

The live part calls runWorkflowAgent, which no longer exists. So a free identifier sits in shipped code. Verified against a production build:

main + this change   bundle contains "runWorkflowAgent": no
main                 bundle contains "runWorkflowAgent": yes

It is there on main because a live free-variable reference is something the minifier cannot rename away. There is no eslint in this project — plain webpack and babel-loader — so nothing objected.

Why it matters, given it cannot be reached

It genuinely cannot: openDialog starts false, every other setOpenDialog passes false, and the only setOpenDialog(true) is inside the commented block. Nothing crashes today.

The cost is a trap rather than a crash. Uncommenting the button to try the agent gives a ReferenceError, thrown from a definition that was commented out 160 lines earlier. The next person to test this path spends their first half hour on that instead of on the agent.

All three parts are disabled together now, so re-enabling is one coherent change rather than three discoveries.

Verified

production build            succeeds
bundle: runWorkflowAgent    absent (present on main)
bundle: "Enter Agent URL"   absent
bundle: "Run Workflow with Agent"  absent

What this deliberately does not decide

Whether the feature comes back. A working runWorkflowWithAgent exists on the agent branch (line 631, with a live button, and the output filename already corrected to node.id + "-out" — which is what the service actually expects). Restoring it is a port, not a cherry-pick: agent is not an ancestor of main and last moved in May.

That is a product question. This change leaves it open and only makes the current state honest.

The agent path is in three parts and only two of them were disabled. The
function was commented out where it is defined (RecipePanel.js:652) and the
button that opens the dialog was commented out (791-795), but the dialog itself
was live -- and its Run button called runWorkflowAgent, which no longer exists.

So a free identifier sat in shipped code. Verified against a production build:
on main the bundle contains "runWorkflowAgent", because it is a live
free-variable reference the minifier cannot rename away. There is no eslint in
this project, so nothing objected.

It could not be reached, since openDialog starts false and every other setter
passes false -- the only setOpenDialog(true) is inside the commented block. The
cost was not a crash but a trap: uncommenting the button to try the agent gives
a ReferenceError, from a definition commented out 160 lines earlier, rather than
the feature.

All three parts are disabled together now, so re-enabling is one coherent
change rather than three discoveries. Verified: the build succeeds, and the
bundle no longer contains runWorkflowAgent, "Enter Agent URL" or "Run Workflow
with Agent".

This deliberately does not decide whether the feature comes back. A working
runWorkflowWithAgent exists on the agent branch (line 631, with a live button
and the output filename already corrected); restoring it is a port, not a
cherry-pick, since that branch is not an ancestor of main. That is a product
question and this change leaves it open.
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.

2 participants