Skip to content

Product feedback - #13

Merged
saengel merged 2 commits into
mainfrom
feature/sc-47699/product-feedback-on-new-pbs-site
Oct 13, 2026
Merged

saengel merged 2 commits into
mainfrom
feature/sc-47699/product-feedback-on-new-pbs-site

Conversation

@saengel

@saengel saengel commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

This PR adds additional filtering, coloring, a featured projects "zone" and an is buggy toggle

…toggle

- Category tiles and filter icons use per-category color tokens via a
  single CATEGORY_META map
- Featured projects band (featured === true, newest first, max 3)
- Filters: Topics, Language, Sefaria resources, Built with, with faceted
  counts, disclosures, active-filter chips and URL state
- Replace "Open source only" with "Show projects with known issues"
  (off by default); buggy projects show a Known issues badge
- Update docs/REDESIGN_SPEC.md (§16) and add unit, component and e2e tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gitvelocity-reviewer

Copy link
Copy Markdown

📊 Code Quality Score: 65/100

Base 65 (S18 + A11 + I14 + R8 + Q12 + P2) x ESF 1.0 (Extra Large: 2838 effective lines, 52 files) = 65

Category Score Factors
🔭 Scope 18/20 52 files across src/lib, src/features/browse, src/features/featured, src/features/project, src/components/ui, src/features/charts/selectors.ts, tokens.css and e2e/. New modules include featured.ts, languages.ts, FacetGroup.tsx, FilterSection.tsx, Switch.tsx, KnownIssuesBadge.tsx and FeaturedProjects.tsx. Three new URL params (topic, lang, resource, tech, plus bugs) widen the public query contract.
🏗️ Architecture 11/20 CATEGORY_META replaces getCategoryMeta and the ICONS map in CategoryIcon.tsx, so label, icon and color token sit in one record. FilterSection takes a render-prop child that receives the legend class. Filters grows from two fields to seven and categoryCounts is replaced by filterFacets, which calls filterProjects with a skip argument. visibleTopics and LANGUAGE_TAG are removed in favour of Project.languages.
⚙️ Implementation 14/20 facetOptions counts each option across the projects that pass every other section, keeps selected zero-count options, and sorts by count then A-Z. filterProjects ANDs across sections and ORs within one, and applies isVisible for known-issue projects. getFeaturedProjects filters, sorts newest first and caps at 3 with no backfill. FeaturedProjects.tsx switches between a 3-column grid and a focusable scroll-snap region at 900px using useMediaQuery. FacetGroup shows the top 8, keeps selected options visible, and adds a text filter above 12 options.
⚠️ Risk 8/20 Changes the public browse page that every visitor sees: 12 of 133 projects disappear from the default view, and the hero count changes from 133 to 121. parseList in url.ts splits on commas, so a tag containing a comma would be parsed back as two values. There is no feature flag. The featured band depends on a featured field that is not yet set in production data, so it renders nothing until it is.
✅ Quality 12/15 New and extended unit tests: featured.test.ts, filter.test.ts, url.test.ts, project.test.ts, categories.test.ts, FilterPanel.test.tsx, FilterSheet.test.tsx, FeaturedProjects.test.tsx, ProjectList.test.tsx, ProjectDialog.test.tsx. New e2e specs filters.spec.ts and featured.spec.ts check both breakpoints and run axe. layout.spec.ts adds a touch-target check. No test drives Switch.tsx, FacetGroup.tsx or FeaturedCard.tsx directly, and none covers a comma-containing value in url.ts. featured.spec.ts has a leftover void scroller, and many tests hardcode 121 and 133.
🔒 Perf / Security 2/5 Accessibility work: aria-expanded and aria-controls on FilterSection, a named focusable scroller region, prefers-reduced-motion rules, and 44px touch targets verified in layout.spec.ts. useMemo wraps filters, facets, featured and results in BrowsePage.tsx. filterFacets runs five filterProjects passes and rebuilds the search haystack on each; no benchmark accompanies it. No input-validation changes beyond parseList trimming and deduping URL values.

Was this score accurate? 👍 Yes · 👎 No

How this was scored →

Scored by GitVelocity · How are scores calculated?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both “Clear all” actions preserve search text contrary to the updated specification.

2 open findings
What changed in this PR

Adds faceted filtering, category colors, featured projects, and known-issue visibility controls.

Changes:

  • Adds data-driven filters with URL persistence.
  • Adds category styling and a featured-project band.
  • Hides buggy projects by default and displays warning badges.
File Description
src/​styles/​tokens.css Adds category colors.
src/​lib/​url.ts Serializes new filters.
src/​lib/​project.ts Normalizes new project fields.
src/​lib/​languages.ts Recognizes language tags.
src/​lib/​filter.ts Implements faceted filtering.
src/​lib/​featured.ts Selects featured projects.
src/​lib/​categories.ts Centralizes category presentation.
src/​lib/​__tests__/​url.test.ts Tests filter URLs.
src/​lib/​__tests__/​project.test.ts Tests normalization.
src/​lib/​__tests__/​filter.test.ts Tests facets and visibility.
src/​lib/​__tests__/​featured.test.ts Tests featured selection.
src/​lib/​__tests__/​categories.test.ts Tests category metadata.
src/​hooks/​useMediaQuery.ts Adds featured breakpoint.
src/​features/​project/​ProjectDialog.tsx Shows known-issue badges.
src/​features/​project/​ProjectDialog.module.css Styles dialog header.
src/​features/​project/​__tests__/​ProjectDialog.test.tsx Tests dialog badges.
src/​features/​featured/​FeaturedProjects.tsx Adds featured band.
src/​features/​featured/​FeaturedProjects.module.css Styles featured layout.
src/​features/​featured/​FeaturedCard.tsx Adds featured cards.
src/​features/​featured/​FeaturedCard.module.css Styles featured cards.
src/​features/​featured/​__tests__/​FeaturedProjects.test.tsx Tests featured UI.
src/​features/​charts/​selectors.ts Preserves tag analytics.
src/​features/​browse/​ProjectList.tsx Updates list metadata.
src/​features/​browse/​ProjectCard.tsx Updates cards and badges.
src/​features/​browse/​FilterSheet.tsx Adds pending facet controls.
src/​features/​browse/​FilterSection.tsx Adds filter disclosures.
src/​features/​browse/​FilterSection.module.css Styles disclosures.
src/​features/​browse/​FilterPanel.tsx Renders expanded filter panel.
src/​features/​browse/​FilterPanel.module.css Styles panel rows.
src/​features/​browse/​FacetGroup.tsx Adds checkbox facets.
src/​features/​browse/​FacetGroup.module.css Styles facet controls.
src/​features/​browse/​BrowsePage.tsx Integrates filtering and featured content.
src/​features/​browse/​BrowsePage.module.css Makes filters sticky.
src/​features/​browse/​ActiveFilters.tsx Adds removable filter chips.
src/​features/​browse/​ActiveFilters.module.css Updates chip layout.
src/​features/​browse/​__tests__/​ProjectList.test.tsx Tests list badges.
src/​features/​browse/​__tests__/​ProjectCard.test.tsx Tests card colors and badges.
src/​features/​browse/​__tests__/​FilterSheet.test.tsx Tests pending filters.
src/​features/​browse/​__tests__/​FilterPanel.test.tsx Tests filter controls.
src/​features/​browse/​__tests__/​BrowsePage.test.tsx Tests integrated behavior.
src/​components/​ui/​Switch.tsx Adds accessible switch.
src/​components/​ui/​Switch.module.css Styles switch.
src/​components/​ui/​KnownIssuesBadge.tsx Adds issue badge.
src/​components/​ui/​KnownIssuesBadge.module.css Styles issue badge.
src/​components/​icons/​CategoryIcon.tsx Applies category metadata.
src/​components/​icons/​CategoryIcon.module.css Applies category colors.
e2e/​support.ts Adds fixture helpers.
e2e/​screenshots.spec.ts Adds revision screenshots.
e2e/​layout.spec.ts Extends layout checks.
e2e/​filters.spec.ts Adds filter E2E coverage.
e2e/​featured.spec.ts Adds featured E2E coverage.
e2e/​browse.spec.ts Updates browse expectations.
docs/​REDESIGN_SPEC.md Documents revision requirements.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/features/browse/ActiveFilters.tsx Outdated
)
})}
<li>
<Button variant="text" onClick={() => onChange(CLEARED_VALUES)}>
Comment on lines +51 to +54
<Button
variant="text"
onClick={() => setPending((current) => ({ ...current, ...CLEARED_VALUES }))}
>
The chips-row and filter-sheet "Clear all" buttons left the search query
in place, contrary to the spec. Both now clear the search and every
filter value, and still leave the known-issues display switch alone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@saengel
saengel merged commit 290d105 into main Oct 13, 2026
1 check passed
@saengel
saengel deleted the feature/sc-47699/product-feedback-on-new-pbs-site branch October 13, 2026 08:31
@gitvelocity-reviewer

Copy link
Copy Markdown

📊 Code Quality Score: 66/100

Base Score 66 (S18 + A11 + I14 + R8 + Q13 + P2) × ESF 1.0 (2869 effective lines, 52 files, Extra Large tier) = 66.

Category Score Factors
🔭 Scope 18/20 52 files across src/lib (filter.ts, url.ts, project.ts, categories.ts, new featured.ts and languages.ts), src/features/browse, new src/features/featured, src/components/ui (Switch, KnownIssuesBadge), tokens.css, and the unit and Playwright suites. It adds the URL params topic, lang, resource, tech and bugs.
🏗️ Architecture 11/20 CATEGORY_META replaces getCategoryMeta and the per-component icon map, so CategoryIcon, FilterPanel, ProjectCard, ProjectList, ProjectDialog and FeaturedCard read label, icon and color from one table. filterProjects gains a skip argument that categoryCounts and facetOptions use for faceted counts. FilterSection passes its legend class to a render-prop child, and FilterPanel stays stateless, with state held in BrowsePage and the FilterSheet pending copy. Project gains languages, resourceGroups, featured and isBuggy, and visibleTopics and LANGUAGE_TAG are removed.
⚙️ Implementation 14/20 facetOptions counts each value once per project, drops zero-count options unless selected, and sorts by count then A–Z. filterProjects applies search, then category, then OR within a facet and AND across facets, then known-issues visibility. splitTags routes tags through a 43-name LANGUAGE_NAMES map. getFeaturedProjects sorts newest first, caps at 3 and never backfills. FacetGroup keeps selected options visible beyond the top 8 and adds a text filter above 12 options. FeaturedProjects switches between a grid and a scroll-snap region at 900px using useMediaQuery.
⚠️ Risk 8/20 Browse-page and URL-state changes are visible to every visitor, and old links with only q, category or project still parse. topTags in charts/selectors.ts now merges languages and topics so /charts output stays the same. Buggy projects are hidden everywhere by default, including the hero count and filter counts, which changes the headline number from 133 to 121. No schema, auth or server code is touched.
✅ Quality 13/15 New FilterPanel.test.tsx, featured.test.ts, FeaturedProjects.test.tsx, ProjectList.test.tsx and ProjectDialog.test.tsx. Extended filter.test.ts, url.test.ts, project.test.ts, FilterSheet.test.tsx and BrowsePage.test.tsx. e2e/featured.spec.ts and e2e/filters.spec.ts run on desktop and mobile, with axe checks and a 44px touch-target test in layout.spec.ts. project.test.ts checks resourceGroups against the /charts resourcesUsed output. featured.spec.ts keeps an unused scroller locator (void scroller), and e2e assertions hard-code the 121/133 fixture counts.
🔒 Perf / Security 2/5 BrowsePage memoizes filters, shown, facets and featured so filterFacets does not rerun on unrelated renders. parseList dedupes and trims comma-separated URL values. FeaturedCard and Switch honour prefers-reduced-motion. No benchmark accompanies the facet computation, which runs four filter passes per render.

Was this score accurate? 👍 Yes · 👎 No

How this was scored →

Scored by GitVelocity · How are scores calculated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants