fix(ui): toggle files pane independently - #757
Conversation
|
@tridha643 is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThe PR decouples the built-in files-pane shortcut from extension-pane visibility and updates its labels and documentation. The fallback handling remains inconsistent after extension re-registration.
Confidence Score: 4/5The PR is not yet safe to merge because a soft extension reload can restore the files-pane replacement as the toggle target while the built-in fallback remains visible. The prior reply from an author whose name is not shown says the fallback issue was fixed, but a crashed replacement followed by a resetApp-false extension reload creates a fresh unquarantined registration while retaining the built-in fallback’s open state, so Files Needing Attention: src/ui/App.tsx and src/ui/AppHost.extension-sidebar.test.tsx Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Replacement pane crashes] --> B[Quarantine old registration]
B --> C[Close replacement and open built-in fallback]
C --> D[Soft extension reload preserves App state]
D --> E[Fresh replacement registration is not quarantined]
E --> F[User presses s]
F --> G[Toggle targets replacement instead of visible fallback]
Prompt To Fix All With AI### Issue 1
src/ui/App.tsx:1461
**Reload restores wrong toggle target**
When a files-pane replacement crashes and extensions are reloaded without remounting `App`, the fresh registration is no longer quarantined while the built-in fallback remains open. Pressing `s` then targets the replacement instead of closing the visible fallback, reopening or re-crashing the replacement while leaving the fallback visible.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (2): Last reviewed commit: "fix(ui): preserve files pane fallback to..." | Re-trigger Greptile |
|
Hmm, maybe I don't understand this. My expectation is if you added your own sidebar or panel, you would register your own keys for opening it. |
|
Nice! |
Problem
The
sshortcut toggles one global sidebar-area visibility flag. When an extension contributes a right-side pane, pressingstherefore hides both the built-in files pane and the extension pane even though the extension pane remains logically open. Reopening the extension pane can also bring the files pane back, which makes their controls feel coupled.Approach
hunk.view.toggleSidebartoggle the active files pane's existing pane-open state instead of the global wrapper around every horizontal pane.hunk:fileswhen one is registered.This belongs in core because the built-in
scommand and global sidebar-area state are host-owned. Extensions cannot override the built-in chord or prevent the host from hiding every left/right pane.Behavior
Before:
After:
No change is intended to responsive omission: when the terminal cannot fit every requested pane while preserving the minimum review width, Hunk may still omit a pane from that frame. The logical open states remain independent.
Validation
TMPDIR="$PWD/.tmp" bun test src/ui/AppHost.extension-sidebar.test.tsx src/ui/lib/appCommands.test.ts src/ui/lib/appMenus.test.ts src/core/commandCatalog.test.ts(52 passed)bun run format:checkbun run typecheckbun run lintbun run check:docsTMPDIR="$PWD/.tmp" bun run test:integration(103 passed, 8 pager timeouts; the representativepager mode hides chrome and pages forward on spacetimeout reproduces unchanged onmain)Manual UI check
Tested the compiled standalone binary on macOS in Ghostty with zsh at 197x56. With the built-in files pane and the
hunk-calldiffright pane open,sclosed and reopened only files;Ctrl+Gclosed and reopened only Call Flow.Release
Includes a patch Changeset for
hunkdiff.