feat: hide a project from the sidebar - #1
Open
WazoAkaRapace wants to merge 3 commits into
Open
Conversation
`projects.hidden` 0/1 column + `hide_project(id, hidden)`, mirroring `pin_project`. Hidden rows stay in `list_projects` on purpose: the sidebar filters its own view, so the project route, tabs and search keep resolving a hidden project — hiding the one you're viewing must not yank the page. Re-adding a folder clears the flag (that's the un-hide gesture) while still leaving `pinned` alone; the indexer's upsert never touches `hidden`, so a rescan can't undo a hide. Both guarded by tests, next to their pin counterparts.
Required (not optional) on the TS interface, so the compiler finds every construction site, exactly as `missing` did. cmd.hideProject mirrors pinProject; the mock's add_project case now mirrors the real command's ON CONFLICT too — an existing row gets realPath/missing/hidden refreshed instead of being left untouched, so re-adding a hidden folder actually restores the row in browser-only mode.
The pin button's pattern, one slot over: hover-revealed EyeOff (visible without hovering on pinned/active rows), optimistic write so the row vanishes at the click rather than after the 2s poll. No glyph swap, no confirm — the row is about to disappear and the gesture is reversible. visibleProjects filters the sidebar's view of the shared projects cache, so the project route, session tabs and search keep resolving a hidden project — hiding the one you're viewing doesn't yank the page. All-hidden is its own empty state pointing at the FolderPlus, not a blank pane. F1 specced in the same commit.
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
A project can now leave the sidebar. Hover a row → EyeOff (beside the pin) → gone. Reversible: re-adding the folder via ⊕ Add project brings it back.
How
projects.hiddencolumn +hide_project(id, hidden)command, mirroringpinnedend to endlist_projectsstill returns hidden rows; the sidebar filters its own view — so the project route, session tabs and search keep resolving a hidden project (hiding the one you're viewing doesn't yank the page)hidden, so a rescan can't undo a hide (Rust-tested, like the pin guard)add_project's ON CONFLICT clearshidden— re-adding is the un-hide gesture — while preservingpinnedVerification
Full gate green: lint, typecheck, unit, 77/77 e2e, deps:check, deps:unused, clippy
-D warnings, 110 Rust tests. Plus a Playwright visual pass (hover reveal, pinned-row persistence, hide-from-pinned, all-hidden state, re-add restore).