Skip to content

[Bug]: Terminal button needs two clicks after the last terminal was closed #39259

Closed

Description

@viktorce

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open any thread and click the terminal button in the top right. The drawer opens.
  2. Close the terminal with the trash icon and confirm. Typing exit in the shell does the same.
  3. Click the terminal button again.

Expected behavior

The drawer opens with a new terminal.

Actual behavior

Nothing visible happens. The drawer opens and closes again within about 20 ms. A second click opens it.

The terminal store remembers which terminal ids the server last listed, and closes a local terminal that later drops off that list. The closed term-1 stays on that list because the drawer unmounts before it sees the server drop it. Reopening creates term-1 again, and the first reconcile closes it as if another client had closed it. This list came with #38998, so this looks like a regression from it.

Impact

Minor bug or occasional failure

Version or commit

main at e37e45fd5b. The terminal store and drawer files are unchanged on 803f21f6a5.

Environment

Web client in Chromium on macOS. The desktop app runs the same web code.

Logs or stack traces

No response

Screenshots, recordings, or supporting files

Close the terminal, then click the terminal button twice. The first click does nothing.

terminal-reopen-before.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions