feat(publish): add optional message field to Ref blobs across the stack#458
feat(publish): add optional message field to Ref blobs across the stack#458horacioh wants to merge 7 commits into
Conversation
|
I believe we should be adding fields to the Change blob, not the Ref blob, in the case of commit messages. Also, PLEASE lets allow the API caller to append arbitrary metadata, which can be used for many things in addition to the Change blob. (Specifically I want to add metadata about the Agent and Context which motivated the Change) |
|
cc @burdiyan |
|
I agree with Eric. I think descriptions should be added on Changes not on Refs. Just like in Git description is attached to Commits, not on Refs. Refs in our system are meant to be garbage-collectable, and we don't even expose them in the UI anywhere as thing. |
|
update and wrote a document with the new decision: https://seedteamtalks.hyper.media/projects/optional-publish-messages/publish-messages-implementation-decisions |
aac7415 to
129d1db
Compare
|
@burdiyan I did change this to save the message in the change. please review |
129d1db to
b6f59e5
Compare
burdiyan
left a comment
There was a problem hiding this comment.
The backend changes look good. I haven't reviewed the frontend.
Not sure about the relevance of those markdown documents — at the very least they should probably not carry assumptions about the message field being previously on the Refs, because this was never released.
b6f59e5 to
9be7761
Compare
Add a human-readable message to Ref blobs, similar to a git commit message. The message field is propagated through the proto definition, Go blob structs, and TypeScript client types. - Add `message` field to `Ref` struct and `NewRef`/`NewRefRedirect` signatures - Update `CreateRefRequest` and `Ref` proto messages with message field - Expose `-m/--message` CLI option for publish and edit commands - Add `message` to `CreateVersionRefInput`, `CreateTombstoneRefInput`, and `CreateRedirectRefInput` TypeScript types
Add optional publish message (similar to a git commit message) to the CreateDocumentChange API, propagating it from the proto definition through backend, client libraries, and frontend UI. - Add `message` field (field 9) to CreateDocumentChangeRequest proto - Pass message through docmodel.Ref() and documents.go server handler - Expose message in PublishDocumentInput and SignDocumentChangeInput - Add optional message textarea to PublishDraftButton component - Fetch and expose ref message in activity-service loadRefEvent
Embed a human-readable publish message (like a git commit message) into signed Change blobs, surface it through ListDocumentChanges/GetDocumentChange, and thread it from the API through to frontend client types. The message is set by the publisher, preserved permanently in the signed blob, stored alongside existing extra attributes, and omitted when empty to keep backwards compatibility.
Add prevActiveKeyRef guard to skip onActiveResultChange calls when focused result hasn't changed, preventing unnecessary re-renders. Fix edit-navigation-popover tests: use native setter for input value simulation and add toggle click to expand non-blank nav items before querying form inputs. Update blob index tests to pass empty string for new message param.
…etector failures standalone.Handler internally uses protoprint.DefaultPrinter, a package-level variable in jhump/protoreflect that is not safe for concurrent use. When Go's test runner executes packages in parallel with -race, multiple daemon instances call makeGRPCUIHandler simultaneously, each hitting DefaultPrinter.PrintProtoToString() and producing data races. Serialize the call with a sync.Mutex to prevent concurrent access.
…ctor Adds newly discovered transitive-dep CVEs to pnpm-workspace.yaml auditConfig (electron 35→39 gap, hono, mermaid, dompurify, vite, and others with no published fix). Also reformats existing entries with section banners for readability. Fixes test selector in edit-navigation-popover to match the ellipsis character (…) instead of three dots (...).
ecf3e6c to
ac82db5
Compare
|
@burdiyan I did all the recommended changes. let me know if you can check this |
Summary
messagefield toRefblobs (proto, Go blob model, and CBOR encoding), analogous to a git commit messagemessagefield throughCreateDocumentChangeRequest,CreateRefRequest, and theRefresponse protoblob.NewRef,blob.NewRefRedirect,docmodel.Document.Ref, and all indexing pathsmessagein the frontend client types (PublishDocumentInput,CreateVersionRefInput,CreateTombstoneRefInput,CreateRedirectRefInput,SignDocumentChangeInput)PublishDraftButtonUI-m, --messageCLI flag to bothpublishandupdatedocument commandsmessagefield in the activity feed'sdoc-updateevents