-
-
Notifications
You must be signed in to change notification settings - Fork 78
Faster extraUserFields #1144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster extraUserFields #1144
Conversation
|
This patch seems really questionable. An API fetch shouldn't be cached by the browser and you added multiple mechanisms to prevent caching. Are you using your map behind a CDN? Would the outdated data be an issue if you try connect to your map without going through the CDN? |
|
That's just a straight solution from AI 🤷♂️ Garbage in garbage out 😅 I used your commeng and updated fetches.js |
|
Umm I am suggesting that something else (non-reactmap) might be the issue here. Have you tried what I suggested? |
|
Why it would be non-reactmap? I simply used AI on repo with prompt pretty much like "extraUserFields refresh on re-login only - make it refresh on each profile window open". There was no other context than that |
|
The fact that this fixed it for you seems to say that this might be a different issue. |
|
I'm not sure that's an issue in the first place. I guess it's just how that feature was developed and the way it currently works was intended |
|
Please check if #1145 fixes the issue for you. P.S. You can call it a programmer's intuition but it appears to me that your patch works around the problem rather than addressing the root cause. Here's what my codex found:
|
|
Does your patch work if you revert the changes in |
|
No |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the user profile to refresh extraUserFields data whenever the profile window is opened, instead of only on re-login. This provides more current information to users without requiring them to log out and back in.
- Adds automatic data refresh when profile dialog opens
- Updates server endpoint to include user data in response
- Maintains existing error handling and cleanup patterns
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/features/profile/index.jsx | Adds useEffect to fetch and update user data when profile opens |
| server/src/routes/rootRouter.js | Updates settings endpoint to include user data in response |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@kamieniarz I did some additional improvements on your PR. Please check if it still works for you? |
|
Everything works 💪 |
# [1.40.0-develop.6](v1.40.0-develop.5...v1.40.0-develop.6) (2025-10-01) ### Features * faster extraUserFields ([#1144](#1144)) ([2216787](2216787))
|
🎉 This PR is included in version 1.40.0-develop.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
These fields in profile (configured in config: database.settings.extraUserFields) refresh on re-login only. I made them update on each profile window open

Disclaimer: PR created with AI. I have no idea what I'm doing