Repository navigation
Conversation
Poll the notes folder about once per second while the panel is open and fold outside edits into the editor instead of losing them on the next autosave: compatible appends are merged with the local buffer, and an incompatible change keeps the local text and saves a copy under .conflicts/ instead of overwriting what someone else wrote. - merge.luau: pure 3-way resolver (same/local/remote/merged/conflict) - panel.luau: directory signature per tick, merge on load/save, conflict copy - plugin.toml: watch setting (bool, default on), version 1.4.0 - README + en.json: document the setting and the conflict behavior
Author
|
Tested on Hyprland (panel entry from this branch, Noctalia API 26):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Watch the notes folder while the panel is open and fold outside edits into the
editor instead of losing them. Compatible appends are merged with the local
buffer; an incompatible change keeps the local text and saves a copy under
.conflicts/instead of overwriting what someone else wrote.notes/merge.luau(new): pure 3-way resolver returningsame/local/remote/merged/conflict.notes/panel.luau: per-tick directory signature (name + mtime + size), thesave path merges before writing, and conflicts are reported once per remote
revision with a copy of the unsaved text.
notes/plugin.toml: newwatchsetting (bool, defaulttrue); version1.3.0→1.4.0.notes/README.md,notes/translations/en.json: document the setting and theconflict behavior.
Motivation
Notes are plain files, so another editor, a sync tool or a script can change
them while the panel is open. Today the panel only reacts to the launcher's own
notes_bumpsignal, and there are two silent data losses:external change is not a simple append.
This PR makes both cases safe and keeps the behavior opt-outable with
watch.Type of Change
Related Issue
None.
Testing
luau-compileon every changed entry (panel.luau,merge.luau, plusdirs.luau,notes.luau,launcher.luau) - all passed.noctalia plugins lint notes→0 errors, 0 warnings..github/actions/validate-plugins/validate-plugins.py --profile official→
Validated 14 plugin manifest(s).panel.luau: a compatible external append is merged and written back; anincompatible external edit is not overwritten, is reported once, and the
local text lands in
.conflicts/..conflictsfolder is created on demand and is not listed as a note.append appeared in the open editor without reloading; an incompatible
external rewrite kept the disk text, showed the conflict notification and
wrote the unsaved local text to
.conflicts/, which the note list ignores.Manual Coverage
Screenshots / Videos
No visual changes.
Checklist
translations/en.json, or this PR adds no new user-facing strings.Additional Notes
matrix were not exercised. The polling is one
listDir+ onefileInfopernote per second while the panel is open, and it stops when
watchis off.watchoff, the panel keeps the previous behavior: launcher capturesstill refresh the open note via
notes_bump.the same note do not collide.