Skip to content

fix: zero cache stale replica & improved mentioned document chip handling#1388

Open
AnishSarkar22 wants to merge 9 commits into
MODSetter:devfrom
AnishSarkar22:fix/zero-cache-stale-replica-1355
Open

fix: zero cache stale replica & improved mentioned document chip handling#1388
AnishSarkar22 wants to merge 9 commits into
MODSetter:devfrom
AnishSarkar22:fix/zero-cache-stale-replica-1355

Conversation

@AnishSarkar22
Copy link
Copy Markdown
Contributor

@AnishSarkar22 AnishSarkar22 commented May 12, 2026

Description

  • Updated roricorp zero from 0.26.2 to 1.4.0
  • Added an alembic migration to force zero-cache resync after Zero upgrade
  • Improved user query handling and mention chip functionality
  • Screen capture button will be shown for desktop users only

Motivation and Context

FIX #1355

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR upgrades the Rocicorp Zero cache from version 0.26.2 to 1.4.0 and addresses a critical bug where zero-cache could become stuck on a stale replica snapshot. A new Alembic migration forces a resync of the zero_publication using the correct COMMENT ON PUBLICATION bookend pattern that properly triggers Zero's schema-change hooks. Additionally, documentation warnings were added to existing migrations to prevent future developers from using the problematic DROP/CREATE PUBLICATION anti-pattern that caused the original issue.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/alembic/versions/143_force_zero_publication_resync.py
2 surfsense_backend/alembic/versions/116_create_zero_publication.py
3 surfsense_backend/alembic/versions/117_optimize_zero_publication_column_lists.py
4 surfsense_backend/alembic/versions/118_add_local_folder_sync_and_versioning.py
5 surfsense_backend/alembic/versions/139_add_user_to_zero_publication.py
6 surfsense_backend/alembic/versions/140_premium_tokens_to_credit_micros.py
7 docker/docker-compose.deps-only.yml
8 docker/docker-compose.dev.yml
9 docker/docker-compose.yml
10 surfsense_web/package.json
11 surfsense_web/pnpm-lock.yaml

Need help? Join our Discord

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 420eca2d-35e3-495d-80e0-e997f4a26691

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@AnishSarkar22 AnishSarkar22 changed the title fix: zero cache stale replica fix: zero cache stale replica & some fixes May 12, 2026
@AnishSarkar22 AnishSarkar22 changed the title fix: zero cache stale replica & some fixes fix: zero cache stale replica & improved mentioned document chip handling May 12, 2026
@AnishSarkar22 AnishSarkar22 marked this pull request as ready for review May 12, 2026 17:55
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