Conversation
Free text notes can be attached to any resource in the cluster. They are stored on the controller in a notes datastore keyed by resource type and id, so mods and saves that are not records on the controller can carry notes too, and plugins can use their own resource types. Adds Note data class, NoteListRequest, NoteSetRequest and NoteUpdatesEvent with core.note.list, core.note.subscribe and core.note.update permissions. Setting an empty note removes it, and deleting an instance, user, role, mod pack or mod removes its note. The web interface gets a notes section on the host, instance, user, role and mod pack pages, and a compact editor in mod details and the saves list. ctl gets note list, get, set and delete commands. Closes clusterio#903 Closes clusterio#599 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1000 +/- ##
==========================================
+ Coverage 81.20% 81.34% +0.14%
==========================================
Files 140 143 +3
Lines 12879 12998 +119
Branches 2236 2252 +16
==========================================
+ Hits 10458 10573 +115
- Misses 2245 2248 +3
- Partials 176 177 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Implements #903, also covers #599.
Every resource can now carry a free text note that is visible to everyone with access to the resource. Notes live in a new
notes.jsondatastore on the controller, keyed by resource type and id (host/4,user/player,mod/name_1.0.0,save/4/world.zip). I went with a separate store instead of a field on each data class because mods and saves are not controller records, and it lets plugins attach notes to their own resource types with no core changes.What is in here:
Notedata class,NoteListRequest,NoteSetRequestandNoteUpdatesEvent, withcore.note.list,core.note.subscribe(both granted by default) andcore.note.updatepermissions. Setting an empty note deletes it. Notes record who last edited them.ResourceNotescomponent (exported for plugins) with an inline textarea editor, shown as a section on the host, instance, user, role and mod pack pages, and in compact form inside mod details and the expanded row of the saves list. Ctrl+Enter saves, Escape cancels, and edits from other clients show up live through the subscription.note list [--type],note get,note setandnote delete, documented in managing-a-cluster.md.Tested with new unit tests for the data class, the request handlers and the cleanup on delete, plus a playwright click-through of the host, role and user pages (spec not committed since playwright is not a repo dependency).
Changelog
🤖 Generated with Claude Code