- Fixed TypeError: Cannot assign to read only property 'position' of object
- Changed _loadPosition() to use Object.assign() instead of direct assignment
- Added null check for this.options?.position to handle both Foundry and test environments
- Updated fallback _AppBase class to store options in constructor for test compatibility
- Added comprehensive tests for _loadPosition() method
The error occurred because in FoundryVTT v14, ApplicationV2 freezes the options object,
making direct assignment to this.options.position impossible. Using Object.assign()
merges the properties instead, which works with both frozen and unfrozen objects.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Update FoundryAdapter to properly detect and expose WebRTC stream access
- Modify ScryingPoolStrip to create video elements with WebRTC streams
- Add video container to roster-strip.hbs template with conditional rendering
- Add CSS to hide Foundry's AV dock (#av and .camera-view)
- Add CSS styling for video containers and elements
- Fix unused variable in FoundryAdapter.buildWebRTCSurface
- Add comprehensive test script for stream access implementation
Architecture: Full replacement mode where module hides Foundry's AV dock
and creates its own video elements using game.webrtc.client.getMediaStreamForUser()
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Remove unused StripOverlayLayer import and stripOverlayLayer variable from module.js
- Add comprehensive JSDoc annotations to FoundryAdapter.js methods (settings, socket, users, scenes, notifications, hooks)
- Add /* global Dialog */ comment to PlayerPrivacyPanel.js for ESLint
- Remove unused _force parameter from GMPlayerPrivacySelector.js render() method
- Fix PlayerPrivacyPanelMenu.js: add constructor() to fallback class and call super()
All 862 unit tests passing. All Story 4.2 acceptance criteria met.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Modified GMPlayerPrivacySelectorMenu to extend ApplicationV2 (or fallback class)
to be compatible with FoundryVTT's registerMenu API.
FoundryVTT requires that menu types passed to registerMenu() must be a
FormApplication or ApplicationV2 instance or subclass.
Changes:
- Added conditional _AppBase class (ApplicationV2 or fallback for tests)
- Extended GMPlayerPrivacySelectorMenu from _AppBase
- Added DEFAULT_OPTIONS static property for ApplicationV2 compatibility
- Added super(options) call in constructor
This fixes: Error: You must provide a menu type that is a FormApplication or ApplicationV2 instance or subclass
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Changed selector from '.scrying-pool__roster-strip' to '.scrying-pool-strip'
to match the actual CSS class defined in ScryingPoolStrip.defaultOptions.
This was the root cause of the warning: 'StripOverlayLayer: ScryingPoolStrip not found'
The class name in ScryingPoolStrip is 'scrying-pool-strip' (set in defaultOptions),
not 'scrying-pool__roster-strip'.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Resolved the 'ScryingPoolStrip not found, appending to body' warning by
restructuring the initialization flow:
1. ScryingPoolStrip now creates its own StripOverlayLayer lazily via getter
2. ScryingPoolStrip.stripOverlayLayer returns the layer instance
3. ConfirmationBar accepts ScryingPoolStrip/RoleRenderer and extracts stripOverlayLayer
4. RoleRenderer exposes public .strip getter for ScryingPoolStrip access
5. All components only initialized for GM users (where ScryingPoolStrip exists)
This ensures:
- StripOverlayLayer is created AFTER ScryingPoolStrip DOM element exists
- ConfirmationBar renders correctly positioned within the strip
- No fallback to document.body needed
- Proper separation of concerns (strip owns its overlay layer)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Delete src/ui/shared/ParticipantCard.js (duplicate of boardUtils.js with conflicting implementations)
- Delete tests/unit/ui/shared/ParticipantCard.test.js (tests for deleted file)
- Add directorsBoard to global declarations in ScryingPoolStrip.js to fix lint errors
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>