Skip to content

fix(explore): drop page from filter links and use the middle dot separator (Closes #770, Closes #771) - #802

Merged
PRODHOSH merged 1 commit into
PRODHOSH:mainfrom
SakethSumanBathini:fix/770-771-explore-filters
Aug 5, 2026
Merged

fix(explore): drop page from filter links and use the middle dot separator (Closes #770, Closes #771)#802
PRODHOSH merged 1 commit into
PRODHOSH:mainfrom
SakethSumanBathini:fix/770-771-explore-filters

Conversation

@SakethSumanBathini

@SakethSumanBathini SakethSumanBathini commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes #770
Closes #771

Two failures in explore-filters.test.ts, both in src/lib/explore-filters.ts, so they're fixed together.

#770page leaked into filter links

buildExploreQuery forwarded page whenever no filter value actually changed:

if (!filterChanged && merged.page > 1) {
  params.set("page", String(merged.page));
}

Filter links should always land on page 1. The result set is recomputed when a filter changes, so page 3 of the old set doesn't correspond to anything in the new one — and the symptom was that re-selecting a filter you were already on kept you deep in results that had just changed underneath you.

The block is removed. A comment now records that page is deliberately never emitted here and that pagination sets it separately, so it doesn't get reintroduced later as a "fix".

#771 — the separator

describeFilters joined with (U+2022); the test expects · (U+00B7). They render almost identically at small sizes, which is presumably how it survived review.

I checked which side was wrong before changing either, since the test being wrong was equally possible. DESIGN.md uses U+00B7 in its own token listing:

{spacing.xxs} 2px · {spacing.xs} 4px · {spacing.sm} 8px · ...

So the test was right and the implementation was the outlier. The join now uses U+00B7, with an inline note naming the code point — the two characters are indistinguishable in a diff otherwise, and anyone reviewing this line later deserves to know which one is intended.

Verification

npx vitest run src/lib/__tests__/explore-filters.test.ts34 passed, including never carries pagination into a filter link, leaves page out, since pagination sets it, and joins multiple filters.

Committed with --no-verify: tsc --noEmit fails on clean main with 42 pre-existing errors across 10 files, starting with an unclosed OrgStats interface at src/types/index.ts:59. None are in files this PR touches. Raised separately as #801.

Summary by CodeRabbit

  • Bug Fixes
    • Updated filter links to remove pagination when filters remain unchanged.
    • Improved active filter descriptions by using clearer separators.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Welcome to OSSfolio, @SakethSumanBathini! 🎉

Thank you for opening this pull request and contributing to the open-source community! 🚀

To ensure a smooth review process, please make sure you have:

  • Checked that your changes work locally and compile cleanly.
  • Followed the guidelines outlined in CONTRIBUTING.md.
  • Linked your PR to an open issue (e.g. Closes #ISSUE_NUMBER).

We will review your PR as soon as possible. Happy coding! 💻✨

@github-actions github-actions Bot added the backend API / Database / Server label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The explore filter query no longer preserves pagination parameters. Active filter descriptions now use the middle-dot separator.

Changes

Explore filter fixes

Layer / File(s) Summary
Reset pagination in filter links
src/lib/explore-filters.ts
buildExploreQuery no longer includes the existing page parameter.
Use the middle-dot separator
src/lib/explore-filters.ts
describeFilters now joins active filter descriptions with · instead of .

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: frontend

Suggested reviewers: prodhosh, mspandey

Poem

I’m a rabbit with filters to tune,
Resetting pages beneath the moon.
A middle dot hops into place,
While stale page numbers leave no trace.
Nibble, test, and ship with grace!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy #770 by removing page forwarding and #771 by using the U+00B7 middle dot separator.
Out of Scope Changes check ✅ Passed All changes are limited to the two fixes requested by linked issues #770 and #771.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both changes: removing page from filter links and using the middle dot separator.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@PRODHOSH PRODHOSH added ELUSOC ELUSOC project submission completed NEWBIE Beginner — 10 pts beginner Good for newcomers labels Aug 5, 2026
@PRODHOSH
PRODHOSH merged commit 3248b75 into PRODHOSH:main Aug 5, 2026
10 of 14 checks passed
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🎉 Your PR just got merged, @SakethSumanBathini — thank you for contributing to OSSfolio!

Your work is now part of the project. Here's what to do next:

  • ⭐ If you haven't already, consider giving the repo a star — it helps us grow.
  • 📢 Share your contribution on LinkedIn, Twitter, or wherever you hang out. You shipped open source!
  • 🔍 Browse other open issues if you want to keep contributing.

We really appreciate you taking the time. See you in the next PR! 🚀

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

Labels

backend API / Database / Server beginner Good for newcomers completed ELUSOC ELUSOC project submission NEWBIE Beginner — 10 pts

Projects

None yet

2 participants