Support editing comments and replies on the frontend - #247
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
- Preserve newlines and consecutive spaces when editing plain-text comments created from the Console textarea editor - Show a dedicated message when saving fails with 404 on Halo versions without the content endpoints - Allow canceling while the latest content is loading and retrying after a load failure - Focus the editor once it is ready and confirm before discarding unsaved changes - Rename the generic close event to edit-close - Cover the new content endpoints and plain-text conversion with tests
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e68dda894f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Join plain-text lines with hard breaks instead of paragraphs so line spacing matches the pre-wrap rendering of existing comments - Keep existing HTML entities encoded once and expand tabs - Treat angle-bracket text that cleaning would strip as plain text - Record the editor-normalized content as the dirty-check baseline so undoing back to the original no longer prompts or enables save - Cover concurrent deletion in the 404 save error message
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab186fb9b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d43f286ce9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Port the comment content editing capability from Halo Console (halo-dev/halo#10302) to the comment widget, so users with comment management permission can edit comment and reply bodies directly on the frontend.
system:comments:managepermission and hidden for deleted targetsPUT /apis/api.console.halo.run/v1alpha1/{comments|replies}/{name}/contentendpoints withraw,content, and the loadedversion, preserving moderation state and authorshipcontent-visibility: autopaint containment on the item content container while editingRequires a Halo version that includes halo-dev/halo#10302. On older versions, saving fails with an inline error and the draft is kept; nothing else in the widget is affected.
Validation:
pnpm build,tsc --noEmit,biome check, andvitest run(122 tests) all pass