Skip to content

feat: add conflict-safe file editing - #35

Merged
wolfiesch merged 1 commit into
LycaonLLC:feat/v0.1.23-polishfrom
wolfiesch:feat/conflict-safe-file-editor
Jul 18, 2026
Merged

feat: add conflict-safe file editing#35
wolfiesch merged 1 commit into
LycaonLLC:feat/v0.1.23-polishfrom
wolfiesch:feat/conflict-safe-file-editor

Conversation

@wolfiesch

Copy link
Copy Markdown
Collaborator

Summary

  • add lazy host-backed file browsing and previews to the Files pane
  • edit only complete text previews and save through revision-gated files.write commands
  • preserve drafts and surface conflicts when host content changes, a revision goes stale, the connection drops, or a save outcome cannot be confirmed

Verification

  • pnpm check
  • pnpm test
  • Browser smoke: browsed the fixture tree, previewed package.json, and entered editor mode

Screenshots

Conflict-safe file editor

Copilot AI review requested due to automatic review settings July 18, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds conflict-safe, revision-gated file editing to the Files pane, integrating controller-backed saves and draft/conflict handling so the UI can safely edit only complete previews and avoid overwriting host changes.

Changes:

  • Introduces per-path file drafts (clean/dirty/saving/conflict/error) with save/discard actions and conflict detection on preview refresh.
  • Adds files.write action availability and wires live + fixture controllers to dispatch revision-gated writes and resolve outcomes.
  • Extends tests to cover local draft lifecycle, revision-stale conflicts, and save result settling.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/web/test/panes-live.test.ts Extends live-pane tests for files.write enablement and revision-gated save/conflict behavior.
apps/web/test/panes-files.test.ts Adds unit tests for draft editing, save promotion, conflict on host change, and truncated-preview edit blocking.
apps/web/src/features/panes/model.ts Adds fileWrite to the action availability model.
apps/web/src/features/panes/live-inspector.ts Wires files.write availability and implements revision-gated writeFile controller behavior.
apps/web/src/features/panes/inspector-store.ts Adds draft state/actions and implements preview/write outcome reconciliation logic.
apps/web/src/features/panes/fixtures.ts Extends fixture controller to persist edited content and resolve write outcomes as saved.
apps/web/src/features/panes/FilesPane.tsx Adds editor UI (textarea) and Save/Discard controls driven by draft and fileWrite availability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/web/src/features/panes/inspector-store.ts
Comment thread apps/web/src/features/panes/FilesPane.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd8b443941

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/features/panes/live-inspector.ts Outdated
@wolfiesch
wolfiesch force-pushed the feat/conflict-safe-file-editor branch from cd8b443 to a8386c2 Compare July 18, 2026 06:12
@wolfiesch
wolfiesch deleted the branch LycaonLLC:feat/v0.1.23-polish July 18, 2026 07:00
@wolfiesch wolfiesch closed this Jul 18, 2026
@wolfiesch wolfiesch reopened this Jul 18, 2026
@wolfiesch
wolfiesch merged commit 63b7174 into LycaonLLC:feat/v0.1.23-polish Jul 18, 2026
8 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.

2 participants