feat(m4-m6): session, panel, Replace, settings and onboarding
M4: TranslationSession actor with epochs/one-in-flight streaming, PanelViewModel, non-activating NSPanel, streaming panel UI, searchable/recent target languages, warnings/errors and Copy/Retry/Replace actions. M5: InsertionCoordinator with target capture, AX direct replacement, secure-field/own-PID refusal, frontmost and selected-text verification, snapshot/⌘V/restore fallback, cancellation-safe restore and blocking-warning gate. M6: versioned AppSettings/SettingsStore, onboarding for Ollama/model/target/Accessibility, General/Model/Translation/Privacy/Diagnostics settings, launch-at-login via SMAppService, status menu (target, copy/replace last, setup, diagnostics, about), text-free diagnostics and first-run setup. Docs: PROGRESS M4–M6, ARCHITECTURE §10–§12, ADR-019/020, SELECTION_AND_CLIPBOARD and TESTING. Manual 10-app matrices, real AX/paste delivery, VoiceOver and focus checks remain open. Verified: make verify green (format, strict lint, scripts, privacy, Debug+Release signatures, 217 package tests); app launches and a two-copy clipboard smoke test opens the panel.
This commit is contained in:
1 parent
64078e2f04
commit
a78572adc3
47 files changed
+4963
-79
No files matched your search
@@ -516,7 +516,7 @@ If the detected source language equals the target with reasonable confidence, th
|
||||
|
||||
## 10. Translation session and state machine
|
||||
|
||||
`TranslationSession` is an actor in `SprachmittlerCore`; `PanelViewModel` is `@MainActor @Observable` and mirrors it.
|
||||
`TranslationSession` is an actor in `SprachmittlerCore`; `PanelViewModel` is `@MainActor @Observable` in Core and mirrors it. The App target owns the non-activating `NSPanel` controller.
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
@@ -540,7 +540,7 @@ stateDiagram-v2
|
||||
- Every session has an epoch (`UInt64`). A new trigger increments it; events from an older epoch are ignored.
|
||||
- `Copy` never changes the session state; it writes the clipboard and keeps the panel open.
|
||||
- `Replace` is disabled while `.translating` or `.failed`, and when validation found a blocking warning.
|
||||
- The session owns no disk state. It releases source and translation when the panel closes.
|
||||
- The session owns no disk state. Its working copy is released when the panel closes; `AppEnvironment` may keep the last source, translation and insertion target in memory until quit, solely for the status menu's Copy/Replace Last actions (ADR-007). Nothing is written to disk.
|
||||
|
||||
---
|
||||
|
||||
@@ -571,6 +571,7 @@ Accessibility: every control has an `accessibilityLabel`; the panel exposes sour
|
||||
| `model` | String | `hf.co/tencent/Hy-MT3-7B-GGUF:Q4_K_M` (provisional until T7.4) |
|
||||
| `fastModel` | String? | `hf.co/tencent/Hy-MT3-1.8B-GGUF:Q4_K_M` (if installed) |
|
||||
| `targetLanguage` | LanguageCode | system language if supported, else `en` |
|
||||
| `recentTargetLanguages` | [String] | last three targets, most recent first |
|
||||
| `doubleCopyWindowMs` | Int | 500 (300–1000) |
|
||||
| `maxCharactersLatin` | Int | 4000 |
|
||||
| `maxCharactersCJK` | Int | 2000 |
|
||||
@@ -587,6 +588,7 @@ Accessibility: every control has an `accessibilityLabel`; the panel exposes sour
|
||||
| `showSourcePreview` | Bool | true |
|
||||
| `launchAtLogin` | Bool | false |
|
||||
| `keepRecentTranslationInMemory` | Bool | true (cleared on quit; no disk) |
|
||||
| `hasCompletedOnboarding` | Bool | false |
|
||||
| `settingsVersion` | Int | 1 |
|
||||
|
||||
Never store source text, translations, pasteboard contents or app names in settings.
|
||||
|
||||
Reference in new issue
Block a user