Skip to content

Conversation

@yoen-velt
Copy link
Collaborator

@yoen-velt yoen-velt commented Jan 7, 2026

…n_denied on first load

Previously, VeltComments, VeltCommentsSidebar, and VeltCursor mounted immediately when VeltCollaboration rendered, before auth and document setup completed. This caused Firebase permission_denied errors in iframe contexts where sessionStorage is used (fresh auth each load).

This fix wraps these components in a conditional that checks useVeltInitState(), which returns true only when both user authentication AND document setup are complete. This mirrors the pattern already used in ReactFlowComponent.

Changes:

  • Added useVeltInitState import to all 17 VeltCollaboration.tsx files
  • Wrapped VeltComments, VeltCommentsSidebar, VeltCursor in {veltInitialized && (...)}
  • VeltInitializeDocument and VeltCustomization remain outside the conditional

🤖 Generated with Claude Code

Pull Request

Description

Type of Change

  • New demo application
  • Bug fix
  • Feature enhancement
  • Documentation update
  • Infrastructure/tooling change
  • Other (please describe):

Monorepo Structure Checklist

If adding a new demo, ensure you've followed the 5-level structure:

  • Placed in correct path: apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/
  • Updated package.json with scoped name: @apps/<framework>-<document>-<library-or-solution>-<demo>
  • Created comprehensive README.md in the demo directory
  • Verified build passes: pnpm --filter <package-name> build
  • Verified dev server runs: pnpm --filter <package-name> dev

Deployment Checklist

If this demo should be deployed:

  • Added/updated Vercel project configuration
  • Updated GitHub Actions workflows (if applicable)
  • Verified deployment paths in CI/CD configs

Testing

  • Tested locally with pnpm -w install && pnpm -w build
  • Verified all affected apps still build
  • Tested dev servers for affected apps

Documentation

  • Updated relevant documentation (if needed)
  • Added demo to master-sample-app (if applicable)
  • Updated deployment docs (if applicable)

Related Issues

Screenshots/Videos

Additional Context


For Reviewers

Demo Location

Path: apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/

Package name: @apps/<...>

How to Test

# Install dependencies
pnpm -w install

# Run the specific demo
pnpm --filter @apps/<package-name> dev

# Build the specific demo
pnpm --filter @apps/<package-name> build

Structure Verification

The demo follows the 5-level hierarchy:

  1. Framework:
  2. Document:
  3. Type:
  4. Implementation:
  5. Library/Solution:
  6. Demo:

Documentation: See README_MONOREPO.md and docs/structure.md for more details on the monorepo structure.


Note

Ensures Velt UI mounts only after auth and document setup to prevent first-load permission_denied errors (notably in iframe/sessionStorage contexts).

  • Import useVeltInitState in all VeltCollaboration.tsx demo files (dashboards, tables, text editors, CRDT)
  • Wrap VeltComments, VeltCommentsSidebar, and VeltCursor with veltInitialized && (...)
  • Keep VeltInitializeDocument and VeltCustomization outside the conditional

Written by Cursor Bugbot for commit 791873b. This will update automatically on new commits. Configure here.

…n_denied on first load

Previously, VeltComments, VeltCommentsSidebar, and VeltCursor mounted immediately
when VeltCollaboration rendered, before auth and document setup completed. This
caused Firebase permission_denied errors in iframe contexts where sessionStorage
is used (fresh auth each load).

This fix wraps these components in a conditional that checks useVeltInitState(),
which returns true only when both user authentication AND document setup are
complete. This mirrors the pattern already used in ReactFlowComponent.

Changes:
- Added useVeltInitState import to all 17 VeltCollaboration.tsx files
- Wrapped VeltComments, VeltCommentsSidebar, VeltCursor in {veltInitialized && (...)}
- VeltInitializeDocument and VeltCustomization remain outside the conditional

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@yoen-velt yoen-velt self-assigned this Jan 7, 2026
@vercel
Copy link

vercel bot commented Jan 7, 2026

@yoen-velt yoen-velt merged commit da7a4ea into main Jan 7, 2026
20 checks passed
yoen-velt added a commit that referenced this pull request Jan 7, 2026
…-guard"

This reverts commit da7a4ea, reversing
changes made to 09295c5.
yoen-velt added a commit that referenced this pull request Jan 7, 2026
yoen-velt added a commit that referenced this pull request Jan 7, 2026
…mple-app-loading-guard"""

This reverts commit 6a50a37.
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.

2 participants