feat(core): re-bucket pinned docks into a dedicated ~pinned category#466
Merged
Conversation
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
Reworks the dock pin feature. Previously, pinning a dock only floated it to the top of its existing category bucket — it could never jump ahead of higher-priority categories. Now pinning re-buckets the entry into a dedicated
~pinnedcategory with a strongly-negative order weight (-100000), so pinned entries lead the dock bar ahead of every real category.The re-bucketing respects the dual role of
category:~pinnedbucket.~pinnedsub-category that leads its own group, staying folded inside the group rather than surfacing on the top-level bar.~pinnedis chosen before the category-hide check and is itself never hideable, so a pinned entry stays visible even when its home category is hidden. Unpinning returns the entry to its home category in its previous position.The whole feature stays client-side: the
~pinnedorder is a local override in the sort rather than an edit to the upstreamDEFAULT_CATEGORIES_ORDERtable (thedocksPinnedshared-state field is unchanged, so no migration). The old "pinned-first" intra-category tiebreaker is removed since pin now changes the bucket. Docs are updated, including a fix to thedefaultOrderdescription (the code sorts ascending — lower first — not "higher first" as previously documented).Linked Issues
Additional context
New tests in
dock-groups.test.tscover top-level pin →~pinned, group-button pin → top-level~pinned, grouped-member pin →~pinnedsub-category (no bar promotion), the-100000lead ordering, pin overriding category-hide, and the intra-~pinnedsort.pnpm lint && pnpm test && pnpm typecheck && pnpm buildall pass.This PR was created with the help of an agent.