Skip to content

feat: wire up selected_template_id as default enhance template#4124

Merged
yujonglee merged 3 commits intofastrepl:mainfrom
quintusman:feat/default-template-setting
Feb 21, 2026
Merged

feat: wire up selected_template_id as default enhance template#4124
yujonglee merged 3 commits intofastrepl:mainfrom
quintusman:feat/default-template-setting

Conversation

@quintusman
Copy link
Contributor

@quintusman quintusman commented Feb 20, 2026

Summary

  • The selected_template_id field already exists in ConfigGeneral (Rust backend) but was never read by the desktop frontend
  • This PR wires it up so that when no explicit template is selected for a session, the global default from settings is used
  • All callers explicitly pass templateId through enhance task args — no hidden fallbacks in the transform layer

Changes

  • settings.ts: Add selected_template_id to the TinyBase settings store mapping (path: general.selected_template_id)
  • useEnhancedNotes.ts: Pass selected_template_id when creating the default summary note
  • autoEnhance/runner.ts: Read selected_template_id from settings; pass it when creating note and in enhance task args
  • options-menu.tsx: Read selected_template_id from settings; pass it when creating note and in enhance task args (file upload → enhance flow)
  • enhance-error.tsx: Read template_id from the enhanced note for retry, so retries preserve the original template
  • header.tsx (useEnhanceLogic): Read template_id from the enhanced note; use as fallback when regenerating

How to use

Users can set selected_template_id in their settings (via the settings panel or by editing settings.json):

{
  "general": {
    "selected_template_id": "<template-uuid>"
  }
}

All new summaries will then use that template's sections instead of the generic AI-chosen structure.

Review & Testing Checklist for Human

This is a medium-risk change — multiple call sites modified, no automated tests, and behavior depends on runtime store state.

  • Set selected_template_id in settings to a valid template UUID, record a meeting, and verify auto-enhance uses the selected template's sections
  • Open a session with an existing transcript (but no enhanced notes) and verify the default summary uses the template
  • Verify that manually selecting a different template via "Create other format" still overrides the default
  • Verify regenerate (refresh icon on an enhanced tab) preserves the note's original template, not the current global default
  • Verify retry after an enhance error preserves the note's template
  • Verify that with no selected_template_id set, behavior is unchanged (generic summary)

Notes

  • All enhance callers now explicitly pass templateId — no hidden fallbacks in enhance-transform.ts
  • Inner tabs will show the template's title (e.g. "Sales Call") instead of hardcoded "Summary" when a template is used
  • Refactored after initial review to make template passing explicit rather than relying on settings fallback

Link to Devin run: https://app.devin.ai/sessions/dfab59b71c694f109b50adaa73ab8895
Requested by: @yujonglee

The `selected_template_id` field exists in ConfigGeneral but was never
read by the frontend. This wires it up so users can set a default
template that applies to all new summaries without manual selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit b39da77
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/699934c38900220008ed5779
😎 Deploy Preview https://deploy-preview-4124--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.

@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit b39da77
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/699934c3fb882a0008f18a4a
😎 Deploy Preview https://deploy-preview-4124--hyprnote-storybook.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.

devin-ai-integration bot and others added 2 commits February 21, 2026 04:19
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@yujonglee yujonglee merged commit 9d8266a into fastrepl:main Feb 21, 2026
13 checks passed
@yujonglee
Copy link
Contributor

@quintusman thank you for help!

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