Skip to content

Fix blog filter edge cases - #1180

Open
tannerlinsley wants to merge 2 commits into
mainfrom
agent/validate-library-blog-author
Open

Fix blog filter edge cases#1180
tannerlinsley wants to merge 2 commits into
mainfrom
agent/validate-library-blog-author

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Aug 25, 2026

Copy link
Copy Markdown
Member

Evidence

The design-system blog refresh left two filter edge cases on main:

  1. A library blog with an unknown author query displayed All authors, but still filtered posts using the unknown value. A stale, mistyped, or manually edited URL therefore showed an empty blog while the visible filter said all authors were selected. This remained as an unresolved finding on merged PR Design system refresh: Tabs, Panel, neutral badges, squircles + blog polish #1171: Design system refresh: Tabs, Panel, neutral badges, squircles + blog polish #1171 (comment)
  2. The mobile blog filter drawer collapsed to a zero-height grid without becoming inert. Its visually hidden dropdowns remained in keyboard focus order while the drawer was closed.

Final title, body, keyword, and open-PR file searches found no issue or active change covering either behavior.

Impact

Invalid author URLs now behave consistently as All authors, and keyboard users no longer tab into closed mobile filter controls.

Change

  • Normalize the requested library-blog author, validate it once against the loaded posts, and reuse that value for display, filtering, and empty-state copy.
  • Apply native inert and aria-hidden state to the collapsed mobile filter container.

Validation

  • pnpm test after each change
  • TypeScript and type-aware lint passed
  • 367 tests total, 366 passed, 1 environment-gated docs smoke test skipped
  • git diff --check

The first sandboxed test attempt hit the known macOS TSX IPC EPERM; the identical escalated run and all later full runs passed.

Risk

Low. Valid author filters and open mobile filters are unchanged. The changes only align hidden or invalid states with what the interface already communicates.

Summary by CodeRabbit

  • Bug Fixes
    • Improved author filtering in the blog view.
    • Invalid or unavailable author selections now show all posts instead of hiding content.
    • The author selector now consistently reflects the valid selection.
    • Improved accessibility by preventing interaction with the closed mobile filter panel.

@tannerlinsley tannerlinsley added the source-audit Tracked by the automated source audit label Aug 25, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 5ce392b Commit Preview URL

Branch Preview URL
Aug 25 2026, 02:18 PM

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ff260d8-e1cc-435a-908e-dec6f739ce4d

📥 Commits

Reviewing files that changed from the base of the PR and between 54e5046 and 5ce392b.

📒 Files selected for processing (1)
  • src/components/BlogFilterBar.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The blog route validates author query values against available authors. Invalid values become no selection, so all posts remain visible. The author select uses the validated value. The closed mobile filter panel is hidden from assistive technology and cannot receive interaction.

Changes

Blog filters

Layer / File(s) Summary
Validate and reuse author selection
src/routes/_library/$libraryId/$version.docs.blog.tsx
The route normalizes unavailable author values to undefined and uses the validated value in the author select control.
Control mobile filter state
src/components/BlogFilterBar.tsx
The mobile filter container sets aria-hidden when closed and applies inert to prevent interaction with hidden contents.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 5ce39

The changes align invalid author URLs and closed mobile filter controls with the interface behavior users see; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: abeuty

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes to blog filter behavior and covers both the author-filter edge case and hidden mobile filter behavior.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/validate-library-blog-author

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley tannerlinsley changed the title Ignore unknown library blog authors Fix blog filter edge cases Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source-audit Tracked by the automated source audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant