Skip to content

https://app.doboard.com/1/task/60670 - #139

Merged
veronika-tseleva-cleantalk merged 5 commits into
devfrom
fix_60670
Nov 5, 2026
Merged

veronika-tseleva-cleantalk merged 5 commits into
devfrom
fix_60670

Conversation

@veronika-tseleva-cleantalk

Copy link
Copy Markdown
Contributor

Copilot AI balanced review requested due to automatic review settings November 5, 2026 16:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Comment thread js/src/localDB.js Resolved
Comment thread js/src/handlers.js
Comment on lines +73 to +77
try {
await Promise.all(requests);
} catch (error) {
console.error('SpotFix task details loading error:', error);
}
Comment thread js/src/localDB.js Resolved
Copilot AI balanced review requested due to automatic review settings November 5, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Comment thread js/src/handlers.js Resolved
Comment thread js/src/widget.js
Comment on lines +99 to +103
this.allTasksData = type === 'wrap'
? await Promise.race([
tasksRequest,
new Promise((resolve) => setTimeout(() => resolve([]), SPOTFIX_WRAP_TASKS_TIMEOUT)),
])
Copilot AI balanced review requested due to automatic review settings November 5, 2026 17:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Comment thread js/src/api.js Resolved
Comment thread js/src/localDB.js Resolved
Copilot AI balanced review requested due to automatic review settings November 5, 2026 17:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

Comment thread js/src/main.js
Comment on lines +89 to +90
if (!spotFixWidgetContainer.isConnected) {
document.body.appendChild(spotFixWidgetContainer);
@veronika-tseleva-cleantalk
veronika-tseleva-cleantalk merged commit ff85d8b into dev Nov 5, 2026
3 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.

3 participants