Skip to content

Conversation

@Okuro3499
Copy link
Collaborator

fixes #8981
fixes #8999

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

for (team in teams) {
if (team.isValid) {
teamList.add(team.name)

P1 Badge Team dropdown stays empty after copying Realm objects

After fetching the teams you call realm.copyFromRealm(it), so every team in teams is an unmanaged Realm object. RealmObject.isValid returns false for unmanaged copies, therefore this loop never adds any names to teamList (and the later team.isValid check when restoring the last selection will also fail). Prior to this change the results were managed and isValid was true. The dropdown will always show only “Select team” and users cannot pick a team. Consider removing the isValid checks or avoiding copyFromRealm if live Realm objects are required.

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

@dogi dogi added the priority label Nov 10, 2025
@dogi dogi changed the title userProfileHandler: resolve realm threading and closed instance errors (fixes #8981 & #8999) sync: smoother user profile Handler: resolve realm threading and closed instance errors (fixes #8981 & #8999) Nov 11, 2025
@dogi dogi changed the title sync: smoother user profile Handler: resolve realm threading and closed instance errors (fixes #8981 & #8999) sync: smoother user profile realm handling (fixes #8981 & #8999) Nov 11, 2025
@dogi dogi changed the title sync: smoother user profile realm handling (fixes #8981 & #8999) sync: smoother user profile realm handling (fixes #8999) Nov 11, 2025
@dogi dogi merged commit a2e9680 into master Nov 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot modify managed objects outside of a write transaction. IllegalStateException

4 participants