Skip to content

revset: fix revset not using default when empty#399

Merged
idursun merged 1 commit intoidursun:mainfrom
baggiiiie:yc/fix-default-config
Nov 29, 2025
Merged

revset: fix revset not using default when empty#399
idursun merged 1 commit intoidursun:mainfrom
baggiiiie:yc/fix-default-config

Conversation

@baggiiiie
Copy link
Copy Markdown
Collaborator

When jjui is launched with a --revset/-r flag, the input argument should be come the default revset for the session, i.e., when user hits L and then enter with empty string, it should default to the argument defined by -r flag.

However, currently There's a mismatch between the display of revset and the actual jj log fetched: revset is user's session-wide default defined by -r flag, actual jj log is user's jj/jjui config.

This is due to m.context.CurrentRevset is updated to empty string, instead of default, when the text input is an empty string.

See
image

asciicast

When jjui is launched with a `--revset/-r` flag, the input argument
should be come the default revset for the session, i.e., when user hits
`L` and then `enter` with empty string, it should default to the
argument defined by `-r` flag.

However, currently There's a mismatch between the display of `revset`
and the actual jj log fetched: `revset` is user's session-wide default
defined by `-r` flag, actual jj log is user's jj/jjui config.

This is due to `m.context.CurrentRevset` is updated to empty string,
instead of default, when the text input is an empty string.

See [![asciicast](https://asciinema.org/a/CJ0dsrGzlEWvv0ApI31GnHmAr.svg)](https://asciinema.org/a/CJ0dsrGzlEWvv0ApI31GnHmAr)
Copy link
Copy Markdown
Owner

@idursun idursun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@idursun idursun merged commit 52b60d8 into idursun:main Nov 29, 2025
3 checks passed
@baggiiiie baggiiiie deleted the yc/fix-default-config branch November 30, 2025 01:29
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 3, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.9.6` -> `v0.9.7` |

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.7`](https://github.com/idursun/jjui/releases/tag/v0.9.7)

[Compare Source](idursun/jjui@v0.9.6...v0.9.7)

🎉 This release enhances performance and introduces stability improvements in log parsing and command execution. It also takes back some of the stability by adding basic mouse support.

#### Features

##### 📈 Performance Improvements

Implemented frame-rate limited rendering (capped at 120 FPS) to significantly improve application performance by deferring view generation until the next frame tick. This addresses the slowest path in the application - view generation - making it much more responsive

##### 🐭 Mouse Support

- Clickable and scrollable revisions view (excluding operations) ([#&#8203;391](idursun/jjui#391))
- Clickable and scrollable op log view
- Draggable and scrollable (vertically + horizontally) preview pane
- Scrollable diff window
- Replaced custom viewport with bubbles/viewport for more responsive rendering ([#&#8203;396](idursun/jjui#396))

<https://github.com/user-attachments/assets/7cbad275-713e-4fa3-8d61-4e86c301ab0c>

##### 🔎 Preview

- Replaced surrounding border with divider for more preview space ([#&#8203;396](idursun/jjui#396))

##### Operation Log (oplog)

- Added `jj op revert` functionality with `R` key binding ([#&#8203;400](idursun/jjui#400))

##### Revset Handling

- Pressing up arrow in empty revset field now sets the current revset ([#&#8203;284](idursun/jjui#284))
- Fixed mismatch where empty revset input would use config default instead of session default from `-r` flag. Now correctly updates `CurrentRevset` to session default instead of empty string ([#&#8203;399](idursun/jjui#399))

##### Details View

- Allow quitting from details view when quit key is pressed (e.g. `q`)

#### Bug Fixes

##### Rendering Issues

- Fixed double rendering of inline describe content when next line contains only revision line. Added `revisionLineRendered` tracking flag to properly sequence the description overlay rendering ([#&#8203;403](idursun/jjui#403), [#&#8203;369](idursun/jjui#369))
- Fixed viewport adjustment when PageDown moves cursor below viewport. The renderer now continues rendering until it reaches the focused item, ensuring proper viewport adjustment ([#&#8203;395](idursun/jjui#395))
- Fixed PageUp/Down navigation at top and bottom of revset when less than one page remains. Now includes early return with feedback message when already at boundary ([#&#8203;387](idursun/jjui#387), [#&#8203;386](idursun/jjui#386))
- Removed incorrect space trimming in renderer ([#&#8203;393](idursun/jjui#393))

##### Log Processing

- Applied partial fixes to prevent out-of-order row updates in log streamer

##### Details View

- Handle cases where conflict markers span multiple lines ([#&#8203;398](idursun/jjui#398))
- Ignore virtual selection on refresh ([#&#8203;381](idursun/jjui#381))

##### Operation Log (oplog)

- Fixed an issue in operation ID detection ([#&#8203;380](idursun/jjui#380), [#&#8203;377](idursun/jjui#377))

##### Command Execution

- Added a mechanism for restoring failed commands to input field, allowing retries without retyping ([#&#8203;392](idursun/jjui#392))

##### Template System

- Enhanced `jj log` parsing using native template prefixes for better change ID and commit ID detection. Fixes issues when bookmarks are "HexLike" ([#&#8203;358](idursun/jjui#358), [#&#8203;228](idursun/jjui#228), [#&#8203;372](idursun/jjui#372))

#### What's Changed

- Remove teatest package and simplify tests by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;379](idursun/jjui#379)
- internal/parser: get revision ids with template prefixes by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;372](idursun/jjui#372)
- fix(oplog): improve operation id detection by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;380](idursun/jjui#380)
- refactor: serialise command execution by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;378](idursun/jjui#378)
- Revert "refactor: serialise command execution" by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;383](idursun/jjui#383)
- revisions: fix scrolling at the top and bottom of revset by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;387](idursun/jjui#387)
- refactor: introduce and implement common.Model by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;384](idursun/jjui#384)
- refactor: Replace custom cell buffer implementation with `cellbuf` package by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;388](idursun/jjui#388)
- refactor: use simple layout functions to lay out the main UI by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;389](idursun/jjui#389)
- Coming back to previous state  when exec command failed by [@&#8203;ArnaudBger](https://github.com/ArnaudBger) in [#&#8203;392](idursun/jjui#392)
- feat: add basic mouse support by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;391](idursun/jjui#391)
- list/renderer: fix viewport adjustment on PageDown by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;395](idursun/jjui#395)
- Make preview horizontally scrollable by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;396](idursun/jjui#396)
- revset: fix revset not using default when empty by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;399](idursun/jjui#399)
- operation: add op log revert by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;400](idursun/jjui#400)
- revision: fix double rendering of inline describe content by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;403](idursun/jjui#403)
- refactor: replace usages of scattered width/height pairs with `ViewNode` by [@&#8203;idursun](https://github.com/idursun) in [#&#8203;401](idursun/jjui#401)
- describe: catch cursor blinking to avoid unnecessary rendering by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;404](idursun/jjui#404)

#### New Contributors

- [@&#8203;ArnaudBger](https://github.com/ArnaudBger) made their first contribution in [#&#8203;392](idursun/jjui#392)

**Full Changelog**: <idursun/jjui@v0.9.6...v0.9.7>

</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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4yOS40IiwidXBkYXRlZEluVmVyIjoiNDIuMjkuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants