# Changelog

All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This
project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.4.2] - 2026-05-06

### Added

- Startup splash screen powered by `hjkl-splash`. On TUI launch a block-cursor
  animation traces the `sqeel` letterforms until the user presses any key. Hint
  text below the art shows `:e <file>`, `:c <conn>`, and `:q` as quick-start
  reminders.
- `pub fn sqeel_tui::run(state, show_splash: bool)` free function — callers that
  want fine-grained control over the splash (e.g. `--no-splash`) use this
  instead of going through `UiProvider::run`.

### Changed

- **`hjkl-splash` 0.1 → 0.2.** Adopts the clock-owned `Splash` API: removes
  manual `advance()` calls, drops the public `tick` field on `SqeelStartScreen`,
  and unmuts the splash binding. Animation cadence is now 120ms (8 Hz) driven by
  `Splash`'s internal wall clock; redraw cadence stays at the event-poll rate
  (50ms / 20 Hz). Decoupling them fixes a class of bugs where high-frequency
  events would starve the timeout branch and freeze the animation.

## [0.4.1] - 2026-05-05

### Changed

- Bumps `sqeel-core` 0.3 → 0.4 (picks up the connection-storage move,
  theme-loader path resolution, and `AsyncGrammarLoader` adoption).
- Render loop now uses `Highlighter::new_async()` + per-tick `try_upgrade()` for
  SQL syntax highlighting. The first-frame freeze on a fresh grammar install is
  gone: the editor renders plain text until the background
  `hjkl_bonsai::AsyncGrammarLoader` finishes the clone + compile, then switches
  to full highlighting automatically on the next tick. Three call sites updated:
  the main highlighter constructed in `run_loop`, plus the thread-local helpers
  in `highlight_sql_lines` and `highlight_query_line`.
- Theme loader (`theme.rs`) now resolves `theme.toml` through
  `sqeel_core::config::config_dir()` (the sqeel-config-backed central path
  resolver) instead of calling `dirs::config_dir()` directly. Two effects: the
  sandbox override (`--sandbox`) now applies to theme loading like it does for
  every other config file, and the `dirs` crate is dropped from `sqeel-tui`'s
  direct deps (still pulled transitively via `sqeel-core`).

## [0.4.0] - 2026-05-05

### Added

- Connection state badge in the connection switcher. Each row now shows a
  colored glyph reflecting the live state of the active connection: `●` green
  for a live connection, `◌` yellow while the handshake is in flight, `✗` red
  when the last attempt failed. Non-active connections show a blank badge (no
  tracked state this session). The active connection name is bolded so it
  remains identifiable when the cursor is on a different row. Replaces the old
  `*` prefix.

### Changed

- **`hjkl-picker` 0.3 → 0.4.** `PickerAction` reduced to
  `Custom(Box<dyn Any + Send>) | None`; app-specific variants removed. sqeel-tui
  now defines a local `SqeelFileAction::OpenPath` enum and wraps `FileSource` in
  a `SqeelFileSource` adapter so `select()` emits
  `PickerAction::Custom(Box::new(SqeelFileAction::OpenPath(path)))`. The
  dispatch arm downcasts on receive. Behavior preserved.
- **`hjkl-editor` 0.3 → 0.4.** `ExEffect::Substituted` now carries
  `lines_changed: usize` alongside `count`. The substitute toast now renders
  vim-accurate `"N substitution(s) on M line(s)"` (e.g.
  `"1 substitution on 1 line"`, `"3 substitutions on 2 lines"`). Old text was
  `"N substitution(s)"`.
- **`hjkl-clipboard` 0.4 → 0.5.** Additive-only upgrade. New public `Backend`
  trait, `BackendKind` enum, `Capabilities` bitflags, async variants
  (`set_async` / `get_async` / `clear_async` / `available_async`),
  `Clipboard::with_backend`, `Clipboard::kind()`, and
  `Clipboard::capabilities()` are now available. sqeel-tui's clipboard usage
  (text `set`/`get` on `Selection::Clipboard`) is unchanged; no call-site
  updates were required.
- **`hjkl-bonsai` 0.3 → 0.5.** Picks up the 0.4 `ManifestMeta` loader API and
  the 0.5 `highlight_range_with_injections` viewport-scoped method. The
  `InputEdit` / `Point` re-exports used here are unchanged.

## [0.3.0] - 2026-05-03

### Changed

- **`hjkl-bonsai` 0.2 → 0.3.** Grammar storage subdir renamed `hjkl/` →
  `bonsai/`; macOS/Windows now follow XDG-everywhere. Existing grammars re-fetch
  on first use. See `crates/hjkl-bonsai/CHANGELOG.md` for detail.
- **`sqeel-core` 0.2 → 0.3.** Pulls in the breaking `leader_key` `String` →
  `char` change + the hjkl-config 0.2 path migration. See
  `crates/sqeel-core/CHANGELOG.md`.

## [0.2.4] - 2026-05-03

### Changed

- Replaced sqeel's bespoke `FilePicker` (subsequence fuzzy scorer + custom
  dialog) with `hjkl-picker`. The leader+space picker now enumerates every saved
  `.sql` buffer in `~/.local/share/sqeel/queries/` via
  `hjkl_picker::FileSource`, ranked by `hjkl_picker::score`. Selecting a file
  opens it as a tab if not already open; otherwise switches to the existing tab.
  Match positions render with the editor search-bg highlight.

### Removed

- `FilePicker` struct + `fuzzy_score` helper (~50 lines) — superseded by
  `hjkl_picker::Picker` + built-in `FileSource`.

## [0.2.3] - 2026-05-03

### Changed

- Bumped `hjkl-bonsai` 0.1 → 0.2. Only `InputEdit` / `Point` re-exports are
  consumed here; sqeel-tui's behaviour is unchanged. The runtime grammar
  pipeline is exercised through `sqeel-core` 0.2.3.

## [0.2.2] - 2026-05-03

### Changed

- `deny.toml`: allow `CDLA-Permissive-2.0` (transitive via webpki-roots, through
  sqeel-core) and ignore RUSTSEC-2023-0071 (rsa Marvin attack — transitive via
  sqlx-mysql, no fix available).
- CI: extracted shared lint/test jobs (`fmt`, `clippy`, `test`, `deny`) into a
  reusable `_tests.yml` workflow called by both `ci.yml` and `release.yml`.

## [0.2.1] - 2026-05-03

### Changed

- Migrated `sqeel-tui` from the `kryptic-sh/sqeel` monorepo into its own
  repository ([kryptic-sh/sqeel-tui](https://github.com/kryptic-sh/sqeel-tui))
  with full git history preserved.
- Bumped hjkl deps from 0.2 to 0.3 (`hjkl-engine`, `hjkl-buffer`, `hjkl-editor`,
  `hjkl-form`, `hjkl-ratatui`) and `hjkl-clipboard` 0.2 → 0.4.
- Replaced removed `hjkl-tree-sitter` with `hjkl-bonsai` 0.1.
- Bumped `ratatui` 0.29 → 0.30 and `crossterm` 0.28 → 0.29.
- Adapted to `hjkl-clipboard` 0.4 generic API (`set`/`get` with `Selection` +
  `MimeType`; `Clipboard::new` now returns `Result`).
- Adapted to `hjkl_buffer::Gutter` new `line_offset` field.
- `sqeel-core` resolved from crates.io (was sibling path dep).
- Loosened dep pins from `=0.X.Y` exact to `"0.X"` caret-minor.

### Added

- Standalone `LICENSE`, `.gitignore`, `deny.toml`, `rust-toolchain.toml`, and CI
  workflows at the repo root.

[Unreleased]: https://github.com/kryptic-sh/sqeel-tui/compare/v0.4.2...HEAD
[0.4.2]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.4.2
[0.4.1]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.4.1
[0.4.0]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.4.0
[0.3.0]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.3.0
[0.2.4]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.2.4
[0.2.3]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.2.3
[0.2.2]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.2.2
[0.2.1]: https://github.com/kryptic-sh/sqeel-tui/releases/tag/v0.2.1
