Skip to content

Merge v0.0.x into v1.x - #291

Merged
antobinary merged 14 commits into
bigbluebutton:v1.xfrom
imdt-claudiop:sync-0.0.x-0.1.x-100926-1
Sep 14, 2026
Merged

antobinary merged 14 commits into
bigbluebutton:v1.xfrom
imdt-claudiop:sync-0.0.x-0.1.x-100926-1

Conversation

@imdt-claudiop

Copy link
Copy Markdown

Summary

Merge the latest v0.0.x changes into the v1.x line (currently at the v0.1.x tip, 8c8cf3266a2d88920e833ccdd5ff7a357bd65444) while preserving the complete commit history and original authorship.

The branch head is 7718ae2c601acd11729c7e11276760d8cdb0eec8: a single true merge commit of v0.0.x (10ca0fa4415d80f3603fa6ece462ba646febe892) into that base. A mechanical git merge-tree reproduction of the two parents differs from the actual tree only in the 48 conflicted paths documented below; there is no additional change beyond the conflict resolutions.

Conflict resolution

  • Kept the v0.0.x versions of hookCreator.ts and its unit test because they include the additional guard and regression coverage for variables becoming undefined.
  • Kept the v0.1.x versions of every package.json and package-lock.json, preserving version 0.1.26 and coherent sample dependency locks. The test devDependencies and test:unit scripts added on v0.0.x were already present on the v0.1.x side, so nothing was lost.
  • Preserved the deletion of sample-action-button-dropdown-plugin, which was already removed from v0.1.x.

CI workflow cleanup

The merge removes .github/workflows/automated-tests-publish-results.yml and adds the active unit-test workflow from v0.0.x (both from commit 675fd2c0). The removed workflow listened for a workflow named Automated tests, which does not exist on either maintained line, so it could never publish results. Keeping the removal avoids carrying a dead workflow forward.

Validation

The following checks passed both before the merge on the base commit and after the merge:

  • npm run test:unit:coverage
  • npx tsc
  • npm run lint
  • npm run build
  • ./scripts/validate-samples-code.sh
  • npm ci lockfile coherence check

The Playwright sample suites were built against the checked-out SDK and published to a live BBB 4.0 from-source environment before each run. Playwright discovered nine tests: one passed and eight failed both before and after the merge with the same console-logger timing symptoms. This is a known pre-existing limitation of the current v0.1.x E2E baseline, not a regression introduced by this merge.

History

This is a true merge commit, no squash. All 13 incoming commits retain their original authorship, and the merge commit credits Guilherme Pereira Leme as co-author.

GuiLeme and others added 14 commits June 26, 2026 14:47
createDataConsumptionHook kept its unmount cleanup in a mount-only
effect, closing over the first render's query/variables. After a
custom subscription changed variables, unmount dispatched
PLUGIN_UNSUBSCRIBED_FROM_BBB_CORE with the initial arguments: the
core counter for the old identifier went negative, so remounting
with those arguments summed to zero and the subscription never
resolved, while the active identifier leaked without unsubscribe.

Rework the hook into a single effect keyed on the normalized
query/variables state, so every cycle subscribes, listens and
cleans up with the same arguments. This also stops stale
BBB_CORE_SENT_NEW_DATA listeners from piling up on resubscribe.
Custom queries keep their mount-time arguments, as before.
Unit tests run with vitest + testing-library via npm run test:unit,
living under tests/unit/ (mirroring the src/ tree) instead of
alongside the source files, and ignored by the Playwright runner.
Shared query and type fixtures live in tests/unit/queries.ts and
tests/unit/types.ts, following the same convention as the e2e
fixtures under tests/core/.

The suite locks the data-consumption hook contracts: subscribe and
unsubscribe events balance per identifier across mount, variable
changes and unmount (bigbluebutton#275); every mount emits a fresh subscribe with
the data listener registered beforehand so resubscribing after a
full unsubscribe still resolves (bigbluebutton/bigbluebutton#23814);
re-dispatched unchanged data is applied idempotently and shared
subscriptions stay stable across rerenders (bigbluebutton#251); custom queries
keep their mount-time arguments.

Refs bigbluebutton#275, bigbluebutton#251, bigbluebutton/bigbluebutton#23814
tests/tsconfig.json had no include/exclude, so once tests/unit/
started importing src/ modules it pulled the whole SDK into the
same TypeScript program as tests/core/. That collided two unrelated
things:

- tests/core/helpers.ts declares a global `Window.meetingClientSettings`
  override for Playwright's page.evaluate calls; merged with
  src/core/api/types.ts's own PluginBrowserWindow (which extends
  Window with an optional, differently-shaped meetingClientSettings),
  TypeScript raised a global interface merge conflict.
- Its ancient target (es5) with no skipLibCheck choked on the newer
  syntax used by vitest/vite/rollup's own .d.ts files once vitest
  entered the program.

tests/tsconfig.json now excludes tests/unit/ and stays scoped to the
e2e helpers it was written for (plus skipLibCheck, which was already
needed for the pre-existing playwright-core lib errors). tests/unit/
gets its own tsconfig.json instead of sharing one with the Playwright
suite, so unit and e2e tests never share a program again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…x/issue/275

[Backport of bigbluebutton#278] fix(data-consumption): unsubscribe with current args on unmount & test: initial unit test setup
This guards a pre-existing crash when variables change from a defined object to undefined. PR bigbluebutton#279 reduces the bug's exposure but does not introduce it.
…x-v1

ci: Run unit tests in CI and guard undefined variables
…0926-1

Conflicts:
	package-lock.json
	package.json
	samples/sample-actions-bar-plugin/package-lock.json
	samples/sample-actions-bar-plugin/package.json
	samples/sample-audio-settings-dropdown-plugin/package-lock.json
	samples/sample-audio-settings-dropdown-plugin/package.json
	samples/sample-camera-settings-dropdown-plugin/package-lock.json
	samples/sample-camera-settings-dropdown-plugin/package.json
	samples/sample-custom-subscription-hook/package-lock.json
	samples/sample-custom-subscription-hook/package.json
	samples/sample-data-channel-plugin/package-lock.json
	samples/sample-data-channel-plugin/package.json
	samples/sample-dom-element-manipulation/package-lock.json
	samples/sample-dom-element-manipulation/package.json
	samples/sample-floating-window-plugin/package-lock.json
	samples/sample-floating-window-plugin/package.json
	samples/sample-generic-content-sidekick-plugin/package-lock.json
	samples/sample-generic-content-sidekick-plugin/package.json
	samples/sample-media-area-plugin/package-lock.json
	samples/sample-media-area-plugin/package.json
	samples/sample-nav-bar-plugin/package-lock.json
	samples/sample-nav-bar-plugin/package.json
	samples/sample-options-dropdown-plugin/package-lock.json
	samples/sample-options-dropdown-plugin/package.json
	samples/sample-presentation-dropdown-plugin/package-lock.json
	samples/sample-presentation-dropdown-plugin/package.json
	samples/sample-presentation-toolbar-plugin/package-lock.json
	samples/sample-presentation-toolbar-plugin/package.json
	samples/sample-screenshare-helper-plugin/package-lock.json
	samples/sample-screenshare-helper-plugin/package.json
	samples/sample-server-commands-plugin/package-lock.json
	samples/sample-server-commands-plugin/package.json
	samples/sample-ui-commands-plugin/package-lock.json
	samples/sample-ui-commands-plugin/package.json
	samples/sample-ui-events-plugin/package-lock.json
	samples/sample-ui-events-plugin/package.json
	samples/sample-use-meeting/package-lock.json
	samples/sample-use-meeting/package.json
	samples/sample-user-camera-dropdown-plugin/package-lock.json
	samples/sample-user-camera-dropdown-plugin/package.json
	samples/sample-user-camera-helper-plugin/package-lock.json
	samples/sample-user-camera-helper-plugin/package.json
	samples/sample-user-list-dropdown-plugin/package-lock.json
	samples/sample-user-list-dropdown-plugin/package.json
	samples/sample-user-list-item-additional-information-plugin/package-lock.json
	samples/sample-user-list-item-additional-information-plugin/package.json
	src/data-consumption/factory/hookCreator.ts
	tests/unit/data-consumption/factory/hookCreator.test.ts

Co-Authored-By: Guilherme Pereira Leme <69865537+GuiLeme@users.noreply.github.com>
@welcome

welcome Bot commented Sep 10, 2026

Copy link
Copy Markdown

Thank you for this contribution! Could you please confirm if you already sent in the signed Contributor License Agreement? See https://docs.bigbluebutton.org/support/faq.html#why-do-i-need-to-sign-a-contributor-license-agreement-to-contribute-source-code Thanks in advance!

@GuiLeme GuiLeme left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@antobinary
antobinary merged commit 9c1b884 into bigbluebutton:v1.x Sep 14, 2026
5 checks passed
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.

5 participants