Skip to content

Conversation

@hungngodev
Copy link
Collaborator

@hungngodev hungngodev commented Dec 26, 2025

Description

Summary of Changes

1. Fixed "Expected 1 arguments" Error

  • Removed the buggy server:started hook in wxt.config.ts.
  • Replaced it with a client-side reload mechanism in useDev.

2. Refactored Auto-Join Logic (useDev.ts)

  • Host vs. Guest Logic:
    • Host (dev:1): Always resets the room (deletes & recreates) to ensure a clean slate and remove stale users.
    • Guest (dev:2): Tries to join the existing room. Falls back to creating one if the host is offline.

3. Global Configuration

  • Global Constants: Exposed IS_HOST and USER_PROFILE via define in wxt.config.ts.
  • Cleaner Types: Updated vite-env.d.ts to declare these globals, removing the "clunky" import.meta.env usage.

Test

Checklist

If you're making changes to the extension, please run through the following checklist to make sure that we don't have
any regressions. Note that we plan to add integration tests in the future!

  • Create room and join room on at least 2 browsers
  • Ensure that code and tests are correctly stream
  • Verify that when reloading, user can automatically join the room

Possible Downsides

Additional Documentations

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