Use Pierre Diffs edit mode for in-app file editing and persist unsaved drafts - #91
Closed
danielss-dev wants to merge 4 commits into
Closed
Use Pierre Diffs edit mode for in-app file editing and persist unsaved drafts#91danielss-dev wants to merge 4 commits into
danielss-dev wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
HighlightedEditorfor working-tree edits.Mod+S) to avoid implicit disk writes.Description
ui/src/views/FileView.tsxto mount Pierre's edit surface: wrapped the file surface in anEditProviderand render an editable PierreFilewhencanEditFileContentis true, removing the in-repoHighlightedEditorimplementation.ui/src/lib/fileEditing.ts::fileDraftKeyand asessionFileDraftsmap so unsaved drafts survive navigation but are not auto-saved.onChangeand save flow to maintain/delete the session draft map on edits and successful saves (keeps explicit save semantics).ui/src/vite-pierre-edit.d.tsto type the@pierre/diffs/editentry used at build time.@pierre/diffsto^1.3.2and updatedpnpm-lock.yaml.ui/src/lib/fileEditing.test.tsextended to coverfileDraftKey; updatedREADME.md,TASKS.md,ROADMAP.md, andwebsite/docs/work.mdto describe edit-mode and unsaved-draft behavior.tauri.repoFileWrite) and stale-write rejection behavior unchanged.Testing
pnpm --filter ./ui exec tsc --noEmitand the UI typecheck passed.pnpm --filter ./ui exec vitest run src/lib/fileEditing.test.tsand the added test passed (1 file, 3 tests).git diff --check(no whitespace/errors).cargo check -p strand-core -p strand-tauri; the Rust build failed in this environment due to missing systemglib-2.0pkg-config dependency (environment issue), not code regressions.Codex Task