Skip to content

[variable-resolver] Keep task input prompts open - #17917

Open
mehedi-107 wants to merge 2 commits into
eclipse-theia:masterfrom
mehedi-107:fix-17894-task-input-focus
Open

[variable-resolver] Keep task input prompts open#17917
mehedi-107 wants to merge 2 commits into
eclipse-theia:masterfrom
mehedi-107:fix-17894-task-input-focus

Conversation

@mehedi-107

@mehedi-107 mehedi-107 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Closes #17894.

Summary

Task input prompts were closing when focus moved away, for example after clicking in the Explorer. That is disruptive because the task is still waiting for a value.

This change keeps both promptString and pickString task inputs open when focus moves elsewhere. A task now proceeds only after the user selects a value or confirms the text input. Pressing Escape cancels the task cleanly instead of leaving a partially resolved task running.

While testing the cancellation path, I also found that cancelling an input could leave a shell task without its arguments. With the example task, that meant starting node by itself and leaving a Node prompt running. The process task resolver now stops task resolution when a command or its arguments are cancelled.

Manual testing

Using packages/task/test-resources/.theia/tasks.json and Task: Run Task:

  • Started task with input variables, clicked elsewhere in the Explorer while the text prompt was open, and confirmed that the prompt remained open.
  • Entered b, selected c, and confirmed the task completed with the expected arguments: a b c.
  • Pressed Escape at the text prompt and verified that the task was cancelled rather than started.
  • Started the same task again immediately after cancellation and confirmed that it opened normally; no "already running" task was left behind.
  • Repeated the focus-loss and Escape checks for the choice input.

Automated checks

Passed locally:

  • npm run compile --workspace=@theia/task
  • npm run compile --workspace=@theia/variable-resolver
  • npm test --workspace=@theia/variable-resolver (12 passing)
  • ./node_modules/.bin/mocha --config ./configs/mocharc.yml ./packages/task/lib/browser/process/process-task-resolver.spec.js (1 passing)
  • npm run lint --workspace=@theia/task
  • npm run lint --workspace=@theia/variable-resolver
  • git diff --check
  • JSONC validation for packages/task/test-resources/.theia/tasks.json

The complete @theia/task suite could not be started locally because the current Node 24 environment is missing the unrelated native drivelist binding. The modified packages compile cleanly, and the focused regression tests pass.

Signed-off-by: Md. Mehedi Hasan <2105052@ugrad.cse.buet.ac.bd>
@github-project-automation github-project-automation Bot moved this to Waiting on reviewers in PR Backlog Aug 13, 2026
Signed-off-by: Md. Mehedi Hasan <2105052@ugrad.cse.buet.ac.bd>
@mehedi-107
mehedi-107 marked this pull request as ready for review August 13, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

Task input prompt closes when clicking outside the dialog

1 participant