Skip to content

feat(frontend): AI suggestion history in app state#156

Open
briwitched wants to merge 5 commits into
AcademySoftwareFoundation:mainfrom
briwitched:history_navigation
Open

feat(frontend): AI suggestion history in app state#156
briwitched wants to merge 5 commits into
AcademySoftwareFoundation:mainfrom
briwitched:history_navigation

Conversation

@briwitched
Copy link
Copy Markdown

Summary

Store generated note text per SG versionId in React state only; remove AISuggestionManager and related types from @dna/core.

Call generateNote from useAISuggestion with debounced transcript regeneration. Keep Assistant version navigation; expose prompt/context for Prompt Debug only when viewing the newest note.

Restore localStorage/sessionStorage polyfill in Vitest setup for ThemeModeProvider.

Testing

  • I have tested these changes locally
  • I have run all relevant automated tests
  • I have verified this does not break existing workflows
  • For changes that can be tested in UI, I have included screenshots or gif animations of the changes.

How I Tested

npm run test-ci

  1. Opened localhost:5173
  2. Opened test playlist
  3. Selected mk020_0210
  4. Scrolled down to AI Assistant
  5. Generated a few notes.

Navigation between the notes of that session is shown below. When at max/min, the corresponding chevron is greyed out.

history_navigation history_nav_3

Store generated note text per SG versionId in React state only; remove AISuggestionManager and related types from @dna/core.

Call generateNote from useAISuggestion with debounced transcript regeneration. Keep Assistant version navigation; expose prompt/context for Prompt Debug only when viewing the newest note.

Restore localStorage/sessionStorage polyfill in Vitest setup for ThemeModeProvider.

Signed-off-by: Briana Johnson <brianajohnsxn@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 14, 2026

CLA Not Signed

@jspada200 jspada200 self-requested a review May 14, 2026 22:03
briwitched and others added 2 commits May 14, 2026 15:56
Re-export AISuggestionManager from core with shared app singleton beside
apiHandler for pipeline consumers. Delegate generation and debounced
transcript regeneration to the manager while keeping per-version suggestion
history in the hook.

Signed-off-by: Briana Johnson <brianajohnsxn@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the prior hook layout (notesByVersionId, runGenerate, regenerate).
Delegate generate and transcript debounce to aiSuggestionManager; subscribe
once to mirror loading, errors, and history updates when scheduled runs finish.

Signed-off-by: Briana Johnson <brianajohnsxn@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@briwitched
Copy link
Copy Markdown
Author

Note: the pink box is just to highlight the change, it is NOT visible in the interface!

@jspada200
Copy link
Copy Markdown
Collaborator

Dropping note here but talked in person!

We should not remove the module from the core. It should contain the fetch logic in core then store in the state hook in the app package.

AISuggestionManager now only orchestrates generate-note calls and
tracks loading/error. useAISuggestion stores note snapshots and
history navigation in React state.

Signed-off-by: Briana Johnson <brianajohnsxn@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants