tconbeer / harlequin

The SQL IDE for Your Terminal.
https://harlequin.sh
MIT License
3.65k stars 83 forks source link

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

Closed mattgiles closed 6 months ago

mattgiles commented 6 months ago

Before Proceeding, please acknowledge:

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?

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?

[!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?

tconbeer commented 6 months ago

Thanks for the report!