Repository navigation
Conversation
Opening a launch config adds its tabs one at a time, and each tab that joins a group expands it. Groups saved as collapsed came back expanded, and a collapsed group holding the active tab could expand too. Remember which groups are collapsed before adding the tabs and collapse them again afterward.
|
@zhixinwuu, your GitHub account is not connected to Warp. Connect your GitHub account, then retry GitHub PR opened from warp-terminal-factory. |
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.
Description
Closes #53
Launch configs save whether each tab group is collapsed, and opening one creates the group with that value. The tabs are then added one at a time, though, and with the default "new tab after current tab" setting each new tab joins the previous tab's group. Joining a group expands it, so a collapsed group with two or more tabs opens expanded.
The same thing can happen to a group that was already in the window. If the active tab is in a collapsed group and a launch config is opened into that window, the first new tab joins that group for a moment and expands it before it gets its real group.
I note which groups are collapsed before the tabs are added and collapse them again afterward. I didn't change how new tabs join groups, since expanding the group is what someone wants when they open a tab by hand. This is the same kind of bug as #16 (session restore), but in a different code path, so fixing that one doesn't fix this.
This does change one case. If the config's active tab is inside a collapsed group, the group now stays collapsed with that tab active. Session restore does the same once #13 is in.
Linked Issue
ready-to-specorready-to-implement.Testing
I added two unit tests. One opens a launch config with a collapsed two-tab group and checks the group is still collapsed. The other collapses a group that holds the active tab, opens a launch config into the same window and checks that group stays collapsed. Both fail on master and pass with this change. The other workspace tests, clippy on the warp crate and the format check pass too.
For the screenshots I opened a launch config with a collapsed group in a new window through the integration test runner with a real display, once on master and once with this change.
./script/runScreenshots / Videos
Before (master), the group opens expanded:
After, it opens collapsed:
Agent Mode
CHANGELOG-BUG-FIX: Tab groups saved as collapsed in a launch config now open collapsed.