Skip to content

fix: markdown editor live refresh#654

Merged
GCWing merged 1 commit intoGCWing:mainfrom
wgqqqqq:codex/live-markdown-editor-refresh
May 11, 2026
Merged

fix: markdown editor live refresh#654
GCWing merged 1 commit intoGCWing:mainfrom
wgqqqqq:codex/live-markdown-editor-refresh

Conversation

@wgqqqqq
Copy link
Copy Markdown
Collaborator

@wgqqqqq wgqqqqq commented May 11, 2026

Summary

  • Make MarkdownEditor subscribe to editor:file-changed events for the currently opened Markdown file.
  • Reuse the existing disk-sync path for event-triggered reloads, preserving missing-file handling and local-edit conflict confirmation.
  • Keep polling behavior intact while allowing agent/file-watcher writes to refresh the right-side Markdown editor immediately.

Root Cause

MarkdownEditor had metadata polling for external changes, but it did not subscribe to the global file-change event emitted by the file explorer watcher. Agent writes could therefore update the file tree and disk state while the already-open Markdown editor kept showing stale content until the tab was closed and reopened.

Validation

  • pnpm run type-check:web
  • pnpm run lint:web
  • pnpm --dir src/web-ui run test:run

@wgqqqqq wgqqqqq changed the title [codex] fix markdown editor live refresh fix: markdown editor live refresh May 11, 2026
@wgqqqqq wgqqqqq marked this pull request as ready for review May 11, 2026 08:47
@GCWing GCWing merged commit 586ecb2 into GCWing:main May 11, 2026
4 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