Skip to content

chore: harden SSR safety and tests#13

Merged
Tnalxmsk merged 5 commits intodevelopfrom
feat/#12/stability-tests
Jan 31, 2026
Merged

chore: harden SSR safety and tests#13
Tnalxmsk merged 5 commits intodevelopfrom
feat/#12/stability-tests

Conversation

@Tnalxmsk
Copy link
Owner

@Tnalxmsk Tnalxmsk commented Jan 31, 2026

Summary

Improve SSR safety and stability for the global audio singleton, add a dispose API, and reorganize tests under a
dedicated test directory.

Related Issues

Changes

  • Add SSR guards for audio creation and storage access; ensure safe no-op behavior on the server
  • Introduce audioManager.dispose() to remove listeners and reset state
  • Add SSR + dispose tests, and split manager vs hook tests into test/
  • Update README with dispose usage and SSR note
  • Add @testing-library/dom and refine Vitest test include path

How To Test

  1. npm run test:run
  2. npm run lint
  3. npm run build

Checklist

  • Title follows the convention (e.g., feat: add global audio seek guard)
  • Build passes locally (pnpm build)
  • No breaking changes, or they are documented below
  • Tests added/updated where appropriate
  • Docs/comments updated where helpful

Breaking Changes (if any)

None.

Notes For Reviewers

  • SSR mode now no-ops audio actions and keeps the default snapshot state.
  • dispose() is optional and intended for tests/cleanup.

Screenshots / Recordings (if UI changes)

N/A

@Tnalxmsk Tnalxmsk self-assigned this Jan 31, 2026
@Tnalxmsk Tnalxmsk merged commit 12aab17 into develop Jan 31, 2026
1 check passed
@Tnalxmsk Tnalxmsk deleted the feat/#12/stability-tests branch January 31, 2026 04:41
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.

chore: stability audit and tests

1 participant