Skip to content

feat(instance): sort, filter and page the instance users table - #1835

Merged
dawsontoth merged 2 commits into
claude/1264-org-users-tablefrom
claude/1268-instance-users-table
Oct 12, 2026
Merged

dawsontoth merged 2 commits into
claude/1264-org-users-tablefrom
claude/1268-instance-users-table

Conversation

@dawsontoth

@dawsontoth dawsontoth commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

An otter sorting instance badges on a chalkboard with arrows and a funnel

⊙ Problem

An instance's Config > Users table can't be sorted (every column sets enableSorting: false), searched, or paged (#1268 asks for sort and filter by name and role, and paging).

❓ Your call: is it warranted now? The issue notes no known deployment has more than three or four users. It is cheap once #1832 exists (this PR is a column-definition change plus two props), so it ships with the rest of the stack; dropping it is reverting this one PR.

💡 Solution

Stacked on #1832, which adds the shared opt-in filter / paginated props to SimpleBrowseDataTable; this PR turns both on for instance users.

  • Every column is sortable. Role becomes an accessor column so it sorts and is searchable, and Created becomes an accessor column on __createdtime__ (still rendered as "time ago") so it sorts by time.
  • The search matches username and role. Created and Updated are kept out of it (both) because every row's timestamp shares long digit runs; the boolean Active column is already skipped by TanStack's global filter, which only matches string and number columns. The placeholder says so: "Filter by username or role".
  • With no display columns left, the file drops createColumnHelper.

✅ Verification

End-to-end route: component integration in jsdom through the real SimpleBrowseDataTable, TanStack row models and these column definitions, rendered as the page renders it (initial username sort, filter, paginated). Not browser-verified, since the authenticated dev origin was shared with other sessions; no Playwright spec covers this page.

  • src/features/instance/config/users/constants/tableDefinition.test.tsx: filters by username and role (case-insensitively), and true or a timestamp prefix matches nothing; sorts by Role, then by Created, starting from the page's initial username sort.
  • Mutation checks, each turning a test red and then reverted: re-enabling the two timestamp columns in the search; opting Active into the search.
  • Gates: full vitest via the pre-commit hook, 397 files, 3677 passed, 11 skipped; tsc -b exit 0; oxlint exit 0; dprint check exit 0; commitlint passed.
  • Cross-model review: one full round, codex (graded) + gemini, base claude/1264-org-users-table. Codex found nothing. Gemini's major (that passing sortingState locks sorting) is wrong: feat(organization): sort, filter and page the org users table #1832's component uses it only as the initial value of its own sorting state, and the test now renders with it and still re-sorts. Its minor (Active matches true) is covered by the new assertion and needed no change. 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. The test changes made after the round were not re-reviewed.

Merge after #1832. Its base is claude/1264-org-users-table, so GitHub retargets it to stage once that branch merges and is deleted.

Closes #1268

🤖 Generated with Claude Code; posted via @dawsontoth.

Related PRs: #1832 independent (the stacked base this builds on; merge it first)
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 @ 30e9fee

Review-Attention: study ~9m (raised: degraded review, open major) @ 30e9fee

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request enables sorting on all columns in the instance users table (Username, Role, Active, Created, and Updated) and configures global filtering to ignore the Created and Updated timestamp columns. It also adds a search filter and pagination to the users table component, and introduces a comprehensive test suite to verify these sorting and filtering behaviors. There are no review comments, and the changes look solid, so I have no additional feedback to provide.

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 72.86% 11983 / 16446
🔵 Statements 72.95% 12765 / 17496
🔵 Functions 67.7% 3176 / 4691
🔵 Branches 68.58% 9412 / 13724
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/features/instance/config/users/index.tsx 0% 0% 0% 0% 18-125
src/features/instance/config/users/constants/tableDefinition.ts 100% 100% 100% 100%
Generated in workflow #2271 for commit 5a9d3af by the Vitest Coverage Report Action

@dawsontoth
dawsontoth marked this pull request as ready for review October 12, 2026 19:45
@dawsontoth
dawsontoth requested a review from a team as a code owner October 12, 2026 19:45
Opts the Config > Users table into SimpleBrowseDataTable's `filter` and
`paginated` props and makes every column sortable. Role and Created
become accessor columns so they can be sorted (and Role searched); the
Created and Updated timestamps are kept out of the filter, since their
digits would otherwise match almost anything typed.

Refs #1268

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dawsontoth
dawsontoth force-pushed the claude/1268-instance-users-table branch from 30e9fee to 5a9d3af Compare October 12, 2026 19:46
@dawsontoth
dawsontoth removed this pull request from stack #1913 October 12, 2026 20:26
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>
@dawsontoth
dawsontoth merged commit 382ce13 into claude/1264-org-users-table Oct 12, 2026
1 check passed
@dawsontoth
dawsontoth deleted the claude/1268-instance-users-table branch October 12, 2026 20:26
@dawsontoth dawsontoth mentioned this pull request Oct 12, 2026
3 tasks
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.

Instance Page /Config/Users v2

1 participant