Repository navigation
Machine filter and Archive (N) become two hooks in their own files - #49
Merged
Merged
Conversation
Sidebar.tsx keeps hook calls: useSidebarBulkArchive (prepare/run) and useSidebarEnvironmentFilter/useSidebarEnvironmentFilterUi. The filter's logic, its tests and its saved choice leave Sidebar.logic.ts, uiStateStore.ts and their tests; the choice has its own store and key and adopts the old saved value once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The archive filter call moves into useSidebarEnvironmentFilter (archive first, then machine), using the archived-projects module path. CUSTOM.md keeps integration's table with this feature's two rows. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Part of ziyadakl/tokenmaxxing#119 (spec pingdotgg#107)
Summary
Footprint, Upstream files the Fork edits (merge-base 8657eec):
Those 6 files also hold other slices (groups, auto-archive, desktop mirror). This feature's own lines left in
Sidebar.tsx: about 60 (hook calls, theArchivemenu entry andrunline, imports, and theallThreadsplumbing inuseSidebarThreads/partitionSidebarThreads).uiStateStore.ts,uiStateStore.test.tsandSidebarDraftBlock.browser.test.tsxleave the footprint. The honest floor for the filter is about 30-45 seam lines because it changes which code sees all threads and which sees filtered ones.Kept on purpose:
hasVisibleProjectsonSidebarThreadHeader(gating at the call site would re-indent the 150-line project-scopeCombobox), and theallThreads/observedThreadsparameters inuseSidebarThreads(the notes'isVisibletip would change the snooze wake clock's input).Evidence
After: Sidebar.logic 92 + bulkArchive.logic 12 + environmentFilter.logic 18 (the same 122), Sidebar.drag 45, uiStateStore 13 + environmentFilterStore 14 (7 moved from uiStateStore, 7 new: legacy adoption, blank values, unreadable value), the 5 browser tests unchanged = 199 pass.
environmentFilterStore.test.tsbecause the filter's state left that store.vp check0 errors,tsc --noEmit(apps/web) clean,vp run knip:checkpass.Archive (N); the seam wiring is checked by reading, not by a test.Behaviour kept identical, with one DOM note: unfiltered, the search empty state is Upstream's single
<p>again (it was adivwrapping apwith the same classes).Merge Danger
Door: two-way. Revert restores the old files; the saved machine choice is copied to a new localStorage key and the old key is untouched.
Blast Radius: sidebar (web) only
A user who picked a machine before this build keeps that choice (read once from
t3code:ui-state:v1, copied tot3code:sidebar-environment-filter:v1). Conflicts expected with the archive-projects PR on thewithoutArchivedProjectsimport line inSidebar.tsx(I left that call and import where they are), and with the groups slice onSidebar.tsx/Sidebar.logic.ts.🤖 Generated with Claude Code