Repository navigation
feat(organization): sort, filter and page the org roles table - #1837
Draft
dawsontoth wants to merge 1 commit into
Draft
dawsontoth wants to merge 1 commit into
dawsontoth wants to merge 1 commit into
Conversation
Opts the organization Roles table into SimpleBrowseDataTable's `filter` and `paginated` props and makes every column sortable. ID and Users Assigned become accessor columns so they can be sorted (by id, and by how many users hold the role); the filter matches the role name only, since the opaque ids and the user counts would match many short queries. Refs #1269 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request enables sorting and filtering capabilities for the organization roles table. Specifically, it refactors the table column definitions to support sorting on 'Role Name', 'ID', and 'Users Assigned' columns, while disabling global filtering on the latter two. It also updates the table component integration to include pagination and filtering configurations, and introduces a comprehensive test suite to verify these sorting and filtering behaviors. I have no additional feedback to provide as the changes are well-implemented and covered by tests.
dawsontoth
added this pull request to stack #1913
October 11, 2026 22:28
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
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
The organization Roles table can't be sorted (every column sets
enableSorting: false), filtered, or paged. #1269 asks for pagination, sorting by different attributes of a role, and filtering "by name, or by something within the role itself".💡 Solution
Stacked on #1835 and #1832, which add the shared opt-in
filter/paginatedprops toSimpleBrowseDataTable; this PR turns both on for org roles.userIdscount so it sorts numerically. A role nobody holds still reads "No users assigned";assignedUserCountis shared by the accessor and the cell.✅ Verification
End-to-end route: component integration in jsdom through the real
SimpleBrowseDataTable, TanStack row models and these column definitions. Not browser-verified, since the authenticated dev origin was shared with other sessions; no Playwright spec covers this page.src/features/organization/roles/constants/tableDefinition.test.tsx: filters by role name, not by id or user count; sorts by users assigned and shows "No users assigned" for an unheld role; sorts by role name case-insensitively.tsc -bexit 0;oxlintexit 0;dprint checkexit 0; commitlint passed.claude/1268-instance-users-table. Codex raised the two calls above. Gemini's nit (read the cell fromprops.getValue()instead of recounting) was not taken:getValue()is untyped here and needs a cast to save one array-length read. Cursor could not fetch through the 1Password SSH agent and the Harper domain adjudicator failed on an expired Claude OAuth session, so the round was not adjudicated.Merge after #1835 (and #1832 before it). Its base is
claude/1268-instance-users-table, so GitHub retargets it as the stack below merges.Refs #1269
🤖 Generated with Claude Code; posted via @dawsontoth.
Related PRs: #1832 independent (stacked base: the shared table capability), #1835 independent (stacked base directly below this one)
Complexity: easy
Review-Coverage: authored=claude; ran=gemini,codex; blocked=cursor-composer(no-receipt),domain(auth); declined=cursor-grok,cursor-kimi,cursor-muse; rounds=1; full=1 @ 57ee5a6
Review-Attention: read ~3m (raised: degraded review) @ 57ee5a6