feat: wire up note deletion in analysis page#62
Open
zzzhizhia wants to merge 1 commit intoSamuelZ12:mainfrom
Open
feat: wire up note deletion in analysis page#62zzzhizhia wants to merge 1 commit intoSamuelZ12:mainfrom
zzzhizhia wants to merge 1 commit intoSamuelZ12:mainfrom
Conversation
The delete API, client function, and UI button already existed but were never connected. Add handleDeleteNote callback in the analysis page and thread onDeleteNote prop through RightColumnTabs to NotesPanel so the hover trash icon actually works.
|
@zzzhizhia is attempting to deploy a commit to the samuelz12's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This PR wires the existing note deletion capability into the Analyze page UI by threading a deletion callback down to the notes list component and updating local note state when a delete succeeds.
Changes:
- Import and use
deleteNotein the Analyze page via a newhandleDeleteNotecallback (API call, state update, toasts). - Add
onDeleteNotetoRightColumnTabsprops and forward it toNotesPanel.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
app/analyze/[videoId]/page.tsx |
Adds a delete-note handler that calls the notes API, removes the deleted note from React state, and shows success/error toasts. |
components/right-column-tabs.tsx |
Extends props with onDeleteNote and forwards the callback to NotesPanel so the trash icon can trigger deletion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
handleDeleteNotecallback in the analysis page that calls the API, removes the note from state, and shows a toastonDeleteNoteprop throughRightColumnTabstoNotesPanelso the hover trash icon worksChanges
app/analyze/[videoId]/page.tsx: ImportdeleteNote, add handler, pass propcomponents/right-column-tabs.tsx: AddonDeleteNoteto props interface and forward toNotesPanelTest plan