Skip to content

fix(web): remove isLoaded check from ensureFolderRegistered guard#301

Merged
FSM1 merged 1 commit into
mainfrom
fix/folder-registration-guard
Mar 21, 2026
Merged

fix(web): remove isLoaded check from ensureFolderRegistered guard#301
FSM1 merged 1 commit into
mainfrom
fix/folder-registration-guard

Conversation

@FSM1

@FSM1 FSM1 commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • The isLoaded flag in the ensureFolderRegistered guard (added in PR feat: extract core crypto SDK as shared packages #296 review fixes) was too strict — it's not set in all code paths (e.g., SDK-created folders, root folder after vault init)
  • This caused ensureFolderRegistered to silently skip registration, leading to "Folder not loaded" errors on upload/create operations
  • The guard now only checks for empty key material (folderKey.length === 0 || ipnsPrivateKey.length === 0), which is the actual safety condition

Test plan

  • E2E tests pass — upload, folder creation, and other mutations no longer fail with "Folder not loaded"

🤖 Generated with Claude Code

The isLoaded flag isn't set in all code paths (e.g., SDK-created
folders, root folder after init). The guard only needs to check for
empty key material — if folderKey and ipnsPrivateKey have content,
the folder is safe to register regardless of the isLoaded flag.

This was causing "Folder not loaded" errors in E2E tests because
ensureFolderRegistered silently skipped registration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: e2ed6ed73904
@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@FSM1 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6b5edd5f-4843-4cf3-83c3-f50d3a575014

📥 Commits

Reviewing files that changed from the base of the PR and between eb2e3df and 80e4bcf.

📒 Files selected for processing (1)
  • apps/web/src/lib/sdk-provider.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/folder-registration-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FSM1 FSM1 enabled auto-merge (squash) March 21, 2026 01:18
@FSM1 FSM1 merged commit e6fe6ee into main Mar 21, 2026
23 checks passed
@FSM1 FSM1 deleted the fix/folder-registration-guard branch March 21, 2026 03:41
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