Show Changes Made to the Files Elsewhere Without Waiting for Focus
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, nodejs
- Domain
- full-stack
Research direction
The change spans the server, which should watch the served folder with recursive fs.watch, debounce events, skip .reader/ and reader's own writes, and push changes over server-sent events, and the open page, which must apply clean external edits without moving the caret or scroll and show the existing conflict notice for dirty ones. Start by finding where the server serves files and where the page currently checks for changes on focus, since that check stays as the fallback. Done means an external write to the open file shows up without focus changes, while saves from reader itself do not trigger a reload.
Written by the indexing model from the issue text.
Description
reader notices an edit made to the open file somewhere else only when its window gets focus back. Anyone who writes in the file while it's open in reader, such as a collaborator answering an aside, an agent, or another editor, stays unseen until the reader switches away and back. It can even look as if nothing was written.
What it should do
The server watches the folder it serves and tells the open page when a file changes on disk (server-sent events, say).
- The open file changed, nothing unsaved in the editor: the editor and the page take the new text in place. The caret and the page's scroll stay where they were.
- The open file changed, with unsaved edits: reader's existing conflict notice, as it is now on focus.
- Another file changed: the file list and versions update. Nothing else moves.
Why now
Reviews happen in a file, as ~# asides answered with ~c asides under them. Without this, the person reviewing doesn't see a reply until they leave reader and come back, so the file isn't yet a live conversation.
Notes
fs.watchwithrecursiveworks on macOS and Windows, and on Linux in recent Node. Changes should be debounced, since one save can fire several events.- Ignore
.reader/(backups and versions) and anything reader writes itself, so a save doesn't come back as a change. - Checking on focus stays, as the fallback.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 26
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jzheaux/reader
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
accessibility bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
polish
Difficulty 3/5 1-2 days Newbie friendliness 64/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OWASP/CheatSheetSeries#3018 ·
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
GoogleChrome/modern-web-guidance-src#3675 · 2 comments ·
Maintainers usually reply within 1 day