Skip to content

fix(web): render full document content in viewer#1056

Merged
ishaanxgupta merged 2 commits into
mainfrom
mahesh/fix-doc-viewer-full-content
Jun 6, 2026
Merged

fix(web): render full document content in viewer#1056
ishaanxgupta merged 2 commits into
mainfrom
mahesh/fix-doc-viewer-full-content

Conversation

@MaheshtheDev
Copy link
Copy Markdown
Member

@MaheshtheDev MaheshtheDev commented Jun 6, 2026

The memories list endpoint caps content at 2000 chars; the document modal rendered straight from that list cache, so long Claude Code
sessions (and any doc over the cap) were truncated mid-transcript.
Fetch the full document by id when the modal opens and use it for parsing, the editor, and content rendering.

Also closes a latent data-loss path where the editor initialized from truncated content, so a save could overwrite the stored document.

The memories list endpoint caps content at 2000 chars; the document
modal rendered straight from that list cache, so long Claude Code
sessions (and any doc over the cap) were truncated mid-transcript.
Fetch the full document by id when the modal opens and use it for
parsing, the editor, and content rendering.

Also closes a latent data-loss path where the editor initialized from
truncated content, so a save could overwrite the stored document.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 6, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 9e30bfa Commit Preview URL

Branch Preview URL
Jun 06 2026, 08:39 AM

Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MaheshtheDev MaheshtheDev marked this pull request as ready for review June 6, 2026 00:34
@graphite-app graphite-app Bot requested a review from Dhravya June 6, 2026 00:34
@claude
Copy link
Copy Markdown

claude Bot commented Jun 6, 2026

Claude finished @ved015's task in 1m 38s —— View job


Review Complete

  • Load review tools
  • Get PR diff and review comments
  • Analyze changes for bugs, security issues, and logic errors
  • Submit review

Summary: Reviewed the changes for the full document content fix. No bugs, security issues, or logic errors found. The implementation correctly fetches full document content when the modal opens, with proper cache management and error handling. Submitted review with score 9/10.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 6, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp 9e30bfa Jun 06 2026, 08:38 AM

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Fetches full document content when the modal opens to prevent truncated data from being displayed or saved.

Issues found: None — this looks good to ship.

The implementation is clean:

  • useFullDocumentContent hook correctly skips temporary documents and handles errors gracefully
  • effectiveDocument only overrides when full content is actually available (fullContent !== null)
  • The 5-minute stale time provides good caching for repeated modal opens
  • The existing useEffect syncs the editor when initialEditorString changes, ensuring the full content propagates correctly

Score: 9/10

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Fetches full document content when the modal opens to prevent truncated data from being displayed or saved.

Issues found: None — this looks good to ship.

The implementation is clean:

  • useFullDocumentContent hook correctly skips temporary documents and handles errors gracefully
  • effectiveDocument only overrides when full content is actually available (fullContent !== null)
  • The 5-minute stale time provides good caching for repeated modal opens
  • Query keys match between use-full-document.ts and use-document-mutations.ts, ensuring cache consistency on save/delete
  • The useEffect at line 234-238 properly syncs the editor when initialEditorString changes, ensuring the full content propagates correctly
  • Cache invalidation on both single and bulk delete mutations prevents stale data

Score: 9/10

@ishaanxgupta ishaanxgupta merged commit 2b60568 into main Jun 6, 2026
11 checks 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.

3 participants