Skip to content

Validate new spot description length - #138

Merged
veronika-tseleva-cleantalk merged 6 commits into
devfrom
empty-tasks
Oct 22, 2026
Merged

veronika-tseleva-cleantalk merged 6 commits into
devfrom
empty-tasks

Conversation

@veronika-tseleva-cleantalk

Copy link
Copy Markdown
Contributor

Copilot AI balanced review requested due to automatic review settings October 21, 2026 15:50

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

Unsafe HTML parsing and submission-lock handling introduce script-execution and duplicate-submission risks.

2 open issues
What changed in this PR

Adds a 10-character minimum description length to the widget’s new-spot flow.

Changes:

  • Validates description text before submission and during editing.
  • Adds length guidance and invalid-button styling.
  • Updates the distributed bundle.
File Description
styles/​doboard-widget.css Styles the invalid submit button.
js/​src/​widget.js Adds validation and submit-state updates.
js/​src/​loaders/​SpotFixTemplatesLoader.js Adds description-length guidance.
js/​src/​iframe/​DescriptionEditorIframe.js Adds guidance and undo/redo notifications.
js/​src/​constants.js Defines the minimum description length.
dist/​doboard-widget-bundle.js Includes the source and style changes.

Review effort: Balanced

Comment thread js/src/widget.js Outdated
Comment thread js/src/widget.js Outdated
Copilot AI balanced review requested due to automatic review settings October 21, 2026 16:25

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

Failure handling can validate stale descriptions or leave submission permanently locked.

2 open issues
2 resolved since last review

Review effort: Balanced

Comment thread js/src/widget.js Outdated
Comment thread js/src/widget.js
Copilot AI balanced review requested due to automatic review settings October 21, 2026 16:53

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

Retrying after an initial-comment failure can create a duplicate spot.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread js/src/widget.js
Copilot AI balanced review requested due to automatic review settings October 21, 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

Retry-state handling can publish content to the wrong or still-public spot and create duplicate spots.

3 open issues
1 resolved since last review

Review effort: Balanced

Comment thread js/src/handlers.js Outdated
Comment thread js/src/widget.js Outdated
Comment thread js/src/widget.js Outdated
Copilot AI balanced review requested due to automatic review settings October 21, 2026 17:29

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

Initial-comment failures silently skip selected attachments and navigate away without recoverable partial-failure handling.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread js/src/handlers.js
Comment on lines +116 to +117
} catch (commentErr) {
console.error(commentErr);
@AntonV1211
AntonV1211 requested review from svedge and removed request for AntonV1211 October 22, 2026 10:21
Copilot AI balanced review requested due to automatic review settings October 22, 2026 14:01
@veronika-tseleva-cleantalk
veronika-tseleva-cleantalk merged commit 230f244 into dev Oct 22, 2026
1 check passed

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.

🔵 Needs a closer look

Initial-comment failures silently skip queued attachment uploads while the widget proceeds as though submission succeeded.

1 open issue

Review effort: Balanced

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.

4 participants