-
fix(core): improve TUI task selection and pane focus behavior (#34175)
发布于
2026-01-21 19:02:43 +00:00 Current Behavior
-
When running a task with dependencies (e.g.,
nx serve appwhere app
depends on app2:serve), the initiating task might not be selected on
startup. Additionally, the auto-select logic could switch selection to
the initiating task at any time when it started running - even minutes
later - which felt "random" to the user. -
When pressing Enter on an already-pinned task, it would unpin the
task, causing the pane to disappear while focus remained on it
(invisible-but-focused state).
Expected Behavior
-
The initiating task (the one the user actually requested) should be
selected during init, and selection should never unexpectedly change
later when tasks start. -
Pressing Enter on an already-pinned task should focus the pane, not
unpin it.
Changes
- Select initiating task during init: Moved initiating task
selection toinit()in app.rs. This only applies inRunOnemode
since inRunManythere's no single initiating task to prioritize.
Removed the "switch to initiating task" logic fromstart_tasks()in
tasks_list.rs. - Focus pane on Enter: Changed behavior so pressing Enter on an
already-pinned task focuses the pane instead of unpinning it.
Related Issue(s)
N/A - discovered during TUI testing
下载附件
-