Skip to content

feat: wire up note deletion in analysis page#62

Open
zzzhizhia wants to merge 1 commit intoSamuelZ12:mainfrom
zzzhizhia:feature/note-delete
Open

feat: wire up note deletion in analysis page#62
zzzhizhia wants to merge 1 commit intoSamuelZ12:mainfrom
zzzhizhia:feature/note-delete

Conversation

@zzzhizhia
Copy link

Summary

  • Connect the existing note deletion backend (API route, client function, DB layer) to the frontend UI
  • Add handleDeleteNote callback in the analysis page that calls the API, removes the note from state, and shows a toast
  • Thread onDeleteNote prop through RightColumnTabs to NotesPanel so the hover trash icon works

Changes

  • app/analyze/[videoId]/page.tsx: Import deleteNote, add handler, pass prop
  • components/right-column-tabs.tsx: Add onDeleteNote to props interface and forward to NotesPanel

Test plan

  • Navigate to a video with saved notes
  • Hover over a note card — trash icon should appear
  • Click trash icon — note should be deleted and removed from the list
  • Verify toast notification shows "Note deleted"
  • Verify error toast shows if deletion fails (e.g. network error)

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.
Copilot AI review requested due to automatic review settings March 3, 2026 09:45
@vercel
Copy link

vercel bot commented Mar 3, 2026

@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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 deleteNote in the Analyze page via a new handleDeleteNote callback (API call, state update, toasts).
  • Add onDeleteNote to RightColumnTabs props and forward it to NotesPanel.

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.

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.

2 participants