Skip to content

Conversation

@Musicminion
Copy link
Member

@Musicminion Musicminion commented Feb 7, 2026

Description

I test with 8000 users, since overleaf-cep get all users and projects in one time, the browser get stuck immediately. We need to optimize this.

Related issues / Pull Requests

Contributor Agreement

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1496065092

ℹ️ 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".

Comment on lines +578 to +580
if (typeof value !== 'string' || value.length < 8) {
return HttpErrorHandler.unprocessableEntity(req, res, 'Password must be at least 8 characters long')
}

Choose a reason for hiding this comment

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

P2 Badge Reuse full password policy validation before hashing

This branch accepts any non-empty string of length >= 8 and immediately hashes it, which bypasses the centralized password validation logic used elsewhere (e.g., max length/character policy and other AuthenticationManager.validatePassword checks). In deployments with stricter passwordStrengthOptions, an admin update here can persist passwords that violate configured policy (including bcrypt-truncated overlong passwords), creating inconsistent and weaker credential handling.

Useful? React with 👍 / 👎.

Comment on lines +243 to +245
const numberValue = parseInt(value, 10)
if (!isNaN(numberValue)) {
setUserData(prev => ({

Choose a reason for hiding this comment

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

P2 Badge Permit entering -1 collaborator limits in the features form

handleFeatureNumChange only updates state when parseInt succeeds, but this is a controlled number input: typing the first - for -1 produces NaN, so state is not updated and the field snaps back, making the advertised unlimited value hard/impossible to type via keyboard. The same condition also prevents clearing an existing numeric value because an empty input is ignored.

Useful? React with 👍 / 👎.

- add search router and frontend function
- limit frontend users to 1000(normal)+1000(del)
- fix i18n translations
- add search router and frontend function for project search
-  limit frontend projects to 1000(normal)+1000(del)
@Musicminion
Copy link
Member Author

@codex, please check my new feature, remote search.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6a6eb4824

ℹ️ 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".

)
}

let users = searchResults !== null ? searchResults : loadedUsers

Choose a reason for hiding this comment

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

P1 Badge Derive selected users from search results when searching

Switching processedUsers to searchResults means the table can now show users that are not in loadedUsers (the initial list is capped to 1000), but selection/bulk actions still rely on selectedUsers built from loadedUsers; in this state, selecting a remotely found user does not persist in the UI and bulk tools receive an empty selection. This breaks admin actions for users returned only by /admin/users/search.

Useful? React with 👍 / 👎.

Comment on lines 168 to 170
searchUsers(searchText)
.then(data => {
setSearchResults(data.users)

Choose a reason for hiding this comment

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

P2 Badge Ignore out-of-order user search responses

The debounced effect writes setSearchResults(data.users) for every completed request without checking whether that response matches the latest query, so a slower response for an older term can overwrite newer results when typing quickly. This causes stale/incorrect user lists and can lead admins to act on the wrong result set unless requests are cancelled or versioned.

Useful? React with 👍 / 👎.

The debounced effect writes setSearchResults(data.users) for every completed request without checking whether that response matches the latest query, so a slower response for an older term can overwrite newer results when typing quickly. This causes stale/incorrect user lists and can lead admins to act on the wrong result set unless requests are cancelled or versioned.
@Musicminion
Copy link
Member Author

@codex, what about now

@chatgpt-codex-connector
Copy link

Summary

Testing

  • ⚠️ python - <<'PY' ... urllib.request.urlopen('https://duckduckgo.com/html/?q=AbortController+stale+response+handling+React+useEffect') ... PY (web-search attempt failed in this environment with proxy tunnel 403 Forbidden).
  • ⚠️ cd services/web && npm run -s type-check (fails due to existing repo-wide TypeScript/module issues unrelated to these changes).
  • ⚠️ cd services/web && npm run -s lint -- modules/admin-tools/app/src/UserListController.mjs modules/admin-tools/frontend/js/user-list/components/modals/update-user-modal.tsx modules/admin-tools/frontend/js/user-list/context/user-list-context.tsx (project lint script reports many pre-existing repo-wide issues; not isolated to touched files).

Committed on branch work:

  • 9285513Fix admin tools password and remote user search handling

I also created a follow-up PR via the make_pr tool with title:

  • Follow-up: fix admin tools password validation and remote-search selection

View task →

@Musicminion
Copy link
Member Author

@copilot What about now?

Copy link

Copilot AI commented Feb 9, 2026

@Musicminion I've opened a new pull request, #16, to work on those changes. Once the pull request is ready, I'll request review from you.

@Musicminion
Copy link
Member Author

@codex, I need you to review the code, I think there is no need to add subversion for even a search feature

@Musicminion Musicminion added the enhancement New feature or request label Feb 9, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1fb661966

ℹ️ 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".


const activeUsers = await UserGetter.promises.getUsers({}, projection)
const activeUsers = await User.find({}, projection)
.limit(1000)

Choose a reason for hiding this comment

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

P1 Badge Remove hard 1000-user cap before filtering

Applying .limit(1000) at query time truncates the admin dataset before _applyFilters/sorting run, so instances with more than 1000 users will silently hide accounts and under-report totalSize; this makes some users impossible to reach through normal list/filter workflows and breaks bulk-admin expectations in larger deployments.

Useful? React with 👍 / 👎.

userId == null ? {} : { owner_ref: userId },
projection,
).lean().exec()
).limit(1000).lean().exec()

Choose a reason for hiding this comment

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

P1 Badge Remove hard 1000-project cap before filtering

This cap is applied before project filters and sorting, so when there are more than 1000 projects the list only reflects an arbitrary prefix of records; admins can miss matching deleted/trashed/inactive projects and totalSize no longer represents the real result set.

Useful? React with 👍 / 👎.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, filter in backend is deprecated.

)
}

let users = searchResults !== null ? searchResults : loadedUsers

Choose a reason for hiding this comment

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

P2 Badge Keep searched rows in sync with update/delete actions

processedUsers now prioritizes searchResults, but mutation callbacks in this context still update loadedUsers; during an active search, update/delete/restore actions can succeed server-side while the table remains stale because rendering ignores the mutated source, leading to repeated actions against already-changed users until the query is rerun.

Useful? React with 👍 / 👎.

@Musicminion Musicminion merged commit 114f232 into server-pro Feb 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants