Changelog

This page mirrors CHANGELOG.md. The release skill keeps the two in sync.

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[3.32.1] - 2026-05-31

Fixed

  • Keep the AI popup showing progress instead of going blank mid-request (#184) - While editing a query, each keystroke cancels the in-flight AI request and starts a new one. The cancelled request’s Cancelled message could arrive after the newer request had already begun streaming, and the popup cleared its loading state on that stale message - dropping out of the ⏳ Thinking... view and rendering an empty bordered box for the entire duration of the new request, until its suggestions finally appeared. Stale cancellations are now ignored using the same request-id check already applied to streamed chunks and completions, so a superseded cancellation can no longer blank a popup whose newer request is still in flight. The popup holds ⏳ Thinking... continuously until the suggestions render.

[3.32.0] - 2026-05-31

Added

  • Light and dark themes (#183) - jiq now ships a light color scheme alongside the original dark Galaxy theme, selected via [theme] mode in config.toml: auto (default) detects the terminal background at startup and picks the matching palette, falling back to dark when detection is unavailable; light and dark force a palette. The light palette is tuned for WCAG-AA contrast on a pure-white background, with accents deepened so colors read vividly rather than washed-out, and it paints a pure-white background so jiq blends into a light terminal with no visible tint. The final piped/redirected output keeps the fixed dark jq palette regardless of the display theme, so command-line output is unchanged.

Added

  • Plain-language error overlay (#182) - The error overlay (Ctrl+E) now rewrites jq’s terse, version-dependent stderr into a clear explanation plus a concrete fix hint. An unclosed .foo[ reads “Incomplete query: jq reached the end while still expecting more.” with the hint “Close the ‘[’; e.g. .foo[0] or .foo[]”; a misspelled lengths reports “Unknown function lengths” and suggests length; .foo on an array explains that arrays are indexed by position; and 1 + "a" reports a number/string type mismatch. The rewriter is version-tolerant across jq 1.6, 1.7, and 1.8+ - it strips the misleading (Unix shell quoting issues?) hint that older jq appends, normalizes the $end / end of file wording, and shows the column only when jq reports one. Errors it does not recognize still display verbatim, so no detail is lost. The AI assistant is unchanged and continues to receive jq’s raw error text.

Fixed

  • Show “No suggestions” instead of a parse error when the AI has nothing to add (#181) - When an AI provider returned a valid but empty suggestion list ({"suggestions":[]}, the response the prompt explicitly asks for when there is nothing useful to suggest), jiq treated the non-empty-but-zero-suggestion result as a parse failure and showed the alarming ⚠ Could not parse AI response - did not match the expected format banner. This fired routinely on the bare . identity query. Response parsing now distinguishes three outcomes - usable suggestions, a valid empty list, and genuinely unparseable output - so an empty list renders a calm ✓ No suggestions message and the parse-error banner is reserved for responses jiq actually could not read.

[3.31.1] - 2026-05-30

Fixed

  • Space the back badge off the status badges (#180) - When the results-pane undo ring is non-empty, the cyan [ < Back ] badge on the top border rendered flush against the colored status badge to its right - the golden ⚠ Syntax Error badge on an error and the steel-blue ∅ No Results badge on an empty result - so the two background-colored blocks visually merged into one. The error and empty-result title branches now always emit a neutral, no-background space between the back badge and the status badge, giving them clear separation. The success branch was already separated by the leading space on its stats segment and is unchanged.

[3.31.0] - 2026-05-30

Added

  • Horizontal trackpad swipe scrolls the results pane and input field (#179) - A two-finger horizontal swipe now scrolls the results pane left/right and pans the query input horizontally, complementing the vertical mouse wheel and the keyboard h/l/H/L/0/$ bindings. ScrollRight moves the viewport right (increases the horizontal offset) and ScrollLeft moves it left, mirroring the keyboard convention. A horizontal swipe over the vertical list popups (help, AI, snippets, history, autocomplete) is a deliberate no-op. Works on terminals that emit horizontal scroll events (Ghostty, kitty, WezTerm); inside tmux it requires tmux 3.4+ to forward those events.

Changed

  • Move the line/position indicator back to the top-right border (#179) - The results-pane position indicator (e.g. L1-20/100 (0%)) now renders in the top-right corner of the results border instead of the bottom-right. On the bottom border it was almost always hidden behind the AI sidebar or the help box; the top-right corner stays visible. During a confirmed search the match-count badge still takes that slot. The path-at-cursor breadcrumb on the top-left truncates earlier so it never collides with the indicator, and the centered bottom hint strip reclaims the space the indicator used to reserve.

[3.30.1] - 2026-05-30

Changed

  • Skip AI context preprocessing when AI is not configured (#178) - jiq previously rebuilt the minified/truncated AI-context copy of the query result (prepare_json_for_context) on every successful query, regardless of whether an AI provider was set up. That work only matters when the AI sidebar is actually usable, so it is now gated on the AI being both enabled and configured (a provider with credentials). Users without AI configured save the per-query preprocessing cost - noticeable on large results - while users with AI configured see identical behavior. The gate is a single flag captured once at startup from the resolved AI state; the AI request paths were already short-circuited when AI is unconfigured, so the cached context was pure waste in that case.

[3.30.0] - 2026-05-28

Added

  • String-value autocomplete in comparisons (#177) - Typing inside an unclosed "..." at a value-comparison position now suggests distinct string values pulled from the loaded JSON, so you no longer have to memorize exact spellings. Triggers on ==, !=, contains, startswith, endswith, inside, IN(.path; ", and has/in (the last two defer to the existing object-key autocomplete when the LHS resolves to an object). The classifier folds the surrounding pipe / select(...) / map(...) context into an absolute path rooted at the JSON root, so .users[] | select(.role == " suggests roles found at .users[].role rather than walking the whole document. When folding can’t anchor the path - regex argument functions like test/match/scan/sub, user-defined functions, reduce/foreach, sort_by, etc. - the popup falls back to a precomputed list of every distinct string in the JSON. Selecting a suggestion inserts the value with proper jq escaping (\", \\, \n, etc.) and exactly one closing quote regardless of whether the user already typed one. Filtering as you type narrows the list case-insensitively against the partial. Implementation reuses the existing navigate_multi walker and mirrors the JqExecutor::all_field_names() precompute pattern with a sibling all_string_values(), so there’s no worker thread, no cache invalidation, and per-keystroke cost is one bounded JSON walk plus a memo hit on subsequent characters at the same trigger site.

[3.29.0] - 2026-05-27

Added

  • Ctrl+W saves the current result to a file (#176) - A new global keybinding opens a save popup that writes the rendered jq result to disk. The path field starts pre-filled with jiq-{timestamp}.json resolved against the directory jiq was launched from, and the line below shows the fully expanded absolute path live as you type - → /path/... (clean) becomes ⚠ File exists: /path/... (red, with the bottom-border hint flipping from Enter Save to Enter Overwrite) the moment the typed path collides with something on disk. Edit the filename and the warning recovers in real time. Path expansion supports ~, $VAR / ${VAR}, {timestamp}, {ext}, {cwd}, absolute and relative inputs; surrounding whitespace is trimmed; long paths truncate from the front with so the filename is always visible. Writes go through a sibling .tmp-<pid> + fsync + rename for atomicity, with an EXDEV fallback for cross-filesystem cases. Activation matches Ctrl+O Copy Result: works from any focus and any vim mode in the input pane, suppressed inside snippets / history / search / help popups.

Fixed

  • Single-Enter clipboard load on the source picker (#176) - The smart source picker (added in v3.28.0) previously required two Enter presses to actually load the clipboard payload: the first set up the in-memory loader, but the cached bytes weren’t drained into QueryState until the next iteration of the main event loop, which blocks on the next key. The first Enter now drains the loader synchronously so the JSON renders immediately.

[3.28.1] - 2026-05-27

Added

  • Ctrl+O Copy Result hint surfaced on the global hint strip (#175) - The bottom hint row now advertises Ctrl+O Copy Result whenever the query input is focused (Insert and Normal modes), alongside the existing Enter Output Result and Ctrl+Q Output Query shortcuts. The keybinding itself is unchanged - Ctrl+O has copied the rendered results regardless of focus since v3.27.0 - but the shortcut had no presence on the always-visible hint strip, so users who wanted to copy the output without leaving the query box had to discover it through F1 help. Now the row reads F1 Help • Ctrl+S Snippets • Ctrl+F Search • Enter Output Result • Ctrl+O Copy Result • Ctrl+Q Output Query • Ctrl+C Quit. Help-line snapshot tests bumped from 120 to 130 columns so the full hint line is captured without trailing truncation.

[3.28.0] - 2026-05-27

Added

  • Smart source picker on bare TTY launch (#174) - jiq no longer auto-loads the clipboard when launched without a file argument or piped stdin. It peeks the clipboard once at startup; if the contents parse as a JSON object or array, a top-anchored picker banner appears with Clipboard pre-selected and a live preview of the first lines of the cached payload below. / toggle the highlight, Enter confirms (the bottom-border hint reads “Load” or “Open paste editor” depending on which option is highlighted), and Esc quits. When the clipboard isn’t queryable (empty, invalid JSON, primitive value, or unreadable on remote SSH) the picker is skipped entirely - jiq drops straight into the explicit-paste editor with a one-line “Info” box explaining what was wrong. The cached clipboard bytes are handed to the loader on confirm so the system clipboard is never read twice.
  • --clipboard and --paste CLI flags (#174) - jiq --clipboard forces the legacy clipboard auto-load (skipping the picker), and jiq --paste opens the manual-paste editor without touching the clipboard at all. The two flags are mutually exclusive, and either combined with piped stdin or a file argument now hard-errors with a colored “ambiguous input source” message that lists every valid invocation form (jiq <file> / cat <file> | jiq / jiq / jiq --clipboard / jiq --paste).
  • Manual paste rejects bare JSON primitives (#174) - Pasting 42, "hello", true, or null into the manual-paste editor now reports “Input must be a JSON object or array, not a primitive value.” instead of silently loading an unqueryable value. Same rule the clipboard auto-load already enforced; both paths now share a single-pass scan that reports validity and container shape together.

Changed

  • --paste opens a neutral editor view, not a red error screen (#174) - Deliberate paste-mode invocations (via --paste or the picker’s Paste option) now render with a calm cyan border and no top “Info” box at all - the textarea’s title and placeholder already say “paste JSON, press Enter to load”, so the redundant info box was just visual noise. The clipboard-failure recovery path keeps the red “No JSON loaded” framing because something genuinely went wrong there.

[3.27.3] - 2026-05-26

Added

  • Clickable [ < Back ] badge on the results pane (#173) - The < chord is now also a visual affordance: a styled [ < Back ] badge appears on the top-left of the results pane border whenever the undo ring is non-empty. Cyan by default, purple+bold on hover. Clicking it focuses the results pane (confirming search if open) and pops the most recent drill snapshot - same effect as pressing <. The keyboard chord remains in the bottom hint strip alongside > value, * iterate, ^ parent, } wrap, ]/[ siblings so the shortcut stays discoverable.

Changed

  • Position indicator moves to the bottom-right border (#173) - L1-65/5957 (0%) now lives on the bottom-right of the results pane instead of the top-right, freeing the top-left for the back badge and the path-at-cursor span. The centered hint strip on the bottom border is explicitly width-budgeted and trims at hint boundaries so it never collides with the position indicator on any terminal width. When search is confirmed, the bottom-right slot switches from position to the match-count badge.
  • Drill chords are typed as text while editing the search query (#173) - Previously >, <, *, ^, }, [, ] would trigger drill operations even while the search bar was unconfirmed - making it impossible to grep for those characters in JSON containing HTML/XML, regex char classes, glob keys, etc. They now reach the search textarea as literal characters until you confirm with Enter or Tab, after which the chords work as before. The search bar’s bottom hints update accordingly to advertise only the keys that actually fire in editing mode (Enter Confirm • Tab Confirm • Esc Close); the results-pane chord strip is suppressed in the same state.

[3.27.2] - 2026-05-26

Changed

  • Global hint strip slimmed; Shift+Tab moved onto the query box border (#172) - The independent hint line at the very bottom of the TUI no longer duplicates shortcuts that are already shown on the query input’s bottom border. While the query box is focused (INSERT or NORMAL), the global strip now reads F1 Help • Ctrl+S Snippets • Ctrl+F Search • Enter Output Result • Ctrl+Q Output Query • Ctrl+C Quit - dropping Shift+Tab Navigate Results, Ctrl+P/N Cycle History, and Ctrl+R History, and adding Enter/Ctrl+Q so the two most common exit shortcuts are visible globally. Shift+Tab Navigate Results moves to the query input’s own bottom border, alongside the state-aware hints already shown there (Enter/Ctrl+Q when the query is non-empty, Ctrl+P/Ctrl+N/Ctrl+R when empty, Ctrl+E Show Error when there’s a parse error). No keybindings change - this is purely a hint-placement cleanup so each shortcut is announced exactly once on screen.

[3.27.1] - 2026-05-26

Added

  • Double-click to drill / accept (#171) - Double-click any row in the results pane to drill into the value on that row, the same effect as putting the cursor there and pressing >. Double-click any suggestion in the autocomplete dropdown to accept it - closing the gap where the behavior was already advertised in the docs but had no implementation. Single-click behavior is unchanged: it positions the cursor in the results pane and only highlights in the autocomplete dropdown. Detection lives in a shared DoubleClickTracker (400 ms threshold, configurable per-consumer granularity of same-row or same-cell, region-aware) so any future double-click consumer reuses the same primitive instead of growing a third hand-rolled implementation. Hover and scroll between two clicks invalidate the pending pair, so a wandering pointer or wheel-tick can’t accidentally trigger a drill, and a successful double-click does not chain into a triple.

[3.27.0] - 2026-05-24

Added

  • Sibling navigation chords (], [) (#170) - Press ] to jump the cursor to the next sibling row and [ to jump to the previous sibling, within the cursor’s parent container. Pure cursor movement: the query is unchanged, the textarea is untouched, and the undo ring is left alone (so < still pops the last > you pressed, not the last sibling step). Wraps at container boundaries: ] from the last child returns to the first; [ from the first goes to the last. The handler resolves the cursor row’s path, walks to the prev/next sibling in the parsed JSON tree (object keys preserved by serde_json’s preserve_order, array indices trivial), maps that sibling back to its rendered line via a new line_at_path walker, and move_to_lines there with ensure_cursor_visible to handle scrolling. Single-child containers and the root row are soft no-ops with notifications. Works in search mode against the match row and keeps the overlay open since cursor movement doesn’t invalidate the search context. Bottom-border hints now read > value · < back · * iterate · ^ parent · } wrap · ]/[ siblings.

[3.26.0] - 2026-05-24

Added

  • More path navigation chords (*, ^, }) (#169) - Three new chords on the results pane (and in search mode) build on > / < for finer-grained query rewrites. * iterates over the nearest array index in the path (.users[2].tags[1] becomes .users[2].tags[]); pushes to the undo ring like > so < reverses it. ^ steps up one level by parsing the trailing path segment of the typed query and dropping the last step (.users[0].name becomes .users[0], then .users, then .); pipe-aware so a >-then-^ cleanly walks back through a drill chain; ring-free. } wraps the cursor’s leaf as a single-entry object literal (.users[0].name becomes .users[0] | {name}, producing {"name": "alice"} instead of just "alice"); long-form syntax for keys that need bracket notation. All are pure textarea rewrites — execution flows through the existing debounced async pipeline. Bottom-border hints read > value · < back · * iterate · ^ parent · } wrap, with < back shown only when the undo ring is non-empty.

Changed

  • < always pops the most recent >-snapshot (#169) - Previously, manually editing the textarea between drill-ins would invalidate the entire undo ring with a “history cleared” notification. The new behavior pops unconditionally — your intermediate edits are discarded, but the mental model becomes a clean “always undoes a >.” The [ and ] keys (formerly bound to alternate parent/up chords) are now unbound and reserved for future sibling navigation.

[3.25.0] - 2026-05-23

Added

  • Path-at-cursor display + > / < to drill in / step back (#168) - The results pane title shows the live jq path of the value pretty-printed on the current cursor row (e.g., Array [50 objects] · .users[2].profile.email). The path span fills the available top-border space and head-truncates with only when it would otherwise overflow. Press > to drill into the value at the cursor — pipe-composes the path onto the current query (or replaces it outright when the query is empty or just .); press < to step back to the prior query, restoring the cursor row and scroll position you came from. Drill-in / back simply rewrite the input, so the existing debounced async query pipeline picks up the change exactly as if you’d typed it. Both chords stay on the results pane so you can drill repeatedly without leaving exploration mode. While search is active, > drills into the current match’s row (not the cursor) and closes the search overlay; < works identically inside or outside search. The < bottom-border hint only appears once you have at least one snapshot to step back to, and a manual edit to the textarea between drill-ins invalidates the entire undo ring with a notification. The span is hidden when the result is a multi-document stream (where the parsed-value layout doesn’t line up with the rendered output). Path emission rules (jq simple-identifier vs. bracket notation) are centralized in a new json_path module shared with the autocomplete suggestion engine.

[3.24.0] - 2026-05-23

Added

  • In-app paste recovery when clipboard auto-load fails (#166) - When jiq launches with no file argument, no piped stdin, and the clipboard fallback can’t produce valid JSON (unreadable backend, empty clipboard, or non-JSON content), the app now drops into a paste-recovery view instead of exiting with the static error. The view shows the diagnosis in a top “No JSON loaded” block and a multi-line textarea below it; paste your JSON (Cmd+V / Ctrl+Shift+V or the terminal’s native shortcut), press Enter to validate and load. On parse failure the top block updates to Invalid JSON: <details> and a red toast nudges the eye to the change. Ctrl+X clears the textarea so you can paste fresh content. Editing reuses the existing query-input VIM infrastructure so dd, cc, D, C, dw, ci", f/F/t/T, ;/,, u, Ctrl+R, etc. all work; j/k/g/G navigate between lines. Bottom-border hints are mode-aware — only the opposite mode toggle is shown (Esc Normal while in Insert; i Insert while in Normal). On terminals/multiplexers that don’t forward bracketed paste (Cloud Desktop, plain tmux, mosh), pasted newlines arrive as Ctrl+J keystrokes, which jiq now intercepts and turns into real line breaks instead of letting tui-textarea’s default Ctrl+J = delete-line-by-head collapse the paste.

[3.23.4] - 2026-05-23

Added

  • OSC 52 clipboard read fallback (#165) - When arboard cannot reach the system clipboard - typically a remote SSH session without X11/Wayland - jiq now falls back to OSC 52 read with a 1s timeout (matching Neovim’s vim.ui.clipboard.osc52 initial wait). Modern terminals (Ghostty, kitty, WezTerm, foot) hand the clipboard back over the SSH tunnel, so launching jiq with no path / no piped stdin works in environments where it previously errored out. The OSC 52 path picks up content copied inside the remote session (tmux selection buffers, OSC 52 writes from peer apps); content copied on the host workstation generally cannot reach jiq because most terminals refuse to forward host-clipboard reads back through the SSH tunnel for security reasons.

Changed

  • Multi-line input-error message (#165) - The “no input provided” error now uses a multi-line format with three distinct first-line diagnoses: Could not read the system clipboard. (backend unavailable, both arboard and OSC 52 failed), Clipboard is empty., or Clipboard does not contain valid JSON.. Each is followed by the three valid invocation forms with inline comments: jiq <file>, cat data.json | jiq, and jiq (clipboard).

[3.23.3] - 2026-05-22

Fixed

  • Clipboard fallback no longer surfaces raw backend errors (#164) - On remote SSH sessions without a real clipboard (no X11/Wayland, no OSC 52 read), launching jiq with no path and no piped stdin previously dumped the raw arboard error - e.g. Failed to load file: I/O error, clipboard unavailable. ... X11 server connection timed out. The clipboard fallback is silent, so any failure now collapses to a friendly usage hint: No input provided. Usage: jiq <file> or echo '{}' | jiq (backend unavailable, empty, or read failure) or No input provided and clipboard does not contain valid JSON. Usage: jiq <file> or echo '{}' | jiq (clipboard had text but it wasn’t JSON). The raw arboard error remains visible at debug level via --debug / JIQ_DEBUG=1 for diagnosis.

[3.23.2] - 2026-05-22

Added

  • Delete entries from history popup (#163) - Press Ctrl+D to delete the selected entry, or hover any row to reveal a button that deletes the entry on click. The popup auto-closes when the last entry is removed, and deletes are persisted to the on-disk history file. The popup’s bottom border now shows Enter Select • Ctrl+D Delete • Esc Close, matching the pattern used by search and snippets.

[3.23.1] - 2026-05-22

Added

  • Ctrl+O to copy results from any focus (#162) - Pressing Ctrl+O now copies the results pane content regardless of which pane is focused, so you can grab the rendered JSON without leaving the query box. Ctrl+Y is unchanged and remains focus-aware (copies query when input focused, results when results focused).

[3.23.0] - 2026-05-22

Added

  • Clipboard fallback on launch (#161) - When jiq is launched with no file argument and no piped stdin, it now reads JSON from the system clipboard. If the clipboard contains valid JSON or JSONL, jiq starts with that content; otherwise the existing “No input provided” error is shown. Existing paths (positional file argument and piped stdin) are unchanged. Note: this relies on a real local clipboard (macOS, Linux desktop, WSL); remote SSH sessions that copy via OSC 52 cannot read it back, so the feature is unavailable there and falls back gracefully to the no-input error.

[3.22.3] - 2026-05-19

Fixed

  • Search no-match feedback (#160) - When typing in the search bar (Ctrl+F edit mode) and the query stops matching, the results pane now resets scroll to the top, dims the rendered results, and shows a red ⚠ No Matches badge in the title — visually consistent with the existing ⚠ Syntax Error and ∅ No Results badges. Previously the viewport stayed frozen at the last partial match with no visual indication that the current query produced no results. The behavior applies only while typing and only for non-empty queries; once Enter confirms the search, navigation mode resumes normally.

[3.22.2] - 2026-05-16

Fixed

  • AI context UTF-8 boundary truncation (#158) - JSON context sent to the AI assistant is now truncated at valid UTF-8 character boundaries, preventing panics when the cutoff fell mid-multibyte character (CJK, emoji, accented Latin).
  • Clippy lints for Rust 1.95.0 (#159) - Behavior-preserving refactors to satisfy stricter clippy checks in Rust 1.95.0: unnecessary_sort_by in history/snippet matchers (now use sort_by_key with Reverse), manual_checked_ops in results render, and collapsible_match in stats parser and tooltip detector.

[3.22.1] - 2026-04-15

Added

  • Release-build debug logging (#157) - End users running release binaries can now capture diagnostic output via --debug flag or JIQ_DEBUG=1 environment variable. Logs are written to /tmp/jiq-debug.log at DEBUG level with zero overhead when disabled. Expanded coverage across session lifecycle, config loading, file I/O, jq execution, query dispatch, AI requests, clipboard operations, and terminal init/restore to make logs useful for diagnosing crashes, hangs, wrong results, and config issues. All output goes to file only — never stdout/stderr — so the TUI remains uncorrupted.

Documentation

  • Added Troubleshooting section to README explaining debug logging activation.

[3.22.0] - 2026-04-15

Fixed

  • UTF-8 crash in autocomplete (#153) - Typing non-ASCII characters (CJK, emoji, accented Latin) no longer panics. Root cause was the textarea reporting cursor as a character index while autocomplete used it as a byte offset for Rust string slicing. Fixed via ingress normalization at the two autocomplete entry points, making all downstream slicing automatically safe for multibyte text.
  • Autocomplete suggestions emit valid jq for non-ASCII keys - Previously, keys like 名前 or café were classified as identifiers via Rust’s Unicode-aware is_alphanumeric, producing suggestions like .名前 that jq rejects as syntax errors. The identifier check is now ASCII-only, so non-ASCII keys are suggested as .["名前"] bracket notation.
  • Autocomplete popup width for wide characters - CJK and emoji characters now size the suggestion popup correctly via unicode-width. Previously .chars().count() undercounted their 2-column display footprint, causing type labels to get cut off.
  • AI assistant reliability for non-ASCII keys - Added a client-side sanitizer that rewrites any .X suggestion to .["X"] when X isn’t a valid ASCII jq identifier, eliminating invalid queries regardless of model compliance with prompt rules.
  • AI response parsing robustness - More lenient markdown-fence stripping (handles missing newlines, inline fences, missing closing fences, uppercase language tags) plus a last-resort JSON-object extractor that catches prose-wrapped responses.
  • AI parse-error visibility - Parse errors now only display when a response genuinely failed to parse, not during the intermediate state between two requests where stale output would briefly appear as “Could not parse”.

Added

  • Non-ASCII bracket-notation guidance in AI prompts - Both error and success prompts now include rules and a stricter output-format specification to reduce parse failures and invalid-syntax suggestions.
  • UTF-8 test fixtures - tests/fixtures/utf8-{cjk,emoji,accented,mixed}.json for manual and future automated testing.
  • Diagnostic logging for AI parse failures - Failing responses are now logged via the existing env_logger infrastructure (debug builds only) so the exact model output can be inspected.

Documentation

  • Added Tips entry in README explaining that non-ASCII keys require bracket notation (.["名前"]) or quoted-dot notation (."名前") — jq’s .field shorthand is ASCII-only.

[3.21.1] - 2026-04-11

Changed

  • Commit Cargo.lock for reproducible builds - Removed Cargo.lock from .gitignore and committed it to the repository, enabling packaging for Nix and other package managers that require the lock file (#154)

Documentation

  • Clarified array_sample_size config description and default value in README

[3.20.3] - 2026-01-29

Added

  • Auto-quoting for non-simple field names in autocomplete - Field names containing special characters are now automatically wrapped in quotes (thanks @thn929!)
    • Field names with spaces, hyphens, or other special characters are suggested as .["field-name"] instead of .field-name
    • Ensures syntactically valid jq queries when accepting autocomplete suggestions

[3.20.2] - 2026-01-27

Added

  • Modern badge styling for status indicators - Enhanced visual appearance of status badges in the UI with improved styling and consistency

[3.20.1] - 2026-01-27

Fixed

  • Improved keyboard shortcut hints styling and display logic - Enhanced visual presentation and conditional display of keyboard shortcuts in pane borders

[3.20.0] - 2026-01-27

Added

  • Galaxy theme - New vibrant color theme with cosmic-inspired palette
    • Accessible via theme configuration
    • Features bold, high-contrast colors for improved visibility

Fixed

  • Removed arrow indicator from autocomplete suggestions - Cleaner visual appearance for autocomplete dropdown
  • Tests updated to use theme colors - Test suite now references theme constants instead of hardcoded color values

[3.19.0] - 2026-01-27

Added

  • / shortcut in normal mode to open search - Quick access to search functionality from normal mode in the query input field
  • Modernized snippet manager selection indicator - Updated visual design with improved clarity and styling

Fixed

  • Mode indicator shows red when input has error - Visual feedback now indicates syntax errors in the mode indicator
  • Simplified error display with red border - Error state now shown with red border instead of title text for cleaner UI
  • Improved history popup visual design - Enhanced visual appearance and layout of the history popup

[3.18.4] - 2026-01-26

Fixed

  • Improved help popup styling and mouse hover accuracy - Enhanced visual appearance and more precise mouse interaction detection
  • AI Assistant popup padding - Added padding for better visual spacing
  • AI Assistant hint styling - Matched hint color to input border and hide hint when input is unfocused

[3.18.3] - 2026-01-26

Changed

  • Unified border keyboard shortcuts styling - Consistent styling applied to keyboard shortcut hints displayed in pane borders

Fixed

  • Popups now close on mouse click focus switch - Clicking to switch focus to the results pane now properly closes any open popups (history, snippets, help)

[3.18.2] - 2026-01-26

Changed

  • Unified help hints styling - Standardized Gray/DarkGray color scheme for all help hint text across the UI

[3.18.1] - 2026-01-26

Added

  • Syntax highlighting in history and snippets - jq syntax highlighting now applied to query text in:
    • History popup entries
    • Snippets preview panel
    • Replace snippet confirmation dialog (old/new queries)

Changed

  • History selection background updated to darker color for better contrast with syntax highlighting

[3.18.0] - 2026-01-26

Changed

  • Centralized theme configuration - All colors and styles now defined in src/theme.rs
    • Single source of truth for all UI colors across the application
    • Organized into component-specific submodules (input, results, search, help, history, snippets, ai, autocomplete, tooltip, syntax)
    • Eliminates hardcoded Color::* values scattered throughout render files
    • Easier to maintain consistent styling and make theme-wide changes
    • Added theme usage guidelines to CLAUDE.md for contributors

[3.17.8] - 2026-01-26

Changed

  • Modernized UI with rounded borders - Updated border style from sharp corners to rounded for a more polished appearance
    • All panes and popups now use rounded corners
    • Consistent visual styling across the entire interface

[3.17.6] - 2026-01-25

Performance

  • Optimized search highlights and reduced ANSI parsing memory - Improved memory efficiency during search result rendering
    • Reduced allocations when highlighting search matches
    • More efficient ANSI code parsing for large result sets

[3.17.5] - 2026-01-25

Fixed

  • Search highlight preserved when cursor is on same line - Search matches now remain highlighted when navigating to a line containing a match
    • Previously, moving cursor to a line with a search match would lose the search highlight
    • Search highlighting now correctly persists regardless of cursor position

[3.17.4] - 2026-01-25

Performance

  • Moved is_only_nulls check to worker thread - Eliminates main thread computation during rendering
    • Null detection now performed during preprocessing in background thread
    • Reduces per-frame overhead for queries that return null values

[3.17.3] - 2026-01-25

Performance

  • Cached line widths - Eliminate O(n) computation per render frame
    • Line widths now computed once in worker thread when query results return
    • Previously allocated ~200KB per frame for large files (100K+ lines)
    • Reduces per-frame overhead for smoother scrolling on large result sets
  • Combined JSON parsing - Eliminate duplicate parse with parse_and_detect_type
    • JSON is now parsed once for both type detection and value extraction
    • Removes redundant parsing that occurred on every query result

[3.17.2] - 2026-01-24

Added

  • Mouse support for query input box - Click to position cursor in query input field
    • Click anywhere in the query input to move cursor to that position
    • Complements existing keyboard navigation for flexible input editing

[3.17.1] - 2026-01-24

Added

  • Click-and-drag multi-line selection in results pane - Mouse selection support for copying multiple lines
    • Click and drag to select text across multiple lines
    • Selection follows mouse movement for intuitive text selection
    • Works seamlessly with existing keyboard-based selection modes
  • Vim-style cursor navigation with visual line selection - Enhanced results pane navigation
    • Visual line selection mode for precise text selection
    • Cursor-based navigation using vim keybindings
    • Integrates with mouse selection for flexible interaction

[3.17.0] - 2026-01-23

Added

  • Query execution time display - Shows query execution time in the results pane
    • Displays timing in bottom-left corner of results window
    • Color-coded performance indicators: green (<200ms), yellow (200-1000ms), red (>1000ms)
    • Compact format: “42ms” or “1.2s” for longer queries
    • Measures actual execution time (jq + preprocessing, excludes debounce delay)

[3.16.0] - 2026-01-23

Added

  • Automatic JSONL support - Auto-detection and parsing of newline-delimited JSON (JSONL/NDJSON) input
    • Automatically detects JSONL format when input contains multiple JSON objects separated by newlines
    • Wraps JSONL content in a JSON array for seamless jq processing
    • Works with both file input and stdin piping
    • No manual flags required - format detection is automatic

[3.15.1] - 2026-01-23

Fixed

  • Search confirmation on click - Clicking on results pane now confirms search when search is active
    • Previously clicking results pane did not confirm the search
    • Now clicking behaves consistently with pressing Tab to confirm search

[3.15.0] - 2026-01-23

Added

  • Comprehensive mouse interaction support - Full mouse support for intuitive TUI navigation
    • Click to focus panes (query input, results pane)
    • Click on autocomplete suggestions to select them
    • Click on AI suggestions to select them
    • Click on history popup entries to select them
    • Click on snippet manager entries to select them
    • Double-click to apply selected items
    • Mouse wheel scrolling in results pane and popups
    • Click on help popup tabs to switch between them
    • Scrollbar click and drag support in results pane

Fixed

  • Results pane scrollbar positioning - Scrollbar now respects border corners for cleaner visual appearance

[3.14.0] - 2026-01-22

Added

  • Visual scrollbar in results pane - Results pane now displays a scrollbar for easier navigation
    • Shows scroll position within large result sets
    • Provides visual feedback for vertical navigation

[3.13.13] - 2026-01-22

Added

  • Unified entry context detection for to_entries/with_entries - Autocomplete now suggests .key and .value fields inside both to_entries and with_entries functions
    • Consistent behavior across both entry-manipulation functions
    • Context-aware suggestions appear when cursor is inside these functions

[3.13.12] - 2026-01-22

Added

  • Bidirectional Tab navigation for search mode - Tab key now switches between search bar and results pane
    • Tab in search bar confirms search and moves focus to results pane
    • Tab in results pane (during search) returns focus to search bar
  • Enhanced results pane navigation - Added Tab and i keys to switch focus back to query input
    • i key follows vim convention for entering insert mode
    • Tab provides consistent navigation across all contexts
  • Popup auto-hide on focus switch - AI assistant and tooltip popups automatically hide when switching pane focus
    • Popups restore when returning to query input
    • Prevents visual clutter during navigation

[3.13.11] - 2026-01-21

Added

  • Tabbed Help Popup - Help popup now has 7 tabs for better organization.
  • Context-aware Help - Help popup now shows relevant keybindings based on the current context.
  • Search Keybinding - Search results border now shows Ctrl+F keybinding.

[3.13.10] - 2026-01-21

Added

  • Visual cues for unfocused query input - Query input now shows visual distinction when unfocused
  • Keyboard shortcuts on search bar and results pane borders - Shortcuts displayed directly on borders for better discoverability
  • Context-aware footer shortcuts - Footer help excludes inapplicable shortcuts in Search and Snippet Manager modes

Changed

  • Enhanced bracket highlighting - Matching brackets now highlighted with yellow color and bold styling for better visibility

[3.13.9] - 2026-01-20

Fixed

  • Popup key handling layering - Restructured popup key handling for proper event layering
    • Fixes issues where key events could be incorrectly captured or passed through overlapping popups
    • Ensures consistent key behavior across all popup types (AI, search, snippets, history)

[3.13.8] - 2026-01-20

Changed

  • Improved snippet manager keybinding display - Bottom border now shows shortcuts with proper prefixes
    • Shortcuts displayed with “Snippet: “ prefix for better context
    • Consistent formatting across all snippet manager states
    • Improved visual hierarchy in keybinding hints

Fixed

  • Search window focus indication - Active search window now has purple border, inactive has gray
    • Purple border indicates the active search window for clear focus state
    • Gray border for inactive state provides visual distinction
    • Improves usability when switching between search and results
  • Search UX improvements - Enhanced visual states and focus restoration
    • Search mode now maintains proper focus after operations
    • Visual states clearly indicate search activity
    • Improved state transitions between search and normal modes

[3.13.7] - 2026-01-20

Changed

  • Full-screen search and snippets overlays - Query input is now hidden when search or snippets manager is open, giving overlays more screen space
  • Distinct overlay border colors - Search uses light purple (LightMagenta), snippets manager uses light green (LightGreen)
  • Cohesive search mode styling - Results pane border and title text match light purple when search is active

[3.13.6] - 2026-01-20

Added

  • Position indicator in results title bar - Shows current line range and scroll percentage
    • Format: L{start}-{end}/{total} ({percent}%)
    • Displays visible line range (1-indexed), total line count, and scroll position
    • Appears in top-right corner of results pane
  • Quick snippet query replacement - Replace snippet query with current input using Ctrl+R
    • Shows confirmation dialog with old vs new query comparison
    • Press Enter to confirm, Esc to cancel
    • Warns if queries are identical (no changes needed)

[3.13.5] - 2026-01-19

Fixed

  • Search popup focus - AI assistant and tooltip popups now auto-hide when search is opened
    • Prevents visual clutter and overlap when entering search mode
    • Popups restore automatically when search is closed

[3.13.4] - 2026-01-19

Fixed

  • History navigation boundaries - Arrow keys now stop at first/last entry instead of wrapping around
    • Up arrow stops at oldest history entry
    • Down arrow stops at newest history entry
    • Consistent with AI popup navigation behavior (v3.12.2)

[3.13.3] - 2026-01-19

Fixed

  • Snippet manager search interference - Changed keybindings to use Ctrl modifiers to prevent interference with search query typing
    • Previously, keybindings without modifiers would trigger actions while typing in the search box
    • Search input now works correctly without unintended keybinding activation

[3.13.2] - 2026-01-19

Added

  • Mouse wheel scrolling for results pane
    • Scroll up/down using mouse wheel when results pane is focused
    • Provides intuitive navigation for users who prefer mouse input

[3.13.1] - 2026-01-19

Fixed

  • Added missing Ctrl+S keybinding documentation to help popup and global keybinds section

[3.13.0] - 2026-01-19

Added

  • Snippet library - Save and reuse frequently used jq queries
    • Ctrl+S to open snippet library popup
    • Create new snippets from current query with name and optional description
    • Edit existing snippets (name, query, description)
    • Delete snippets with confirmation dialog
    • Fuzzy search to quickly find saved snippets
    • Apply snippet with Enter to replace current query
    • Snippets persist to ~/.config/jiq/snippets.toml
    • Tab/Shift+Tab to cycle between fields in create/edit mode

[3.12.2] - 2026-01-17

Fixed

  • AI popup navigation boundaries - Disable wrap-around when navigating suggestions
    • Arrow keys now stop at first/last suggestion instead of wrapping
    • Prevents accidental selection jumps when navigating through suggestions

[3.12.1] - 2026-01-17

Added

  • Scrollable autocomplete popup - Autocomplete suggestions now scroll when there are many matches
    • Fixed-width type labels for consistent alignment
    • Smooth scrolling through long suggestion lists
    • Improved readability for large JSON structures with many fields

[3.12.0] - 2026-01-17

Added

  • Nested path navigation for autocomplete - Multi-level field suggestions in non-executing contexts
    • Suggestions now work inside map(), select(), array builders [.a, .b], and object builders {key: .val}
    • Path parser extracts expressions like .user.profile. for JSON tree navigation
    • Zero-copy navigation using borrowed references for performance
    • Graceful fallback to root-level suggestions when navigation fails

[3.11.3] - 2026-01-15

Added

  • Visual bracket pair highlighting - Shows matching brackets when cursor is positioned on them
    • Highlights matching pairs of (), [], {} when cursor is on opening or closing bracket
    • Helps identify bracket scope and nesting in complex queries
    • Improves code navigation and readability

Fixed

  • Missing import in bracket_matcher module documentation test

Tests

  • Updated help popup snapshot for $ keybinding

[3.11.2] - 2026-01-14

Added

  • Vim operator character search motions - Delete and change operators now work with character search
    • df{char} / dF{char} - delete forward/backward to character
    • dt{char} / dT{char} - delete till forward/backward (stop before character)
    • cf{char} / cF{char} - change forward/backward to character
    • ct{char} / cT{char} - change till forward/backward (stop before character)
    • Combines existing character search motions (f/F/t/T) with delete/change operators
    • Example usage:
      • df" - delete from cursor to next quote
      • ct| - change from cursor till next pipe
      • dT( - delete backward till opening parenthesis
    • Enables precise text manipulation using character targets

[3.11.1] - 2026-01-14

Added

  • Visual dimming for stale results - Last non-empty/last successful results are dimmed to make stale output more obvious

Tests

  • Updated help popup snapshots for v3.11.0 features

[3.11.0] - 2026-01-14

Added

  • Vim-style text object operators - Advanced vim text manipulation with ci/di/ca/da operators
    • ci/di for change/delete inner (content only)
    • ca/da for change/delete around (including delimiters)
    • Supported targets:
      • w - word (alphanumeric + underscore)
      • ", ', ` - quote pairs
      • (, ), [, ], {, } - bracket pairs with nesting support
      • | - pipe segments in jq queries
    • Example usage:
      • ciw - change inner word
      • di" - delete inside quotes
      • ca( - change around parentheses (including the parens)
      • ci| - change inside pipe segment
    • Inner scope operates on content only, around scope includes delimiters
    • Pipe text objects handle jq query segments intelligently
  • Vim character search navigation - Fast character-based cursor movement
    • f{char} - find forward to character
    • F{char} - find backward to character
    • t{char} - till forward (stop before character)
    • T{char} - till backward (stop after character)
    • ; - repeat last search in same direction
    • , - repeat last search in opposite direction
    • Enables quick navigation within queries without using word motions
    • Integrates with operators (e.g., df" to delete from cursor to next quote)

[3.10.7] - 2026-01-13

Fixed

  • Terminal cleanup on error paths - Ensures terminal is properly restored on all error conditions
    • Terminal state now correctly restored even when errors occur during initialization
    • Prevents terminal corruption when application exits via error paths
    • Improves reliability and robustness of terminal handling

[3.10.6] - 2026-01-13

Added

  • Variable autosuggestion for jq variables - Autocomplete now suggests jq variables ($var)
    • Detects variable definitions in query (as $var, | . as $var)
    • Suggests defined variables when typing $
    • Handles multiple variable definitions and scoping
    • Improves workflow when working with jq variable assignments
  • Variable syntax highlighting - Variables now highlighted in distinct color for better readability
    • All $variable references shown in dedicated color
    • Helps distinguish variables from other jq syntax elements

Internal

  • Comprehensive test coverage for variable autosuggestion edge cases
  • Refactored helper functions in context.rs for improved maintainability
  • Enhanced code documentation for autocomplete helper functions

[3.10.5] - 2026-01-12

Added

  • Ctrl+D/U navigation from input field - Page scrolling now works from input field without focus switch
    • Ctrl+D scrolls results half-page down from input field
    • Ctrl+U scrolls results half-page up from input field
    • Maintains focus on input field while navigating results
    • Improves workflow by eliminating need to switch focus for quick result browsing

Internal

  • Enhanced test coverage for autocomplete edge cases
  • Refactored insertion logic with focused helper functions for improved maintainability

[3.10.4] - 2026-01-09

Fixed

  • Autocomplete suggestions after question mark operator - Suggestions no longer appear after bare ? operator
    • Prevents incorrect suggestions after try-catch operators
    • Autocomplete properly detects when ? is used as error suppression syntax
  • Text duplication in mid-query suggestion insertion - Fixed text duplication when accepting suggestions in the middle of a query
    • Autocomplete now correctly replaces text at cursor position
    • Prevents duplicate text from appearing when inserting suggestions

[3.10.3] - 2026-01-07

Added

  • Autocomplete suggestions for fromjson and tojson functions - JSON string conversion functions now appear in autocomplete
    • fromjson suggestion for parsing JSON strings into objects
    • tojson suggestion for serializing objects into JSON strings
    • Improves discoverability of string/JSON conversion operations

[3.10.2] - 2026-01-07

Fixed

  • Stdin terminal detection - Immediately errors when stdin is not a terminal instead of blocking
    • Prevents application from hanging when stdin is a pipe but not providing data
    • Provides clear error message directing users to use file input or pipe JSON data
    • Improved CI stability with more reliable subprocess tests

[3.10.1] - 2026-01-05

Fixed

  • History popup scroll support - History popup now supports mouse wheel and keyboard scrolling
    • Added scroll support to navigate through long history lists
    • Improves usability when viewing many saved queries

[3.10.0] - 2026-01-03

Added

  • OpenAI-compatible API endpoint support - AI provider can now connect to any OpenAI-compatible API
    • Custom base URL configuration via base_url field in provider config
    • Enables use of local LLM servers (Ollama, LM Studio, etc.)
    • Supports alternative API providers with OpenAI-compatible interfaces
    • Configuration example:
      [ai]
      enabled = true
      provider = "openai"
      
      [ai.openai]
      api_key = "not-needed-for-local"
      model = "llama3.2"
      base_url = "http://localhost:11434/v1"  # Ollama example
      
    • Works with Anthropic, OpenAI, Gemini, and Bedrock providers
    • Allows mixing cloud and local AI models in same configuration

[3.9.2] - 2026-01-02

Changed

  • Code cleanup and quality improvements
    • Removed duplicate execute() method in query module
    • Fixed clippy linting warnings for improved code quality

[3.9.1] - 2026-01-02

Performance

  • SIMD-accelerated ANSI stripping - Uses memchr for faster ANSI color code removal
    • Leverages SIMD instructions for improved performance on large result sets
    • Optimizes query result preprocessing and rendering

Changed

  • Removed temporary debug statements for cleaner codebase
  • Updated README documentation

[3.9.0] - 2025-12-31

Added

  • JSON response format for AI suggestions - Structured JSON output from AI providers
    • Enables better parsing and validation of AI responses
    • Improves reliability of AI-generated query suggestions
    • Graceful fallback to text parsing when JSON format fails

Fixed

  • AI empty/null output handling - Enhanced context for empty or null query results
    • AI now receives additional context when queries return empty/null values
    • Improved suggestion quality for edge cases

Changed

  • Increased AI context limits - Enhanced context capacity for better suggestions
    • Raised default context limit from 50KB to 100KB
    • Raised minification threshold from 250KB to 5MB
    • Provides AI with more comprehensive JSON structure and content
    • Updated default configuration documentation to reflect new 100KB limit
  • Configurable context truncation - Added max_context_length config option
    • Users can now customize how much context is sent to AI
    • Balances suggestion quality vs token usage/costs
    • Default remains at 100KB for optimal results

Internal

  • Marked test helper functions as cfg(test) for cleaner production builds
  • Improved metadata field documentation
  • Enhanced code clarity with better inline documentation

[3.8.3] - 2025-12-30

Fixed

  • AI token overflow - Fixed token overflow issues in AI prompts
    • Removed redundant input sample from error prompts to reduce token usage
    • Input schema now properly truncated to 25KB limit before being sent to AI
    • Better token management prevents exceeding model context limits
  • AI empty result context - Enhanced AI context for empty/null query results
    • AI now receives last non-empty query and its output when current query returns empty/null
    • Success prompts include cursor position for better suggestion accuracy
    • Improved suggestions for queries that filter down to empty results

[3.8.2] - 2025-12-29

Fixed

  • AI suggestion spacing - Fixed spacing disappearing when selecting last AI suggestion
    • Cursor now remains in the correct position after accepting the final suggestion
    • Prevents text collapsing when selecting the last item in the suggestion list

Changed

  • AI popup border color - Updated AI assistant popup border color for better visual distinction
    • Improved visual clarity and consistency with other UI elements

[3.8.1] - 2025-12-29

Added

  • Visual state indicators for result states - Color-coded borders and text to show result status
    • SUCCESS: Green text and border for current successful query results
    • EMPTY: Gray text with “∅ No Results Type Showing last non-empty result” message
    • ERROR: Yellow text with “⚠ Syntax Error Type Showing last successful result” message
    • All states use cyan border when results pane is focused, state-specific colors when unfocused
    • Improves visual feedback about query execution status at a glance

Changed

  • AI assistant border color - Changed from green to magenta to avoid conflict with success state indicator
    • Maintains clear visual distinction between different UI elements
    • Prevents confusion between AI suggestions and successful query results

Fixed

  • File loading error display - Prevents nested overlapping error boxes during startup
    • AI popup no longer renders when query is None during file loading errors
    • Shows brief notification instead of full error overlay for cleaner error handling
    • Eliminates visual glitches from multiple error indicators competing for screen space

[3.8.0] - 2025-12-29

Added

  • Suggestion counter in AI popup - Shows current selection position (e.g., “Suggestion 2 of 5”)
    • Helps users track their position when navigating through multiple AI suggestions
    • Displays in the popup header for easy reference

Improved

  • Scrolling support in AI suggestion box - Long suggestions now scrollable for better readability
    • Automatically scrolls when suggestions exceed popup height
    • Prevents content truncation for lengthy AI responses
    • Maintains consistent popup sizing
  • Natural language query handling - Enhanced AI prompts for better query interpretation
    • Improved context and instructions for processing user’s natural language intent
    • Better suggestions when users describe what they want in plain English
    • More accurate query generation from conversational input

Changed

  • Removed word limit constraints from AI responses - AI can now provide more detailed explanations
    • No artificial restrictions on response length
    • Better explanations and context in suggestions
    • Improved query reasoning and justification

[3.7.3] - 2025-12-28

Changed

  • AI context limit increased from 2,000 to 25,000 characters (12.5x) - Provides AI with significantly more JSON structure and content for better suggestions
    • Input JSON sample, output sample, and last successful result all use enhanced limit
    • Improves suggestion quality for complex or deeply nested JSON structures

Added

  • Smart JSON minification for 25KB-250KB context - Automatically compresses pretty-printed JSON to preserve more semantic content
    • Minification threshold: 10x the context limit (250KB)
    • Removes whitespace and formatting while preserving all data
    • Falls back to direct truncation for invalid JSON or sizes >250KB
    • Negligible performance impact (~8-10ms, <0.5% of typical AI API latency)

Tests

  • 26 new tests for context preparation and minification logic
    • 7 unit tests for try_minify_json()
    • 13 unit tests for prepare_json_for_context()
    • 3 integration tests with QueryContext
    • 3 edge case tests (unicode, deep nesting, special values)
    • 4 property-based tests for robustness
  • Total test count: 1569 → 1595 tests, all passing

[3.7.2] - 2025-12-27

Added

  • Autocomplete suggestions inside with_entries() - Suggests .key and .value fields for object entry manipulation
    • .key and .value appear as the first two suggestions when cursor is inside with_entries()
    • Data-driven suggestions from the JSON structure also appear alongside
    • Context-aware: suggestions disappear after closing parenthesis
    • Works with nested functions like with_entries(select(.key | ...))

Tests

  • 30 new tests for with_entries context detection and suggestion behavior
    • 13 unit tests for BraceTracker WithEntries context detection
    • 17 integration tests for full suggestion flow
  • Total test count: 1536 → 1566 tests, all passing

[3.7.1] - 2025-12-26

Fixed

  • Autocomplete suggestions inside element-context functions - .array | map(.<tab>) now correctly suggests .field instead of .[].field
    • Functions like map(), select(), sort_by(), group_by(), unique_by(), min_by(), max_by(), recurse(), and walk() already provide element iteration
    • Autocomplete now detects this context and omits the redundant []. prefix
    • .[] suggestion also suppressed inside these functions since iteration is already provided
    • ObjectKeyContext ({na<tab>) correctly suppresses .[] suggestion

Added

  • ELEMENT_CONTEXT_FUNCTIONS HashSet for O(1) lookup of element-iterating functions
  • FunctionContext enum and BraceInfo struct in BraceTracker for tracking function context
  • is_in_element_context() method to detect cursor position inside element-iterating functions
  • suppress_array_brackets parameter in ResultAnalyzer for context-aware suggestions

Tests

  • 51 new tests for element context detection and suggestion behavior
    • Unit tests for BraceTracker function context detection
    • Property-based tests for element context functions
    • Integration tests for full suggestion flow
    • Regression tests for existing behavior
  • Total test count: 1416 → 1467 tests, all passing

[3.7.0] - 2025-12-23

Performance

  • Async query execution with worker thread - Eliminates 58-second UI freeze on large files
    • Query preprocessing (ANSI parsing, JSON parsing, line metrics) moved to background thread
    • Non-blocking execution via execute_async() and poll_response() methods
    • Cancellable requests using CancellationToken for instant abort
    • UI remains responsive during query execution regardless of file size
    • Proper panic handling prevents worker thread crashes from corrupting TUI
  • Dirty flag rendering system - Eliminates idle CPU usage with on-demand rendering
    • Added needs_render flag to track state changes
    • Main loop only renders when should_render() returns true
    • needs_animation() automatically handles spinner animations
    • Event handlers mark dirty after state modifications
    • Reduces CPU usage from continuous redraw to event-driven updates
  • Pre-rendered ANSI caching - Eliminates per-frame color conversion overhead
    • ANSI codes parsed once and cached in last_successful_result_rendered
    • Viewport slicing: only visible lines cloned (50 vs 100K+ for large files)
    • O(1) instead of O(n) per-render overhead for large result sets
  • Cached line metrics - Eliminates redundant line counting on every render
    • Line count and max width computed once during preprocessing
    • Cached values reused across frames until query changes
  • Search optimization - O(1) match lookup during rendering
    • matches_by_line: HashMap<u32, Vec<usize>> for instant line-based queries
    • matches_on_line(line: u32) method replaces linear search
    • Significantly faster search highlighting for large result sets

Fixed

  • Rendered cache now preserved for null query results
    • Prevents cache loss when query returns null or empty values
    • Maintains UI stability and performance across query variations

Tests

  • Comprehensive test coverage - 27 new tests for performance features
    • Dirty flag system: 13 tests (unit + property tests)
    • Search matches_by_line: 11 tests (unit + property tests)
    • File loader integration: 3 tests
    • Total test count: 1389 → 1416 tests, all passing
  • Test organization improvements
    • Split app_render_tests.rs into focused modules (basic_ui_tests.rs, popup_tests.rs, etc.)
    • Removed debug println statements from test code

Technical

  • New modules: query/worker/preprocess.rs, query/worker/thread.rs, query/worker/types.rs
  • Request/response architecture with QueryRequest and QueryResponse types
  • Worker thread uses std::sync::mpsc channels for communication
  • Zero clippy warnings, zero build warnings, all formatting checks pass

[3.6.0] - 2025-12-22

Changed

  • Dynamic AI context depth - Schema extraction depth now scales with file size
    • Small files (<1MB): depth 30 for comprehensive context
    • Medium files (1-10MB): depth 20 for balanced extraction
    • Large files (10-100MB): depth 10 for focused structure
    • Very large files (>100MB): depth 5 for minimal extraction
    • Provides better AI assistance for small files while maintaining performance
    • Array sampling optimization keeps extraction fast regardless of depth
    • Negligible load-time impact (<5ms for most files)

[3.5.1] - 2025-12-22

Added

  • Rainbow spinner animation during query processing
    • Non-intrusive animated spinner in title bar using Braille dot characters
    • Cycles through 8 rainbow colors (coral, orange, yellow, green, blue, indigo, violet, pink)
    • Results remain visible during processing - no more screen flashing
    • Animation speed: ~133ms per frame for smooth, subtle indication

Changed

  • Removed intrusive “Processing query…” overlay that replaced results
  • Query processing now indicated by small animated spinner in title bar

Technical

  • Added frame counter to App struct for animation timing
  • Implemented independent character and color cycling (10 chars, 8 colors)
  • Comprehensive test coverage: 9 unit tests + 5 snapshot tests

[3.5.0] - 2025-12-20

Performance

  • Async query execution infrastructure
    • Query worker with background thread for non-blocking execution
    • Automatic cancellation of stale queries with request ID tracking
    • Eliminates UI freezing during query execution
    • Proper pipe handling prevents deadlocks on large outputs (>64KB)
  • Arc-based optimizations for large file handling
    • Arc for JSON input (O(1) cloning vs O(n))
    • Arc for cached results (eliminates copy on every keystroke)
    • Cached parsed JSON (Arc) for autocomplete
    • Eliminates O(n) string copies and JSON parsing on every keystroke
  • Deferred/lazy loading for instant UI
    • Background file loading with progress indication
    • Instant UI startup even with very large input files
    • Responsive interaction during file loading
  • Improved debouncing
    • Increased debounce delay from 50ms to 150ms for better performance
    • Reduces query execution spam during fast typing

Fixed

  • AI context matching
    • AI suggestions now correctly match executed queries
    • Fixed race condition where AI received mismatched query/result pairs
    • poll_response() now returns the completed query for accurate context
    • Query field added to QueryResponse::Error for consistency
  • Autocomplete improvements
    • Unified async execution eliminates sync/async race conditions
    • No more stale autocomplete results
    • Paste operation now uses async execution correctly
    • Base query context properly updated via async path

Added

  • Comprehensive test coverage with 24+ new tests
    • Worker thread tests for concurrent query handling
    • Async execution lifecycle tests
    • Parsed result caching tests
    • Request ID filtering and cancellation tests
    • Coverage for query-in-response and AI context correctness

Changed

  • Removed dead code and unused imports
  • Fixed 11 clippy collapsible_if warnings
  • Cleaned up implementation comments for better code clarity

[3.4.0] - 2025-12-18

Changed

  • BREAKING: Removed default AI provider - users must now explicitly configure their provider
    • AiProviderType no longer has a default value
    • provider field in AiConfig is now Option<AiProviderType> (was AiProviderType)
    • AiConfig::default() now has provider = None instead of defaulting to Anthropic
    • Users must add provider = "anthropic" (or “openai”, “gemini”, “bedrock”) to their config
    • When no provider is configured, AI popup shows setup instructions with README link

Added

  • Input border hint “Press Ctrl+A for AI Assistant” when AI popup is hidden
    • Improves discoverability of AI features
    • Only shown when AI popup is not visible

Fixed

  • AsyncAiProvider::from_config now returns AiError::NotConfigured when provider is None
    • Error message includes README URL for setup guidance
  • Setup instructions in AI popup when no provider is configured
    • Clear message: “AI provider not configured”
    • Direct link to configuration documentation
    • Example configuration showing provider selection
  • Input border hint “Press Ctrl+A for AI Assistant” when AI popup is hidden
    • Improves discoverability of AI features
    • Hint disappears when AI popup is visible

Fixed

  • AsyncAiProvider::from_config now returns proper error when provider is None
    • Returns AiError::NotConfigured with helpful message and README URL
    • No silent fallback to default provider

[3.3.1] - 2025-12-18

Added

  • Full-width selection highlighting for AI suggestions
    • Selected suggestions now display edge-to-edge background highlighting
    • Replaced fragmented text-only highlighting with proper widget-based rendering
    • Each suggestion rendered as independent widget with full-width DarkGray background
    • Improves visual clarity and makes selection state immediately obvious
  • Height persistence during loading to prevent popup flickering
    • Popup maintains consistent size when user types
    • Stored height reused during loading transitions
    • Eliminates jarring size changes between suggestion updates
  • Consistent spacing between AI suggestions
    • Uniform 1-line spacing between all suggestions
    • Fixed inconsistent spacing that made suggestions appear cluttered
    • Clean visual separation using Layout spacing chunks
  • Model name display in AI popup header
    • Shows currently configured AI model (e.g., “claude-3-5-sonnet-20241022”)
    • Displayed on right side of popup title bar
    • Truncates with ellipsis if name is too long
  • Comprehensive test suite for widget rendering
    • 5 height persistence tests
    • 5 spacing validation snapshot tests
    • 7 widget selection snapshot tests
    • 2 widget background unit tests

Fixed

  • AI suggestions now accessible with Ctrl+A even when enabled = false in config
    • Previously required enabled = true for keyboard shortcuts to work
    • Now correctly checks configured status instead of enabled
    • Improves UX for users who keep AI disabled by default

Changed

  • AI suggestion popup positioning uses dynamic height based on content
    • No more wasted vertical space below suggestions
    • Popup shrinks to fit actual content height
    • Maintains bottom-right position above input bar
  • Keybindings moved from popup title to bottom border
    • Better visual hierarchy and cleaner title area
    • Easier to reference while interacting with suggestions

Refactored

  • Split provider_tests.rs into focused test modules
    • anthropic_tests.rs, bedrock_tests.rs, openai_tests.rs, gemini_tests.rs
    • error_tests.rs for cross-provider error handling
    • Improved maintainability and test organization

[3.3.0] - 2025-12-17

Added

  • Google Gemini AI Provider - Google Gemini as an alternative AI provider for query suggestions
    • Support for Gemini models (e.g., gemini-2.0-flash-exp) with API key authentication
    • Streaming support via Server-Sent Events (SSE) for real-time token-by-token responses
    • Comprehensive error handling with detailed messages for:
      • Missing/invalid API keys
      • Network errors
      • Model access issues
      • Rate limiting
      • Configuration validation
    • Configuration in ~/.config/jiq/config.toml:
      [ai]
      enabled = true
      provider = "gemini"
      
      [ai.gemini]
      api_key = "your-api-key-here"
      model = "gemini-2.0-flash-exp"
      
    • Provider information displayed in AI popup header
    • Full test coverage with property-based tests, snapshot tests, and SSE stream parsing tests
    • Reusable SSE parsing utilities for all streaming providers

Changed

  • Enhanced SSE parser to support multiple provider formats (OpenAI, Anthropic, Gemini)
  • Provider system now supports three streaming AI providers with consistent interfaces

[3.2.0] - 2025-12-17

Added

  • OpenAI AI Provider - OpenAI as an alternative AI provider for query suggestions
    • Support for OpenAI models (e.g., GPT-4, GPT-3.5) with API key authentication
    • Streaming support via Server-Sent Events (SSE) for real-time token-by-token responses
    • SSE parser supporting both OpenAI and Anthropic streaming formats
    • Comprehensive error handling with detailed messages for:
      • Missing/invalid API keys
      • Network errors
      • Model access issues
      • Rate limiting
      • Configuration validation
    • Configuration in ~/.config/jiq/config.toml:
      [ai]
      enabled = true
      provider = "openai"
      
      [ai.openai]
      api_key = "sk-..."
      model = "gpt-4o"
      
    • Provider information displayed in AI popup header
    • Full test coverage with snapshot tests and error handling tests

Changed

  • AI provider system now supports multiple streaming formats (OpenAI and Anthropic)
  • Provider-specific UI rendering shows which AI provider is in use

[3.1.0] - 2025-12-17

Added

  • AWS Bedrock AI Provider - Alternative to Anthropic for AI-powered query suggestions
    • Support for AWS Bedrock models (e.g., Claude via Bedrock) with AWS credentials
    • Streaming support via AWS SDK for real-time token-by-token responses
    • Comprehensive error handling with detailed messages for:
      • Missing/invalid AWS credentials
      • Network errors
      • Model access issues
      • Configuration validation
    • AWS credential chain support (environment vars, ~/.aws/credentials, named profiles)
    • Panic handling to prevent AWS SDK panics from corrupting TUI
    • Configuration in ~/.config/jiq/config.toml:
      [ai]
      enabled = true
      provider = "bedrock"
      
      [ai.bedrock]
      region = "us-east-1"
      model = "anthropic.claude-3-haiku-20240307-v1:0"
      profile = "my-aws-profile"  # optional
      

Changed

  • Multi-Provider Error Context - Refactored AiError enum for better provider support
    • Convert tuple variants to struct variants with named fields
    • Add provider field to error variants (NotConfigured, Network, Api, Parse)
    • Error messages now include [Provider] prefix for clearer diagnostics
    • Add provider_name() method to AsyncAiProvider trait
    • Mark AiError as #[non_exhaustive] for future extensibility

Dependencies

  • Added aws-config (with rustls for musl compatibility)
  • Added aws-sdk-bedrockruntime (with rustls)

[3.0.4] - 2025-12-17

Added

  • AI Context Enhancement: Full nested JSON schema and last working query context
    • Created json module with extract_json_schema() for recursive type extraction
    • Schema extracted once at startup and reused for all AI requests
    • Example: {"users": [{"name": "John"}]}{"users": [{"name": "string"}]}
    • On error: AI now receives last successful query + its output for better suggestions
    • Increased JSON sample size from 1000 to 2000 characters
    • Added ContextParams struct to group AI context parameters

Changed

  • AI prompts now include full nested JSON structure instead of shallow top-level keys
  • Error prompts include “Last Working Query” and “Its Output” sections when available
  • Success prompts only include schema enhancement (base query not relevant)

[3.0.3] - 2025-12-16

Fixed

  • Reverted manual workflow changes to use cargo-dist generated workflow
    • Manual edits to release.yml are not supported by cargo-dist
    • Original workflow configuration restored for proper CI/CD operation
  • Coverage generation now uses single-threaded test execution
    • Prevents jq process race conditions during parallel test execution
    • Matches test job configuration for consistency

[3.0.2] - 2025-12-16

Fixed

  • Release workflow: Download cached dist binary in build-local-artifacts job
    • Fixes “dist: command not found” error in musl container builds
    • Ensures dist is available before running build commands (reverted in 3.0.3)

[3.0.1] - 2025-12-16

Fixed

  • Build failures on x86_64-unknown-linux-musl target by switching from native-tls to rustls-tls
    • Resolves static linking issues with OpenSSL on musl targets
    • Enables successful cross-platform binary distribution
    • No functional changes - same HTTP/TLS behavior with better compatibility
  • Release badge added to README

[3.0.0] - 2025-12-16

Added

  • [EXPERIMENTAL] AI Assistant - Context-aware query suggestions powered by Anthropic Claude API
    • Ctrl+A to toggle AI assistant popup
    • Intelligent suggestions for query fixes, optimizations, and natural language interpretation
    • Streaming responses with real-time token-by-token display
    • Direct suggestion selection with Alt+1-5 or navigation with Alt+↑↓/Alt+j/k
    • Token-based request cancellation for instant abort
    • Configuration support in ~/.config/jiq/config.toml:
      [ai]
      enabled = true
      
      [ai.anthropic]
      api_key = "your-api-key-here"
      model = "claude-haiku-4-5-20251001"
      
    • Comprehensive test coverage with 100+ property-based tests and snapshot tests
    • Query-change-only triggering to prevent excessive API calls
    • Graceful fallback to raw responses when structured parsing fails

Changed

  • Code Organization: Refactored large source files (>1000 lines) into smaller, focused modules
    • Split ai_events_tests.rs (1064 lines) into 8 test modules
    • Split ai_state.rs (1036 lines) into lifecycle, suggestions, and response modules
    • Split ai_render.rs (1265 lines) into layout, content, and text modules
    • Split search_events.rs (1432 lines) into navigation and scroll modules
    • Split autocomplete/insertion.rs (1619 lines) into query manipulation, cursor, and execution modules
    • All source files now under 1000 lines for improved maintainability
    • Maintained existing module structure pattern (no mod.rs files)
    • All tests pass, no functionality changes

Documentation

  • Updated README with AI assistant section, keybindings, and configuration examples
  • Added AI keybindings to help popup (Ctrl+A, Alt+1-5, Alt+↑↓)

[2.21.2] - 2025-12-12

Changed

  • Removed unnecessary requirement reference comments from dependencies
  • Added CI status and coverage badges to README for better visibility

[2.21.1] - 2025-12-13

Added

  • CI workflow with automated testing, code coverage, and linting
    • GitHub Actions workflow running tests, cargo-tarpaulin coverage, and clippy/rustfmt checks
    • Codecov integration for coverage tracking and reporting
    • Coverage badge in README showing current test coverage
    • Pre-commit hook for automatic code formatting

Changed

  • Applied rustfmt formatting to entire codebase for consistency
  • CI installs jq 1.8.1 for consistent snapshot test results
  • Tests run serially in CI to avoid jq process race conditions

[2.21.0] - 2025-12-12

Added

  • Object key autocomplete for jq object literals
    • Intelligent suggestions when building jq objects with {key: value} syntax
    • Brace tracking system to understand nested object/array contexts
    • Enhanced context detection for object construction scenarios
    • Improved insertion logic with proper cursor positioning for object keys
    • Supports complex nested structures and multi-pass context scanning

[2.20.6] - 2025-12-11

Fixed

  • Resolved merge conflict between local and remote branches
    • Synchronized local repository with merged PR changes
    • Preserved version history and changelog integrity

[2.20.5] - 2025-12-11

Added

  • Enter key now accepts autocomplete suggestions (same behavior as Tab)
    • Pressing Enter when autocomplete popup is visible accepts the selected suggestion
    • Falls through to existing exit behavior when autocomplete is not visible
    • Maintains existing modifier key behaviors (Shift+Enter, Alt+Enter for output modes)
    • Provides Enter/Tab equivalence for improved user experience and workflow flexibility

[2.20.4] - 2025-12-10

Added

  • Results pane navigation while search is confirmed
    • Can now navigate through results using arrow keys/page keys while search matches remain highlighted
    • Preserves search highlighting during navigation
    • Improves workflow by allowing result exploration without canceling search

[2.20.3] - 2025-12-01

Internal

  • Refactored state management into feature-specific modules
    • Extracted autocomplete state into autocomplete/autocomplete_state.rs and autocomplete/insertion.rs
    • Extracted stats state into stats/stats_state.rs
    • Extracted tooltip state into tooltip/tooltip_state.rs
    • Reduced app_state.rs from ~1300 lines to ~150 lines
  • Improved code organization and maintainability with better separation of concerns

[2.20.2] - 2025-01-30

Added

  • Operator tooltips for //, |=, //=, and .. operators
    • Shows quick reference help when cursor is on these operators
    • Includes practical examples and usage tips
    • Complements existing function tooltip system

[2.20.1] - 2025-12-01

Internal

  • Refactored render methods into component-specific modules (*_render.rs)
  • Renamed module files to use component-prefixed naming convention
    • state.rs*_state.rs, events.rs*_events.rs, content.rs*_content.rs
  • Fixed flaky proptest for tooltip field access detection

[2.20.0] - 2025-11-30

Added

  • Search-in-results functionality with real-time highlighting
    • / in Results pane to open search bar
    • Case-insensitive fuzzy matching across result lines
    • Live match highlighting with distinct colors (magenta for current, yellow for others)
    • Match count display in search bar (e.g., “Match 2/5”)
    • n to jump to next match, N to jump to previous match
    • Enter to accept search and keep matches highlighted
    • ESC to cancel search and clear highlighting
    • Search bar auto-clears when switching focus or exiting
    • Maintains horizontal scroll position when jumping between matches
    • Comprehensive property-based and snapshot tests for search behavior

[2.19.3] - 2025-11-30

Added

  • Configuration option to control tooltip auto-show behavior
    • New [tooltip] section in config with auto_show field (defaults to true)
    • Set to false to hide tooltip by default, requiring Ctrl+I to show manually

Changed

  • Refactored App::new() to accept &Config for better extensibility

[2.19.2] - 2025-11-30

Fixed

  • ESC key now closes autocomplete and switches to Normal mode in a single keypress
    • Previously required two ESC presses when autocomplete was visible
    • Aligns with standard Vim behavior where ESC always returns to Normal mode

[2.19.1] - 2025-11-30

Added

  • Bracketed paste mode for efficient paste handling
    • Terminal now enables bracketed paste mode on startup
    • Pasted content is handled as a single operation
    • Immediate query execution after paste completes
  • Query debouncing for improved performance during fast typing
    • 50ms delay before query execution while typing
    • Prevents excessive jq invocations during rapid input
    • Debounce bypassed for Enter/Tab for immediate feedback

Internal

  • Added Debouncer module with configurable delay
  • Property-based tests for debounce timer reset and state consistency
  • Unit tests for paste event handling and debouncer functionality

[2.18.0] - 2025-11-30

Added

  • Stats bar showing result type and count
    • Displays JSON type (Object, Array, String, Number, Boolean, Null)
    • Shows element/key count for arrays and objects
    • Appears in the results pane title for quick reference

Internal

  • Migrated from mod.rs to modern Rust module naming convention
    • Follows Rust 2018+ idiom of using module.rs instead of module/mod.rs
    • Improves file discoverability and IDE navigation

[2.17.0] - 2025-11-29

Added

  • Function tooltip with quick reference help
    • Contextual help popup when cursor is on a jq function
    • Shows practical examples and usage tips
    • Supports nested function detection (shows innermost function)
    • Purple border styling to distinguish from autocomplete
    • Hint text on input border when tooltip is available but disabled

[2.16.0] - 2025-11-28

Added

  • Smart parenthesis insertion in autocomplete
    • Functions like map, select, has now auto-insert () with cursor positioned inside
    • Non-function suggestions (fields, operators) work as before without parentheses

Internal

  • Refactored event handlers and state into dedicated feature modules
  • Moved help module from app/ to dedicated src/help/ directory

[2.15.0] - 2025-11-28

Added

  • Clipboard support with multiple backends
    • Ctrl+Y in Insert mode to copy query
    • yy in Normal mode to copy query
    • yy in Results pane to copy filtered JSON output
    • Auto-strips ANSI color codes from results before copying
    • Three clipboard backends configurable via ~/.config/jiq/config.toml:
      • auto (default): tries system clipboard, falls back to OSC 52
      • system: OS clipboard only (via arboard)
      • osc52: terminal escape sequences (works over SSH/tmux)
  • Notification system for transient UI messages
    • Info messages (gray, 1.5s) for confirmations like “Copied!”
    • Warning messages (yellow, 10s) for config errors
    • Error messages (red, permanent) for critical errors
    • Notifications display in top-right corner with styled borders
  • Configuration system with TOML support
    • Config file at ~/.config/jiq/config.toml (XDG paths on all platforms)
    • Graceful handling of missing or malformed config files
    • Comprehensive property-based tests for config parsing

Documentation

  • Added CONTRIBUTING.md with project standards and guidelines
  • Updated README with clipboard keybindings and configuration

[2.14.2] - 2025-11-27

Added

  • Horizontal scrolling in results pane for viewing wide JSON content
    • h/l// to scroll 1 column left/right
    • H/L to scroll 10 columns left/right
    • 0/^ to jump to left edge
    • $ to jump to right edge
    • End key to jump to bottom (alongside G)

Documentation

  • Updated README and help popup with horizontal scroll keybindings

[2.14.1] - 2025-11-27

Improved

  • Context-aware help text in INPUT mode that adapts to input state
    • Empty input: Shows history navigation shortcuts (Ctrl+P/N to cycle, ↑/Ctrl+R to open popup)
    • Has content: Shows exit shortcuts and history popup access
    • Always visible: Shift+Tab for pane switching, ↑/Ctrl+R for history
  • Up arrow (↑) now always opens history popup, not just when input is empty
    • More consistent with Ctrl+R behavior
    • Better discoverability of history features

Changed

  • Improved terminology in help text for clarity
    • “Exit with Results” → “Output Result”
    • “Exit with Query” → “Output Query”
    • “Switch Focus” → “Switch Pane”
  • Use arrow symbol (↑) for more compact display in help text

Documentation

  • Updated README to reflect new Up arrow behavior

[2.14.0] - 2025-11-27

Improved

  • Refactored autosuggestions to use query execution results
    • Suggestions now based on actual jq output structure instead of input JSON
    • More accurate field suggestions after transformations (map, select, etc.)
    • Better handling of complex query chains and filters

Documentation

  • Updated development documentation to reflect current codebase structure
  • Improved README with clearer examples and usage instructions

[2.13.0] - 2025-11-25

Added

  • Ctrl+Q keybind to exit with query output (primary method, works in all terminals)
    • Alternative to Shift+Enter and Alt+Enter which may not work in all terminals
    • Saves successful queries to history before exiting
    • Failed queries still exit but are not saved to history

Fixed

  • Input text now scrolls left to fill space when deleting characters
    • Previously left empty space on the right when deleting from long queries
    • Text automatically adjusts to show as much content as possible
    • Cursor remains visible throughout deletion

Changed

  • Refactored input rendering architecture to eliminate cursor desynchronization
    • Replaced overlay rendering with direct styled Paragraph rendering
    • Use tui-textarea for editing logic only, not for rendering
    • Simplifies codebase and prevents cursor position bugs
    • Matches the proven pattern used in results pane rendering

Internal

  • Added 12 scroll offset and synchronization tests
  • Added 9 unit tests for span extraction and cursor insertion
  • Added 6 comprehensive tests for Ctrl+Q, Shift+Enter, Alt+Enter
  • Replaced 5 redundant tests with proper unit tests
  • All 374 tests passing

[2.12.1] - 2025-11-25

Added

  • VIM keybinding ^ in Normal mode - moves cursor to start of line (same as 0)
  • Support for ^ in Operator mode - enables d^ and c^ operations

[2.12.0] - 2025-11-25

Added

  • Syntax highlighting now works for queries of any length
    • Previously disabled for queries longer than terminal width
    • Highlighted text correctly follows horizontal scrolling
    • Colors remain visible even in very long queries

Fixed

  • Cursor jump bug when deleting characters from long queries
    • Cursor would jump several positions left when query crossed viewport width threshold
    • Occurred at the transition between scrolled and non-scrolled states
    • Now maintains correct cursor position at all query lengths

Internal

  • Implemented scroll-aware syntax highlighting overlay
  • Added scroll offset tracking to mirror tui-textarea’s internal state
  • Extract visible portions of highlighted text based on scroll position
  • All 352 tests passing

[2.11.0] - 2025-11-25

Fixed

  • Autocomplete Tab now correctly appends array suggestions instead of replacing entire query
    • Example: Typing .services + accepting [].name now correctly produces .services[].name
    • Previously replaced entire query with just [].name
  • History now correctly saves successful queries on Enter/Shift+Enter/Alt+Enter
    • Queries are persisted to ~/.jiq_history for use in future sessions
    • Failed queries and empty queries are not saved

Changed

  • Major internal refactoring for improved maintainability (no user-facing changes)
    • Extracted event handlers into focused modules (vim, global, history, results)
    • Reduced events.rs from 2,469 to 148 lines (94% reduction)
    • Extracted popup rendering utilities for code reuse
    • Extracted syntax highlighting and help content into dedicated modules
    • All tests now colocated with code following Rust best practices

Added

  • 17 new tests for critical dispatch order and focus interactions
  • Comprehensive regression tests for autocomplete behavior
  • Tests for history persistence logic
  • Total test count increased from 335 to 360 tests

Internal

  • Created 6 new well-organized modules with clear responsibilities
  • Extracted reusable popup positioning utilities (widgets/popup.rs)
  • Help content now maintained in constants file for easier updates
  • Improved code organization with clear module boundaries

[2.10.0] - 2025-11-25

Added

  • Comprehensive keyboard shortcuts help popup
    • F1 or ? to toggle help (works universally across terminals)
    • Full vim-style scrolling: j/k, J/K, g/G, Ctrl+D/U, arrow keys, PageUp/PageDown, Home/End
    • Organized by context: Global, Insert mode, Normal mode, Autocomplete, Results pane, History, Error overlay
    • Mode-aware bottom help line shows relevant keys for current mode

Fixed

  • Help popup now works reliably across all terminal emulators
    • Replaced Ctrl+/ (sends ASCII 0x1F, poorly supported) with F1 and ?
    • F1 works in all modes and focus contexts
    • ? works in Normal mode and Results pane only
  • Terminal resize no longer crashes when help popup is open
    • Popup dimensions now clamp to terminal size
    • Gracefully skips rendering on very small terminals (<20x10)
  • Scroll position correctly resets after jumping to bottom with G
    • Previously required multiple key presses to scroll up after G
    • Now immediate response to k after G

Improved

  • Removed code duplication in help popup key handling
  • Added 16 comprehensive tests for help popup functionality
  • Emojis replaced with ASCII text headers for better terminal compatibility

[2.9.1] - 2025-11-24

Fixed

  • History search box now shows a visible cursor with full editing support
    • Left/right arrow keys move cursor within search text
    • Insert and delete at any position (not just end)
  • History popup no longer collapses when search has no matches
  • Multi-word search now works correctly (space-separated terms are ANDed, like fzf)
    • e.g., headquarters building matches entries containing both terms

[2.9.0] - 2025-11-24

Added

  • Autocomplete suggestions for root-level JSON arrays
    • Pressing . on [{"id": 1}, ...] now suggests .[], .[].id, .[].field, etc.
    • Previously showed no suggestions for top-level arrays
    • Supports prefix filtering (typing n filters to .[].name, .[].notes, etc.)
    • Handles edge cases: empty arrays, arrays of primitives, nested arrays

[2.8.0] - 2025-11-24

Added

  • Smart array field autocomplete with proper jq syntax
    • Typing .array. now suggests [], [].field1, [].field2 (guides user to use iterator)
    • Typing .array | . now suggests .[], .[].field1, .[].field2 (preserves dot after pipe)
    • Typing .array[]. shows normal .field suggestions (iterator already present)
    • Works with all array access patterns: [], [0], [0:5]
  • Standalone [] iterator suggestion when at an array (with description “iterate all elements”)

Improved

  • Suggestion type labels are now more descriptive:
    • fnfunction
    • opoperator
    • patiterator
  • Added 12 new tests for comprehensive array autocomplete coverage

[2.7.2] - 2025-11-24

Fixed

  • Scroll position now properly clamped to content bounds - prevents scrolling past results into empty space
  • ‘q’ key now works correctly in Results pane regardless of editor mode (fixes confusing behavior after focus switch)
  • Line count calculation now matches displayed content when showing cached results after query errors
  • Large files with >65,535 lines now handled correctly without overflow

Improved

  • Added comprehensive test coverage for scroll behavior, quit key interactions, and large file handling

[2.7.1] - 2025-11-24

Fixed

  • Pressing ‘q’ in Insert mode no longer quits the application - allows typing queries like unique, eq, etc. (thanks @dithmer!)

[2.7.0] - 2025-11-24

Added

  • Persistent query history with fuzzy search
  • Ctrl+P / Ctrl+N - Quick cycle through previous/next queries
  • Ctrl+R - Open full-width fuzzy search popup for history
  • Queries persist across sessions in platform-specific data directories
  • Automatic deduplication of duplicate queries
  • History limited to last 1000 entries

[2.6.2] - 2025-11-24

Added

  • Ctrl+Q keybinding to exit and output query string only (universal fallback for terminals that don’t support Shift+Enter)

Fixed

  • Shift+Enter and Alt+Enter not working in some terminal emulators (e.g., macOS Terminal.app)

[2.6.1] - 2025-11-23

Added

  • JSON type information in autocomplete suggestions (String, Number, Boolean, Array, Object, Null)
  • Array element type detection - shows specific types like Array[String], Array[Object], Array[Number]
  • Nested array type support - displays Array[Array[Number]] for multi-dimensional arrays
  • Floating error overlay with Ctrl+E toggle - errors no longer disrupt results pane layout
  • Error indicator (⚠) in input field title when syntax error exists

Improved

  • Autocomplete popup now has solid background with better contrast
  • Selected suggestion uses cyan highlight with black text for improved visibility
  • Type labels right-aligned in autocomplete for cleaner appearance
  • Results pane maintains constant height - no more jarring movement when errors occur
  • Error overlay auto-hides when query is modified

Fixed

  • Fixed popup width calculation to accommodate longer type labels
  • Fixed transparency issue causing JSON text to show through suggestion popup
  • Fixed error overlay not hiding correctly in Insert mode when query changes

[2.5.0] - 2025-11-22

Added

  • Syntax highlighting for jq query input (experimental)
  • Color-coded jq keywords, operators, and functions in the query field

Fixed

  • Fixed autosuggestion issues in jq query field
  • Fixed all clippy warnings for improved code quality

[2.4.0] - 2025-11-22

Added

  • Autocomplete support for array and object outputs
  • Context-aware suggestions for bracket notation (.[n], .[“key”])

Improved

  • Enhanced documentation with additional examples

[2.3.1] - 2025-11-22

Fixed

  • Fixed autosuggestion not appearing after pipe character
  • Fixed unused import warning for Suggestion type in non-test builds

Improved

  • Enhanced test coverage quality and assertions

[2.3.0] - 2025-11-21

Added

  • VIM keybinding C - Change to end of line (same as c$)
  • VIM keybinding D - Delete to end of line (same as d$)

[2.2.0] - 2025-11-21

Added

  • Context-aware autocomplete system for jq queries
  • JSON field suggestions based on input data structure
  • jq built-in function autocomplete (map, select, keys, etc.)
  • Operator and pattern suggestions ( , //, .[], etc.)
  • Nested field path support in autocomplete
  • Tab key to accept autocomplete suggestions
  • Up/Down arrow navigation through suggestions
  • Color-coded suggestion types in popup

Changed

  • Tab key now accepts autocomplete suggestions in INSERT mode
  • Shift+Tab switched focus between Input and Results panes
  • ESC key closes autocomplete popup or switches to NORMAL mode

Performance

  • Static data initialization with LazyLock for instant responses
  • Optimized suggestion filtering for large JSON files

[2.0.0] - 2025-11-18

Added

  • Complete VIM keybinding system for input field
  • Modal editing: INSERT, NORMAL, and OPERATOR modes
  • VIM navigation: h/l/0/$/w/b/e
  • VIM insert commands: i/a/I/A
  • VIM delete operator: x/X, dw/db/de/d$/dd
  • VIM change operator: cw/cb/ce/c$/cc
  • Undo/redo support: u, Ctrl+r
  • Mode-based visual indicators (color-coded borders and cursor)
  • Edit hint in NORMAL mode title
  • Comprehensive VIM documentation in README

Changed

  • Input field now supports full VIM modal editing
  • Cursor color changes per mode (cyan/yellow/green)
  • Border colors match mode colors

[1.5.0] - 2025-11-18

Added

  • VIM operator system (d and c operators)
  • Operator+motion combinations (dw, db, de, d$, cw, etc.)
  • Special operators (dd, cc for full line)
  • Simple delete operations (x, X)

[1.4.0] - 2025-11-18

Added

  • VIM navigation commands (h/l/0/$/w/b/e) in NORMAL mode
  • VIM insert mode commands (i/a/I/A)
  • Mode-based styling with color indicators
  • Cursor color changes per mode

[1.3.0] - 2025-11-18

Added

  • VIM modal editing foundation (INSERT/NORMAL modes)
  • ESC to switch to NORMAL mode
  • Mode indicator in input field title
  • Separate handling for INSERT and NORMAL mode keys

[1.2.0] - 2025-11-18

Added

  • Enhanced VIM navigation for results pane
  • g / Home - Jump to top
  • G - Jump to bottom
  • Ctrl+d / PageDown - Scroll half page down
  • Ctrl+u / PageUp - Scroll half page up

Changed

  • Simplified help text at bottom
  • Updated README with results navigation keys

[1.1.0] - 2025-11-17

Added

  • Comprehensive unit test suite (25 tests)
  • Integration test suite (8 tests)
  • Test fixtures in tests/fixtures/
  • Modern Rust 2024 testing patterns with cargo_bin_cmd!()

Fixed

  • Removed terminal-corrupting interactive tests
  • Fixed clippy warnings (bool_assert_comparison)

[1.0.0] - 2025-11-16

Added

  • Initial stable release
  • Interactive TUI with two-pane layout
  • Real-time jq query execution
  • JSON input from file or stdin
  • Tab focus switching between panes
  • Results scrolling (j/k, arrows, Page Up/Down)
  • JSON syntax highlighting with ANSI colors
  • Enter key outputs filtered JSON
  • Shift+Enter outputs query string only
  • Built with Ratatui 0.29 and Crossterm 0.28.1

Version Numbering

  • Major version (2.x.x) - Complete VIM implementation, breaking UX changes
  • Minor version (x.Y.x) - New features (VIM modes, navigation, operators)
  • Patch version (x.x.Z) - Bug fixes, documentation updates