Commit graph

180 commits

Author SHA1 Message Date
Yun Chan
f95bc9cdeb refactor(core): delete dead IPC/TTS contract and rewire live payload types (WS-G2)
Wave 5 G2 — 채널·타입 SSOT 정리 (docs/REFACTOR_WAVE5_AUDIT.md W5-02/W5-03).

삭제한 죽은 채널 (값 문자열·`IPC_CHANNELS.X` 참조 모두 0, 빌드 산출물 제외 검증):
- TTS 블록 전체 (tts:speak/stop/getVoices/getActiveVoice/setVoice/getStatus/
  downloadVoice/statusChanged/speakingStateChanged) — preload·handler·렌더러 어디에도 없음
- WINDOW: showRecordingTip, showResultPopup, tipMeasured, tipPrepare, tipShow
- SYSTEM: requestMicPermission, showNotification, getActiveApp, insertText
- HISTORY: export · STATS: getDaily, getWeekly · RAG: queryResult
- SUPPORT: getTickets · POPUP_SUGGESTION: accepted

삭제한 죽은 타입 (참조 0): TTS 9종, ShowRecordingTipParams, ShowResultPopupParams,
TipMeasuredParams, TipPrepareEvent, TipShowEvent, ActiveAppInfo, ShowNotificationParams,
InsertTextParams, InsertTextResult, HistoryExportParams, StatsQueryParams, DailyStats,
WeeklyStats, RAGChunk, CreateSupportTicketParams, DiarizationResult,
MeetingGenerateDocResult (preload는 이미 MeetingDocument를 반환 — 낡은 래퍼).

재배선한 살아있는 계약 (드리프트 수정):
- PullModelParams: 실제 payload는 { modelId } 인데 SSOT는 { modelName } 이었다 →
  타입을 실제에 맞추고 llm-handlers + preload가 코어 타입을 쓰도록 복구
- OpenExternalParams: preload·window-handler 인라인 { url } → 코어 타입
- RecordingTipState/TipStateChangedEvent: WindowManager가 string을 받고 있었다 →
  유니온으로 좁히고 'done'(팝업 렌더러가 실제 사용)을 유니온에 포함

검증:
- npm run typecheck (desktop/web/admin/packages) GREEN
- npm run typecheck:mobile GREEN · lint --max-warnings=0 GREEN
- npm test GREEN (desktop 2800, core 605, web 24, api-client 31)
- npm run test:mobile 599 GREEN · test:hygiene 400 files GREEN
- contract:check GREEN · check:design 0 violations
2026-11-08 21:06:24 +09:00
Yun Chan
b8b91901eb refactor(ui): remove dead DS exports and unify wave gradient fallbacks (WS-G1)
Wave 5 G1 — evidence-based deletion only (docs/REFACTOR_WAVE5_AUDIT.md).

Deleted (references = 0 repo-wide, grep verified):
- apps/desktop/src/renderer/components/ProBadge.tsx (65 lines, self-reference only)
- apps/admin/src/lib/supabase-server.ts (unused duplicate of the web wrapper;
  api-client already owns createSupabaseServerClient)
- packages/ui: d3roSpace, d3roWeight, d3roMotion, darkTheme, lightTheme,
  getModePalette; `themes` kept module-private (used by getTheme)
- packages/ui-native: d3roNativeSpace, d3roNativeWeight, d3roNativeMotion,
  d3roNativeOverlayShadow, D3roNativePaletteKey (+ barrel entries)

Changed:
- ds/AudioVisualizerBar, ds/GradientWave: SSR/무-문서 폴백 hex 대신
  theme-raw RAW.dark.gradient 를 읽는다. 같은 색을 두 곳에 적지 않는다 (DP1).

Verification:
- npm run typecheck (desktop/web/admin/packages) GREEN
- npm run lint --max-warnings=0 GREEN
- npm run test GREEN
- npm run typecheck:mobile, lint:mobile GREEN; test:mobile 599 GREEN
- npm run check:design: 0 violations

Kept (with reason): apps/desktop/src/preload/popup.ts (electron-vite entry),
apps/*/src/proxy.ts (Next middleware), instrumentation.ts, *.d.ts,
constants.ts WAVE_BAR (화면 고유 수치, P4).
2026-11-08 20:55:40 +09:00
Yun Chan
3aa68f466c fix(meeting): keep polish from inventing markers or dropping qualifiers
The local model follows the polish instructions only most of the time: in
repeated runs it added a [00:00] or [화자 1] marker that was never in the
audio, and it turned "사실 거의 근간" into "사실 근간". Both change what the
meeting record says, so they are now enforced in code instead of hoped for
in the prompt: markers absent from the original chunk are stripped, and
meaning qualifiers the speaker said are restored from that chunk.

The instructions themselves were re-measured on the model: a fixed removal
list, an explicit qualifier example and a marker ban keep the filler cleanup
without touching ordinary words, and the same wording is used by the app,
the tests and the probe. Unknown-word repair still depends on the model.
2026-11-06 23:24:30 +09:00
Yun Chan
648c7e4f4d refactor(meeting): share the transcript polish prompt with tests
Move the polish instructions into their own module so the prompt the app
sends, the unit tests and the local-model probe use the same text. Tests
now pin the two rules that matter: fix a misheard name or in-house term to
the learned spelling, and never swap an ordinary word on similarity alone.

Verified against the local model with the real learned corpus: 하람록에 was
rewritten to HaramLog에 and the dictionary pronunciation 디에로 to D3RO,
while a natural sentence with no learned term came back with no word
substitutions. Recorded the trap that this model returns empty content
unless thinking is disabled.
2026-11-06 21:47:16 +09:00
Yun Chan
e2d17601a4 feat(meeting): ground AI transcript correction in learned vocabulary
AI polishing of a recorded or pasted transcript was a generic rewrite: it
cleaned fillers but left names and in-house terms mangled even when the app
already knew them. Polishing now corrects dictionary pronunciations and
typed identifiers deterministically before and after the model, and hands
the model the learned term list plus the user's own expressions with
explicit rules: rewrite a misheard name, product or in-house term to the
learned spelling, and never swap an ordinary noun or ending on similarity
alone. Dictation output is re-checked the same way after the model runs.
2026-11-06 17:22:54 +09:00
Yun Chan
7fe49c437e chore: land in-progress workspace changes before 1.16.2
The tree carried uncommitted work from several areas (web push, mobile
screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed
as one commit so the release pipeline can start from a clean tree; the
desktop transcript-correction behaviour shipped in the previous commit and
is unchanged here.
2026-11-05 21:58:44 +09:00
Yun Chan
9c2b6a9782 feat(meeting): correct transcripts with vocabulary learned from typing
Meeting and caption transcription never used what the app had already
learned: speech recognition ran with a fixed Korean prompt, the refine
prompt had no glossary, refined lines stopped inside the caption service,
and the saved transcript was a raw join of segments. Names and jargon the
user types every day were therefore re-mangled on every recording.

The learned corpus (user dictionary plus personal phrases) now feeds one
glossary that biases recognition, fixes mistyped words deterministically
right after each line is finalized, and is handed to the local model when
it polishes a line. Refined lines also reach the meeting transcript and
screen through a new segment-updated event.

Corrections never touch words the user actually wrote, refuse ties between
equally likely candidates, and keep particles intact.
2026-11-05 21:58:28 +09:00
Yun Chan
21a684d572 fix(desktop): prevent fast correction input races 2026-11-04 07:06:10 +09:00
Yun Chan
b3519e5da7 feat: 회의 파일 가져오기와 입력 엔진 배포 보완 2026-11-01 19:39:06 +09:00
Yun Chan
1d4f8d8401 refactor(desktop): structure suggestion pipeline and restore test gates 2026-10-31 23:14:11 +09:00
Yun Chan
02d0d0c6c1 fix(desktop): resolve Ctrl+Alt+Enter accept drops and duplicate typo LLM checks 2026-10-31 04:45:55 +09:00
Yun Chan
41901c1ec5 fix(desktop): prevent modifier key buffer resets, clipboard race on terminal accept, and redundant UIA settle snapshots 2026-10-31 04:19:53 +09:00
Yun Chan
61123b5ad8 fix(desktop): prevent Korean character swallowing in terminal and xterm.js surfaces (INPUT-04, INPUT-19) 2026-10-31 03:38:56 +09:00
Yun Chan
10af20a0ad feat(commands): multi-select ordered command pipeline with step reordering and single-pass composition (AI-05, AI-07) 2026-10-31 02:54:54 +09:00
Yun Chan
7a86afa7b0 feat(input,voice): instant first-word-after-focus PC layout fix and speech disfluency post-processing (INPUT-04, INPUT-19, AI-03, AI-05) 2026-10-29 19:05:01 +09:00
Yun Chan
cd4a452148 feat(input): upgrade graph personalization, english morphology detection, and atomic SendInput replacement 2026-10-29 08:16:26 +09:00
Yun Chan
f403111256 feat(input): expand Araso Han/Eng contractions, acronyms, typo recovery, and fast cursor-tail replacement 2026-10-28 10:41:26 +09:00
Yun Chan
a3ac44da2b feat(desktop): built-in Han/Eng layout auto-switching, terminal/Vim support, and Unicode input 2026-10-27 10:48:07 +09:00
Yun Chan
cdeeff4c11 fix(suggestion): insert accepted suggestions reliably and learn typing as whole sentences
Acceptance waited for modifiers using only the uiohook-tracked set; a missed keyup
made it time out after 1.5 s and paste while Ctrl/Alt counted as held, so nothing
was inserted. Trust GetAsyncKeyState instead, and suppress new suggestions while an
accept is in flight.

Typed deltas were saved per snapshot (every 0.4-0.8 s), storing mid-word fragments.
Buffer them per field and save one diff on idle, sentence end, send or focus change;
drop short pieces, URLs, trailing jamo and truncated emoji.
2026-10-24 13:15:29 +09:00
Yun Chan
bdec40d8b7 fix(popups): reload a popup renderer after it crashes
The window survives a renderer crash, so the get*Window() getters never
recreated it and the popup stayed blank until the app restarted (and a
crashed suggestion overlay could still swallow clicks). On crashed, oom or
abnormal-exit the ready flag is cleared and the renderer reloads, at most
once per 30s so a renderer that keeps dying is not restarted in a loop.
2026-10-21 11:38:59 +09:00
Yun Chan
ddd734fd30 fix(window): don't steal focus when the app starts at login
The login item now passes --autostart (also used when querying it, which
Windows needs to match the registration). On such a launch the main window
is shown inactive instead of focused, flashed and pinned on top for a second,
so typing that already started in another app is not interrupted. Existing
registrations migrate on the next startup sync.
2026-10-21 11:37:36 +09:00
Yun Chan
e7937c877f fix(recording-tip): show "inserted" only after the text was actually inserted
The tip drew its done state on session-completed, before the async insert
ran and even when auto-insert was off or the text was empty. A failed insert
also left the screen-saver-level tip over the result popup's copy button.
session-completed now says whether an insert follows, VoiceModeService emits
text-inserted on success, and the tip hides first when the insert fails.
2026-10-21 11:35:14 +09:00
Yun Chan
06365651fc fix(popups): close the history and command popups on an outside click or after 15s idle
The popups are non-focusable, so nothing closed them except their own toggle,
Esc or a selection, while they held Enter, arrows, Esc and 0-9 as global
shortcuts. Typing "3" or Enter in another app inserted a history entry or
switched the active command. A click outside the popup (converted from
physical pixels to DIP) or 15s without a navigation key now dismisses it and
releases the keys.
2026-10-21 11:32:17 +09:00
Yun Chan
67cc920e06 fix(renderer): keep typed excluded apps and failed template edits instead of silently discarding them
- Settings > Input: the excluded-apps field was reset from every telemetry
  snapshot (several per second while typing), so edits vanished before blur
  saved them; it now syncs only when the saved list changes
- Templates: a failed save (e.g. deleted on another device) closed the dialog
  and dropped the edits; it now stays open and shows why, and a failed
  session start is reported too
2026-10-21 11:30:27 +09:00
Yun Chan
29d22504ae fix(voice-action): route plans through the LLM gateway and validate what reaches the shell
The feature is not wired to the UI yet but is reachable over IPC:
- planning called the premium proxy directly, sending speech to the cloud
  even with the local backend selected and failing in local mode
- LLM-provided app names and key combos were spliced into cmd/PowerShell
  strings; they are now validated, and combos map named keys (alt+tab no
  longer types Alt+T, a, b)
- presets matched substrings and bare nouns ("commute" toggled mute,
  "크롬 캐시 지워줘" opened Chrome); they now match whole words only
- a plan without safe=true is treated as unsafe and unsafe shell commands
  are not run; URLs go through openExternalSafe
2026-10-21 11:28:30 +09:00
Yun Chan
9cf3fd7317 fix(cloud-sync): drop the previous account's cached tier when signing in as someone else
Switching accounts without a sign-out skipped resetToFree, and if the
subscription lookup then failed the new account kept the old one's Pro badge
and ad decision, persisted across restarts.
2026-10-21 11:26:12 +09:00
Yun Chan
6fef05a39f fix(rag): don't carry a query, upload or indexing run across an account switch
The chunk store reads whatever database is open at call time, so a query that
was awaiting the model returned an answer built from the previous account's
documents, and a large file being read was inserted into the new account's
knowledge base and synced there. Each operation now remembers the account
scope it started in and stops if it changed.
2026-10-21 11:23:21 +09:00
Yun Chan
3e6cfd1ba8 fix(keybinding): release held shortcuts and modifiers when the screen locks or the PC sleeps
The lock desktop swallows keyup, so a hold-to-talk recording never ended,
the first shortcut after unlocking was dropped as auto-repeat, and Win from
Win+L made the next suggestion accept wait out the full 1.5s modifier timeout.
On powerMonitor lock-screen/suspend the chord machine now emits released for
emitted triggers and clears its state, and modifier tracking forgets held keys.
2026-10-21 00:28:40 +09:00
Yun Chan
8d003c8fca fix(caption): unload the caption-only STT model when a start is cancelled or fails
stop() during model loading saw no aux model yet and skipped the unload, and
the failure path (e.g. no microphone) never unloaded it, so the caption model
kept VRAM alongside the dictation model until the next session ended.
2026-10-21 00:25:35 +09:00
Yun Chan
c46713536d fix(rag): stop superseded indexing runs and refuse to wipe chunks on an empty reindex
- Each document gets an indexing run number; a reindex, synced replacement or
  delete makes the older run stop instead of embedding stale chunks, reporting
  'indexed' early and leaving a progress bar for a deleted document
- Reindexing a file that is now empty throws like addDocument instead of
  replacing the stored chunks with nothing
2026-10-21 00:24:38 +09:00
Yun Chan
45d8b1ddb1 fix(file-transcription): stop a Whisper repetition loop from spreading to every following chunk
Each 30-second chunk received the previous chunk's text as initial_prompt,
so once one chunk looped on a word the loop became the next chunk's hint
and the rest of the file was the same word. A looping chunk is now
re-transcribed without the hint, looped text is never carried forward, and
runs of 4+ identical phrases or segments are collapsed to one.
2026-10-20 22:56:40 +09:00
Yun Chan
a14bb52b7f fix(meeting-chat): don't send a cancelled answer back to the panel
Clearing the chat mid-answer emptied the panel and then the truncated
answer reappeared, a turn the model's history never recorded.
2026-10-20 22:53:07 +09:00
Yun Chan
95656b098a fix(screen-context): skip selected-text capture when the clipboard can't be fully restored
Capture still used the old snapshot code: a file copied in Explorer looked
empty and was cleared, and Excel's own formats were dropped on restore. It
now uses the shared clipboard snapshot policy and leaves the clipboard
alone when it couldn't put everything back.
2026-10-20 22:51:51 +09:00
Yun Chan
9d0548f871 fix(tools): keep undo-deleted items hidden across page navigation
The hidden set lived in page state while the real delete runs from the app
notification after the page unmounts, so leaving and returning during the
undo window showed the item again and it stayed visible after deletion. The
set now lives in a module store and committed ids stay hidden.
2026-10-20 22:50:15 +09:00
Yun Chan
b961dfd999 fix(commands): decide whether a deleted command was in use when the delete commits, not when it was clicked
Picking another command during the undo window was overwritten with 'raw'
five seconds later because the selection was captured at click time.
2026-10-20 22:49:11 +09:00
Yun Chan
ce8d603b4a fix(chain): route chain steps through the LLM gateway instead of always calling the premium proxy
Chains were pinned to the premium service, so they always failed in
anonymous local mode and sent text to the cloud for signed-in users who had
chosen the local backend.
2026-10-20 22:48:17 +09:00
Yun Chan
51a80ad56c fix(llm): let a local-LLM license block propagate instead of being swallowed by its own fallback catch 2026-10-20 22:47:41 +09:00
Yun Chan
3851c2a09a fix(conversation): drop the utterance when the user cancels while it is still being transcribed
Cancel only aborted an in-flight LLM response, which does not exist yet
during STT, so the cancelled speech was answered a few seconds later. A
turn counter bumped by cancel/stop now discards the late transcript.
2026-10-20 22:47:10 +09:00
Yun Chan
a03cda2211 fix(update): never offer a lower or equal version on prerelease channels
Setting a channel makes electron-updater allow downgrades, and the channel
check let prerelease channels accept them, so a stable install on beta would
be asked to 'update' down to an older beta.
2026-10-20 16:34:48 +09:00
Yun Chan
4e75f515e2 fix(dictionary): catch non-ASCII case duplicates when importing a dictionary file
SQLite lower() only folds ASCII, so importing 'äpfel' next to an existing
'Äpfel' created a second local entry that later collided with the server's
unique index and silently overwrote one spelling. Import now compares with
the same JS identity key as add/update, including duplicates within the file.
2026-10-20 16:34:12 +09:00
Yun Chan
c3ca95d20f fix(cloud-sync): finish active dictation and meeting recording before switching to another account's database
Signing in as a different account (e.g. while the previous one was still
waiting on an offline restore) swapped the database under a live
recording, so its final save and audio upload went into the new account.
The sign-out capture shutdown now also runs whenever the open database
belongs to another user.
2026-10-20 16:32:54 +09:00
Yun Chan
69c4307eee fix(sync): don't let a pull wipe the checkpointed transcript of a meeting this device is recording
Checkpoints stay local until stop, so a pull during recording replaced the
saved transcript with the server's empty one; a crash then recovered the
meeting as an error with nothing in it. Status, transcript, end time and
duration of a locally recording meeting are now kept on pull.
2026-10-20 16:31:08 +09:00
Yun Chan
cf37fd5281 fix(meeting): save the recording when the app quits while a stop is still flushing
Quitting during the few seconds a stop waits for the last caption skipped
the shutdown save, so the in-memory audio and every sentence since the last
checkpoint were lost. Shutdown now saves unless post-processing already
wrote the final result.
2026-10-20 16:29:29 +09:00
Yun Chan
32cf826290 fix(suggestion): keep a shown typo fix when only trailing spaces changed before accepting
The session ignores trailing whitespace but acceptance compared the raw
prefix, so typing one more space after the fix appeared made accept drop
the correction silently and leave the typo in place.
2026-10-20 16:27:40 +09:00
Yun Chan
1b39afe9ff fix(history): tell users a memo tag is too long instead of offering a retry that always fails
Tags over 80 characters now show a length notice, and adding a tag that
already exists in another case just closes the input, rather than both
landing on a '#tag · retry' badge that repeats the same rejection.
2026-10-20 16:26:16 +09:00
Yun Chan
90c96c6f80 fix(desktop): stop re-asking for downloaded updates, local-date memo export, end template sessions on delete, reject blank chain renames
- UpdateService: an already-downloaded version no longer reopens the consent
  dialog every 24h, where choosing skip still installed it on quit
- MemoService: export groups and titles by local date so KST 00-09h memos
  stop landing under the previous day
- DictationTemplateService: deleting (or remotely removing) the active
  session's template cancels the session instead of blocking new ones
- ChainService: update trims names and rejects blank ones like create does
2026-10-20 09:56:29 +09:00
Yun Chan
fd9c97b7cc feat(release): one-command desktop release with Ed25519-signed update metadata
The installer is unsigned, so latest.yml is now signed with an Ed25519 key and the
app verifies the downloaded installer against it before installing.
npm run release -- patch|minor bumps, gates, tags, builds, signs, publishes,
re-verifies the public feed and pushes; --resume continues after a failure.
The retired GitLab registry publisher is removed.
2026-10-18 07:06:55 +09:00
Yun Chan
f5ae4c8c04 feat(desktop): propose typo fixes inside the suggestion popup and make suggestions snappier
While suggestions are on, typos are no longer replaced silently. The popup shows
the fix next to the candidate and applies it only when the candidate is accepted.
The per-minute request cap rises from 6 to 20 so suggestions keep appearing after
accepting one and continuing to type.
2026-10-18 07:06:55 +09:00
Yun Chan
d63854db67 fix(desktop): stop pinning local models in memory and cap audio buffers
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Successful in 56s
ci / .NET API 서버 테스트 (push) Successful in 10s
deploy-site / deploy (push) Successful in 38s
ci / 모바일 린트·타입·Jest (push) Successful in 44s
ci / 워크스페이스 빌드 검증 (push) Successful in 54s
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 22s
portable-unsigned / portable-windows (push) Failing after 35s
release / release-windows (push) Failing after 13s
The PC-wide slowdown was not a leak but model residency: boot warmup loaded
gemma4:e4b (~11.6 GB RAM incl. 5.9 GB pinned host buffer, no mmap on Windows
CUDA) and kept it for 30m, next to the large-v3 sidecar. Measured on the HEAD
build: free RAM 7.9 GB -> 32 MB within 20 s; after this change 10.8 GB with no
Ollama model loaded until typing starts.

- single LOCAL_LLM_KEEP_ALIVE (10m) for every local request; no boot warmup
- unload this app's resident Ollama models (keep_alive 0) on quit
- sidecar POST /unload for the aux slot; captions release it on stop
- partial dictation copies only the tail window, not the whole recording
- cap the voice-conversation listen buffer at 5 minutes
- mic test: generation guard so re-entry cannot orphan lease/timers
- startRealtime: single-flight and removeChannel to stop duplicate bindings
- meeting WAV save writes header and PCM without a concat copy

Docs: AI-01 policy note, GAP-PERF-01 with remaining work.
2026-10-11 11:35:15 +09:00
Yun Chan
3cac14f668 feat(desktop): typo auto-correct and context-aware sentence prediction
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Has been cancelled
deploy-site / deploy (push) Has been cancelled
ci / 워크스페이스 빌드 검증 (push) Has been cancelled
ci / 모바일 린트·타입·Jest (push) Has been cancelled
ci / Supabase Edge Functions + Cloudflare Worker (push) Has been cancelled
ci / .NET API 서버 테스트 (push) Has been cancelled
Typo auto-correct (INPUT-19)
- TypoCorrectionService + core typo-correction: 2-set Korean layout
  mistypes both ways, always-wrong spellings, near-misses of the user's
  frequent words, optional model check re-validated in core; applied by
  backspace N + paste and cancelled on new keys or window change.

Prediction quality (INPUT-20/21)
- gemma models are sent raw with the user's unfinished sentence pre-filled
  into the model turn, so the model truly continues the text (mid-word
  joins and spacing exact). Other models keep the instruction prompt.
- Context: text before the caret (opening lines and a fact list of names,
  dates, amounts outside the 400-char window), messages just sent in the
  same chat window (memory only, 30 min), personal-graph follow-ups and
  IDF-ranked related sentences with Korean stemming.
- Guards: first sentence only, restated-prefix stripping (also fixes the
  instruction path), repeat drop, no invented dates/names/numbers
  (one retry), plain -다 register, no emoji unless the user uses them,
  search-box keywords. Fill loop mixes instruction prompts for variety.
- Opt-in real-model probe: tests/integration/suggestion-quality.ollama.test.ts

Suggestions now actually show up
- Terminal (Claude Code): caret trust from the input line, not the whole
  screen (status line below the box blocked every keystroke); Korean
  composition counts as typing at the end; a grey placeholder filling the
  empty box at once is not user text.
- Chrome: UIA focus flicker while typing no longer resets "edited".
- KakaoTalk/RichEdit: trailing paragraph mark ignored for edit position
  and stripped so accepted text keeps its separating space.
- While the overlay is visible the suggestion shortcuts are captured so
  Ctrl+Alt+Enter no longer also types a newline; released when hidden.
- nut-js preloaded after boot (first accept waited 4.8 s).
2026-10-03 21:48:28 +09:00