Repository navigation
feat: POST /doc/update endpoint — partial document update with chunk rebuild - #583
Merged
Merged
Conversation
…rebuild (#579) Add partial document update endpoint to uteke-serve HTTP API. Changes: - documents.rs: update_document() — dynamic SET clause, only updates provided fields, always increments version, returns updated doc - lib.rs: doc_update() — resolves doc by id/slug, partial update, rebuilds chunks + re-embeds if content changed - types.rs: DocUpdateRequest struct + resolve_doc_id_update helper - handlers.rs: POST /doc/update route with 404 for missing docs API: POST /doc/update { id | slug, title?, content?, tags?, metadata? } → Full document (version incremented) → 404 if not found Partial update semantics: only fields present in request are modified. Content changes trigger chunk rebuild (old chunks deleted, new ones embedded and indexed). Non-content updates (title, tags) skip re-chunking. Follow-up to Corin #139 — Corin DocumentsView will use this for Save.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-cli · BYOK · MIT |
| // If content was changed, rebuild chunks. | ||
| if let Some(content_text) = content { | ||
| let old_chunk_ids = self | ||
| .store |
| content: chunk.content.clone(), | ||
| char_start: chunk.char_start as i64, | ||
| char_end: chunk.char_end as i64, | ||
| tags: updated.tags.clone(), |
This was referenced Jul 6, 2026
ajianaz
added a commit
that referenced
this pull request
Aug 13, 2026
feat: POST /doc/update endpoint — partial document update with chunk rebuild
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
Add
POST /doc/updateendpoint to uteke-serve — partial document update with automatic chunk rebuild on content changes.Follow-up to Corin #139. Enables the DocumentsView.svelte Save button for editing existing documents.
API
Behavior
Changes
Verification
Cross-repo Dependency
Corin needs this merged first, then wire doc_update in uteke_client.rs + commands.rs + ipc.ts + DocumentsView.svelte (Corin #139)