Skip to content

[codex] Add blog search and category sidebar#25

Merged
riderx merged 2 commits into
mainfrom
codex/blog-search-category-sidebar
Jun 18, 2026
Merged

[codex] Add blog search and category sidebar#25
riderx merged 2 commits into
mainfrom
codex/blog-search-category-sidebar

Conversation

@riderx

@riderx riderx commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a Median-style blog filter sidebar with search and computed categories.
  • Keep the sidebar sticky on desktop and use a sticky mobile filter bar with collapsible categories.
  • Update blog cards so category labels render cleanly with or without images.

Screenshots

Desktop:

Desktop blog sidebar

Mobile:

Mobile blog filters

Validation

  • bunx prettier --write src/components/BlogListing.astro src/components/Blog.astro
  • bun run build
  • Headless Playwright: desktop sidebar sticks at 24px after scroll; desktop search/category/empty state work; mobile search and category disclosure work.

Summary by CodeRabbit

  • New Features

    • Added search functionality to filter blog posts by keywords
    • Added category filtering for blog listings with an "All" view option
    • Display result count for filtered blog articles
  • Style

    • Refined blog card layout and spacing for improved readability
    • Updated overflow behavior on page layout

@github-actions

Copy link
Copy Markdown
Contributor

@riderx
riderx marked this pull request as ready for review June 18, 2026 10:36
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@riderx, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 36 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 38863a20-408a-4068-894f-94303f305a26

📥 Commits

Reviewing files that changed from the base of the PR and between bdf5452 and ff698c3.

📒 Files selected for processing (3)
  • output/playwright/blog-sidebar-desktop.webp
  • output/playwright/blog-sidebar-mobile.webp
  • src/components/BlogListing.astro
📝 Walkthrough

Walkthrough

The PR restructures the blog card layout to use a flex column container with updated tag/image conditional rendering and spacing, adds server-side keyword-based category classification to BlogListing.astro, rebuilds the listing UI with desktop/mobile search inputs, category filter buttons, and per-card dataset attributes, introduces a client-side filter/search script, and changes the layout container to overflow-x-clip.

Changes

Blog listing search, filter, and card layout

Layer / File(s) Summary
Blog card layout and overflow styling
src/layouts/Layout.astro, src/components/Blog.astro
Layout container switches from overflow-x-hidden to overflow-x-clip. Blog card outer container converts to flex column; tag rendering is split between image and !image conditionals; time <span> classes conditionally add top margin for the tag && !image case; image element CSS class is updated.
Server-side category classification
src/components/BlogListing.astro
Adds categoryRules, fallbackCategory, and getPostCategory to classify posts by keyword matching against title, description, slug, and id fields. Derives postsWithCategories, categoryCounts, and a final categories array including an All entry for the filter UI.
Search/filter UI and client-side filtering
src/components/BlogListing.astro
Rebuilds listing layout with desktop and mobile search inputs, category buttons rendered from the computed list, data-blog-card and dataset fields on each card, a live "Showing X articles" counter, and a hidden empty-state element. A client-side script syncs inputs, filters card visibility by selectedCategory and search query, updates aria-pressed state on category buttons, refreshes the result count, and toggles the empty state; runs applyFilters() on load and on all input/click events.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SearchInput
  participant CategoryButtons
  participant applyFilters
  participant BlogCards
  participant ResultCounter

  User->>SearchInput: type search query
  SearchInput->>applyFilters: input event (syncs desktop ↔ mobile)
  User->>CategoryButtons: click category
  CategoryButtons->>applyFilters: click event (set selectedCategory, update aria-pressed)
  applyFilters->>BlogCards: show/hide each card via data-category and data-search fields
  applyFilters->>ResultCounter: update "Showing X articles" text
  applyFilters->>BlogCards: toggle empty-state element visibility
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main changes: adding blog search functionality and a category sidebar to the blog listing page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdf5452066

ℹ️ 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".

Comment thread src/components/BlogListing.astro Outdated
@riderx

riderx commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/BlogListing.astro`:
- Line 168: The empty state paragraph element with data-blog-empty attribute
lacks ARIA attributes necessary for screen reader accessibility. Add
role="status" and aria-live="polite" attributes to the empty state element so
that when it becomes visible (when the hidden attribute is removed), screen
readers will announce the message to users about no articles matching their
filters.
- Around line 31-34: The getPostCategory function uses simple substring matching
which causes false positives when terms like "auth", "map", and "file" match
unrelated words like "author", "bitmap", and "profile". Additionally, including
post.id in the haystack allows file path names to trigger unintended
categorization matches. To fix this, refactor the matching logic to use
word-boundary regex patterns (escaping special characters properly) instead of
substring matching, and exclude post.id from the haystack so that only
post.data.title, post.data.description, and post.data.slug are used for
determining categories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ff09e182-d22a-41ef-a207-4460f2dcfdb9

📥 Commits

Reviewing files that changed from the base of the PR and between f4719c2 and bdf5452.

📒 Files selected for processing (5)
  • output/playwright/blog-sidebar-desktop.webp
  • output/playwright/blog-sidebar-mobile.webp
  • src/components/Blog.astro
  • src/components/BlogListing.astro
  • src/layouts/Layout.astro
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Cap-go/capacitor-updater (manual)

Comment thread src/components/BlogListing.astro
Comment thread src/components/BlogListing.astro Outdated
@github-actions

Copy link
Copy Markdown
Contributor

@riderx
riderx merged commit 2042bd2 into main Jun 18, 2026
4 checks passed
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.

1 participant