Skip to content

fix(visual-builder): grey structural actions while a collaborator is in the container - #679

Open
sairaj-cs wants to merge 2 commits into
ce-auto-draft-lpfrom
container-structural-locks
Open

sairaj-cs wants to merge 2 commits into
ce-auto-draft-lpfrom
container-structural-locks

Conversation

@sairaj-cs

Copy link
Copy Markdown
Contributor
  • An instance element is matched on its own path, so a collaborator's lock in a sibling instance no longer marks it locked or blocks selecting it.
  • Move, delete and add on a multiple container are disabled while a collaborator holds a lock on the container, inside it or above it. The tooltip names who holds it, and the buttons update live as locks change.
  • Add-instance buttons are now unmounted when removed. Before, element.remove() left each button's lock subscription running after every hover.

Test plan

  • Unit: fieldToolbar, addInstanceButton, generateAddInstanceButtons and fieldLockIndicator suites pass.
  • Checked with two users on the same entry against Visual Editor: the toolbar greys and recovers as the other user selects and leaves an instance, for groups, nested groups and modular blocks.

🤖 Generated with Claude Code

sairaj-cs and others added 2 commits November 3, 2026 14:36
…in the container

Match an instance element on its own path, so a collaborator's lock in a
sibling instance no longer marks it locked or blocks selecting it.
Disable move, delete and add on a multiple container while a collaborator
holds a lock on it, inside it or above it, with the holder in the tooltip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The buttons subscribe to lock updates to grey out live. Removing them with
element.remove() never unmounted the preact root, so each hover left its
subscription behind. removeAddInstanceButton unmounts the root first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sairaj-cs
sairaj-cs requested a review from a team as a code owner November 3, 2026 11:36
@snyk-io

snyk-io Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 2 0 10 ✅ Passed
🟠 High Severity 2 0 25 ✅ Passed
🟡 Medium Severity 3 0 500 ✅ Passed
🔵 Low Severity 1 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.51% 2831 / 4015
🔵 Statements 69.44% 2884 / 4153
🔵 Functions 68.56% 519 / 757
🔵 Branches 65.24% 1757 / 2693
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/visualBuilder/components/FieldToolbar.tsx 78.57% 80% 69.23% 78.57% 94-97, 147-161, 290-306, 328-330, 395-401, 411, 415, 468-472, 491
src/visualBuilder/components/addInstanceButton.tsx 96.42% 78.94% 100% 96.42% 58
src/visualBuilder/components/fieldLabelWrapper.tsx 65.35% 66.66% 72% 66.66% 54-55, 64-65, 113-116, 150-160, 180-182, 241, 332-341, 348-351, 386-389, 394-421, 464, 469-472, 478, 637
src/visualBuilder/generators/generateAddInstanceButtons.tsx 100% 85.71% 100% 100%
src/visualBuilder/utils/fieldLockIndicator.ts 96.22% 91.22% 100% 95.91% 194, 200
src/visualBuilder/utils/multipleElementAddButton.ts 82.5% 76.08% 66.66% 83.54% 54, 85, 220, 259-282
Generated in workflow #965 for commit f3dc780 by the Vitest Coverage Report Action

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.

1 participant