Add Recent Drafts section and Drafts library tab
Summary
Adds a "Recent Drafts" section below the home prompt box showing the 5 most recently AI-generated candidate assets, and introduces a new "Drafts" tab in the Library view to house all unsaved draft generations.
Problem
There was no quick way for users to revisit AI-generated assets that hadn't been saved yet. Unsaved draft generations were mixed in with other assets in the library with no dedicated view, making them hard to find.
Solution
A new list-draft-assets server action queries candidate-role assets across accessible libraries. A RecentDraftsSection component renders the 5 most recent drafts below the home prompt box with a "View all drafts" link pointing to the library's new Drafts tab. The library route gains a drafts tab type that filters assets by role === "generated" && status === "candidate", and the tab is pre-selected when navigating via the ?tab=drafts URL parameter.
Old UX
https://github.com/user-attachments/assets/705f67d9-314d-4439-a2e6-279ea4967af1
###Updated UX
https://github.com/user-attachments/assets/73a57290-c5e8-4271-a2d9-5aaa77b09316
Key Changes
actions/list-draft-assets.ts– New server action that fetches unsaved draft assets (role = "generated",status = "candidate") across accessible libraries, ordered newest first, with an optionallibraryIdfilter and configurablelimit.RecentDraftsSection.tsx– New React component that displays up to 5 recent drafts as a thumbnail grid with skeleton loading states, image/video thumbnail support, and a "View all drafts" button linking to/library?tab=drafts._index.tsx– Renders<RecentDraftsSection />below the prompt box on the home page.library.tsx– Adds adraftstab type andisDraftAssethelper; updatesassetMatchesTabso thegeneratedtab excludes drafts; reads the?tab=URL param on mount and syncs it to state; passesincludeCandidates: truewhen the drafts tab is active; adds the "Drafts"TabsTriggerto the UI; addsstatusfield to theAssettype.
To clone this PR locally use the Github CLI with command gh pr checkout 1219
You can tag me at @builderio for anything you want me to fix or change
Deploy Preview for agent-native-scheduling ready!
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-scheduling/deploys/6a43206ad8d7e400081ae986 |
| Deploy Preview | https://deploy-preview-1219--agent-native-scheduling.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for agent-native-meeting-notes ready!
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-meeting-notes/deploys/6a43206a43aae700077cd51f |
| Deploy Preview | https://deploy-preview-1219--agent-native-meeting-notes.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for nutritrack-daily-calories canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/nutritrack-daily-calories/deploys/6a43206acb915500086fc63f |
Here's a visual recap of what changed:
Open the full interactive recap
Large diff — this recap is a summarized view (top files + schema/API deltas).
Deploy Preview for agent-native-design ready!
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-design/deploys/6a43206a3c816c00086f4300 |
| Deploy Preview | https://deploy-preview-1219--agent-native-design.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for agent-native-brain ready!
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-brain/deploys/6a43206a5780fb0008562387 |
| Deploy Preview | https://deploy-preview-1219--agent-native-brain.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for agent-native-images ready!
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-images/deploys/6a43206a8835a10008f8b4a1 |
| Deploy Preview | https://deploy-preview-1219--agent-native-images.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for agent-native-calendar canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-calendar/deploys/6a43206ac3b9270008d80700 |
Deploy Preview for agent-native-mail canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-mail/deploys/6a43206a6c082e0008aa7ae0 |
Deploy Preview for agent-native-dispatch canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-dispatch/deploys/6a43206ab46103000703a0e7 |
Deploy Preview for agent-native-forms canceled.
| Name | Link |
|---|---|
| Latest commit | aaa1a6dc5453d75079bcfefc0ad6f8b8c990e52a |
| Latest deploy log | https://app.netlify.com/projects/agent-native-forms/deploys/6a3ad6a71ac24400081e23bd |
Deploy Preview for agent-native-content canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-content/deploys/6a43206a71df8900086577e3 |
Deploy Preview for agent-native-slides canceled.
| Name | Link |
|---|---|
| Latest commit | 9fe7a1505745ea52772fbc8e377eb0ea6cb756aa |
| Latest deploy log | https://app.netlify.com/projects/agent-native-slides/deploys/6a3505f15f5ac700084b47b5 |
Deploy Preview for agent-native-videos canceled.
| Name | Link |
|---|---|
| Latest commit | 9fe7a1505745ea52772fbc8e377eb0ea6cb756aa |
| Latest deploy log | https://app.netlify.com/projects/agent-native-videos/deploys/6a3505f12d5f7100088083d4 |
Deploy Preview for agent-native-macros canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-macros/deploys/6a43206ad0a4de0008bc5a5e |
Deploy Preview for agent-native-starter canceled.
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-starter/deploys/6a43206a6c082e0008aa7ae4 |
Deploy Preview for agent-native-voice ready!
| Name | Link |
|---|---|
| Latest commit | 45a5f9c8ec3868311da264262e308a0fc2595c4e |
| Latest deploy log | https://app.netlify.com/projects/agent-native-voice/deploys/6a43206abb14230008762e44 |
| Deploy Preview | https://deploy-preview-1219--agent-native-voice.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
| Make changes | Run an agent on this branch |
To edit notification comments on pull requests, go to your Netlify project configuration.
@builderio-bot look at latest PR feedback and fix anything you agree with. Be skeptical. Reply to every comment if you fixed it or not and why.
There was a problem with your request, please try again later. Error id: 13e28aa54d104e79ab012671e19434a6
@builderio-bot look at latest PR feedback and fix anything you agree with. Be skeptical. Reply to every comment if you fixed it or not and why.