Repository navigation
Prototype: Fold the staging functionality into the main view - #5732
stefanhaller wants to merge 255 commits into
Conversation
|
I'm about 8 minutes into your demo video and I'm already very excited. Conceptually it seems simple enough. I just need to add some "hidden" escape codes into the d-s-f output to mark changed lines? |
I don't know enough about OSC codes to have a strong opinion on this. But 1717 seems fine to me.
This seems fine to me I think.
Not sure I have enough information to say on this.
I believe so. I'd definitely like to work closer with you to beta-test this feature as there are a lot of technical details I don't 100% follow quite yet.
I don't think so. d-s-f parses line by line, and retains header information so I should be able to call back to the last header when I encounter a line change. |
|
Having read the spec document and watched your video can I get clarification on a couple of things?
diff --git a/LICENSE b/LICENSE
index eb26539..028c6af 100644
--- a/LICENSE
+++ b/LICENSE
@@ -5,17 +5,18 @@ Copyright (c) 2016 So Fancy team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
+FOOBAR
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM;
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.Help me understand the fields for the deleted line. Would it be: For the added line. Would it be: In section 4.3 it says "context, new line 10" but I think it would be more clear as "context, line 10" because it's not new. |
|
Possible minor hiccup? While attempting to implement the basics of this I came across a minor problem: The default mode with d-s-f it to pipe through less as a pager, and it appears |
I must not have made that clear enough: you don't have to do that, I did already. I just didn't post a (draft) PR yet because I first wanted to get feedback on the spec; but the changes are ready (apart from the necessary changes to the docs, if any, and to the changelog etc.). My branch is here if you want to try it.
That's too bad, but it's not a problem, because d-s-f will only emit the sequences when it is running inside lazygit. I'm taking your other questions over to #5731, that's where the spec should be discussed. |
|
Oh man... you didn't tell me you had most of the work done in d-s-f. You should have led with that. Your code looks pretty sane to me. Well done. |
ecdd436 to
a75c169
Compare
|
Just want to say that this prototype looks very exciting and I would be ecstatic if these changes landed in an official Lazygit release. |
|
This looks amazing. This would be a serious game-changer for my workflow and I imagine many others as well. |
a75c169 to
3dedcea
Compare
3dedcea to
dd11e82
Compare
dd11e82 to
665149b
Compare
|
@dandavison @scottchiefbaker I want to make progress on this. I'm happy with the prototype and with the spec, and I want to start implementing it soon. Anything that is still worth iterating on or discussing before I productionize it? My plan is to start working on it after the next lazygit release, which is scheduled for August 2. My rough estimate is that it will take between one and two weeks to get it all in; we then have a bit of time to test it thoroughly, and hopefully release it with the September release if all goes well. Which means we'd have to ship delta and d-s-f updates some time in late August so that they are available in time. Does that sound like it would work for you? |
|
That's fine with me @stefanhaller. I'm running your delta branch as my delta locally (with gitu) and will of course report any issues I encounter. From delta's point of view, I'll initially consider OSC 1717 support to be experimental in the sense that delta won't complain if there are some backwards incompatible changes in the way the feature works. Though delta might of course need help with PRs for evolving the support. |
|
@stefanhaller I'm fine with all the decisions we've made so far. I support moving forward with this. Will you be updated your diff-so-fancy branch with these proposed changes? |
@scottchiefbaker The PR is already up to date, it is ready to be merged once the fixups are squashed. I'll do that right now. (Please don't merge it just yet though.) |
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two bugs reported from using the stack and a third found while reproducing the first (PR 2 round 1, PR 5 round 5, PR 8 round 1), then two more rounds as each fix in turn was tested and found short: the pane answered "is there anything to select here?" one screenful too early (round 6), and then took the answer over from the commit before while it still couldn't tell (round 7). Round 6 carries the measurements from the reported commit, which say what each fix is worth. §8 gains the diffstat row the user has since decided to keep, and loses the row round 7 closes. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two problems from testing PR 9: wrapLinesInDiffView governed everything the two main panes showed, and the hint for a conflict that has to be resolved by picking a side had a selection over it. Both are answered by having a render say whether it holds the panel's diff. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A fixup on "Show git's own diff when the renderer's can't be acted on" would have folded two decisions into one commit: which diff to render, and whether the content can be pointed at. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The branch's opening commit belongs in PR 5, and moving it there proved much cheaper than the note in the plan had assumed. Four more findings needed code, two of them in gocui. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The click names its own line, so it needs none of the gate the edit keybinding needs, and for a modify/delete conflict the file it opens is in the working tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The lint failure at PR 6's tip came out of the 2026-09-19 replay, and the fixups for it sit on two PRs. Write down why the wrapper leaves PR 6 and comes back in PR 7, and that the PR 7 commit between the two fixups is meant to stay unbuildable until they are folded in. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ws pass Delta and difftastic both rendered the preview normally with the trees a line ending apart, so only the warning was ever visible. The setting behind it was core.autocrlf in the system config Git for Windows installs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…leave Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
This work was redone in non-prototype quality, merged to master, and released with v0.66.0. Closing. |
This is a prototype of a major change to how staging works:
In order to illustrate this better I made a video to demo it. Unfortunately it got a little longer than I had planned, I'm not experienced in producing content like this.
Prototype branches for the three mentioned pagers are here: delta, diff-so-fancy, difftastic.
For feedback on the OSC spec, please comment on stefanhaller/diff-line-metadata-spec#1, not here.