Repository navigation
feat(app): close pinned tabs from their right-click menu - #67499
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. The new Close tab item calls the existing pins.close, the same handler as middle-click on a pinned tab, and reuses the existing common.closeTab string. Grouped pinned tabs get it too, since they use the same PinnedSession component. I couldn't drive the web app here, so I didn't run it. I read the code path: tsc -b in packages/app passes and the pins/tabs tests pass (30/30). Your before/after screenshots cover the visible change.
Public API is unchanged.
1 task
6 tasks
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.
Issue for this PR
Closes #
Type of change
What does this PR do?
Right-clicking a pinned tab, loose or inside a group, had no way to close it. You had to unpin it first and then close the tab. The menu now ends with Close tab, which unpins the session and closes its tab in one click. It calls the existing
pins.close, the same action as middle-click on a pinned tab, and reuses the translated "Close tab" string.The pinned area only appears with the navigation prototype setting turned on, so no new flag is needed.
How did you verify your code works?
bun typecheckinpackages/app: passedbun testforsrc/shell/tabs/pins.test.tsandsrc/shell/tabs/tabs.test.ts(with the package's preloads): 30 pass, 0 failbun run lint:changed origin/dev: 0 problemsapp-session-menus--pinned-tablab story before (withorigin/dev'spinned-area.tsx) and after, at the same viewport, theme and state.Screenshots / recordings
Before:
After:
Checklist