[Request] Auto-refresh editor when files change on disk (with conflict prompt for unsaved local edits)

未关闭
#1,331 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
ios, swift
领域
frontend, mobile

调研方向

The issue names no files or entry points. Start by finding where the app opens a file for the editor and how it reads files over SSH/SFTP, then check whether any file-change notification already exists. Done means an external change to an open file with no unsaved edits refreshes the tab, and a conflicting unsaved buffer shows a prompt. The conflict-prompt design is not settled, so confirm the expected options with maintainers before building it.

由索引模型根据 Issue 内容生成。

描述

Use case / Example:

  1. Open a project on an SSH/SFTP-mounted filesystem.
  2. Edit a file externally — for example via a terminal session, or an AI coding agent like Claude Code / Claude Remote making changes directly on disk.
  3. Switch back to Code App: the editor still shows the old, stale content. Changes made outside the app aren’t picked up automatically.

Proposed behavior:

  • When a file is modified on disk (detected via filesystem watcher / SFTP polling), the open editor tab should automatically refresh to reflect the new content — as long as there are no unsaved local changes.
  • If the local buffer has unsaved changes that conflict with the on-disk version, prompt the user with options such as:
    • Keep local changes (overwrite disk)
    • Load disk version (discard local changes)
    • View diff / merge manually

Why this matters:

This is increasingly common with AI coding assistants and remote dev workflows that edit files directly on disk outside the editor’s control. Without auto-refresh, users risk working on stale files or unknowingly overwriting external changes when they save.

主要语言
Swift
星标
4k
派生
376
平均合并
1 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

thebaselab/codeapp 的其他 Issue

查看 thebaselab/codeapp 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。