Skip to content

fix jobs state filter active matching#527

Open
bgentry wants to merge 1 commit intomasterfrom
bg/jobs-link-active-fix
Open

fix jobs state filter active matching#527
bgentry wants to merge 1 commit intomasterfrom
bg/jobs-link-active-fix

Conversation

@bgentry
Copy link
Contributor

@bgentry bgentry commented Mar 4, 2026

The jobs state sidebar could show Running as active even when another state was selected. This happened because the jobs route strips the default state=running from search params, so the running link was matching too broadly.

The filter links now require exact + search-aware active matching and preserve non-state search params while setting state. This makes the active indicator follow the selected job state correctly.

A regression test uses the same jobs search middleware behavior and asserts that only the selected state is active while Running is active for the default /jobs state.

Fixes #526

@bgentry bgentry force-pushed the bg/jobs-link-active-fix branch from 1df1c20 to a857cde Compare March 4, 2026 14:23
The jobs state sidebar could show `Running` as active even when another
state was selected. This happened because the jobs route strips the
default `state=running` from search params, so the running link was
matching too broadly.

The filter links now require exact + search-aware active matching and
preserve non-state search params while setting `state`. This makes the
active indicator follow the selected job state correctly.

A regression test uses the same jobs search middleware behavior and
asserts that only the selected state is active while `Running` is active
for the default `/jobs` state.

Fixes #526
@bgentry bgentry force-pushed the bg/jobs-link-active-fix branch from a857cde to d10e7a2 Compare March 4, 2026 14:31
@bgentry
Copy link
Contributor Author

bgentry commented Mar 4, 2026

I confirmed with manual testing that this fixes the issue 🙌

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.

Running tab is never unselected

1 participant