implement Nova chat attachments on the web side #1004
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | 5aad18e | Jun 06 2026, 01:15 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | 5aad18e | Commit Preview URL Branch Preview URL |
Jun 06 2026, 01:16 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>
|
Claude finished @ishaanxgupta's task in 1m 48s —— View job Review Complete
Result: No issues found — this PR looks good to ship. The attachment implementation handles file validation, upload state management, error recovery, and cleanup correctly. See the full review comment for details. |
There was a problem hiding this comment.
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
uploadAttachmentDraftcorrectly 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
canSendlogic 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
handleRetryAttachmentcapturescurrentChatIdat callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.
There was a problem hiding this comment.
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
uploadAttachmentDraftcorrectly 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
canSendlogic correctly blocks sending when uploads are in progress or have errors - Object URLs are properly cleaned up in
useEffectreturn to prevent memory leaks
Score: 9/10
Minor observations (not blocking):
- Attachments upload sequentially rather than in parallel — likely intentional for server load control
handleRetryAttachmentcapturescurrentChatIdat callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.
There was a problem hiding this comment.
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
uploadAttachmentDraftcorrectly 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
canSendlogic correctly blocks sending when uploads are in progress or have errors - Object URLs are properly cleaned up in
useEffectreturn to prevent memory leaks
Score: 9/10
Minor observations (not blocking):
- Attachments upload sequentially rather than in parallel — likely intentional for server load control
handleRetryAttachmentcapturescurrentChatIdat callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.
- Format Dialog import on single line - Remove redundant onClick from div (button inside already handles preview) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes formatting issues in user-message.tsx, index.tsx, and file-cache.ts. Removes unused useCallback import from pdf.tsx. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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
uploadAttachmentDraftcorrectly 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
canSendlogic correctly blocks sending when uploads are in progress or have errors - Object URLs are properly cleaned up in
useEffectreturn to prevent memory leaks - Inflight upload tracking via
uploadPromisesRefprevents 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
handleRetryAttachmentcapturescurrentChatIdat callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.
9646398 to
5aad18e
Compare
There was a problem hiding this comment.
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
uploadAttachmentDraftcorrectly 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
canSendlogic correctly blocks sending when uploads are in progress or have errors - Object URLs are properly cleaned up in
useEffectreturn to prevent memory leaks - Inflight upload tracking via
uploadPromisesRefprevents 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
handleRetryAttachmentcapturescurrentChatIdat callback creation time, so if a user switches threads before clicking retry, the attachment uploads to the new thread. Edge case, but worth noting.
Uh oh!
There was an error while loading. Please reload this page.