Repository navigation
feat(search): one filter sidebar for the home page and results, kept on screen across a search, and faster results - #1729
Conversation
…on screen across a search The home page and the results pages share a route group whose layout holds the search state and the filter sidebar, so a search from / no longer drops the sidebar, flashes a full-page spinner, or resets the sidebar's scroll. A search this browser already holds shows at once instead of waiting for its account copy; a results page opened from its address shows the sidebar dimmed and inert until its saved copy arrives. On a phone both tabs stay mounted, so switching keeps each one's scroll and anything on its way.
…othing blanking in between - The results page's state is worked out once by the search frame, which hides the sidebar on a page with no search (deleted, unknown, failed). - The results layout keeps no loading boundary of its own, so the home page stays until the results can draw, and the search box no longer fades in. - An account's search runs while its request is counted in Convex instead of after; a visitor is still counted first, at no cost.
- The sidebar is away on every page with no search, including when the account can't be read, and on a phone the Filters tab goes with it. - While its filters aren't the search's own yet, the whole sidebar is still, Clear all and its button included; its shortcut does nothing while away. - The frame reads the gate's saved flag instead of its own copy. - One PageSpinner for the four page spinners; one auth() per counted search. - Fixed sidebar widths in FilterSidebar, one store factory for both sidebars, no pass-through [searchId] layouts, no dead mocks or attributes. - The home box's mode resets while rendering, not in an effect.
…filters of the one just left Two walkers and the navigation tester went back to Search for a related search and had to set their limits again, while the box kept their words. The sidebar still starts folded; the filters show as chips in the box.
…out a new entry The newest history entry's copy was kept once and never refreshed, so after one Back and Forward, a later change from the assistant or another tab was put back to the older copy by the next Back and Forward, and lost. Forward onto the newest entry now spends its copy, so the next Back keeps the search as it then is. The assistant also says what a search holds only from its latest read or change, not from earlier in the chat.
- A results page fetches nothing until it knows which search it shows, so a saved search opened by its ID no longer runs an unfiltered search first, and lost or failed pages fetch nothing. - On a phone, arriving at the home page or a results page shows its own tab, not the Filters tab left open on the page before. - The home search's working state is held by the frame, so a resize across the phone width mid-search keeps the box waiting.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
… aside (UI rule: one element doesn't both slide and fade)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 203db952d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- An account Convex finds out of requests is refused here, before asking the source, for the next minute: past its limit it reaches the source at most once a minute on each server, not on every search. - A results page waits to fetch while a question in its address is being written into a search, and on the bare /results address it's about to leave. - The home box's picked mode lives beside its words in the query store, so a resize across the phone width keeps it.
…nd the account limit test holds the clock still
A search from
/used to drop the filter sidebar, flash a full-page spinner, and bring the results page's own sidebar back with its scroll reset: each page built its own.One frame for
/and/results/and/results/*(and the same under/o/<slug>/) move into theapp/(search)/route group. Its layout,components/search-frame.tsx, holds one search state and one filter sidebar, so the sidebar stays on screen through a search, keeping its scroll and open state./the sidebar starts folded, and a search opens it there and on its results. Back on/from results, the next search starts with the filters of the one just left, shown as chips in the box; a fresh load of/starts with none.Faster results
Fixes found while testing
Checks
npx tsc --noEmit; vitest on request limits, search actions and the library page.npm run verify -- shiftin Chromium and Firefox: search from/, Back, Forward and return to/show no blanks or spinners. What's left are the results page's own loading moves, which dev has too./lands on the Search tab.A separate PR brings the same commits to
prod.