feat: implement rebasing#534
Open
jakubbortlik wants to merge 15 commits intoharrisoncramer:developfrom
Open
Conversation
jakubbortlik
commented
Mar 4, 2026
27e544a to
6fc6475
Compare
3384ee1 to
d528de8
Compare
This was referenced Apr 7, 2026
dff2d2a to
49d2495
Compare
jakubbortlik
commented
Apr 12, 2026
| create_mr = "glC", -- Create a new MR for currently checked-out feature branch | ||
| choose_merge_request = "glc", -- Chose MR for review (if necessary check out the feature branch) | ||
| start_review = "glS", -- Start review for the currently checked-out branch | ||
| reload_review = "gl<C-R>", -- Load new MR state from Gitlab and apply new diff refs to the diff view |
Collaborator
Author
There was a problem hiding this comment.
I'm wondering whether it would make sense to connect this to the refresh of the discussion tree instead of making it a separate function and keybinding.
jakubbortlik
commented
Apr 12, 2026
Comment on lines
+865
to
871
| gitlab.close_review() ~ | ||
|
|
||
| Closes the reviewer tab and discussion tree and cleans up (e.g., removes | ||
| winbar timer). | ||
| >lua | ||
| require("gitlab").close_review() | ||
| < |
Collaborator
Author
There was a problem hiding this comment.
This is an existing API that was just missing documentation.
jakubbortlik
commented
Apr 12, 2026
| M.is_open = true | ||
| local cur_view = diffview_lib.get_current_view() | ||
| M.diffview_layout = cur_view.cur_layout | ||
| M.diffview = require("diffview.lib").get_current_view() |
Collaborator
Author
There was a problem hiding this comment.
Saving this to the module table makes it possible to reduce the reliance on the diffview.lib in other places of the codebase.
jakubbortlik
commented
Apr 12, 2026
The `vim.api.nvim_get_current_tabpage()` function returns a tab ID, not a tab number, as exemplified by the usage: `vim.cmd.tabclose(vim.api.nvim_tabpage_get_number(M.tabid))`
a9de870 to
9dd7965
Compare
Introducing more async git calls to prevent blocking UI (cursor and winbar updates) when checking if the local branch is up-to-date with the remote tracking branch. These checks can be async if we just want to notify the user and the following actions are not blocked by the branch being out-of-sync.
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.
Closes #497.
This is still in draft because I would like to test it thoroughly, butthe main functionality works. The maintained Diffview fork supports updating a diffview, and programmatically modifying selections which enables us to update the reviewer in place without closing and reopening after a rebase.There will be a trivial conflict with #530 because both PR's add keybindings in the same place in settings.I've also replaced some synchronous system calls to
gitwith async calls. This prevents blocking the UI (cursor and winbar updates) when checking if the local branch is up-to-date with the remote tracking branch. This makes loading the summary and rebuilding the discussion tree more responsive.AI use: The Go code is mostly generated by Claude Opus 4.5. The same model has been used for reviewing the lua code.