Skip to content

Add file attachments to messages#3

Open
andreastande wants to merge 10 commits intomainfrom
feat/attachments
Open

Add file attachments to messages#3
andreastande wants to merge 10 commits intomainfrom
feat/attachments

Conversation

@andreastande
Copy link
Owner

No description provided.

@vercel
Copy link

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
a7-chat-v3 Ready Ready Preview, Comment Feb 10, 2026 0:39am

@andreastande
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbe6a1f0c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +141 to +143
const signedUrl = await signCanonicalAttachmentUrl(part.url, userId)
if (!signedUrl) return part

Choose a reason for hiding this comment

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

P2 Badge Reject unsignable attachments before calling the model

If signCanonicalAttachmentUrl fails, this branch keeps the original supabase://... URL in the outgoing message part and still proceeds to convertToModelMessages; providers generally need fetchable HTTP/data URLs for file parts, so a transient signing/storage failure can turn a valid user message into a model-call failure (or silently dropped attachment). The request should fail fast (or drop the file part explicitly) instead of forwarding an unusable canonical URI.

Useful? React with 👍 / 👎.

src/dal/chat.ts Outdated
Comment on lines +36 to +38
if (error || !data) {
console.error("Failed to batch sign attachment URLs", error)
return messages

Choose a reason for hiding this comment

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

P2 Badge Do not return canonical URLs when batch signing fails

When batch signing fails, this returns messages with raw canonical supabase://... attachment URLs unchanged; those URLs are not directly consumable by the browser or model providers, so any temporary Supabase signing outage can break attachment rendering and poison the model context for that request. It is safer to fail the chat load/send path or strip file parts than to propagate unusable canonical URIs.

Useful? React with 👍 / 👎.

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