fix: search roles server-side in the space permissions picker#725
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Only the first 20 enabled roles were ever selectable under Settings -> Permissions. The list resource passed `pageLength: 0` intending "no limit", but frappe-ui falls back to 20 for a falsy pageLength, and the picker then filtered that single page in the browser — so every role past the first page was unreachable. Replace the hand-rolled dropdown with frappe-ui's Combobox (reka-ui based, so its portalled popover works inside the settings dialog) and drive it from a debounced server-side `like` search. Picking a role now adds it straight to the table. Fixes #709 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Selecting a role committed the row immediately, which read as abrupt next to the rest of the panel. The Combobox fills the field again and Add commits it, as before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Confidence Score: 5/5The PR appears safe to merge. No concrete changed-code failure was established from the available repository evidence. Reviews (1): Last reviewed commit: "style(permissions): make the Beta badge ..." | Re-trigger Greptile |
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
Only the first 20 enabled roles were selectable under Space Settings → Permissions. The role list passed
pageLength: 0intending "no limit", but frappe-ui falls back to20for a falsypageLength, and the picker then filtered that single page in the browser — so every role past the first page was unreachable.Closes #709
Solution
Combobox. It is reka-ui based, so its portalled popover works inside the settings dialog — which is why the old dropdown was hand-rolled. Keyboard navigation and ARIA combobox semantics come along for free.likesearch onRoleinstead of a client-side filter over one page.allRoles.loading, which the list resource never exposes, so the spinner never rendered.Tests
New
e2e/tests/space-permissions-role-search.spec.tsseeds a role named to sort last alphabetically, searches for it, adds it and asserts it persisted. Verified it fails against the pre-fix code and passes after.🤖 Generated with Claude Code