Skip to content

fix: persist company filter across offer tabs - #899

Open
0xgny wants to merge 8 commits into
colorstackorg:mainfrom
0xgny:main
Open

0xgny wants to merge 8 commits into
colorstackorg:mainfrom
0xgny:main

Conversation

@0xgny

@0xgny 0xgny commented Aug 5, 2026 •

Copy link
Copy Markdown

Description ✏️

Closes #898

Persists the company filter when switching between the Internships and Full-Time
tabs, and adds a clearer empty state when the selected company has no offers of
that type.

  • OffersNavigation now appends the current company param to both tab links. The
    logic is inside the component, so the desktop and mobile navs both get it.
  • Only company is forwarded. hourlyRate is Internships-only, totalCompensation
    is Full-Time-only, and the location options are built per offer type, so
    forwarding those could filter a tab by a value missing from its own dropdown.
    page is dropped so you don't land on page 4 of a one-page list.
  • Both list routes compute a specific emptyMessage: "No record exists for
    internship offers at {company} yet." It only shows when company is the sole
    active filter and totalOffers === 0. The company-only check exists because
    with other filters on, the empty result may be caused by those filters. The
    totalOffers check exists because an empty later page (e.g.
    ?company=X&page=99) would otherwise show the message even when the company
    has offers. totalOffers counts all matching offers regardless of page, so it
    is the correct signal. Any other empty result falls back to the generic "No
    … offers found matching the criteria."
  • appliedCompany and totalOffers were already in both loader payloads, so no
    loader or query changes were needed.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@0xgny
0xgny requested a review from ramiAbdou as a code owner August 5, 2026 22:17

@0xgny 0xgny left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

review

@queenellie873

Copy link
Copy Markdown
Collaborator

@levin0710 and i will take a look this week

@queenellie873 queenellie873 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this, @0xgny! Keeping the company filter when you switch tabs is a nice fix, and only carrying company over (not page or the per-tab filters) makes sense.

Two small things before we merge:

  1. Please remove changes.md from the repo root. The write-up is helpful, so move it into the PR description instead.
  2. The new "No record exists for ... at {company} yet." message can show on an empty later page (for example ?company=X&page=99) even when that company has offers. Can you also check totalOffers === 0 before showing it? totalOffers is already in the loader data for both tabs.

Once those are in, this looks good to me.

@0xgny
0xgny requested a review from levin0710 as a code owner November 4, 2026 16:39
@0xgny

0xgny commented Nov 4, 2026

Copy link
Copy Markdown
Author

Done!

@0xgny 0xgny left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

changes made

This branch has not been deployed

No deployments
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.

Company filter resets when switching between Offers tabs

2 participants