Repository navigation
Conversation
|
I’d prefer not to add extra setting options that could increase the cognitive load for users. Instead, we can keep the logic simple: if the user hasn’t made any changes, just reload the file directly. If the file has been modified, show a prompt asking the user what to do. |
|
Adding my voice — I'd really like to see this land. My use case: the markdown files I keep open in MarkText are updated by external processes all the time (sync/scripts writing into the folder), so the "has been changed on disk" prompt pops up constantly. Since the open tab usually holds local edits, the clean-tab path doesn't help me, and clicking through the dialog every time gets old very quickly. A default-off switch I can turn on would be enough for my workflow. I understand the concern about cognitive load — a single default-off toggle in Preferences seems like a small price for this, and it doesn't change anything for users who never touch it. (Offering it right from the reload prompt, as suggested in #4940, would also keep it out of the way.) Happy to help test or re-implement if the direction changes. One more thought on the cognitive load argument: having to click the confirmation button on every external file update is no less cognitive load — and quite possibly more — than one extra switch in Preferences. The switch is a one-time cost you forget about afterwards, while the dialog demands attention (and a decision) over and over again for as long as the file keeps changing. |
Closes #4940
Summary
autoReloadpreference.Type of change
Test plan
Commands run:
pnpm run lint(0 errors; existing repository warnings remain)pnpm run typecheckpnpm -C packages/desktop exec vitest runpnpm -C packages/desktop exec playwright test test/e2e/external-reload-undo.spec.tspnpm run build:unpackThe Preferences UI was also exercised in Electron to verify that the new switch renders, defaults to off, and can be enabled.
Notes for reviewers [optional]
autoReloaddefaults tofalsefor backward compatibility. When enabled, only clean tabs reload automatically; tabs with unsaved edits continue to show the existing reload notification.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.