Repository navigation
feat(desktop): pin workspaces from the rail group menu - #678
Merged
Merged
Conversation
The desktop already held the workspace pin data (column, store call, remote command) but had no surface for it: `workspaces.pinned` could only be set from the phone. Wire the desktop up. - `pin_workspace` Tauri command, plus `pinWorkspace` in the storage layer and `onTogglePinWorkspace` through AppShell (the same refresh shape as a thread pin). - The workspace group menu gains Pin / Unpin beside rename, reusing the existing `activityRail.pin` / `unpin` strings. - The rail orders its workspace groups pinned-first, keeping the store's recency order inside each half, and marks a pinned header with a Pin icon. `list_workspaces` deliberately keeps its recency order: the new-conversation picker reads `workspaces[0]` as the most recently used workspace, so ordering belongs to the surfaces that show groups (this rail, and the phone's workspace tab from the same column) rather than to the shared list contract.
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.
What
The desktop already had the workspace pin data (
workspaces.pinned,store::pin_workspace, theset_workspace_pinnedremote command) but no surface for it — the flag could only be set from the phone. This wires the desktop up:pin_workspaceTauri command (registered in the invoke handler).pinWorkspace, andStoredWorkspace.pinned.⋯on a group header) gains Pin / Unpin beside Rename, reusing the existingactivityRail.pin/unpinstrings;AppShelltoggles and refreshes the store like a thread pin.Why
list_workspaceskeeps its recency orderThe new-conversation picker reads
workspaces[0]as the most recently used workspace (useWorkspaceForm.cancel), so ordering by the pin flag belongs to the surfaces that render groups — this rail, and the phone’s workspace tab from the same column — rather than to the shared list contract.The pin is not activity:
last_opened_at/updated_atstay put, so unpinning returns a group to its recency position instead of jumping it to the front (locked by the existing store test).Tests
workspace_commands_round_tripnow pins and asserts the stored flag; GUI and headless (--no-default-features) clippy both pass with-D warnings; full suite 1275 lib + 1 bin + 5 integration tests.tsc --noEmit, eslint, and 128 vitest files / 1086 tests. New rail tests cover pinned-first ordering (marker and order, and the unpin fallback) and the group-menu Pin / Unpin path, plus a storage-layer assertion for the new command.Not verified on a live desktop window: the change is a menu item, an icon and list order, all covered by DOM-level tests.