Skip to content

Add post-edit correction learning and explicit format contracts - #74

Merged
IchenDEV merged 1 commit into
mainfrom
t3code/improve-typeless-text-correction
Aug 11, 2026
Merged

Add post-edit correction learning and explicit format contracts#74
IchenDEV merged 1 commit into
mainfrom
t3code/improve-typeless-text-correction

Conversation

@IchenDEV

Copy link
Copy Markdown
Owner

Summary

  • add a bounded post-insertion correction capture session that observes only the inserted AX region and stops on timeout, focus/app change, the next recording, or learning being disabled
  • classify sparse local edits into high-confidence learned terms or pending candidates, with manual-term precedence, conflict handling, privacy exclusions, and backward-compatible dictionary persistence
  • add a native dictionary management UI for manual, learned, and pending entries, including search, edit, approve, disable, delete, import, export, and clearing learned entries
  • classify processed output into explicit paragraph, unordered-list, ordered-step, email, chat, or code/terminal contracts and persist formatKind plus optional userFinalText in history
  • document the Typeless evidence boundary, implementation decisions, and follow-up benchmark plan

Why

OpenType already had deterministic dictionary replacement, ASR term context, and LLM term protection, but no normal product path for the dictionary to grow or be managed. Post-insertion user edits were not associated with history, and formatting relied on a generic prompt that tended to collapse unordered lists and ordered steps into the same numbered structure.

This change closes that P0 loop conservatively while keeping vocabulary learning separate from future style personalization.

User impact

Users can now teach OpenType preferred names and spellings by correcting a recently inserted term or by adding it manually. Ambiguous or conflicting corrections remain pending instead of silently changing output. Processed dictation now has explicit, auditable layout behavior for common document types.

Sensitive targets such as terminals, password managers, secure fields, and browser address fields are excluded from post-edit observation.

Validation

  • swift test — 552 XCTest cases, 0 failures, 7 environment-gated skips; 2 Swift Testing cases passed
  • bash scripts/ci-basic-checks.sh
  • bash scripts/build-app.sh --app-only
  • codesign --verify --deep --strict dist/OpenType.app
  • verified bundled MLX default.metallib
  • rendered the release app and inspected the Chinese dictionary settings UI; verified the add form enables without persisting a test entry
  • git diff --check

Validation boundary

A real third-party-app insert → edit → learn → repeat run still requires granting Accessibility access on the test machine. The pure capture, privacy, candidate, dictionary, prompt, history, and format-classification paths are covered by automated tests.

@IchenDEV
IchenDEV marked this pull request as ready for review August 11, 2026 22:44
@IchenDEV
IchenDEV merged commit 59d78e0 into main Aug 11, 2026
2 checks passed
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