Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the PI search functionality to improve performance by caching PI group data in $_SESSION and relocating the search endpoint from modal/ to ajax/. The submit button now only enables when an exact PI group match is found.
Changes:
- Moved
pi_search.phpfrommodal/toajax/directory - Implemented session-based caching of PI group owner information
- Enhanced submit button behavior to only enable on exact matches
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| webroot/panel/modal/pi_search.php | Removed old implementation that performed LDAP queries on every keystroke |
| webroot/panel/modal/new_pi.php | Added session cache initialization and improved JavaScript for exact match validation |
| webroot/panel/ajax/pi_search.php | New implementation using session cache instead of direct LDAP queries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2432870 to
d58210b
Compare
bryank-cs
approved these changes
Jan 16, 2026
Member
Author
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.
before:
pi_search.phpis located undermodal/despite that it is only used with ajaxpi_search.phpreturns HTMLafter:
pi_search.phpis located underajax/where it belongspi_search.phpreturns JSONScreen.Recording.2026-01-16.at.8.30.51.AM.mov
in the rare scenario where the user's session gets automatically cleaned up by php:
I also implemented this in a simpler way where all the PI owner attributes are stored in the browser, but I decided that wasn't a good idea. #535
Future work:
UnityLdap->getAllPIGroups(), updategroup_user_request_owner_reminder.phpto manually parse attributes