Skip to content

Add safe editing for text files opened from chat output #771

Closed

Description

@vibewriter-hand

Problem

The file viewer can preview text and download it, but it cannot save a change. The current server routes are read-only. Users must leave the web UI to edit a Markdown or JSON file. This complements the file-opening work in #691 and the user-file links in #730.

Proposal

Design a separate write API for approved text files. Validate the pane sandbox and file type on the server. Use atomic writes, a file revision or hash for conflict detection, and an explicit save result. Add the same checks to the remote machine proxy. Add a small editor with syntax-aware plain text and a clear conflict state.

Acceptance

  • Only approved text files under the pane sandbox can be written.
  • A stale revision returns a conflict and does not overwrite the file.
  • Writes are atomic and preserve file permissions where supported.
  • Remote and local panes use the same authorization rules.
  • The UI never executes HTML or SVG content.
  • Security, API, and browser tests cover traversal, conflict, cancel, and save.

Screenshots

Add editor, conflict, and permission-error screenshots here.

Activity

  1. vibewriter-hand commented on Oct 16, 2026

    @vibewriter-hand
    ContributorAuthor

    Follow-up: #1196 proposes a Markdown documents panel (list, search, open, edit, create, delete) that would use the write API proposed here for its Save, with the same revision check and sandbox rules.

  2. added
    enhancement
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions