Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Adds a new Assets Library page at /app/assets for marketers to manage images, videos, and other files in Supabase storage. This is a web-based file navigator with CRUD operations.

Features implemented:

  • File listing with folder navigation and breadcrumbs
  • Single/multiple file upload and folder upload
  • Multi-select with bulk delete
  • Copy public URL functionality
  • Folder creation
  • Context menu for file actions

Database changes:

  • New Supabase migration creates assets bucket (public) with RLS policies scoped to user ID folders

Review & Testing Checklist for Human

  • Test file upload - Upload single files, multiple files, and folders. Verify files appear in the correct user folder in Supabase storage
  • Verify RLS policies - Confirm users can only see/modify their own files, and that public URLs work for anonymous access
  • Test folder upload - The webkitdirectory attribute is non-standard; verify it works in Chrome/Edge (may not work in Firefox/Safari)
  • Test copy public URL - Click context menu → Copy Public URL, paste and verify the URL is accessible
  • Test bulk delete - Select multiple files and delete; verify they're removed from storage

Recommended test plan:

  1. Navigate to /app/assets while logged in
  2. Create a folder, upload some test images
  3. Navigate into the folder, upload more files
  4. Multi-select files and delete them
  5. Copy a public URL and verify it loads in an incognito window

Notes

  • The bucket is set to public = true - all uploaded files will be publicly accessible via URL. Confirm this is the desired behavior for marketing assets.
  • No toast notifications for success/error states - users rely on visual feedback (loading states, list updates)
  • File size display depends on Supabase returning metadata; may show "-" if metadata is unavailable

Link to Devin run: https://app.devin.ai/sessions/55d4032bd5d34421976e5264fcea8191
Requested by: [email protected] (@ComputelessComputer)

- Add new route at /app/assets for authenticated users
- Implement file navigator with folder navigation and breadcrumbs
- Support single/multiple file upload and folder upload
- Add multi-select functionality for bulk delete
- Implement copy public URL feature
- Add folder creation capability
- Create Supabase migration for assets storage bucket with RLS policies

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 6997e4b
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6957a2fbeccf1000083513f9
😎 Deploy Preview https://deploy-preview-2738--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 6997e4b
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6957a2fb681ca50008a512df

@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for howto-fix-macos-audio-selection canceled.

Name Link
🔨 Latest commit 6997e4b
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/6957a2fbe25a300008209acd

@yujonglee yujonglee closed this Jan 2, 2026
@yujonglee yujonglee deleted the devin/1767350784-assets-library branch January 2, 2026 10:51
Comment on lines +114 to +121
for (const item of data || []) {
if (item.id === null && !seenFolders.has(item.name)) {
seenFolders.add(item.name);
items.push({ name: item.name, isFolder: true });
} else if (item.id !== null) {
items.push({ ...item, isFolder: false });
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The folder detection logic filters items where id === null as folders. However, the .keep files created by createFolderMutation (line 178) will have a non-null id and will appear as regular files in the listing. This means users will see .keep placeholder files in their folder view, which breaks the folder abstraction.

// Filter out .keep files from the display
for (const item of data || []) {
  if (item.name === '.keep') continue; // Skip .keep files
  if (item.id === null && !seenFolders.has(item.name)) {
    // ... folder handling
  }
}
Suggested change
for (const item of data || []) {
if (item.id === null && !seenFolders.has(item.name)) {
seenFolders.add(item.name);
items.push({ name: item.name, isFolder: true });
} else if (item.id !== null) {
items.push({ ...item, isFolder: false });
}
}
for (const item of data || []) {
if (item.name === '.keep') continue; // Skip .keep files
if (item.id === null && !seenFolders.has(item.name)) {
seenFolders.add(item.name);
items.push({ name: item.name, isFolder: true });
} else if (item.id !== null) {
items.push({ ...item, isFolder: false });
}
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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