feat: RoomSummary.referenced_documents for cross-entity linking (#689 PR3)#705
Merged
Conversation
β¦#689 PR3) - Add referenced_documents field (Option<Vec<String>>) to RoomSummary struct with serde(default, skip_serializing_if) for backward compatibility - Set referenced_documents: None at both RoomSummary construction sites in room_summary() for backward compat - Add Store::room_summary_with_docs() that enriches a summary with document slugs from the room_documents junction table - Add Uteke::room_summary_with_docs() high-level wrapper in rooms.rs - Add 3 tests: with documents, empty room (None), nonexistent room (None)
π Cora AI Code ReviewReview powered by cora-cli Β· BYOK Β· MIT |
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.
Summary
Part of #689 β PR3: Room β Document enrichment.
Adds
referenced_documentsfield toRoomSummaryand a newroom_summary_with_docs()method that populates it from theroom_documentsjunction table (added in PR1).Changes
referenced_documents: Option<Vec<String>>field with#[serde(default, skip_serializing_if = "Option::is_none")]for backward compatreferenced_documents: None(existing behavior preserved)Nonedocs when no documents are linkedrooms.rsTesting
room_summary_with_docs_returns_documentsβ room with 2 linked docs βSome(vec![...])room_summary_with_docs_empty_room_returns_none_docsβ room with no docs βNoneroom_summary_with_docs_nonexistent_returns_noneβ missing room βNoneNote: Cannot compile locally (no libssl-dev). CI will validate.