Skip to content

feat: CJK word count, pipeline timing, history modal, auto-mute, auto-dictionary#1

Merged
WEIFENG2333 merged 2 commits intomainfrom
feat/v1.3-enhancements
Feb 28, 2026
Merged

feat: CJK word count, pipeline timing, history modal, auto-mute, auto-dictionary#1
WEIFENG2333 merged 2 commits intomainfrom
feat/v1.3-enhancements

Conversation

@WEIFENG2333
Copy link
Owner

Summary

  • Universal word count: New countWords() utility supporting mixed CJK + Latin text (CJK characters count individually, Latin words by whitespace)
  • Pipeline timing: STT and LLM call durations recorded and displayed in history detail view with colored badges
  • History detail modal: Redesigned from full-page navigation to modal overlay popup with backdrop blur
  • Auto-mute: System audio auto-muted during recording (macOS osascript, Linux pactl), with state restore
  • Auto-dictionary learning: Proper nouns, brand names, and technical terms auto-extracted from transcriptions and added to personal dictionary
  • OCR prompt redesign: Structured extraction (APP, TASK, KEY TERMS, TEXT CONTEXT) instead of freeform description
  • Settings UI: New toggles for auto-mute (Audio) and auto-learn dictionary (Context)
  • i18n: All new strings translated in both en/zh
  • CLAUDE.md: Comprehensive rewrite with synchronization checklists, naming conventions, and common pitfalls

Changed files (20 files, +1463/-374)

  • src/utils/wordCount.ts — New CJK-aware word counting utility
  • electron/main.ts — Auto-mute, auto-dictionary extraction, pipeline timing
  • electron/llm-service.ts — Redesigned OCR prompt
  • electron/preload.ts — New onDictionaryAutoAdded event
  • electron/config-store.ts — New config defaults
  • src/types/config.ts — Added timing, auto-learn fields to types
  • src/types/electron.d.ts — Updated PipelineResult + new event type
  • src/services/pipeline.ts — Pass through timing + auto-learned terms
  • src/hooks/useRecorder.ts — Use countWords, save timing to history
  • src/pages/HistoryPage.tsx — Modal overlay + timing display + auto-learned terms
  • src/pages/settings/AudioSettings.tsx — Auto-mute toggle
  • src/pages/settings/ContextSettings.tsx — Auto-learn dictionary toggle
  • src/i18n/locales/{en,zh}.json — New translation keys

Test plan

  • Verify CJK word counting: "你好 world" should count as 4 (2 CJK + 1 Latin + "world")
  • Verify pipeline timing shows in history detail modal (STT/LLM duration badges)
  • Verify history detail opens as modal overlay, closes on backdrop click or X
  • Verify auto-mute toggle in Audio settings persists
  • Verify auto-learn toggle in Context settings persists
  • Verify typecheck and build pass (confirmed locally)

🤖 Generated with Claude Code

Liang Weifeng and others added 2 commits February 27, 2026 18:52
…-dictionary

- Add universal word count utility supporting mixed CJK + Latin text
- Record STT/LLM call durations and display in history detail view
- Redesign history detail as modal overlay instead of full-page navigation
- Add auto-mute system audio during recording (macOS/Linux)
- Add auto-dictionary learning from transcription output
- Redesign OCR prompt to extract structured context (key terms, app, task)
- Add auto-mute toggle in Audio settings
- Add auto-learn dictionary toggle in Context settings
- Update i18n translations (en/zh) for new features
- Comprehensive CLAUDE.md rewrite with conventions and pitfalls

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Capture 6 new macOS AX attributes: AXRoleDescription, AXDescription/
  AXTitle, AXPlaceholderValue, AXSelectedTextRange, AXNumberOfCharacters,
  AXInsertionPointLineNumber
- Show cursor position to LLM with "|" marker in field text
- Show selected text with [SELECTED: ...] marker for replacement context
- Add cursor-centered truncation for long field text (keeps context around cursor)
- Include field placeholder and label in LLM prompt for input purpose hints
- Enhance Windows UI Automation: capture Element.Name, HelpText, caret position
- Display new metadata in history detail: role description, field label,
  placeholder, cursor position, selection range
- Update all type declarations and i18n translations

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@WEIFENG2333 WEIFENG2333 merged commit 14eba6c into main Feb 28, 2026
1 check passed
@WEIFENG2333 WEIFENG2333 deleted the feat/v1.3-enhancements branch February 28, 2026 02:32
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