Skip to content

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

Draft
dawsontoth wants to merge 1 commit into
claude/1264-org-users-tablefrom
claude/1268-instance-users-table
Draft

dawsontoth wants to merge 1 commit into
claude/1264-org-users-tablefrom
claude/1268-instance-users-table

Conversation

@dawsontoth

@dawsontoth dawsontoth commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

⊙ 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

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>

@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.

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.

1 participant