Repository navigation
dbeaver/pro#11947 Add server-side users sorting and pagination - #4988
sergeyteleshev wants to merge 22 commits into
Conversation
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 39 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da56972bac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!resource.isIntersect(targetKey, pagination._target)) { | ||
| pagination._key = createPageKey(offset, pageSize, targetKey); | ||
| pagination._target = targetKey; | ||
| runInAction(() => { | ||
| resource.offsetPagination.reset(pagination._key); | ||
| pagination._target = targetKey; | ||
| pagination._key = createPageKey(CACHED_RESOURCE_DEFAULT_PAGE_OFFSET, pageSize, targetKey); | ||
| pagination.reset(); | ||
| }); |
There was a problem hiding this comment.
Commit focused tests for the new pagination lifecycle
This changes shared pagination state, filter switching, and pending-response invalidation without adding any tests, leaving cases such as A → B → A with overlapping requests and the 100/101-result boundary unprotected. Add the focused regression tests alongside the affected packages rather than relying on the documented manual scenarios.
AGENTS.md reference: AGENTS.md:L74-L74
Useful? React with 👍 / 👎.
|
@codex review Updated in 48243cd: server-side sorting for name, role, status, and last login; preserves server page order in the cache. Pagination resets now happen in the commit phase. Companion model PR: dbeaver/dbeaver#43209. Regression tests remain local and uncommitted for the author’s review as previously agreed; the test-coverage review finding remains outstanding for merge. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b174736a8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e02c1ee6c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9a34d22be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex review |
|
@codex review |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 43 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 332af7e29d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
A few notes on the review questions:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e68baf28ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df6b0926c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 43 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98cf424c0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| List<String> whereParts = new ArrayList<>(); | ||
| if (!CommonUtils.isEmpty(filter.getUserIdMask())) { | ||
| whereParts.add("USER_ID LIKE ?"); | ||
| whereParts.add("LOWER(USER_ID) LIKE LOWER(?)" + (filter.isLiteralSearch() ? " ESCAPE '!'" : "")); |
There was a problem hiding this comment.
Apply case-insensitive filtering when loading user metadata
On PostgreSQL or Oracle, a case-insensitive search can now select a mixed-case user here, but readSubjectsMetas subsequently reuses the original mask with a case-sensitive SUBJECT_ID LIKE ?. For example, searching john returns user John while omitting that user's metaParameters from listUsers responses that request them; load metadata by the selected result IDs or apply the same case-insensitive predicate there.
AGENTS.md reference: AGENTS.md:L93-L93
Useful? React with 👍 / 👎.
| if (filter.isLiteralSearch()) { | ||
| mask = mask.replace("!", "!!").replace("%", "!%").replace("_", "!_"); |
There was a problem hiding this comment.
Escape SQL Server bracket wildcards in literal searches
When CloudBeaver uses SQL Server and the search contains [, this branch does not preserve literal-substring semantics because SQL Server LIKE treats bracket expressions as patterns. For example, searching for team[1] can match team1 rather than the literal user ID; escape [ with the configured escape character in addition to !, %, and _.
AGENTS.md reference: AGENTS.md:L93-L93
Useful? React with 👍 / 👎.
Closes dbeaver/pro#11947
Summary
Apply search, status, multiple-role filters, and sorting before server pagination so results cover the full users list. Sort by username, role, status, or last login; reset scroll when filters or sorting change.
Architecture
Reuse
useOffsetPaginationanduseResource. Incore-authentication,UsersResourceListKeyidentifies server-ordered lists and supports cache invalidation; legacy filter keys remain supported.core-sdkforwards optional ordering tolistUsers. These shared resource/API contracts belong in core; the table controls stay in the administration plugin.Existing API calls retain username-ascending order. No domain entities or relationships change.
Dependencies
Merge dbeaver/dbeaver#43209 first. CSV export integration: dbeaver/cloudbeaver-ee#2870.
Verification
Frontend build and formatting passed. Branch-wide ESLint: no errors, three return-type warnings; GraphQL is outside ESLint scope. Shared pagination edge cases remain a follow-up.
AI-assisted with OpenCode.