Remove the staging and patch-building panels - #6040
Open
stefanhaller wants to merge 29 commits into
Open
stefanhaller wants to merge 29 commits into
stefanhaller wants to merge 29 commits into
Conversation
stefanhaller
added this pull request to stack #6027
September 20, 2026 18:05
stefanhaller
force-pushed
the
replace-staging-panels-with-main-view
branch
from
September 21, 2026 12:44
6993298 to
6daa651
Compare
The hint was raised on entering the staging panel, once, to explain that the selection mode there had changed and how to get the old one back. That panel is gone, and with it the moment the hint was tied to; what is left is a string nothing prints and a flag nothing reads. The advice it carried is not lost: the option it names is documented, and the key that switches modes is on screen while a diff is focused. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keeping the same staging interactions covered through the explorer would pin the suite to the panel that this branch removes. The focused main view now owns line, range, hunk, navigation, search, context-size, and rapid-input coverage. Co-Authored-By: GitHub Copilot <copilot@github.com>
Removing the staging panel must not lose the handoff that happens when a file's final change disappears. Drive that behavior through the focused main view so the test continues to require focus and selection to follow the files panel onto the next diff. Co-Authored-By: GitHub Copilot <copilot@github.com>
The commit rewrite triggered by moving a custom patch must keep the user's place without relying on the patch-building panel. Build the patch and leave the affected range selected in the focused diff so the regression test follows the UI that survives this branch. Co-Authored-By: GitHub Copilot <copilot@github.com>
The patch-building panel could move an added file as a file, while selecting every visible change through the focused diff currently moves only its content and leaves the empty file behind. Keep the intended index state beside the current one so the replacement flow demonstrates that gap before it is fixed. Co-Authored-By: GitHub Copilot <copilot@github.com>
A focused diff must replace the patch builder's whole-file toggle without losing file creation or deletion metadata. Ordinary modifications and renames must remain line-level selections even when every changed content line is selected. Ask the patch builder's canonical raw diff whether it consists of one hunk containing only additions or only deletions and no context. Use the whole-file operation only when the selection also covers every change. Co-Authored-By: GitHub Copilot <copilot@github.com>
Patch movement still needs coverage for partial modifications, adjacent additions, custom diff settings, and selections spanning files after the patch-building panel goes away. Drive each through diff-line identities while keeping the resulting commit and index assertions unchanged. Co-Authored-By: GitHub Copilot <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
The next commit deletes the controller this lives in, while the helper itself is still wanted: it is what makes a copied selection paste straight into code. Move it first, so that the deletion is a deletion. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Focused main views now own selection, staging, patch construction, copying, and context-size rerenders. Remove the parallel controller/helper stack and its refresh scopes, while retaining custom-patch reset as mode behavior. Co-Authored-By: GitHub Copilot <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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 <copilot@github.com>
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) <noreply@anthropic.com>
Users no longer enter separate staging or patch-building panels. Describe file entry, pane switching, staging, and custom patch construction where those actions now happen, and remove the deleted package from the developer guide. Co-Authored-By: GitHub Copilot <copilot@github.com>
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 <copilot@github.com>
In the staging panel it used to copy the selected text verbatim, but in the focused main view it copies the diff lines (that's also what the toast says), and now that the staging panel is gone, we can change the text to make it more specific.
stefanhaller
force-pushed
the
replace-staging-panels-with-main-view
branch
from
September 21, 2026 13:46
6daa651 to
90743af
Compare
This branch has not been deployed
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.
9th PR in the stack of PRs towards staging hunks directly from the main view. This one is stacked on #6039.
Everything the staging and patch-building panels did now happens in the main view, so this PR removes them.
enteron a file, in the files panel or the commit files panel, focuses the main view at that file's diff. Double-clicking the file row does the same. Everything else about the flow is unchanged; there is simply no separate panel to be in.Config changes, both migrated automatically:
gui.wrapLinesInStagingView→gui.wrapLinesInDiffViewgui.useHunkModeInStagingView→gui.useHunkModeInDiffViewNotable change:
wrapLinesInStagingViewused to affect only the staging panel, but not the normal diff view. The newwrapLinesInDiffViewaffects the main view always, whether focused or not; I assumed this is probably the desired behavior, but I don't use the option myself, so I can't tell for sure.One thing to know if you use custom commands:
staging,stagingSecondaryandpatchBuildingare no longer context names. If a custom command still names one in itscontextfield, that is now reported as a config error which you need to fix manually.The context size can now be changed while a patch is being built. The refusal existed because the old patch explorer kept track of which lines are included in the patch by their line indices in the diff, which would change when changing the context size. The new mechanism doesn't have this problem, because it keeps track of patch lines by their line identity, which doesn't change.