Skip to content

fix(app): use HTTP-safe UUID for restored comment notes - #53501

Merged
opencode-agent[bot] merged 1 commit into
v2from
comment-note-http-uuid
Oct 6, 2026
Merged

opencode-agent[bot] merged 1 commit into
v2from
comment-note-http-uuid

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restoring a sent comment note to the composer (revert/fork) generated its commentID with crypto.randomUUID(), which is unavailable on non-local HTTP origins. It now uses the existing uuid() helper, matching the rest of the composer.
  • Touching this file brings it under lint:changed, so the hand-rolled metadata parsing is replaced with Effect Schema decoding: readPromptPresentation decodes displayText, comments and attachments with the existing Persistence helpers, still skipping malformed comments/attachments individually and still returning nothing without a comments list.
  • Removes readCommentMetadata and createCommentMetadata, which had no callers.

Behaviour differences, checked against the previous implementation on a table of malformed inputs: a file comment sent with type: "file" keeps that field, and a comment with an unrecognised type is now skipped instead of being read as a file comment.

Checks

  • bun typecheck from packages/app
  • bun test --conditions=solid --preload ./happydom.ts ./src from packages/app (730 pass)
  • oxlint on comment-note.ts: 0 warnings

Requested by: @Brendonovich (Brendan via Slack)

@opencode-agent
opencode-agent Bot merged commit da20865 into v2 Oct 6, 2026
11 checks passed
@opencode-agent
opencode-agent Bot deleted the comment-note-http-uuid branch October 6, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant