Skip to content

feat(composer): final whole-text polish, clear button and runtime model hints - #2

Merged
Hongwei-MB merged 2 commits into
mainfrom
feat/final-polish-clear-models
Nov 2, 2026
Merged

Hongwei-MB merged 2 commits into
mainfrom
feat/final-polish-clear-models

Conversation

@Hongwei-MB

Copy link
Copy Markdown
Collaborator

Final whole-dictation polish with editable requirements, visible Clear button with epoch-guarded races, runtime model hints, and safe model switching. Local gate: ./build.sh Test (Core 498 / Desktop 711 / Web 324), 0 warnings; independent code review: no findings. Real-model checks: polish on user samples; Hy-MT2 1.8B -> 7B -> 1.8B confirmed by provider responses.

Hongwei-MB and others added 2 commits November 2, 2026 23:31
…el hints

Final polish
- On stop, the whole dictation is summarized and polished as one text through
  PolishScheduler and IDictationPolisher, sharing the cleanup role's route.
  Draft.Polishing is set in the same step as Recording=false, so writing waits.
- Stale polish requests are discarded by dictation/source revision; failures
  are reported instead of looking like success. No recursive retries.
- The polish requirements are editable in Settings > Voice (PolishStyle owns
  validation and the default). Unusable text resolves to the default, and an
  invalid custom result is retried once with the default.
- The fidelity gate accepts spoken filler trims and restated clauses, and
  still refuses lost numbers, terms and any deleted negation.
- Passages end after a 2 s pause; truncated cleanup answers keep the words.

Clear
- A visible Clear button reuses NewDraft: it stops recording, serializes with
  start/stop/import (IsClearing) and keeps the target and preferences.
  DictationSession writes are guarded by Draft.Epoch so recognition that
  outlives the stop timeout cannot repopulate a cleared draft.

Models
- ModelUsage reports the speech models, local leases and cloud responses
  actually used; the UI shows a brief notice and details on the chip.
- LlamaServerHost waits for active leases before replacing a role's model;
  changing the translation tier refreshes the open composer's model plan and
  generated translations (manual edits are kept).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The scenario captured the draft while the background cleanup was still racing
from pending to ready, so the golden file only matched on fast machines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Hongwei-MB
Hongwei-MB merged commit ee865ee into main Nov 2, 2026
1 check passed
@Hongwei-MB
Hongwei-MB deleted the feat/final-polish-clear-models branch November 2, 2026 15:47
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