Skip to content

Conversation

@IanCal
Copy link
Contributor

@IanCal IanCal commented Jan 27, 2026

Currently we require that every realm has its own user added to matrix, and every realm-user pair has a unique room.

Instead, we can have a single server user, and a single dm room for events between the server and user.

This means that creating a new realm requires just creating a new realm, not a realm and user and room.

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: 7cd147b2c3

ℹ️ 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 +76 to +80
'JOIN realm_user_permissions rup',
'ON rup.username = sr.matrix_user_id',
'WHERE rup.realm_url =',
param(realmURL),
'AND (rup.read = true OR rup.write = true)',

Choose a reason for hiding this comment

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

P2 Badge Include public permissions when selecting session rooms

This query now only returns session rooms for users that have explicit realm_user_permissions rows (it joins on rup.username = sr.matrix_user_id). For realms that are world‑readable via the '*' permission row, users who only have public access will not match this join, so fetchAllSessionRooms returns no rooms for them. Because NodeAdapter.broadcastRealmEvent relies on this mapping, those public users will stop receiving realm events (e.g. incremental index invalidations) even though they can read the realm. This regression happens specifically for realms that are readable via '*' but have no per‑user permission rows.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Only specifically mentioned users with read or write access are now going to be notified of updates. This is an expected and OK change. Pinging all users if we change catalog could be a huge issue, and should be solved in a different way so this drop of functionality is expected.

@github-actions
Copy link

Preview deployments

@IanCal IanCal marked this pull request as draft January 27, 2026 15:08
@github-actions
Copy link

Host Test Results

  1 files  ±    0   1 suites  ±0   5m 41s ⏱️ - 1h 35m 58s
154 tests  - 1 762  39 ✅  - 1 855  3 💤  - 14   13 ❌ + 13  99 🔥 +94 
154 runs   - 1 777  -60 ✅  - 1 964  3 💤  - 14  112 ❌ +107  99 🔥 +94 

For more details on these failures and errors, see this check.

Results for commit 7cd147b. ± Comparison against base commit 5a329a3.

This pull request removes 1775 and adds 13 tests. Note that renamed tests count towards both.
Chrome ‑ Acceptance | AI Assistant tests: "Add Same Skills" copies skill configuration to new session
Chrome ‑ Acceptance | AI Assistant tests: ai assistant panel width persists to localStorage
Chrome ‑ Acceptance | AI Assistant tests: auto-attached cards behaviour
Chrome ‑ Acceptance | AI Assistant tests: auto-attached spec card can be removed
Chrome ‑ Acceptance | AI Assistant tests: auto-attaches spec card when spec panel is open and spec is selected
Chrome ‑ Acceptance | AI Assistant tests: can display and remove auto attached file
Chrome ‑ Acceptance | AI Assistant tests: can open attach file modal
Chrome ‑ Acceptance | AI Assistant tests: clicking auto-attached card makes it a chosen card
Chrome ‑ Acceptance | AI Assistant tests: clicking auto-attached file makes it a chosen file
Chrome ‑ Acceptance | AI Assistant tests: code mode context sent with message
…
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | AI Assistant tests: can open attach file modal 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | Code patches tests: can patch code 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | Spec preview: view when there is a single spec instance 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | basic tests: visiting realm root 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | code submode tests > multiple realms: default realm is the personal realm 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | code submode | create-file tests > when user has permissions to both test realms: new file button has options to create card def, field def, card instance, and text files 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | code submode | editor tests: card instance JSON displayed in monaco editor 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | code submode | file-tree tests: can navigate file tree, file view mode is persisted in query parameter 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | code submode | head format preview: head format preview updates when editing card json 
Chrome ‑ Global error: Uncaught TypeError: Cannot read properties of undefined (reading 'getUserId') at http://localhost:7357/assets/chunk.dae6caba8acf5ae347e2.js, line 156670  While executing test: Acceptance | code submode | inspector tests: inspector will show json instance definition and module definition in card inheritance panel 
…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants