Skip to content

implement Nova chat attachments on the web side#1004

Open
ishaanxgupta wants to merge 2 commits into
mainfrom
ishaan/attach
Open

implement Nova chat attachments on the web side#1004
ishaanxgupta wants to merge 2 commits into
mainfrom
ishaan/attach

Conversation

@ishaanxgupta
Copy link
Copy Markdown
Contributor

@ishaanxgupta ishaanxgupta commented May 25, 2026

  • 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 image

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

cloudflare-workers-and-pages Bot commented May 25, 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 ece0498 May 25 2026, 04:55 PM

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

cloudflare-workers-and-pages Bot commented May 25, 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 ece0498 Commit Preview URL

Branch Preview URL
May 25 2026, 04:56 PM

Remove unused useEffect dependencies (fallbackChatId, threadId) and apply
Biome formatting to chat attachment files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@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
Copy link
Copy Markdown

claude Bot commented May 26, 2026

Claude finished @ishaanxgupta's task in 2m 10s —— View job


Code Review Complete

  • Fetching PR diff
  • Analyzing changed files for bugs and security issues
  • Reading surrounding code for context
  • Posting review findings

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.

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: 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.

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