Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 23, 2025

Implement Note History System for Meeting Context Tracking

Summary

This PR implements a note history system that tracks when users write notes relative to meeting transcripts. The system captures note changes with timestamps and categorizes them into three temporal buckets (before/during/after meeting) to provide better context to the AI when generating enhanced notes.

Key Changes:

  • Added note_history table to database schema with session_id, content, created_at_ms, and transcript_id fields
  • Implemented change detection in TinyBase to automatically capture note history when raw_md changes
  • Added temporal context processing that categorizes notes by when they were written relative to transcript timestamps
  • Updated AI prompt template to include temporal note history sections
  • Installed diff library to compute diffs between consecutive note snapshots

Review & Testing Checklist for Human

⚠️ CRITICAL - Database Migration Required:

  • Create a database migration for the note_history table - The schema was updated but no migration was created. Existing databases will not have this table and the app will fail when trying to write history entries.

High Priority:

  • Test note history capture end-to-end - Open a session, write notes before starting a recording, write notes during recording, and write notes after stopping. Then trigger AI enhancement and verify the temporal sections appear correctly in the prompt.
  • Verify temporal boundary logic - The code uses lastTranscriptStart as the end boundary for "during meeting", but it should probably use the last transcript's ended_at timestamp. Check if notes written after the last transcript starts but before it ends are categorized correctly.
  • Check diff output quality - The diff library compares line-by-line, but notes are stored as Tiptap JSON. Test if the diffs are meaningful or if they just show JSON structure changes. May need to convert to plain text before diffing.

Medium Priority:

  • Review change detection performance - Every raw_md change creates a history entry. Test if this creates too many entries during active typing. Consider adding debouncing or rate-limiting.
  • Verify transcript_id logic - The code loops through all transcripts to find one matching the session. Test with multiple transcripts to ensure it picks the right one (currently takes the last match).

Updates Since Last Revision

  • Fixed TypeScript type definition error by adding noteHistory field to TaskArgsMapTransformed['enhance'] interface (commit 4484125)

Notes

- Add note_history table to database schema with session_id, content, created_at_ms, and transcript_id fields
- Update TinyBase client-side schema to include note_history table
- Install diff library for text diffing between note snapshots
- Implement change detection in main.ts to capture note history when raw_md changes
- Add temporal context processing in enhance-transform.ts to categorize notes by beforeMeeting, duringMeeting, and afterMeeting
- Update AI prompt template to display temporal note history sections
- Update enhance-workflow.ts to pass note_history data to template
- Compute diffs between consecutive note snapshots to show what was added over time

Co-Authored-By: yujonglee <[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. Add '(aside)' to your comment to have me ignore it.
  • 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

@coderabbitai
Copy link

coderabbitai bot commented Nov 23, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1763865512-note-history-system

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Nov 23, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 4484125
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692275c48891f50008f97b6f
😎 Deploy Preview https://deploy-preview-1799--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.

Add noteHistory field to TaskArgsMapTransformed['enhance'] type definition to resolve TypeScript errors in CI

Co-Authored-By: yujonglee <[email protected]>
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