Repository navigation
https://app.doboard.com/1/task/60670 - #139
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The fallback cache can expose private data across user sessions, while incomplete fallback snapshots and premature reads can hide tasks, comments, or attachments.
3 open issues
1 file not reviewed
js/src/lib/dom-to-image.js: Generated file
What changed in this PR
This PR improves the embedded SpotFix widget’s resilience to unavailable browser storage, slow requests, and host-page DOM changes.
Changes:
- Adds storage fallbacks, IndexedDB recovery, and API read timeouts.
- Updates widget visibility, detached-widget restoration, positioning, and task-loading error handling.
- Adds the screenshot library source, configures TinyMCE licensing, and updates the build and distribution bundle.
| File | Description |
|---|---|
js/src/widget.js |
Uses safe storage and makes initial rendering less dependent on task requests. |
js/src/websocket.js |
Uses safe storage and catches connection-construction errors. |
js/src/storage.js |
Migrates storage helpers and adjusts widget visibility persistence. |
js/src/selections.js |
Reads highlight preferences through safe storage. |
js/src/safeStorage.js |
Adds a localStorage wrapper with an in-memory fallback. |
js/src/main.js |
Restores detached widgets and resets legacy hidden state. |
js/src/localDB.js |
Adds IndexedDB timeouts, retries, and memory fallback tables. |
js/src/lib/dom-to-image.js |
Adds the screenshot library source used by the bundle. |
js/src/iframe/MessageEditorIframe.js |
Configures TinyMCE’s GPL license key. |
js/src/iframe/DescriptionEditorIframe.js |
Configures TinyMCE’s GPL license key. |
js/src/handlers.js |
Handles loading failures, validates task metadata, and bounds restored positioning. |
js/src/constants.js |
Defines the initial task-loading timeout. |
js/src/api.js |
Adds read-request timeouts and guards denied-task cache writes. |
gulpfile.js |
Loads safe storage before dependent modules. |
dist/doboard-widget-bundle.js |
Incorporates the source changes into the distributable widget. |
Review effort: Balanced
| try { | ||
| await Promise.all(requests); | ||
| } catch (error) { | ||
| console.error('SpotFix task details loading error:', error); | ||
| } |
There was a problem hiding this comment.
🟡 Changes recommended
A swallowed session-change rejection can expose a previous account’s cached private tasks after logout or an account switch.
3 open issues
2 resolved since last review
1 file not reviewed
js/src/lib/dom-to-image.js: Generated file
Review effort: Balanced
| this.allTasksData = type === 'wrap' | ||
| ? await Promise.race([ | ||
| tasksRequest, | ||
| new Promise((resolve) => setTimeout(() => resolve([]), SPOTFIX_WRAP_TASKS_TIMEOUT)), | ||
| ]) |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved session-switch races in database retries and API responses can persist one user’s private data in another user’s database.
4 open issues
1 resolved since last review
1 file not reviewed
js/src/lib/dom-to-image.js: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved loading races can cache empty comments and leave unread badges hidden, while widget reattachment can replace current editor contents with stale drafts.
3 open issues
2 resolved since last review
1 file not reviewed
js/src/lib/dom-to-image.js: Generated file
Review effort: Balanced
| if (!spotFixWidgetContainer.isConnected) { | ||
| document.body.appendChild(spotFixWidgetContainer); |


https://app.doboard.com/1/task/60670