tconbeer/harlequin

Pressing `F8` when already viewing the history screen crashes the app

Closed this issue · 1 comments

Before Proceeding, please acknowledge:

  • I have consulted the Troubleshooting guide.
  • I have searched Issues and Discussions in this repo.
  • Feature requests should be initiated as Discussions. This is a bug report.

Describe the bug
Pressing F8 when already viewing history crashes the app.

To Reproduce

  1. Launch harlequin
  2. Press F8 to view history screen
  3. Press F8 again

Expected behavior
One of: (a) nothing, or (b) exit history screen, as when esc is pressed.

Actual behavior
The app crashes with a stack trace (hard to paste rich-rendered stack traces here) that concludes:

DuplicateIds: Tried to insert a widget with ID 'history_screen', but a widget HistoryScreen(id='history_screen') already exists with that ID in this list of children. The children of a widget must have unique IDs.

Contributing
Are you interested in contributing a fix?

  • Yes
  • Maybe
  • No

Additional context
Please provide as much as you can, but don't waste your time if it's definitely not relevant or you don't know.

What is the output of harlequin --version?

$ rye run harlequin --version
harlequin, version 1.16.0

Installed Adapters:
  - duckdb, version 1.16.0
  - sqlite, version 1.16.0

What database adapter are you using with Harlequin? (Default is duckdb)

duckdb

What other options are you using when invoking Harlequin? (If you are using a profile, please add relevant items from your profile here).

Can you tell us more about your system?

  • Shell: zsh
  • Terminal: iTerm2
  • OS of the shell: macOS
  • OS of the terminal (if different from the shell):
  • Default locale / language for your OS/Terminal/Shell: en_US.UTF-8

Tip

For example, for my system, these are:

  • Bash
  • Windows Terminal
  • Ubuntu 22.04 / WSL2
  • Windows 11
  • en_US/UTF-8

How did you install Harlequin?

  • pipx
  • conda/mamba
  • pip (global install)
  • pip + venv/virtualenv or pipenv
  • Poetry
  • uv/Rye
  • other: _____________

Thanks for the report!