jjui icon indicating copy to clipboard operation
jjui copied to clipboard

FR: make the "jump to parent" `J` key work in the op log

Open ilyagr opened this issue 5 months ago • 5 comments

Currently, J seems to do nothing when jjui shows the operation log.

ilyagr avatar Jul 12 '25 01:07 ilyagr

Also happened on my end, while testing my #179 leader branch. My example toml file uses J to rebase a new "TODO" change into its parent, but looks like J is not moving the cursor (jj.GetParent() seems to always return -1).

vic avatar Jul 13 '25 21:07 vic

Jump to parent only works in the revisions view and also it only jumps to a parent if the parent is visible in the current revset.

This was not implemented for the operation log because mine always seems to be linear. What would be the jj command to run to figure out the parent operation id of an op log entry given its operation id?

idursun avatar Jul 14 '25 00:07 idursun

This was not implemented for the operation log because mine always seems to be linear.

It gets non-linear when several jj commands run concurrently, usually because you have jjui auto-refresh at the same time as another jj command happens. This becomes even more frequent if you also use, say, jjk or VisualJJ for VS Code.

What would be the jj command to run to figure out the parent operation id of an op log entry given its operation id?

Good point! I think this might not be implemented yet. I wrote down some thoughts in https://github.com/jj-vcs/jj/issues/6979, including a really messy workaround (that I'm not sure I recommend using); perhaps others will have additional thoughts.

ilyagr avatar Jul 14 '25 00:07 ilyagr

dang, you are fast!

idursun avatar Jul 14 '25 01:07 idursun

I was thinking that about you 😀. Several times I woke up, and jjui had several new features, a couple of which I previously thought would be impractically difficult.

Editing descriptions inline was the most recent time I remember this happening.

Image

ilyagr avatar Jul 14 '25 02:07 ilyagr