Skip to content

implement Nova chat attachments on the web side #1004

Merged
graphite-app[bot] merged 1 commit into
mainfrom
ishaan/attach
Jun 8, 2026
Merged

implement Nova chat attachments on the web side #1004
graphite-app[bot] merged 1 commit into
mainfrom
ishaan/attach

Conversation

@ishaanxgupta

@ishaanxgupta ishaanxgupta commented May 25, 2026

Copy link
Copy Markdown
Contributor
  • Added attachment draft/shared types and validation in components/chat/attachments.ts.
  • Added paperclip upload UI to Nova composer with file chips, size/status, remove, retry, and per-file Save / Chat only toggle.
  • Wired uploads before send to /chat/attachments, then sends returned attachment references in chat message metadata.
  • Preserved attachment metadata when loading threads and rendered attachment chips on user messages.
  • Added attachment support from the home composer into the full chat view.
  • Extended chat analytics with attachment counts.
image image
  • ensured responsiveness

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 25, 2026

Copy link
Copy Markdown

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 7095548 Jun 08 2026, 06:20 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 25, 2026

Copy link
Copy Markdown

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 7095548 Commit Preview URL

Branch Preview URL
Jun 08 2026, 06:21 AM

@ishaanxgupta ishaanxgupta marked this pull request as ready for review May 26, 2026 16:50
@graphite-app graphite-app Bot requested a review from Dhravya May 26, 2026 16:50
@claude

claude Bot commented May 26, 2026

Copy link
Copy Markdown

Claude finished @MaheshtheDev's task in 2m 21s —— View job


Reviewing PR #1004: Nova chat attachments

  • Fetch PR diff and existing review comments
  • Analyze changed files for bugs, security issues, and logic errors
  • Read surrounding code for boundary issues
  • Submit review with findings

Review submitted. No bugs, security issues, or logic errors found. This is a solid implementation with proper error handling, memory management, and XSS prevention. Score: 9/10.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Implements chat attachment functionality with file uploads, draft state management, save-to-memory toggle, and attachment rendering in messages.

Issues found: None — this looks good to ship.

The implementation is solid:

  • File validation checks size (50MB limit) and type before accepting
  • Each attachment draft tracks its own upload state (queued → uploading → uploaded/error), enabling granular retry
  • uploadAttachmentDraft correctly skips already-uploaded drafts on retry
  • State is only cleared on full success (both uploads and sendMessage complete)
  • Error handling preserves draft state so users can retry or remove individual failures
  • React's automatic text escaping prevents XSS in filename rendering
  • The canSend logic correctly blocks sending when uploads are in progress or have errors

Score: 9/10

Minor observations (not blocking):

  • Attachments upload sequentially rather than in parallel — likely intentional for server load control
  • handleRetryAttachment captures currentChatId at callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Implements chat attachment functionality with file uploads, draft state management, save-to-memory toggle, and attachment rendering in messages.

Issues found: None — this looks good to ship.

The implementation is solid:

  • File validation checks size (50MB limit) and type before accepting
  • Each attachment draft tracks its own upload state (queued → uploading → uploaded/error), enabling granular retry
  • uploadAttachmentDraft correctly skips already-uploaded drafts on retry
  • State is only cleared on full success (both uploads and sendMessage complete)
  • Error handling preserves draft state so users can retry or remove individual failures
  • React's automatic text escaping prevents XSS in filename rendering
  • The canSend logic correctly blocks sending when uploads are in progress or have errors
  • Object URLs are properly cleaned up in useEffect return to prevent memory leaks

Score: 9/10

Minor observations (not blocking):

  • Attachments upload sequentially rather than in parallel — likely intentional for server load control
  • handleRetryAttachment captures currentChatId at callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Implements chat attachment functionality with file uploads, draft state management, save-to-memory toggle, and attachment rendering in messages.

Issues found: None — this looks good to ship.

The implementation is solid:

  • File validation checks size (50MB limit) and type before accepting
  • Each attachment draft tracks its own upload state (queued → uploading → uploaded/error), enabling granular retry
  • uploadAttachmentDraft correctly skips already-uploaded drafts on retry
  • State is only cleared on full success (both uploads and sendMessage complete)
  • Error handling preserves draft state so users can retry or remove individual failures
  • React's automatic text escaping prevents XSS in filename rendering
  • The canSend logic correctly blocks sending when uploads are in progress or have errors
  • Object URLs are properly cleaned up in useEffect return to prevent memory leaks

Score: 9/10

Minor observations (not blocking):

  • Attachments upload sequentially rather than in parallel — likely intentional for server load control
  • handleRetryAttachment captures currentChatId at callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.

@ved015 ved015 changed the title implement Nova chat attachments on the web side [DON'T MERGE] implement Nova chat attachments on the web side [DON'T MERGE] May 28, 2026
@ishaanxgupta ishaanxgupta changed the title [DON'T MERGE] implement Nova chat attachments on the web side [DON'T MERGE] implement Nova chat attachments on the web side Jun 1, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Implements chat attachment functionality with file uploads, draft state management, save-to-memory toggle, and attachment rendering in messages.

Issues found: None — this looks good to ship.

The implementation is solid:

  • File validation checks size (50MB limit) and type before accepting
  • Each attachment draft tracks its own upload state (queued → uploading → uploaded/error), enabling granular retry
  • uploadAttachmentDraft correctly skips already-uploaded drafts on retry
  • State is only cleared on full success (both uploads and sendMessage complete)
  • Error handling preserves draft state so users can retry or remove individual failures
  • React's automatic text escaping prevents XSS in filename rendering
  • The canSend logic correctly blocks sending when uploads are in progress or have errors
  • Object URLs are properly cleaned up in useEffect return to prevent memory leaks
  • Inflight upload tracking via uploadPromisesRef prevents duplicate upload requests
  • Abort controllers are properly cleaned up when attachments are removed
  • Discarded draft tracking ensures uploads that complete after removal are cleaned up server-side

Score: 9/10

Minor observations (not blocking):

  • Attachments upload sequentially rather than in parallel — likely intentional for server load control
  • handleRetryAttachment captures currentChatId at callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Implements chat attachment functionality with file uploads, draft state management, save-to-memory toggle, and attachment rendering in messages.

Issues found: None — this looks good to ship.

The implementation is solid:

  • File validation checks size (50MB limit) and type before accepting
  • Each attachment draft tracks its own upload state (queued → uploading → uploaded/error), enabling granular retry
  • uploadAttachmentDraft correctly skips already-uploaded drafts on retry
  • State is only cleared on full success (both uploads and sendMessage complete)
  • Error handling preserves draft state so users can retry or remove individual failures
  • React's automatic text escaping prevents XSS in filename rendering
  • The canSend logic correctly blocks sending when uploads are in progress or have errors
  • Object URLs are properly cleaned up in useEffect return to prevent memory leaks
  • Inflight upload tracking via uploadPromisesRef prevents duplicate upload requests
  • Abort controllers are properly cleaned up when attachments are removed
  • Discarded draft tracking ensures uploads that complete after removal are cleaned up server-side

Score: 9/10

Minor observations (not blocking):

  • Attachments upload sequentially rather than in parallel — likely intentional for server load control
  • handleRetryAttachment captures currentChatId at callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Implements chat attachment functionality with file uploads, draft state management, save-to-memory toggle, and attachment rendering in messages.

Issues found: None — this looks good to ship.

The implementation is solid:

  • File validation checks size (50MB limit) and type before accepting
  • Each attachment draft tracks its own upload state (queued → uploading → uploaded/error), enabling granular retry
  • uploadAttachmentDraft correctly skips already-uploaded drafts on retry
  • State is only cleared on full success (both uploads and sendMessage complete)
  • Error handling preserves draft state so users can retry or remove individual failures
  • React's automatic text escaping prevents XSS in filename rendering
  • The canSend logic correctly blocks sending when uploads are in progress or have errors
  • Object URLs are properly cleaned up in useEffect return to prevent memory leaks
  • Inflight upload tracking via uploadPromisesRef prevents duplicate upload requests
  • Abort controllers are properly cleaned up when attachments are removed
  • Discarded draft tracking ensures uploads that complete after removal are cleaned up server-side

Score: 9/10

Minor observations (not blocking):

  • Attachments upload sequentially rather than in parallel — likely intentional for server load control
  • handleRetryAttachment captures currentChatId at callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.

MaheshtheDev added a commit that referenced this pull request Jun 8, 2026
Stacked on the Nova chat attachments PR (#1004): adds Grok 4.3 (default), reworks the composer toolbar + web-source citations, and overhauls the mobile chat experience (sticky nav, pinned composer, back button). Plus a11y, delete-toast, and markdown fixes.

Copy link
Copy Markdown
Member

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.

@graphite-app

graphite-app Bot commented Jun 8, 2026

Copy link
Copy Markdown

Merge activity

- Added attachment draft/shared types and validation in components/chat/attachments.ts.
- Added paperclip upload UI to Nova composer with file chips, size/status, remove, retry, and per-file Save / Chat only toggle.
- Wired uploads before send to /chat/attachments, then sends returned attachment references in chat message metadata.
- Preserved attachment metadata when loading threads and rendered attachment chips on user messages.
- Added attachment support from the home composer into the full chat view.
- Extended chat analytics with attachment counts.

<img width="1905" height="900" alt="image" src="https://github.com/user-attachments/assets/631001b8-7c68-4015-b36b-06c69cdad271" />
<img width="1323" height="1600" alt="image" src="https://github.com/user-attachments/assets/77eee08a-b235-41eb-b03a-f406b81b46e7" />

- ensured responsiveness
@graphite-app graphite-app Bot merged commit 7095548 into main Jun 8, 2026
6 of 8 checks passed
graphite-app Bot pushed a commit that referenced this pull request Jun 8, 2026
Stacked on the Nova chat attachments PR (#1004): adds Grok 4.3 (default), reworks the composer toolbar + web-source citations, and overhauls the mobile chat experience (sticky nav, pinned composer, back button). Plus a11y, delete-toast, and markdown fixes.
graphite-app Bot pushed a commit that referenced this pull request Jun 8, 2026
Stacked on the Nova chat attachments PR (#1004): adds Grok 4.3 (default), reworks the composer toolbar + web-source citations, and overhauls the mobile chat experience (sticky nav, pinned composer, back button). Plus a11y, delete-toast, and markdown fixes.
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.

2 participants