feat(phase9): write_text_file_cmd

Thin UTF-8 writer used by the new save-dialog path. Caller owns path
safety; the source path is always OS-dialog-provided. Two unit tests:
roundtrips a small UTF-8 string with non-ASCII chars and asserts a
nonexistent parent path returns an actionable error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 23:47:41 +01:00
parent 3eb24f2c63
commit 5a15c931d0
3 changed files with 50 additions and 0 deletions

View File

@@ -74,6 +74,11 @@ libloading = "0.8"
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite"] }
uuid = { version = "1", features = ["v4"] }
[dev-dependencies]
# Phase 9 fs::write_text_file_cmd tests use a temp directory so we don't
# pollute the workspace.
tempfile = "3"
[target.'cfg(target_os = "linux")'.dependencies]
webkit2gtk = "2.0"
# Needed for setting the preview overlay's WindowTypeHint to Utility via