Skip to content

fix: refactor init.js#17934

Merged
Antreesy merged 2 commits into
mainfrom
fix/noid/init
May 7, 2026
Merged

fix: refactor init.js#17934
Antreesy merged 2 commits into
mainfrom
fix/noid/init

Conversation

@Antreesy
Copy link
Copy Markdown
Contributor

@Antreesy Antreesy commented May 6, 2026

☑️ Resolves

  • Refactor init.js
    • Potentially solve issue with circular import (caused by plain import 'init.js')
    • Improve readability and concurrent calls
  • Extract EventBus.on listeners
    • Call in place, when app is mounted, and stores are ready
    • Unregister with app unmount

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🖌️ UI Checklist

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

@Antreesy Antreesy added this to the 🏖️ Next Beta (34) milestone May 6, 2026
@Antreesy Antreesy requested review from DorraJaouad and ShGKme May 6, 2026 15:27
@Antreesy Antreesy self-assigned this May 6, 2026
@Antreesy Antreesy changed the title Fix/noid/init fix: refactor init.js May 6, 2026
@ShGKme
Copy link
Copy Markdown
Contributor

ShGKme commented May 6, 2026

The name useRegisterGlobalEvents says use "Register GlobalEvents" but it doesn't provide the registrator nor is it about all the global events handling.

It seems like it semantically does two different things, and only is having setting some EventBus.on in common:

  1. The token sync on signaling-join-room
    • Seems like it can be a part of the tokenStore
  2. The current joint conversation recording status sync
    • It depends on the current token and doesn't make sense as a global handler, IMO
    • I'd move it close to the conversation component (it doesn't make sense outside the conversation)
    • Or, if you want to split to a composable, I'd name it something like useRecordingStatusSync

@Antreesy
Copy link
Copy Markdown
Contributor Author

Antreesy commented May 6, 2026

  1. Seems like it can be a part of the tokenStore

Right

  1. I'd move it close to the conversation component

I will keep it separately, there is no single shared component, that appear in every integration and main app

Comment thread src/composables/useRecordingStatusSync.ts
Antreesy added 2 commits May 7, 2026 12:42
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy merged commit 7569fb3 into main May 7, 2026
53 checks passed
@Antreesy Antreesy deleted the fix/noid/init branch May 7, 2026 11:31
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.

2 participants