Commit Graph
1046 Commits
Author SHA1 Message Date
Stefan HallerandClaude Opus 5.5 3742ac6066 Show an error when editing a file of a diff that doesn't exist
If you press `e` on a file of a commit, and a later commit deleted that
file, the editor is opened on a path that doesn't exist. Most editors
then create it as a new, empty file. This is confusing. The same
happens with `o`, and with any other file that the worktree it is
opened from doesn't have. An example is a file that is added in a branch
that isn't checked out anywhere, since it is opened from the current
worktree.

Show an error instead of opening the editor. For a range selection in
the commit files panel, show it only if none of the selected files
exist. Otherwise open the existing ones and leave out the others
silently; an error shown only after returning from the editor would
come too late to be useful.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:58:05 +02:00
Stefan HallerandClaude Opus 5.5 6cd6e4532d Copy the absolute path of a branch's file from the worktree that has it
If the commit files panel was entered from a branch that another
worktree has checked out, "Copy absolute path" in its copy menu gives
the file's path in the current worktree. Make it give the path in the
worktree that has the branch checked out. This is the file that `e` and
`o` open, and the one users most likely want the path of.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:58:05 +02:00
Stefan HallerandClaude Opus 5.5 690509a8cc Open files with o from the worktree that has the branch checked out
Do the same for `o` in the commit files panel as the previous commits
do for `e`. If the panel was entered from a branch that another worktree
has checked out, open the file from that worktree.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:58:05 +02:00
Stefan HallerandClaude Opus 5.5 6c4409b712 Add a test for opening a file of a branch checked out in another worktree
Pressing `o` on a file in the commit files panel has the same problem as
`e` had before the previous commit. If the commit is of a branch that
another worktree has checked out, the file is still opened from the
current worktree. The absolute path in the panel's copy menu points into
the current worktree too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:58:05 +02:00
Stefan HallerandClaude Opus 5.5 51e91fbb85 Open files of a branch's diff from the worktree that has it checked out
If you enter a branch in the branches panel and press `e` on a line of
a commit's diff, or on a file in the commit files panel entered from
there, lazygit opens the file in the current worktree. If another
worktree has the branch checked out, this is the wrong copy of the
file. The current worktree may have it in a different state, or not
have it at all. Clicking a lazygit-edit:// hyperlink of a diff renderer
in such a diff has the same problem.

Open the file from the worktree that has the branch checked out
instead, and carry the line number forward to the file as that worktree
has it.

If no other worktree has the branch checked out, the file is still
opened from the current worktree.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:58:04 +02:00
Stefan HallerandClaude Opus 5.5 f9a3dc7be7 Add a test for editing a file of a branch checked out in another worktree
If you enter a branch in the branches panel, and that branch is checked
out in another worktree, pressing `e` on a line of a commit's diff opens
the file in the current worktree. The same happens for `e` on a file in
the commit files panel entered from there. The current worktree may not
have the file at all, as in this test, or have it in a different state
than the branch has it. The line number is carried forward to the
current worktree's version of the file too, and this gives line 0 here.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:58:04 +02:00
Stefan HallerandClaude Opus 5.5 dd68e5644a Scroll a view sideways to show the search match it goes to
If a view doesn't wrap, a search match can be past its right edge, or
left of it once the view is scrolled sideways. Going to such a match
with /, n or N only scrolls the view vertically, so the match stays out
of sight. This matters most for a diff with gui.wrapLinesInDiffView set
to false, where a change is often at the end of a long line.

Scroll the view sideways if the match isn't on screen. Put the match a
third of the way across the view, so that some of the text before it
shows too. If the view can show the match without scrolling, go back to
the left edge instead. This applies to every view that doesn't wrap,
including the side panels.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:44:43 +02:00
Stefan HallerandClaude Opus 5.5 75083c179e Scroll the focused diff sideways with H and L
If gui.wrapLinesInDiffView is false, long lines of a diff run off the
right edge of the main view, and there is no way to see the rest of
them. This makes it hard to see what has changed in such a line. The
old staging and patch-building views scrolled sideways with H and L, but
the focused main view that replaced them has no binding for these keys.

Bind them in the focused main view, as in the side panels. Leaving the
view scrolls it back to the left edge, as it did for the staging view.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:44:43 +02:00
Stefan HallerandClaude Opus 5.5 56e234e94c Show an error if the selected diff lines can't be found in the diff
When we stage, discard or edit lines of the working tree's diff, we
read the file's diff again and look for the selected lines in it. If
none of them are there, nothing happens. The same goes for adding
lines of a commit's diff to a custom patch, or taking lines out of
it. This can happen if the file changed since its diff was shown, or
if we read the line numbers out of the diff on screen wrongly.

Show an error that names the file instead. As with a file that can't
be found, don't act on any file if the lines of one are missing.

Unlike the file check, this one happens after a new custom patch has
been started. If the error leaves that patch without any lines, reset
it, as we do when the last line is taken out of a patch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:04:41 +02:00
Stefan HallerandClaude Opus 5.5 15ac3c28c9 Show an error if the file of the selected diff lines can't be found
If the path in the diff header of a selected line doesn't name a file
of the files panel, staging or discarding the line does nothing. The
command log shows "Apply patch", but nothing else happens, so the user
has nothing to go on when reporting it. Adding a line of a commit's
diff to a custom patch fails in the same silent way if the path
doesn't name a file of that diff. A diff renderer that names files
differently can cause this, and so can a bug in how we read the path,
like the one we had with diff.mnemonicPrefix.

Show an error that names the path instead, and do nothing else. If a
selection spans several files, don't act on the files we did find,
because that would do only part of what the user asked for. Do the
same for opening a line of a diff in its pull request.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-10 13:04:41 +02:00
Stefan HallerandClaude Opus 5.5 243ede84d7 Fix staging lines in the main view when diff.mnemonicPrefix is set
If diff.mnemonicPrefix is set, pressing space on a line in the focused
main view does nothing. The command log shows "Apply patch", but the
line is not staged. Other commands that read a path out of the working
tree's diff go wrong as well, such as jumping to a file. Building a
custom patch from a commit's diff still works, because git uses
mnemonic prefixes only when one side of the diff is the index or the
working tree.

With this config, the paths in the working tree's diff start with i/
and w/ instead of a/ and b/. We only strip a/ and b/, so the path we
read out of the diff header is not a file of the files panel, and we
skip the line without a message.

Users who set the config want to see these prefixes, so keep them.
Strip the first component of the path instead, whatever it is. `git
apply` does the same by default, and ParseableDiffPrefixes makes sure
there is such a component.

A section without +++ and --- lines needs more than that, because we
find the new path on its "diff --git" line by searching for " b/".
Take the path from the "rename to" or "copy to" line instead where
there is one. Otherwise the two paths on the "diff --git" line are the
same. Split the line where the two halves match after stripping their
prefixes, like `git apply` does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:57:25 +02:00
Stefan HallerandClaude Opus 5.5 c0d4be6b66 Add a test for staging a line with diff.mnemonicPrefix set
If diff.mnemonicPrefix is set, pressing space on a line in the focused
main view does nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:53:25 +02:00
Stefan HallerandClaude Opus 5.5 e67a85a075 Fix diff paths when diff.srcPrefix and diff.dstPrefix are set
If diff.srcPrefix and diff.dstPrefix are set (git 2.45 and later),
pressing space on a line in the focused main view does nothing. These
configs change the diff of a commit too, so the other commands that
read a path out of a diff go wrong as well.

The configs replace the a/ and b/ in front of the paths of a diff with
any string. We only know how to strip a/ and b/, so the paths we read
out of the diff header don't name a file.

We can't tell from the diff where such a prefix ends, so override the
two configs along with diff.noprefix.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:53:03 +02:00
Stefan HallerandClaude Opus 5.5 c0d230777a Add a test for staging a line with diff.srcPrefix and diff.dstPrefix set
If diff.srcPrefix and diff.dstPrefix are set, pressing space on a line
in the focused main view does nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:52:02 +02:00
Stefan HallerandClaude Opus 5.5 5cf1fbf168 Fix diff paths under a top-level a/ or b/ when diff.noprefix is set
If diff.noprefix is set, pressing space on a line of a file under a
top-level directory named a or b does nothing. In a stash entry's diff,
the menu for jumping to a file shows such a file without its directory.

We read the path of a file out of the diff header and strip the a/ or
b/ in front of it. Most diff commands override diff.noprefix so that
this prefix is there, but the diff of the working tree and the diff of
a stash entry don't. With the config set, we strip the file's own
directory instead.

Use ParseableDiffPrefixes for these two commands too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:51:16 +02:00
Stefan HallerandClaude Opus 5.5 8d3cfac12d Add a test for jumping to a file of a stash with diff.noprefix set
If diff.noprefix is set, the menu for jumping to a file of a stash
entry's diff leaves out the directory of a file under a top-level
directory named a or b.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:50:30 +02:00
Stefan HallerandClaude Opus 5.5 621d7993b2 Add a test for staging a line with diff.noprefix set
If diff.noprefix is set, pressing space on a line of a file under a
top-level directory named a or b does nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:49:41 +02:00
Stefan HallerandClaude Opus 5.5 40a1027b89 Draw the commit graph in the demos with the detailed style
The 'auto' style doesn't recognize the terminal that vhs records, so it
would draw the classic graph. Now that the recordings have a font for
the branch drawing symbols, use the detailed graph in all demos.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 18:29:35 +02:00
Stefan HallerandClaude Opus 5 212142ff74 Confirm the nuke prompt in the nuke_working_tree demo
The recording of this demo stops with the confirmation popup still on
screen. The explosion animation and the emptied Files panel that the demo
exists to show never happen at all. Nuking the working tree has asked for
confirmation since 238fdd573c, and the demo only selects the menu item, so
the nuke never runs. The demo asserted nothing about the outcome, so it
stayed green all the while.

Answer the confirmation, and assert that the Files panel ends up empty.
That assertion also holds the recording open until the animation has
played out and the panel has been refreshed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-10-05 18:04:50 +02:00
Stefan Haller 115e3fb389 Update demos and readme for new staging-in-main-view functionality
We don't bother rendering the updated or new demos yet, because we are
about to change them to a different format.
2026-10-05 17:13:31 +02:00
Stefan HallerandClaude Opus 5 f3e8d88019 Run demos at the size they are recorded at
How a demo behaves depends on how much of a list fits on the screen, and
`just e2e` ran demos on a 150x100 screen while we record them at 120x35.
So a demo could pass the test suite and still fail partway through a
recording, and there was no way to find out short of recording it.

Give a demo the recording size when it doesn't ask for a size of its
own.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-10-05 17:13:31 +02:00
Stefan HallerandClaude Opus 5 a2dd3327eb Check the line we start on when navigating to a list item
NavigateToLine looks for its target among the lines the view has
rendered. When a list is scrolled, the view holds only the part of it
that is on screen, so the target may not be among them. For that case
the helper jumps to the top of the list and walks down instead.

That walk presses a key before it looks, so it never sees the item it
starts on, which after jumping is the first item of the list. A target
sitting there is reported as missing. The shorter the terminal, the more
of a list is scrolled out of view and the more often that walk is
needed, so this surfaced once the demos began running in a 35 line
terminal.

Check the line the walk starts on before moving off it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-10-05 17:13:31 +02:00
Stefan Haller dd0029dd35 Use accordion mode in diff_commits demo
When running the demos at a hight of 35, as the new recording mechanism
will, this demo failed because the commits list was too small to show
both commits at the same time, and NavigateToLine has a bug that
prevents it from finding it by going to the top and pressing down until
it matches. We are going to fix that bug in the next commit for similar
future situations, but we also solve the problem here by setting the
side panels to accordion mode so that more commits are visible; this
looks better for this demo anyway.
2026-10-05 17:13:31 +02:00
Stefan HallerandClaude Opus 5.5 1f05a6b152 Keep copied commits when switching to another worktree or repo
If you copy commits with shift-C and then switch to another worktree,
the copied commits are gone, so you can't paste them there with
shift-V. This is a common workflow: copy commits from the branch that
is checked out in one worktree, maybe drop them there right away, then
switch to the worktree of another branch and paste them.

The copied commits live in the cherry-picking mode, and each repo state
creates its own. We keep a separate repo state per worktree, so every
worktree starts with an empty clipboard.

Create the cherry-picking mode once and share it between all repo
states. This also lets you paste in a different clone of the same repo,
as long as that clone has the copied commits (for example because you
fetched them there). If the current repo doesn't have them, git
cherry-pick fails with "bad object", and we show this as an error.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 16:05:40 +02:00
Stefan HallerandClaude Opus 5.5 205fad57fa Keep an emptied pane empty
Emptying a pane of the main view clears it right away, but leaves the
view's tasks alone. If a diff was asked for before, and its task is
only created after the layout, that task fills the pane again. A diff's
task that is still reading can also write into the emptied view.

Give the pane an empty render as well. The render takes its place among
the view's tasks, so the earlier diff's task isn't created, and it stops
a task that is still reading. Once that task has stopped, the render
empties the view again.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 14:55:13 +02:00
Stefan HallerandClaude Opus 5.5 f8fa6ee1a4 Add a test for emptying a pane before its diff's task is created
If the lower pane of the main view is asked to show a diff and is then
emptied before the next layout, it ends up holding the diff. Selecting
a file with staged changes and moving back to one without any in rapid
succession does this. The pane is hidden then, but when it is shown
again, it shows the other file's diff until its next render replaces
it.

Emptying a pane clears the view right away, but leaves the view's tasks
alone. So the diff's task, which is only created after the layout,
fills the pane again. A task that is still reading a diff into the pane
isn't stopped either, so it can write into the emptied view.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 14:55:13 +02:00
Stefan HallerandClaude Opus 5.5 5641e8186b Show what was asked for last in the main view
If a diff and then a message are asked for in the main view before the
next layout, the main view shows the diff. One way this happens is
switching tabs twice in rapid succession. Another is discarding the
changes of the only changed file. Closing the menu asks for the file's
diff, and if the files are refreshed before the layout, "No changed
files" is asked for next. The main view then stays empty, because by
the time the diff runs, the file has no changes. This made the
hide_selection_when_changes_vanish test fail now and then.

A diff's task is only created after the layout, since the layout settles
the width that the diff is laid out to. A diff renderer's task has been
created there since 8b8343b8a9, and the task for git's own diff since
0afb94e97b. A view shows the task that was created last, so the diff's
task replaced the message's.

Reserve the diff's place among the view's tasks when the diff is asked
for, and give its task that place when it is created after the layout.
If another task has been asked for in the meantime, don't create the
diff's task at all.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 14:55:13 +02:00
Stefan HallerandClaude Opus 5.5 4d55e67e2e Add a test for switching tabs twice in rapid succession
If two tab switches are handled before the next layout, and the first
tab shows a diff in the main view while the second one shows a message,
the main view ends up showing the diff.

A diff's task is only created after the layout, since the layout
settles the width that the diff is laid out to. A message's task is
created right away. So the diff's task is created after the message's,
and replaces it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 14:55:13 +02:00
Stefan HallerandClaude Opus 5 07e18b4085 Link the file names in a diffstat to where each file's diff begins
A diff opens with a diffstat naming every file in it, right above the
diff of each of them. Selecting a commit puts that list in front of you,
naming the same files the menu of the diff's files offers, and the menu
is still the only way to any of them.

Make each of those names a link that goes to where that file's diff
begins, as picking it from the menu does. The panel keeps the focus, so
a file of the commit being read is a click away and the selection stays
on the commit.

The names are found in the output as it is written to the pane, for next
to nothing. The diffstat is git's own text whichever renderer the diff
goes through — delta, diff-so-fancy and difftastic all pass it on
untouched — and it comes first, so the scan for it ends with it and
nothing below is looked at.

The link states the name as the diffstat does, and which file that names
is worked out on the click, against the files the diff turned out to
hold. That is the point at which a name the diffstat cut off behind
"..." or compacted to the "{old => new}" form of a rename can be
recognized at all.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-10-05 12:44:17 +02:00
Stefan HallerandClaude Opus 5 e2eab7c956 Add a menu of the diff's files to jump to one directly
n and N step through the files of a multi-file diff one at a time, which
is a long way to the far end of a commit touching a hundred files.

Bind ctrl+g to a menu of the diff's files, in the order the diff shows
them and by the paths the repo knows them by; picking one goes to where
its diff begins, exactly where stepping to it with n would have left
you. The menu filters as you type, so the file you have in mind is a few
characters away however many the commit touches.

The key works in the panel the diff belongs to as well as in the diff
itself. A commit is read from the commits panel, so being able to jump
from there saves focusing the diff and leaving it again for the next
commit; the diff scrolls to the file and the focus stays in the panel.
It is ctrl+g rather than f because a key that works in every panel has
to be free in all of them, and f is fetch in the files panel and fixup
in the commits panel.

The command applies only while the main view is showing a diff, and is
left out of the keybindings menu where it isn't: over a branch's commit
log, or while a conflicted file has given the main section over to the
merge conflicts view.

The diff is read to the end before the menu is built, as searching it
does: a file below the part that has been read is in neither the list
nor the view. Each item names its file rather than the row that file
begins at, so that a diff re-rendered while the menu is up is jumped
into at the row the file begins at now.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-10-05 12:14:02 +02:00
Stefan HallerandClaude Opus 5 ef71bcf9b7 Open the selected diff line in the branch's pull request
Reading a change in lazygit and saying something about it on GitHub
means finding the line again in the browser: open the pull request, find
the commit, find the file, scroll to the line. The line is already under
the cursor here.

Bind G in the focused main view, the key the commits panel opens the
pull request with, to open it at the line the selection is on. The URL
names the commits whose diff is on screen, so that the line numbers of
the diff are the ones the page shows, the file by the SHA-256 of its
repo-relative path, and the line by the side of the diff it is on: R for
the new version of the file, L for the old one, where a deleted line is.
GitHub documents none of that; the form was read off the URLs its own
pages carry.

One commit is named by its hash. A range of them is named by the commit
the range starts after and the commit it ends at, the form the chooser
above a pull request's files uses. The commit a range starts after is
the parent of its oldest commit; where the range starts where the pull
request itself does, that parent is none of the pull request's own
commits, and the keyword BASE stands for it.

Which branch's pull request that is depends on the panel beneath. The
commits panel lists the commits of the checked-out branch, the
sub-commits panel those of the branch drilled into, and the commit files
panel shows the files of a commit from either. In a stack of branches,
each with a pull request of its own, those lists include the commits of
the branches below, and each of those commits is in the pull request of
its own branch. So the command looks upwards from the commit for the
nearest head of a branch with a pull request, and takes the listed
branch if it finds none. Panels showing a diff that no pull request has
a view of don't answer, and the command isn't offered over their diffs
at all.

Neither is it offered over a diff that is not the commit's own, where
the line numbers on screen are not the ones the page shows: a diff
against another ref in diffing mode, and the custom patch, whose lines
sit at the numbers the patch gives them.

A pull request holds only the commits of its branch that are pushed, and
its pages say they can't find any other commit. So the command refuses
where a commit of the diff is not one of the pull request's. Amend a
commit in the middle of the branch, and the diffs of the commits below
it still open; the ones above it sit on hashes the remote doesn't have.
A commit from before the branch, in a main branch already, is refused
too, and so is a range of commits that reaches across the head of a
branch in a stack, since its commits are in two pull requests. Whether a
commit is pushed is known only for the upstream of the listed branch.
For a branch lower in a stack, that is right as long as the branches of
the stack are pushed together.

Only GitHub pull requests are known, since that is where the pull
request data comes from. The whole path can't be exercised headlessly:
no pull request reaches the model without a GitHub token, so the test
covers where the command is offered and the three reasons it refuses.
The URL is unit-tested instead, both the anchor of a line and the way
the commits are named, and so is the choice of a branch in a stack.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 12:05:39 +02:00
Stefan Haller 6990c06880 Open a clicked diff line in the editor
Clickable renderer gutters are small and unavailable on some diff rows.
Make the whole row an editor target without changing focus or selection,
including while a popup is focused.

Use both Alt and Shift because terminal mouse protocols do not deliver
either modifier consistently across Ghostty, iTerm2, and VS Code.
2026-10-05 11:55:14 +02:00
Stefan HallerandGitHub Copilot c04c192659 Remove the last staging-panel language from tests
Generic range assertions and migrated commit tests should describe the views
they still exercise. Drop stale explorer wording so failures and test intent
no longer point contributors at UI that does not exist.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandClaude Opus 5 0b47b0013a Let wrapLinesInDiffView govern the two main panes
Working in a diff used to mean the staging view, and this option said
whether the long lines there were wrapped. The main view does that work
now, and the option has had nothing to govern since the staging view went
away. Both panes wrap whatever they are given.

Make the option their wrap setting instead.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot aba33ad93b Name diff options after the view that now uses them
Hunk defaults and wrapping no longer belong to a staging panel. Rename both
public keys with automatic migration, and remove panel-era English strings so
config, UI, schema, and generated docs describe the surviving interface.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 5d72d7da99 Allow context changes while building a custom patch
The focused diff addresses patch lines by identity, so changing how much
context is rendered cannot invalidate an active patch. Remove the
explorer era refusal and prove that another line can still be toggled
correctly after the rerender.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 9ddd5fc65f Remove the staging and patch-building panel shells
Nothing routes to the explorer contexts after line actions and file entry
moved into the normal main pair. Delete their contexts, views, main-pair
wiring, discovery API, test drivers, and selection-state package so the
surviving diff view is the only implementation.

Their names go from the contexts a custom command may bind to as well, so
that a config still naming one is reported as the config error it now is
rather than taken as a context we simply failed to find.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot a825c5f7a7 Open file diffs in the focused main view
Enter and double-click should take users to the diff where line actions now
live, whether the file belongs to the working tree or a commit. Share the
existing focus, raw-fallback, and selection setup while retaining directory,
submodule, and conflict-specific behavior.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot c38560bfa2 Move the last explorer workflows onto the focused diff
Historical file removal and the staging/custom-patch demos still entered
the old panels even though their line actions already exist in the main
diff. Preserve their prompts, timing, and downstream results while changing
only the interaction surface.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 0902d0a5ea Drop test steps owned by the retiring explorers
The generic filter and range-selection suites already exercise their state
machines on surviving views, while focused-diff tests own range selection
and drag autoscroll. Remove only the repetitions that enter an explorer,
along with the staging-panel screen-mode test whose UI no longer survives.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan Haller f1232bbfd9 Migrate range select tests to focused main view 2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 59df93bfd5 Exercise commit and stash flows through the focused diff
Line staging remains part of several broader workflows: committing staged and
unstaged changes, bypassing hooks, and stashing only the staged part of a
file. Drive those selections through the main diff pair while preserving
their commit, focus, and exact stash-content assertions.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 4c0358d27f Build mixed custom patches from the focused diff
The broad regression for combining a whole file, a hunk, a range, and
individual lines must survive the patch-building panel. Keep the side panel
for the explicit whole-file operation and drive every content selection
through the commit's focused diff.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot a6b5dcdfdb Keep partial rename patches on the focused diff
Selecting a rename's content changes must remain distinct from selecting
the file operation itself. Build and remove that partial patch through
the focused commit diff, and keep asserting that the rename stays in its
source commit after the content change is taken out.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot f3e98ed222 Manage patch lifetime from the focused diff
Removing a whole or partial patch from its source commit, and replacing
a patch when the user selects another commit, must not depend on
entering a patch-building panel. Keep those state transitions covered
through the diff that now owns patch selection.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 8bfd86ca2c Build applied patches from the focused diff
Applying and reverse-applying custom patches must keep their staging,
dirty-worktree, and conflict behavior after the patch-building panel is
removed. Select the source lines in commit diffs while retaining every
assertion about the resulting working tree and conflict resolution.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot b45df1b612 Keep historical diff actions off the explorers
Editing a line whose working-tree position shifted, discarding part of
an added file, and giving up a patch by escaping are all behavior worth
retaining. Drive them through the focused commit diff so their coverage
no longer depends on the patch-building panel.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 41fd1d1c86 Move partial-patch destination tests onto the commit diff
Line-level patch moves must keep their behavior for added and deleted
files, adjacent additions, stacked branches, and conflicting earlier
destinations. Select those lines directly in the focused diff so only
the intended changes move and file-level metadata stays with the source
when appropriate.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 78d0898911 Move whole-patch destination tests onto the commit diff
Moving a complete patch must preserve each file operation whether its
destination is a new commit before or after the source, or an existing
commit earlier or later in history. Build those patches as ranges over
the focused diff so the coverage survives removal of directory toggling
in the patch builder.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00
Stefan HallerandGitHub Copilot 3c36c066ed Keep patch-move conflict coverage on the focused diff
Conflict and dirty-worktree handling happen after a custom patch is
built, but their tests must no longer rely on either explorer to build
it. Select whole and partial patches in the commit diff while preserving
the rebase-conflict and stash-restoration assertions.

Co-Authored-By: GitHub Copilot <[email protected]>
2026-10-05 11:44:42 +02:00