Fix: Layout-mode notes missing from MCP JSON and Markdown copy#176
Open
panrafal wants to merge 1 commit intobenjitaylor:mainfrom
Open
Fix: Layout-mode notes missing from MCP JSON and Markdown copy#176panrafal wants to merge 1 commit intobenjitaylor:mainfrom
panrafal wants to merge 1 commit intobenjitaylor:mainfrom
Conversation
|
@panrafal is attempting to deploy a commit to the Benji Taylor's Projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Problem
When the user attached a note to a Layout-mode item (placement or rearrange), the note was visible in the overlay but dropped from both outputs:
if (currentMap.has(p.id)) continue;) for already-synced placements, so later text edits never reached the server.section.notewas never referenced in the sync payload at all, and pure note-only edits (no rect delta) weren't triggering any update.generateDesignOutput/generateRearrangeOutputrendered component type, coordinates, and sizes but never the user's note.Fix
placementSyncedTextMapref tracks the last-syncedp.textper id; when it diverges, PATCHescomment+placement.textviaupdateAnnotationOnServer. Cleared alongsideplacementAnnotationMapon server-driven deletes and inclearAll.comment(mirroring the existing placement pattern"…— 'my note'"), triggers on note-only edits, and uses a"Note on X section"comment when nothing geometric changed. Kept theAnnotation.rearrangeschema unchanged for backwards compatibility — the note rides incomment, not a new field.generateDesignOutputemits- Note: "…"bullets for placements with text.generateRearrangeOutputemits notes per section and now includes sections whose only change is a note.Files
package/src/components/page-toolbar-css/index.tsxpackage/src/components/design-mode/output.tsWire format
No breaking changes.
Annotationschema untouched. Existing consumers that read the compositecommentstring keep working; the note is appended to it with the same— "…"convention already used for placements.Test plan
GET <endpoint>/sessions/<id>shows it incommentandplacement.text.commentincludes the note.