Repository navigation
fix(terminal): the legacy workflow-step modal can open (#16312) #16909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,6 +237,9 @@ export default { | |
| const waitingForUserConfirmation = ref(false); | ||
|
|
||
| // Advanced workflow management state | ||
| // Default true, so behaviour is unchanged: the advanced modal opens as it | ||
| // always has. Setting it false routes the same call to the legacy modal | ||
| // (#16312). Returned from setup, so a caller or a test can flip it. | ||
| const isAdvancedMode = ref(true); // Use advanced modal by default | ||
| const workflowTemplates = ref([]); | ||
| const passwordPromptActive = ref(false); | ||
|
|
@@ -618,7 +621,16 @@ export default { | |
|
|
||
| const requestManualStepConfirmation = (stepInfo) => { | ||
| pendingWorkflowStep.value = stepInfo; | ||
| showManualStepModal.value = true; | ||
| // #16312: isAdvancedMode chooses which modal opens. Until this, it was set | ||
| // and never read, and showLegacyModal was only ever set to FALSE (three | ||
| // sites, all closing it) — so the documented fallback could not open under | ||
| // any condition, and a route that cannot run is indistinguishable from one | ||
| // that simply never fired. | ||
| if (isAdvancedMode.value) { | ||
| showManualStepModal.value = true; | ||
| } else { | ||
| showLegacyModal.value = true; | ||
| } | ||
|
Comment on lines
+624
to
+633
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '600,650p' autobot-frontend/src/components/terminal/TerminalWindow.vue
rg -n 'showManualStepModal|showLegacyModal|AdvancedStepConfirmationModal|TerminalModals|requestManualStepConfirmation|isAdvancedMode' autobot-frontend/src/components/terminal/TerminalWindow.vue autobot-frontend/src/components/terminal/TerminalModals.vue autobot-frontend/src/components/terminal/AdvancedStepConfirmationModal.vue autobot-frontend/src/components/__tests__/TerminalWindow.test.ts
sed -n '175,260p' autobot-frontend/src/components/__tests__/TerminalWindow.test.ts
sed -n '150,250p' autobot-frontend/src/components/terminal/TerminalModals.vueRepository: mrveiss/AutoBot-AI Length of output: 16147 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- TerminalWindow template and handlers ---'
sed -n '80,145p' autobot-frontend/src/components/terminal/TerminalWindow.vue
sed -n '640,705p' autobot-frontend/src/components/terminal/TerminalWindow.vue
printf '%s\n' '--- AdvancedStepConfirmationModal contract ---'
sed -n '1,180p' autobot-frontend/src/components/terminal/AdvancedStepConfirmationModal.vue
printf '%s\n' '--- TerminalModals contract ---'
sed -n '240,330p' autobot-frontend/src/components/terminal/TerminalModals.vue
printf '%s\n' '--- TerminalWindow modal wiring tests ---'
sed -n '540,625p' autobot-frontend/src/components/__tests__/TerminalWindow.test.ts
printf '%s\n' '--- TerminalModals tests ---'
fd -i 'TerminalModals.test.ts' autobot-frontend/src && file=$(fd -i 'TerminalModals.test.ts' autobot-frontend/src | head -n 1) && sed -n '1,260p' "$file" || trueRepository: mrveiss/AutoBot-AI Length of output: 22444 Assert the modal visibility props in the routing tests. The branch correctly sets 🤖 Prompt for AI Agents |
||
| waitingForUserConfirmation.value = true; | ||
|
|
||
| addOutputLine({ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: mrveiss/AutoBot-AI
Length of output: 19117
🏁 Script executed:
Repository: mrveiss/AutoBot-AI
Length of output: 8399
Unmount direct mounts and clear the cursor interval.
mountWindow()returns wrappers that the tests never unmount. Each mountedTerminalWindowstartsstartCursorBlink()withsetInterval()and registers event listeners. These resources can remain active across tests and keep the test runtime open.Unmount the wrappers in
afterEach. Also retain the cursor interval handle and clear it inonUnmounted; the current hook clears only the focus interval and event listeners.🤖 Prompt for AI Agents