Fix service bodies page reverting to create form when search has no matches - #1529
Merged
Conversation
pjaudiomv
force-pushed
the
fix-servicebodies-search-empty-state
branch
3 times, most recently
from
August 28, 2026 20:11
1c477b8 to
945fc21
Compare
…atches add changelog entry Fix meetings list UI glitches mutliarch pkg update Fix lock fix deprecation in test
pjaudiomv
force-pushed
the
fix-servicebodies-search-empty-state
branch
from
August 28, 2026 20:15
945fc21 to
d889cf0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the Service Bodies page, typing a search term that matched no service bodies caused the page to collapse into the "Add Service Body" create form, the same empty-state view shown when an account genuinely has no service bodies. This was
confusing because the account has plenty of service bodies; only the current filter had no matches.
Cause
The template chose between the table view and the empty create-form view based on
filteredServiceBodies.lengththe list after the search filter was applied. When a search matched nothing, that length dropped to 0 and the page fell through to the create-form branch.Fix
Split the filtering into two derived values:
editableServiceBodies- every service body the authenticated user can administer, ignoring the search term.filteredServiceBodies- that list further narrowed by the search term.The outer branch now keys off editableServiceBodies.length, so the search box and table header stay visible as long as the user has any service bodies. An empty search just renders no rows. The create form only appears when the user truly has none - matching the existing behavior of the Users and Formats pages.