Repository navigation
refactor(filters): one owner per filter concern - #552
Conversation
useFilterMenusOnMap holds the whole rule (beside the panel, over a map, not under the full-width calendar or the filters' drawer), and the map's controls, the Filters button and the filter tags all read it. The map controller provides the widget width to the map's controls, so the store flag and DrawerStack's effect go. The calendar reads its full width once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
useFilterEditor returns the Where menu's place half, including whether it offers Near me, judged by the page the filters narrow. Both surfaces spread it into WhereFilter and add only their own 'search instead'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
useAnswerLabels names each answered question once, and the filter
buttons, the filter tags and the removal under an empty list all read
it. The removal now names days as the buttons and tags do ("Mon").
Co-Authored-By: Claude Opus 5.5 <[email protected]>
scopeOffers answers shownGroups' Where and Language questions from the scope without counting it, with a spec that the two agree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ment and stale comments RecoveryButton is a molecule (the filter drawer and the list both use it). The inline filter row no longer pushes itself right; the toolbar it sits in places it. Comments naming FilterView's long-gone Apply and draft now name the drawer and buttons. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- One owner for the widget's width on a map: the map controller measures the frame and provides it; DrawerStack reads it and measures its own box only map-less. The comments naming DrawerStack as the sole owner say so. - useFilterEditor names the page the filters narrow once. - useAnswerLabels takes t from useLocale, and its docblock says the tags keep their own times and dates; ActiveFilterChips reads its answers from it. - Dead test scaffolding, an unused barrel export and type name, a narrower summarize type, and a stale 'draft' comment. - scopeOffers says, and a spec pins, that a loading scope offers neither question. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 280f5ad | Nov 28 2026, 03:12 AM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff matches its title: four concerns, one owner each, nothing unrelated smuggled in. I traced both moved rules for drift and found none. useFilterMenusOnMap now computes main's filterMenus expression exactly, and on the two newly-tightened paths — top === 'filters' and the full-width calendar — every consumer was already guarded, so this unifies the rule without changing what a visitor sees. No contract surface is touched, and the docs moved with the code, including two already stale.
Findings
should-fix— Streamline: the new hook'suseMemoearns nothing.use-answer-labels.ts:16should-fix— Streamline: thefullWidthJSDoc restates its one call site.CalendarView.tsx:85should-fix— the outline's reason for droppingms-autonames a toolbar that never renders this variant.FilterMenus.tsx:223consider— a fourth site names the same answer and stayed outside the new owner.use-answer-labels.ts:26consider— the removal link's day names got shorter.use-answer-labels.ts:20
What was checked
Rule equivalence walked through isFilterOverlay, baseStackEntry and isCalendarFullWidth at /search/filters, /calendar/filters, /calendar in both views, /gb and /. WidgetWidthContext providers enumerated on both refs: two on main, one kept on DrawerStack's map-less return, one added above the map, and NoopMapControllerProvider adds none. scopeOffers and whenCount match main's inline versions, scope undefined included. filter-blocks.tsx, shared.tsx and ListToolbar read as unchanged consumers; findings 3 and 4 come from them. Ladder walked on four new pieces: the streamliner kept summarize and scopeOffers, the latter after testing the fold against useFilterScope's cheap-read contract. Every path the body names resolves on the branch.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
weekdayNames is Info.weekdays, which Luxon caches per locale, and the object around it is new on every render, so the memo held nothing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqstrJevNu2rNZBG8
"Remove Monday (3 classes)" is prose, where the buttons and tags are chips with no room. The width is the caller's, short by default. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqstrJevNu2rNZBG8
Its one call site already carries the same fact, beside the branch it explains. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqstrJevNu2rNZBG8
LanguageChoices names languages identically today, so the next reader needs to know the fields were left out on purpose. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqstrJevNu2rNZBG8
|
Built and resolved every thread from the review. Adopted:
Answered:
Lean gate green at 2777 tests. Browser lane 39 passed. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
useAnswerLabels → useFilterLabels, useFilterFacets → useFilterCounts, useFilterMenusOnMap → useFilterButtonsShown, and the Mapbox-backed map controller is MapboxControllerProvider (use-map-controller-mapbox.tsx) rather than 'Real'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…yButton and FilterNotes The removal's detection and words are one hook, useFilterRecovery, which the phone filters draw as their footer button and FilterNotice as a link. FilterNotice is its own organism (kind no-match | hidden) with a story, used by every list, instead of two components exported from EventsList. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts own organism FilterMenus reads and writes the URL through useFilterEditor and names the place in scope, so the FilterMenuBar connector goes. WhereFilter, shared by the phone filters and the Where menu, moves to its own organism folder with a story; views/FilterView holds only the drawer again. StoryAddress gives each story section an address of its own, so the FilterMenus and WhereFilter stories show every state side by side, each live. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/components/molecules/RecoveryButton/RecoveryButton.tsx # src/hooks/use-filter-labels.test.tsx # src/hooks/use-filter-labels.ts
Brings in #552 (one owner per filter concern), and adopts its approaches: - `useFilterButtonsShown` is the one rule; it now also holds inline, where the toolbar carries the buttons, and steps aside on a class and its sign-up. The store flag and DrawerStack's copy of the rule are gone, as on main. - `FilterMenus` reads the URL itself, so the inline toolbar and the full map's corner render it directly; `FilterMenuBar` is gone. - `MapboxControllerProvider` provides the frame's width on a map; inline it provides none, so `DrawerStack` keeps measuring the inline column. - The calendar's header takes `fullWidth` from its view, which inline is never full width. - The MapControls story shows the inline toolbar with the live `FilterMenus`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Change outline
Components — one rule for where the filter buttons show
The rule was computed in DrawerStack, copied into a store flag for the map, and computed again more loosely for the Filters button and tags. Now one hook holds it and all three read it.
Components — one owner for the widget's width on a map
The map's controls sit outside DrawerStack, so they need the width too. The map controller already measured the same frame for the camera padding; it now provides that answer to the map and to DrawerStack, which measures its own box only map-less.
FullInterface src/views/FullInterface.tsx RealMapControllerProvider src/hooks/use-map-controller-real.tsx isWide = useIsWide(frameElement()) + <WidgetWidthContext value={isWide}> # read by MapControls and DrawerStack Mapbox → MapControls DrawerStack - isWide = useIsWide(container ?? frameElement()) + isWide = provided ?? useIsWide(container ?? frameElement()) # measures only map-less - <WidgetWidthContext> around the map-mode drawerFlow — one Where for the drawer and the buttons
Both surfaces built the same
WhereFilter, and judged "offer Near me?" two different ways.Components — one way to name an answer, and one way out
The filter buttons, the filter tags and the removal each turned answers into words with the same keys. The removal's detection and wording is now a hook that each surface draws its own way, and the list's two lines are one organism every list renders.
Components — FilterMenus reads the URL itself
The connector view only read the URL and named the place, so the organism does it, as DynamicEventsList reads its data. WhereFilter, shared by the drawer and the Where menu, gets its own folder.
Files — names
Files — tidy-ups
Preview
Preview pending: the Cloudflare branch aliases appear once the build reports.
Test results
.claude/skills/pr-prep/check.sh): lint, typecheck andtest:run(2775) passed.pnpm test:browser): 39 passed, after the folding of FilterMenuBar.use-filter-editor.test.tsx(watched failing with the drawer judged by its own path),use-filter-labels.test.tsx(its long-day case watched failing on the short names),scopeOfferscases infacets.test.ts.Manual verification
Notes for reviewer
(
useAnswerLabels(filters, 'long')), the new hook'suseMemois gone, thefullWidthJSDoc isgone, and the docblock says why the full form's own fields keep their own vocabulary.
/code-review mediumbeside/simplify) findings dismissed:justify-between, so it already ends on the right (checked in Ladle).🤖 Generated with Claude Code