Skip to content

Task icon for terminal tab entry does not update with task label when terminal is reused #179337

@ruffsl

Description

@ruffsl

Type: Bug

When a terminal is reused by different tasks, the icon in it's terminal tabs entry is never updated to reflect the current task that is reusing it. One would expect that just as how the label for the terminal's tab entry updates to match the label for the latest task, that it's icon would similarly be updated to provide a consistent visual and textual feedback of the terminal's current task status.

Steps to Reproduce:
Using the example tasks.json included below:

  1. Close all terminals
  2. Tasks: Run Tasks -> debug-start
  3. Tasks: Run Tasks -> debug-stop

OR

  1. Close all terminals
  2. Tasks: Run Tasks -> Start then Stop
.vscode/tasks.json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "debug-start",
            "icon": {
                "id": "debug-start"
            },
            "type": "shell",
            "command": "echo start",
            "problemMatcher": []
        },
        {
            "label": "debug-stop",
            "icon": {
                "id": "debug-stop"
            },
            "type": "shell",
            "command": "echo stop",
            "problemMatcher": []
        },
        {
            "label": "Start then Stop",
            "dependsOn": [
                "debug-start",
                "debug-stop"
            ],
            "dependsOrder": "sequence",
            "problemMatcher": []
        }
    ]
}

Expected:

  • the task icon should change from :debug-start: to :debug-stop:

image

Observed:

  • the task icon remains the same as whatever it was first initialized to

image

DOM HTML Snippet
<div class="monaco-list-row selected" role="listitem" data-index="3" data-last-element="true" data-parity="odd"
    aria-setsize="4" aria-posinset="4" id="list_id_1_3" aria-selected="true" aria-label="Terminal 27 debug-stop"
    draggable="true" style="top: 66px; height: 22px; line-height: 22px;">
    <div class="terminal-tabs-entry has-text is-active">
        <div
            class="monaco-icon-label file-icon 5e02f7f6f1a0a881b28c849108a10606-name-dir-icon 27-name-file-icon name-file-icon ext-file-icon unknown-lang-file-icon monaco-decoration-itemColor--w77yvu monaco-decoration-itemBadge--w77yvu monaco-decoration-iconBadge--w77yvu">
            <div class="monaco-icon-label-container"><span class="monaco-icon-name-container"><a
                        class="label-name"><span class="monaco-highlighted-label"><span
                                class="codicon codicon-debug-start"></span> debug-stop</span></a></span><span
                    class="monaco-icon-description-container"><span class="label-description"><span
                            class="monaco-highlighted-label">Task</span></span></span></div>
            <div class="actions">
                <div class="monaco-action-bar animated">
                    <ul class="actions-container" role="toolbar">
                        <li class="action-item" role="presentation" title="Split (Ctrl+Shift+5)"><a
                                class="action-label codicon codicon-split-horizontal" role="button"
                                aria-label="Split (Ctrl+Shift+5)" tabindex="0"></a></li>
                        <li class="action-item" role="presentation" title="Kill (Delete)"><a
                                class="action-label codicon codicon-trashcan" role="button"
                                aria-label="Kill (Delete)"></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

VS Code version: Code - Insiders 1.78.0-insider (8f74fbf, 2023-04-05T05:27:51.301Z)
OS version: Linux x64 5.19.0-38-generic
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Core(TM) i7
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 1, 1
Memory (System) 31.17GB (15.15GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
vsc_aa:30263845
pythonptprofiler:30281269
vsdfh931cf:30280410
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887
2i9eh265:30646982
showlangstatbar:30659908
pythonb192:30661256
functionswalk:30687959
pythonms35:30671666
19089226:30680468
57b77579:30687741
pythonclientmv:30700173

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code InsiderstasksTask system issuesterminal-tabsverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions