Fix events revalidation bugs: wrong block mappings and missing relationship queries#1023
Open
Fix events revalidation bugs: wrong block mappings and missing relationship queries#1023
Conversation
…onship queries eventsBlockMappings was using postsBlocks instead of eventsBlocks, and the events collection was completely omitted from relationship reference tracking and queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Preview deployment: https://fixxevents-block-mappings.preview.avy-fx.org |
…improve error logging Events was importing populateBlocksInContent from Posts (using postsBlockMappings). Now uses its own hook with eventsBlockMappings. Also log Drizzle error cause in block reference queries to help diagnose transient query failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rchlfryn
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two bugs in the revalidation system where the events collection was not being properly tracked:
eventsBlockMappingswas incorrectly usingpostsBlocksinstead ofeventsBlocksfindDocumentsWithRelationshipReferencesRelated Issues
Discovered during #455 work. Using a phased approach for the new revalidation system so fixing this while we're still on the old system.
Key Changes
src/utilities/getBlocksFromConfig.ts— FixeventsBlockMappingsto useeventsBlocksinstead ofpostsBlockssrc/utilities/getRelationshipsFromConfig.ts— Add events collection to relationship config extractionsrc/utilities/revalidation/findDocumentsWithRelationshipReferences.ts— Add events collection to relationship reference queries with proper block and relationship field handlingHow to test
Screenshots / Demo video
https://www.loom.com/share/fa0a27d9240f4e42ba7c68568213bfae
Migration Explanation
No migration needed.
Future enhancements / Questions
This revalidation system will be replaced but fixing for now.