Conversation
Collaborator
|
neat! so we can drop leader keys now !? EDIT: Please say YES. so we can have a unified custom commands feature. |
Owner
Author
|
Hey, thanks! That's my plan :) I will brutally kill leader and custom commands in v0.10 and have only one way to customise Until then though, I am adding the building blocks to where they fit. |
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Dec 12, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.9.7` -> `v0.9.8` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>idursun/jjui (idursun/jjui)</summary> ### [`v0.9.8`](https://github.com/idursun/jjui/releases/tag/v0.9.8) [Compare Source](idursun/jjui@v0.9.7...v0.9.8) #### Release Summary This release includes experimental Lua scripting support for custom commands, several bug fixes, and UI improvements. The streaming command handler has been reworked to remove the 100ms delay incurred on every refresh (you should feel the difference), and issues with leader keys, parser colour handling, and preview panel focus have been resolved. ##### Key Highlights **🚀 Major Features** - **Lua Scripting in Custom Commands ([#​415](idursun/jjui#415: Experimental support for writing custom commands using Lua scripts. Initial version includes API for revision navigation, JJ command execution, clipboard operations, revset manipulation and displaying flash messages. These are the currently available functions but expect the list to grow and change with each release. **Available Functions (v1)**: - `revisions.current()` - Get currently selected change ID - `revisions.checked()` - Get list of checked change IDs - `revisions.refresh({keep_selections?, selected_revision?})` - Refresh revisions view - `revisions.navigate({by?, page?, target?, to?, fallback?, ensureView?, allowStream?})` - Navigate revisions - `revisions.start_squash({files?})` - Begin squash workflow - `revisions.start_rebase({source?, target?})` - Start rebase operation - `revisions.open_details()` - Open revision details view - `revisions.start_inline_describe()` - Open inline describe editor - `revset.set(value)` - Set custom revset - `revset.reset()` - Reset to default revset - `revset.current()` - Get active revset string - `revset.default()` - Get default revset string - `jj_async({...})` - Run JJ command asynchronously - `jj({...})` - Run JJ command synchronously (returns output, err) - `flash(message)` - Display flash message - `copy_to_clipboard(text)` - Copy text to clipboard Here are a couple of examples: - Appends `| ancestors(<change id of the current revisions>, 2)` to the end of revset and bumps the number with each execution ```toml [custom_commands.append_to_revset] key = ["+"] lua = ''' local change_id = revisions.current() if not change_id then return end local current = revset.current() local bumped = false local updated = current:gsub("ancestors%(" .. change_id .. "%s*,%s*(%d+)%)", function(n) bumped = true return "ancestors(" .. change_id .. ", " .. (tonumber(n) + 1) .. ")" end, 1) if not bumped then updated = current .. "| ancestors(" .. change_id .. ", 2)" end revset.set(updated) ''' ``` - Inserts a new commit after the selected one and then starts inline describe on the new revision. ```toml [custom_commands.new_then_describe] key = ["N"] lua = ''' jj("new", "-A", revisions.current()) revisions.refresh() local new_change_id = jj("log", "-r", "@​", "-T", "change_id.shortest()", "--no-graph") revisions.navigate{to=new_change_id} revisions.start_inline_describe() ''' ``` - Copy to clipboard example ```toml [custom_commands.copy_to_clipboard] key = ["X"] lua = ''' local selections = revisions.checked() if #selections == 0 then flash("none selected") end local content = table.concat(selections, ",") copy_to_clipboard(content) ''' ``` **✨ Enhancements** - **Key Sequences for Custom Commands ([#​420](idursun/jjui#420: Custom commands can now be triggered with multi-key sequences using `key_sequence` property. Also adds `desc` property for command descriptions. An overlay shows available sequences after pressing the first key. Example: ```toml [custom_commands.bookmark_list] key_sequence = ["w", "b", "l"] desc = "bookmarks list" lua = ''' revset.set("bookmarks() | remote_bookmarks()") ''' ``` - **Faster Refresh ([#​412](idursun/jjui#412: Improved streaming command handling, eliminating 100ms delay and making refreshes instant. Previously jjui would fail to launch or get stuck when jj emitted warning messages (e.g., deprecated config options like `git.push-new-bookmarks`). - **Quick Search Highlighting ([#​414](idursun/jjui#414: Case-insensitive search with visual highlighting of all matches in the revisions view - **Remember Unsaved Descriptions ([#​417](idursun/jjui#417: Descriptions are now preserved when you cancel, preventing accidental loss of work. Addresses the common frustration of accidentally hitting ESC and losing long commit messages with no way to recover them. - **Squash Operation Toggle ([#​405](idursun/jjui#405: New `--use-destination-message` option for squash operations **🐛 Bug Fixes** - **Preview Panel Focus Issue ([#​390](idursun/jjui#390: Fixed preview panel showing full commit diff instead of selected file diff when terminal regains focus - **EOF Error Handling ([#​418](idursun/jjui#418: Proper error messages when revset contains no revisions instead of getting stuck - **Parser Color Agnostic ([#​413](idursun/jjui#413: Fixed parsing issues when users configure ChangeID/CommitID/IsDivergent with same colors. - **Leader Key Timing ([#​416](idursun/jjui#416: Fixed leader key processing to prevent race conditions. Leader keys were completely non-functional in versions after v0.9.3 - the options would appear in the UI but do nothing when selected. **🎨 UI/UX Improvements** - Clear selected revisions with ESC key when not in editing/overlay/focused operations ([#​419](idursun/jjui#419)) - Better menu spacing for git and bookmarks - Reduced preview debounce time back to 50ms for snappier response ([#​410](idursun/jjui#410)). The 200ms debounce made the UI feel sluggish when navigating between revisions. **⚙️ Internal Improvements** - Introduced intent-based architecture for better separation of concerns (only implemented for revisions, flash for now) - Moved flash intents to dedicated package - Simplified details view rendering - Better configuration organisation #### What's Changed - operation: Add use destination message to squash operation by [@​woutersmeenk](https://github.com/woutersmeenk) in [#​405](idursun/jjui#405) - Preview panel shows whole commit diff instead of selected file's diff when terminal regains focus by [@​abourget](https://github.com/abourget) in [#​390](idursun/jjui#390) - fix(streamer): handle warning messages by [@​idursun](https://github.com/idursun) in [#​412](idursun/jjui#412) - parser: stringify log/evolog prefixes to be color agnostic by [@​baggiiiie](https://github.com/baggiiiie) in [#​413](idursun/jjui#413) - revisions: add highlight to QuickSearch, make search case insensitive by [@​baggiiiie](https://github.com/baggiiiie) in [#​414](idursun/jjui#414) - feat: Lua scripting in custom commands by [@​idursun](https://github.com/idursun) in [#​415](idursun/jjui#415) - revisions: handle EOF error for revset without revisions by [@​baggiiiie](https://github.com/baggiiiie) in [#​418](idursun/jjui#418) - revisions: clear selected revisions on cancel by [@​baggiiiie](https://github.com/baggiiiie) in [#​419](idursun/jjui#419) - feat: custom commands with sequence keys by [@​idursun](https://github.com/idursun) in [#​420](idursun/jjui#420) #### New Contributors - [@​woutersmeenk](https://github.com/woutersmeenk) made their first contribution in [#​405](idursun/jjui#405) - [@​abourget](https://github.com/abourget) made their first contribution in [#​390](idursun/jjui#390) **Full Changelog**: <idursun/jjui@v0.9.7...v0.9.8> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Ny4wIiwidXBkYXRlZEluVmVyIjoiNDIuNDcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Jan 9, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.9.8` → `v0.9.9` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>idursun/jjui (idursun/jjui)</summary> ### [`v0.9.9`](https://github.com/idursun/jjui/releases/tag/v0.9.9) [Compare Source](idursun/jjui@v0.9.8...v0.9.9) ### Release Notes Another release with small improvements and bug fixes. Thanks to all contributors! #### 🎉 New Features ##### Custom Commands & Lua API Enhancements - **Custom Commands with Sequence Keys** ([#​420](idursun/jjui#420)) - Added `key_sequence` property allowing custom commands to be invoked with multiple key presses in sequence - Added `desc` property for command descriptions - Introduced sequence overlay UI showing available key sequences when first key is pressed - Example: `key_sequence = ["w", "b", "l"]` - **Lua API: Choose Method and UI** ([#​427](idursun/jjui#427)) ([#​442](idursun/jjui#442)) - New `choose()` function for interactive selection prompts in Lua scripts - New `input()` function to prompt users for text input with customizable title and prompt - New `split_lines()` function for text processing - **Lua API: Await on Operation Results** ([#​422](idursun/jjui#422)) - `start_inline_describe()` now returns boolean indicating if operation was applied or cancelled - Enables conditional command execution based on user actions - Fixes [#​310](idursun/jjui#310) - **Lua API: Interactive Commands** ([commit 8b257263](idursun/jjui@8b257263)) - Added `jj_interactive` Lua function for interactive jj command execution ##### Navigation & UI Improvements - **Ace Jump for Operations** ([#​445](idursun/jjui#445)) - Pressing 'f' in set\_parents/duplicate/rebase/squash modes now triggers ace jump - After jump completes, returns to the original operation mode instead of normal mode - Closes [#​394](idursun/jjui#394) - **Preview Width Variable** ([#​452](idursun/jjui#452)) - Added `$preview_width` placeholder variable for preview commands - Exposes actual view width (in columns) to enable tools like delta to use `--side-by-side` correctly - Width updates dynamically when preview pane is resized - Similar to fzf's `$FZF_PREVIEW_COLUMNS` - **Configurable Flash Message Display Time** ([#​456](idursun/jjui#456)) - New config key: `ui.flash_message_display_seconds` (default: 4) - Special value `0` means messages display until manually dismissed - Fixes [#​455](idursun/jjui#455) - **Page Up/Down Key Configuration** ([#​437](idursun/jjui#437)) - ScrollUp/Down keys now registered in config instead of hardcoded - Keys exposed to configuration for customization - Fixes [#​360](idursun/jjui#360) ##### SSH & Authentication - **SSH Askpass Support** ([#​423](idursun/jjui#423)) - New `[ssh] hijack_askpass` setting to prompt for SSH passphrases/PINs within jjui - Works on Linux and macOS - Properly handles prompt overriding and cancellation - Fixes [#​100](idursun/jjui#100) #### 🐛 Bug Fixes - **Exec Command History** ([#​458](idursun/jjui#458)) - Fixed issue where selected command history wasn't applied in exec mode - Input value now properly updated when selecting from fuzzy/regex suggestions - Selected commands correctly saved to history - **Menu Pagination Display** ([#​446](idursun/jjui#446)) - Fixed incorrect `%d/%d` pagination display - Height now calculated before pagination render - Added tab/shift+tab to short help menu - Fixes [#​444](idursun/jjui#444) - **Flash Message Width** ([#​432](idursun/jjui#432)) - Added maxWidth (50% of screen) to flash message rendering - Messages now properly line-wrap instead of extending beyond window width - **Operation Log Refresh** ([#​431](idursun/jjui#431)) - Operation log now returns Refresh and SelectionChanged messages upon closing - Fixes [#​430](idursun/jjui#430) - **Custom Commands List Sorting** ([commit 3fa9783a](idursun/jjui@3fa9783a)) - Fixed custom commands list to use stable sort - Fixes [#​424](idursun/jjui#424) - **JJ Error Pass-through** ([#​421](idursun/jjui#421)) - jjui now properly passes through stderr from jj commands - Error messages are more informative and show actual jj errors - **Navigation Message Display** ([commit 94a4a874](idursun/jjui@94a4a874)) - Navigation messages now only shown for paged scrolls #### What's Changed - main: pass through jj error by [@​baggiiiie](https://github.com/baggiiiie) in [#​421](idursun/jjui#421) - feat(lua): add ability to await on operation results (cancelled/applied) by [@​idursun](https://github.com/idursun) in [#​422](idursun/jjui#422) - oplog: return Refresh and SelectionChanged upon oplog closing by [@​baggiiiie](https://github.com/baggiiiie) in [#​431](idursun/jjui#431) - feat(nix): add comprehensive nix flake by [@​doprz](https://github.com/doprz) in [#​426](idursun/jjui#426) - Add option to hijack SSH Askpass to prompt for passphrase/pin by [@​oliverpool](https://github.com/oliverpool) in [#​423](idursun/jjui#423) - feat(lua): add choose method and ui by [@​idursun](https://github.com/idursun) in [#​427](idursun/jjui#427) - flash: add maxWidth to flash msg rendering by [@​baggiiiie](https://github.com/baggiiiie) in [#​432](idursun/jjui#432) - keys: add pageup/down to keys config by [@​baggiiiie](https://github.com/baggiiiie) in [#​437](idursun/jjui#437) - chore(github): Add Adda0 as an automatic reviewer for Nix-related changes by [@​Adda0](https://github.com/Adda0) in [#​440](idursun/jjui#440) - feat: add .editorconfig by [@​doprz](https://github.com/doprz) in [#​434](idursun/jjui#434) - Add input and log to custom\_commands API by [@​ArnaudBger](https://github.com/ArnaudBger) in [#​442](idursun/jjui#442) - oplog,list: refactor scrolling with Scrollable/StreamableList interface by [@​baggiiiie](https://github.com/baggiiiie) in [#​429](idursun/jjui#429) - menu: calculate height before pagination render by [@​baggiiiie](https://github.com/baggiiiie) in [#​446](idursun/jjui#446) - operations: enable ace jump for set\_parents/duplicate/rebase/squash by [@​baggiiiie](https://github.com/baggiiiie) in [#​445](idursun/jjui#445) - feat: make flash message display time configurable by [@​living180](https://github.com/living180) in [#​456](idursun/jjui#456) - feat: add $width variable for preview commands by [@​pablospe](https://github.com/pablospe) in [#​452](idursun/jjui#452) - status: fix exec command history not applied by [@​baggiiiie](https://github.com/baggiiiie) in [#​458](idursun/jjui#458) #### New Contributors - [@​doprz](https://github.com/doprz) made their first contribution in [#​426](idursun/jjui#426) - [@​oliverpool](https://github.com/oliverpool) made their first contribution in [#​423](idursun/jjui#423) - [@​living180](https://github.com/living180) made their first contribution in [#​456](idursun/jjui#456) - [@​pablospe](https://github.com/pablospe) made their first contribution in [#​452](idursun/jjui#452) **Full Changelog**: <idursun/jjui@v0.9.8...v0.9.9> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NS4xIiwidXBkYXRlZEluVmVyIjoiNDIuNzUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
key_sequenceproperty to the custom commands so that they can be invoked by pressing multiple keys in sequence. It also adds adescproperty which will come in handy later on.Additionally, adds a sequence overlay which shows up when the user has pressed one of the first keys of a custom command that has
key_sequencedefined.