Skip to content

Notifications: multiple notifications can get out of sync #54369

Closed

Description

Steps to Reproduce:

  1. have a yo code generated extension with the following command implementation:
let disposable = vscode.commands.registerCommand('extension.sayHello', () => {
    // The code you place here will be executed every time your command is executed

    return vscode.window.withProgress(
        { location: vscode.ProgressLocation.Notification, title: 'Dummy Progress' },
        async (pr) => {
            let value = 0;
            while (value < 100) {
                // Wait for a random amount of time. Pauses less than the debounce time (100ms)
                // will cause the progress notification to lose increments.
                // With 200ms as the max pause, 1/2 increments will be lost. The
                // resulting progress bar will show about 1/2 progress.
                await pause(Math.random() * 200);
                value++;
                // Increment. Show the actual percentage for reference.
                pr.report({ increment: 1, message: `Progress is at ${value}%` });
            }
            await pause(2000);
        },
    );
});
  1. run the command multiple times
  2. 🐛 the progress reporting ends up randomly across the different progress notifications that popup and are not individual per invocation

Activity

  1. added
    bug
    workbench-notifications
    on Jul 16, 2018
  2. added 2 commits that reference this issue on Jul 16, 2018
    b757388
    fafff47
  3. locked and limited conversation to collaborators on Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugverifiedworkbench-notifications

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions