Skip to content

feat(rag): replace fragmented extraction and text-search navigation (SD-2522)#1

Merged
caio-pizzol merged 2 commits intomainfrom
caio/sd-2522-rag-demo-replace-text-search-navigation-with-navigateto
Apr 10, 2026
Merged

feat(rag): replace fragmented extraction and text-search navigation (SD-2522)#1
caio-pizzol merged 2 commits intomainfrom
caio/sd-2522-rag-demo-replace-text-search-navigation-with-navigateto

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Replaces the RAG demo's fragmented SDK extraction and text-search navigation with the new doc.extract() + scrollToElement() APIs.

  • extractDocument() now uses a single doc.extract() call instead of 8 separate SDK interactions (find x2, comments.list, trackChanges.list, etc.)
  • Citation navigation uses scrollToElement(targetId) — exact ID-based scroll instead of text search with regex cleanup and retry timeouts
  • Removes nodeText() and targetBlockId() workaround helpers
  • Net deletion of 82 lines

Blocked by superdoc-dev/superdoc#2774 (doc.extract API) — uses (doc as any).extract() cast until SDK types are published.

Closes SD-2522

…SD-2522)

- extractDocument() now uses doc.extract() instead of 8 separate SDK calls
- Citation navigation uses scrollToElement(targetId) instead of text search + retry timeouts
- Removes nodeText() and targetBlockId() helpers, hardcoded limits, regex cleanup
- Net deletion of 82 lines
@linear
Copy link
Copy Markdown

linear bot commented Apr 10, 2026

extract() and scrollToElement() are now in the published packages.
@caio-pizzol caio-pizzol force-pushed the caio/sd-2522-rag-demo-replace-text-search-navigation-with-navigateto branch from 32af930 to 440af7e Compare April 10, 2026 22:57
@caio-pizzol caio-pizzol merged commit 87bfb0c into main Apr 10, 2026
1 check passed
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