Skip to content

fix(details): add shift+p binding for preview_toggle_bottom#649

Merged
idursun merged 1 commit into
idursun:mainfrom
ansel1:fix/details-preview-toggle-bottom
Apr 23, 2026
Merged

fix(details): add shift+p binding for preview_toggle_bottom#649
idursun merged 1 commit into
idursun:mainfrom
ansel1:fix/details-preview-toggle-bottom

Conversation

@ansel1

@ansel1 ansel1 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

The revisions, revisions.evolog, and oplog scopes all bind shift+p to ui.preview_toggle_bottom (move preview between side and bottom position), but the revisions.details scope only has pui.preview_toggle and is missing the corresponding shift+p binding.

This means that once a user enters the details view (pressing l on a revision), they lose the ability to toggle the preview position until they go back to the revisions view — even though p still toggles the preview on/off in details mode.

Change

Add the missing binding in internal/config/default/bindings.toml:

{ key = "shift+p", action = "ui.preview_toggle_bottom", scope = "revisions.details", desc = "move preview to bottom" },

The action ui.preview_toggle_bottom is an existing built-in — no code changes required, and the action catalog does not need to be regenerated.

Verification

  • go build ./cmd/jjui — OK
  • go test ./... — all packages pass
  • Manually tested: in details view, shift+p now toggles preview between side and bottom positions, matching the behavior in revisions, revisions.evolog, and oplog.

The revisions, revisions.evolog, and oplog scopes all bind shift+p to
ui.preview_toggle_bottom, but revisions.details was missing it. Add the
binding so the preview position toggle is available consistently in all
scopes where p toggles the preview.
@ansel1 ansel1 requested a review from idursun as a code owner April 23, 2026 19:43
@ansel1 ansel1 marked this pull request as draft April 23, 2026 19:44
@ansel1 ansel1 marked this pull request as ready for review April 23, 2026 19:51

@idursun idursun left a comment

Copy link
Copy Markdown
Owner

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 96911e3 into idursun:main Apr 23, 2026
4 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 7, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.10.3` → `v0.10.4` |

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

[Compare Source](idursun/jjui@v0.10.3...v0.10.4)

A quick maintenance release with a few improvements and fixes.

#### Features

##### Absorb operation

Absorb is now an operation, similar to rebase, revert, duplicate, and other revision operations, instead of immediately running `jj absorb` with jj's default destination set.

Default absorb targets are preselected and shown with `<< into >>`. Use `space` to toggle candidate targets, `enter` to apply, and `esc` to cancel. Leaving the target set unchanged keeps the previous plain absorb behaviour; changing the set constrains absorb to the selected targets.

([#&#8203;634](idursun/jjui#634), [#&#8203;640](idursun/jjui#640))

##### Directory entries in fuzzy file search

Fuzzy file/path search now includes directory entries such as `src/` and `src/pkg/`, not only leaf file paths. This makes it easier to filter or jump by directory in larger trees.

([#&#8203;642](idursun/jjui#642))

#### Improvements

##### Better theme control for selected rows

Selected-row styling is now theme-owned for revset completion, target picker, details lists, and menu shortcuts. Themes can customise selected sub-roles such as `"revset completion selected matched"`, `"revset completion selected text"`, `"revset completion selected dimmed"`, `"picker selected matched"`, and `"picker selected text"`.

This fixes cases where `"revset completion selected"` changed the selected row background but not the selected foreground or bold styling. Default selected backgrounds for revset completion and target picker now also align with revision details.

([#&#8203;637](idursun/jjui#637))

##### Consistent preview position toggle in details

`shift+p` now toggles the preview between side and bottom positions in the details view, matching the existing behaviour in revisions, evolog, and oplog views.

([#&#8203;649](idursun/jjui#649))

#### Fixes

##### Lua revset actions outside the revset editor

Lua scripts can now dispatch revset actions such as `revset.set(...)` even when the revset editor is not open. This fixes custom revision-scoped Lua actions that update the current revset.

##### Stale file selection after closing details

Closing the details view now clears stale selected-file state, and restoring an existing details operation resynchronises file selection. This fixes cases where a later command error could make `Esc` behave incorrectly instead of dismissing the visible flash message.

([#&#8203;643](idursun/jjui#643))

##### Bookmark names with special characters

Bookmark operations now match bookmark names exactly. This fixes deleting bookmarks whose names contain characters that jj would otherwise interpret as string pattern syntax, such as `1.3.63-+-json-length-fix`.

([#&#8203;632](idursun/jjui#632), [#&#8203;650](idursun/jjui#650))

#### What's Changed

- feat(absorb): add target picker for jj absorb --into by [@&#8203;manusajith](https://github.com/manusajith) in [#&#8203;640](idursun/jjui#640)
- feat: include directories in path entries for fuzzy\_files by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;642](idursun/jjui#642)
- Remove unused struct fields, methods, and functions by [@&#8203;nikosavola](https://github.com/nikosavola) in [#&#8203;648](idursun/jjui#648)
- fix(details): add shift+p binding for preview\_toggle\_bottom by [@&#8203;ansel1](https://github.com/ansel1) in [#&#8203;649](idursun/jjui#649)
- fix(ui): unable to dismiss flash message after split command error by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;643](idursun/jjui#643)
- fix(bookmarks): match bookmark names exactly by [@&#8203;baggiiiie](https://github.com/baggiiiie) in [#&#8203;650](idursun/jjui#650)

#### New Contributors

- [@&#8203;manusajith](https://github.com/manusajith) made their first contribution in [#&#8203;640](idursun/jjui#640)
- [@&#8203;nikosavola](https://github.com/nikosavola) made their first contribution in [#&#8203;648](idursun/jjui#648)
- [@&#8203;ansel1](https://github.com/ansel1) made their first contribution in [#&#8203;649](idursun/jjui#649)

**Full Changelog**: <idursun/jjui@v0.10.3...v0.10.4>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- 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 [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjguNSIsInVwZGF0ZWRJblZlciI6IjQzLjE2OC41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
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