Is your feature request related to a problem? Please describe. Follow-up to #10181.
Since 0.46, jj undo refuses when the latest operation came from another workspace, so with busy sibling workspaces (e.g. agents) you can't undo your own last operation without finding it in jj op log and running jj op revert. Similarly, jj redo finds nothing to redo once another workspace's operation lands after your undo.
jj git init main && cd main
jj workspace add ../second
jj new -m "main 1"
jj -R ../second describe -m "second 1"
jj undo
# Error: Refusing to undo operation dbdcf40c1462 because it was performed in workspace second
jj new -m "main 2"
jj undo
jj -R ../second describe -m "second 2"
jj redo
# Error: Nothing to redoDescribe the solution you'd like
When the latest operation is another workspace's (or a merge of concurrent operations), jj undo reverts this workspace's latest operation, like jj op revert, keeping the other workspaces' operations. Repeating it continues with older operations of this workspace. jj redo likewise finds this workspace's latest undo across intervening operations. When the latest operation is this workspace's own, behavior is unchanged.
I have an implementation along these lines and can send a PR.
Describe alternatives you've considered Putting this behind a flag, as #10181 suggested, keeping the current refusal as the default.
Activity
4Related: https://github.com/jj-vcs/jj/pull/10123
For parallel agent workloads, independent operation history might work better.
Specifically for jj workspace add followed by jj undo, I have a commit for fixing that. I try to go over it and send it soon.
#10482 to attribute the operations created by jj workspace add to the source workspace.
Btw, you do not need to create corresponding issues if you have PRs ready to go. Issues by themselves may be useful if there are other things worth discussing or considering (such as whether this feature should go behind a flag), but if you found a bug and wrote a fix (as with some of your other issues), feel free to just send the PR.