Repository navigation
docs: point the Phase 12 runbook at the owner's env location - #27
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
5 tasks done
ManoharPaturi
pushed a commit
that referenced
this pull request
Oct 9, 2026
…ollection-name search (#28) ## Summary Phase 13: **§40 completion** — category-specific filters generated from category attribute schemas (the spec line "Category-specific filters can be generated from category attributes"), the **Collection** filter on /shop and /search, and collection names in free-text search. App code only, **no migration, no new dependencies**. Branch cut from `main` @ `b5646ad` (after #27). ## A. Schema-driven facets (§40 category-specific filters) - The category `attribute_schema` (already in the DB since Phase 1, with `filterable` flags) now drives extra facet groups: every **filterable, string-typed** field of the categories in scope renders as a checkbox group (e.g. Sarees → *Weave*, *Origin*; Dresses → *Size*, *Fit*). Values come from actual product attribute values in scope, so options never invent themselves. - New pure engine surface in `lib/storefront/search.ts`, all unit-tested: `schemaFacetFields` (scope subtree, first-declaration-wins dedupe, fixed dimensions colour/occasion/fabric excluded, booleans excluded), `pruneAttributeFilters`, `parseFilters`/`buildQuery`/`filterProducts` extended for `f_<key>` params. - URL contract: `?f_weave=Banarasi&f_weave=Handloom` — repeatable values, OR within a key, AND across keys and with the fixed dimensions. A product from another category (no such attribute) never matches. Keys beyond the schema-declared vocabulary are dropped, so stale/hand-crafted URLs can't invent filter dimensions. Keys serialize sorted → canonical URLs. - Works without JavaScript: the groups are checkbox rows in the same GET form (desktop sidebar + mobile bottom sheet). ## B. Collection filter (§40 generic filters list) - /shop and /search get a **Collection** picker (active collections, name only) alongside the category picker. `/collections/[slug]` locks its scope — no picker inside, the slug rides as a hidden field (same pattern as locked categories). - Counts toward the active-filter badge and the "Clear filters" link resets it (and every `f_*` dimension). ## C. Collection names in free-text search (§40) - `listPublishedProducts` now also fetches collection names; `matchesQuery` includes them, so "festive edit" finds products in the Festive Edit collection (previously only the slug matched). ## Verification - [x] `npm run typecheck` — clean - [x] `eslint` on all changed files — clean - [x] `npm test` — **261/261** (242 on main + **19 new**: `f_` param parsing incl. allowlist + blank dropping, prune, canonical sorted serialization, round-trip, OR/AND attribute semantics, missing-attribute exclusion, boolean-never-a-facet, `schemaFacetFields` scope/dedupe/exclusions, collection-name matching) - [x] `npm run build` — clean; storefront routes compile - [x] No migration — rides entirely on the Phase 1 schema (`categories.attribute_schema` + `products.attributes`) ## Notes for review - Per the standing instruction, **every phase now ships new tests** — the 19 above run in the required CI job ("Typecheck · Lint · Build" runs `npm run test`), so the suite grows each phase. - Facet semantics preserved: options never disappear because another facet is active (vocabulary still derives from the scope with value-dims cleared). - Rollback: revert the squash — pure app code, nothing else to undo. - Non-goals honoured: no SQL/search-engine change (the in-memory engine is the designed launch-scale approach; it keeps its shape for a later SQL boundary), nothing weakened, no client-side secrets. --- @ManoharPaturi — Phase 13 is ready for your review. CI runs on this PR; once the required **Typecheck · Lint · Build** check is green, please review and **merge it yourself** (I don't merge — that's your call, per the standing rule). Anything you want changed, comment here and I'll push to this branch.
This branch was successfully deployed
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.
Docs-only (Tier-1): adds one prerequisite note to docs/ops/phase12-verification.md — the canonical .env.local lives in the owner's workspace (~/Desktop/Stonebridge/sri_vartali_sarees/), so the runbook is most naturally run by the owner on that machine. Follow-up to the merged PR #26; commit rode the feature branch past its merge point, moved here cleanly.