Problem
Kastword retains only the latest transcription in memory. Users cannot recover or reuse earlier dictations after another transcription or an application restart. Persisting sensitive transcription text as ordinary plaintext would undermine Kastword's privacy-first positioning and current no-history guarantee.
Expected outcome
Users can deliberately enable useful local dictation history while retaining clear control over sensitive data. History remains offline, encrypted at rest, integrity-protected, and disabled by default.
Scope
- Keep history disabled by default and require explicit, informed opt-in.
- Store transcription text and only the minimal metadata needed to present and retain it, such as a timestamp.
- Never store recorded audio as part of history.
- Encrypt history at rest using authenticated encryption.
- Protect encryption keys through an appropriate KDE facility such as KWallet.
- Fail closed when secure key access is unavailable; never silently fall back to plaintext storage.
- Add a minimal native KDE/Qt history view with copy and individual-delete actions.
- Provide configurable retention by age, entry count, or both.
- Provide a confirmed clear-all-history action.
- When history is disabled, offer to delete existing records and prevent future writes.
- Use restrictive per-user filesystem permissions and safe atomic updates.
- Document the storage location, controls, retention behavior, recovery behavior, and threat model.
- Update README privacy claims and installed documentation to distinguish the default no-history state from explicitly enabled history.
Non-goals
- Cloud storage or synchronization.
- Cross-device history.
- Audio retention.
- Rich text editing or semantic search.
- Usage analytics or telemetry.
- Claiming forensic deletion from SSDs, snapshots, swap, crash dumps, or backups.
- Protecting history from an attacker who already controls the user's unlocked session.
Acceptance criteria
- History is disabled by default, and no history database or transcript file is created before opt-in.
- After opt-in, successful non-empty dictations are available after restarting Kastword.
- Stored transcription records are not readable as plaintext and are protected against undetected modification.
- Encryption keys are not stored alongside the encrypted history as unprotected plaintext.
- Missing, locked, rejected, or failed secure-key access does not expose history or cause plaintext fallback, and provides a clear recovery path.
- Users can copy an entry, delete an entry, clear all entries with confirmation, and configure retention.
- Retention limits are enforced deterministically at startup and after inserting an entry.
- Disabling history prevents future writes and offers to delete existing records.
- History files and containing directories use restrictive per-user permissions and updates cannot leave a partially written valid store.
- Recorded audio is never written to history storage.
- Empty or failed transcriptions do not create entries.
- The history UI follows native KDE/Qt patterns and is keyboard accessible, screen-reader understandable, and localizable.
- Documentation explains that encryption at rest does not protect text copied to clipboard, pasted into applications, exposed in an unlocked compromised session, or retained by backups and operating-system facilities.
- Deterministic tests cover the disabled state, opt-in, persistence across restart, insertion, ordering, retention, individual deletion, clear-all, corruption, atomic-update failure, permissions, and secure-key access failure.
Dependencies and risks
KWallet availability and locked-wallet interaction differ across user environments. The design needs an honest, usable failure state when secure storage is unavailable. Schema migration and recovery must not risk silent data loss or plaintext leakage. Clipboard managers, target applications, backups, swap, and crash dumps remain separate trust boundaries.
Related work
Closed issue #7 established Kastword's existing privacy boundaries and no-history behavior. This issue intentionally changes that behavior only through explicit opt-in and must preserve the secure default.
Prioritization
P1: history materially improves the core dictation workflow, but it handles highly sensitive text and therefore must ship with storage protection, retention controls, deletion, and honest threat-model documentation as one coherent capability.
Problem
Kastword retains only the latest transcription in memory. Users cannot recover or reuse earlier dictations after another transcription or an application restart. Persisting sensitive transcription text as ordinary plaintext would undermine Kastword's privacy-first positioning and current no-history guarantee.
Expected outcome
Users can deliberately enable useful local dictation history while retaining clear control over sensitive data. History remains offline, encrypted at rest, integrity-protected, and disabled by default.
Scope
Non-goals
Acceptance criteria
Dependencies and risks
KWallet availability and locked-wallet interaction differ across user environments. The design needs an honest, usable failure state when secure storage is unavailable. Schema migration and recovery must not risk silent data loss or plaintext leakage. Clipboard managers, target applications, backups, swap, and crash dumps remain separate trust boundaries.
Related work
Closed issue #7 established Kastword's existing privacy boundaries and no-history behavior. This issue intentionally changes that behavior only through explicit opt-in and must preserve the secure default.
Prioritization
P1: history materially improves the core dictation workflow, but it handles highly sensitive text and therefore must ship with storage protection, retention controls, deletion, and honest threat-model documentation as one coherent capability.