Skip to content

feat: add message editing UI - #99

Merged
shakkernerd merged 8 commits into
openclaw:mainfrom
jjjhenriksen:codex/message-editing-ready
Jul 21, 2026
Merged

shakkernerd merged 8 commits into
openclaw:mainfrom
jjjhenriksen:codex/message-editing-ready

Conversation

@jjjhenriksen

@jjjhenriksen jjjhenriksen commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add polished author-only inline editing for channel messages, direct messages, thread roots, and thread replies
  • share bounded edit-session state across the full app and authenticated channel/thread embeds
  • retain drafts across navigation and virtualized row recycling while handling realtime changes, deletion, failures, and competing editors
  • preserve the existing server-owned authorization and whitespace-normalization contracts
  • document the behavior and commit rendered real-app proof

Behavior

  • Edit is exposed only for the original author and remains unavailable for pending, failed, deleted, or other users' messages.
  • Save supports the button and Ctrl/Command+Enter; Escape cancels and restores focus.
  • Empty normalized bodies are rejected locally, no-op edits close without a PATCH, and API failures keep the draft visible for retry.
  • Each conversation allows one active editor. Activating another edit reveals the retained editor instead of discarding its draft.
  • Untouched drafts follow realtime updates; changed drafts are retained with a conflict warning.
  • Reactions, attachments, Markdown rendering, thread state, and edited indicators remain intact after an edit.

Verification

  • pnpm build - passed
  • pnpm fmt:check - passed
  • Crabbox Hetzner run run_0c54703db827 on lease cbx_09128e47bb1d - 7 passed (39.4s), lease stopped
  • broader check stages passed production build, Go packages, fake company deployment tests, desktop tests, type checking, and linting
  • git diff --check origin/main...HEAD - passed

Rendered proof is in:

  • docs/proof/message-editing-editor.png
  • docs/proof/message-editing-real-app.png
  • docs/proof/message-editing-proof.md

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 19, 2026, 6:59 PM ET / 22:59 UTC.

Summary
The PR adds author-only inline editing for channel messages and thread roots/replies, including keyboard controls, persistence through the existing message PATCH path, browser coverage, proof documentation, and regenerated web assets.

Reproducibility: not applicable. as a bug reproduction: this PR proposes a new interaction. The contributor does provide a concrete real-app exercise for the proposed behavior through the production bundle and Go API.

Review metrics: 2 noteworthy metrics.

  • Patch surface: 22 files affected; 956 added, 105 removed. The user-facing feature spans application state, two message surfaces, CSS, generated assets, proof, and browser tests.
  • Behavior coverage: 3 focused Playwright tests. The submitted real-app run covers persistence, channel/thread behavior, focus, failure recovery, and edit-session coordination.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Obtain maintainer sponsorship or decline the new editing interaction.
  • [P2] Rebase onto current main and rerun the focused Playwright proof and required checks on the resulting head.

Risk before merge

  • [P1] GitHub reports this head as dirty against a main branch that has advanced since the PR base; rebase and refresh the focused browser proof/checks before merge so the reviewed behavior matches the actual merge result.

Maintainer options:

  1. Decide the mitigation before merge
    If maintainers want message editing in ClickClack, retain the narrow author-only interaction, rebase it onto current main, and rerun the focused production-bundle browser proof plus required checks on the rebased head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No mechanical repair is indicated; a maintainer must sponsor or decline the new message-editing interaction, then the contributor should rebase and refresh exact-head validation.

Maintainer decision needed

  • Question: Should ClickClack adopt author-only editing for already-sent channel messages and thread replies as a supported core interaction?
  • Rationale: The patch is an additive user-facing capability over an existing update endpoint; source-level review cannot determine whether its interaction, moderation expectations, and permanence fit the product without maintainer intent.
  • Likely owner: jjjhenriksen — They are the available implementation-specific contact, though current-main ownership history was not available in the supplied context.
  • Options:
    • Sponsor the narrow editing interaction (recommended): Approve author-only editing, then require a rebase onto current main and exact-head browser validation before merge.
    • Decline core message editing: Close the PR as an unsponsored product direction if immutable messages remain the intended ClickClack interaction.

Security
Cleared: The diff adds client-side UI, tests, proof assets, and regenerated first-party web assets without changing dependency sources, workflows, secrets handling, permissions, or server authorization boundaries.

Review details

Best possible solution:

If maintainers want message editing in ClickClack, retain the narrow author-only interaction, rebase it onto current main, and rerun the focused production-bundle browser proof plus required checks on the rebased head.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction: this PR proposes a new interaction. The contributor does provide a concrete real-app exercise for the proposed behavior through the production bundle and Go API.

Is this the best way to solve the issue?

Unclear: the implementation is a focused reuse of the existing message-update endpoint, but whether sent-message editing belongs in ClickClack core requires an explicit product decision.

AGENTS.md: found, but no applicable review policy affected this item.

Codex review notes: model internal, reasoning high; reviewed against 992f404d4204.

Label changes

Label justifications:

  • P2: This is a bounded user-facing feature whose value is clear but whose product acceptance is not urgent or yet maintainer-sponsored.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body documents an after-fix run against the locally built production bundle and real Go API, with focused Playwright results and a committed screenshot artifact showing the edited state.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body documents an after-fix run against the locally built production bundle and real Go API, with focused Playwright results and a committed screenshot artifact showing the edited state.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body documents an after-fix run against the locally built production bundle and real Go API, with focused Playwright results and a committed screenshot artifact showing the edited state.
Evidence reviewed

What I checked:

  • Feature scope: The PR introduces a new visible author-only editing interaction in ChatApp, message rows, and the thread panel rather than repairing an established broken behavior. (apps/web/src/ChatApp.svelte:2035, d95bb2e82feb)
  • Existing update integration: The PR body and commit message state that saves use the existing PATCH /api/messages/{id} endpoint; the proposed UI is additive over an existing server capability. (apps/web/src/components/messages/MessageEditor.svelte:43, d95bb2e82feb)
  • Real behavior proof: The submitted proof describes three Playwright runs against a locally built production web bundle served by the real Go API, covering persisted channel and thread edits plus the screenshot artifact. (tests/e2e/message-editing.spec.ts:1, d95bb2e82feb)
  • Prior review continuity: The prior completed review identified one editor-surface issue on an earlier head; subsequent completed cycles at the current head reported no remaining findings. (apps/web/src/ChatApp.svelte:2035, d95bb2e82feb)
  • Merge refresh needed: The PR base is 146f762 while supplied current main is 992f404, and GitHub reports the current merge state as dirty. (992f404d4204)

Likely related people:

  • jjjhenriksen: Authored the sole PR commit and supplied the implementation-specific browser proof; a current-main feature-history owner could not be established from the available read-only review context. (role: current implementation author and likely follow-up contact; confidence: low; commits: d95bb2e82feb; files: apps/web/src/ChatApp.svelte, apps/web/src/components/messages/MessageEditor.svelte, tests/e2e/message-editing.spec.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (4 earlier review cycles)
  • reviewed 2026-07-18T23:15:04.680Z sha 27e456a :: found issues before merge. :: [P2] Preserve the selected surface when rendering the editor
  • reviewed 2026-07-19T01:12:08.542Z sha d95bb2e :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T01:53:23.870Z sha d95bb2e :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T04:01:02.820Z sha d95bb2e :: needs maintainer review before merge. :: none

@jjjhenriksen
jjjhenriksen force-pushed the codex/message-editing-ready branch from 27e456a to d95bb2e Compare July 19, 2026 01:08
@jjjhenriksen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jul 19, 2026
@jjjhenriksen
jjjhenriksen marked this pull request as ready for review July 19, 2026 22:56
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@shakkernerd shakkernerd self-assigned this Jul 20, 2026
jjjhenriksen and others added 8 commits July 21, 2026 00:43
- Add inline edit mode in MessageRow.svelte with textarea
- Add edit button on own messages (pencil icon)
- Add Save/Cancel controls with keyboard shortcuts (Esc to cancel, Cmd+Enter to save)
- Wire to existing PATCH /api/messages/{id} endpoint
- Show (edited) indicator on edited messages
- Hide message actions while editing
- Add editing message state management in ChatApp.svelte
- Show edited indicator in thread panel as well
@shakkernerd
shakkernerd force-pushed the codex/message-editing-ready branch from d95bb2e to c9b6e9e Compare July 21, 2026 00:48
@shakkernerd
shakkernerd merged commit 9eb59dd into openclaw:main Jul 21, 2026
10 of 11 checks passed
@shakkernerd

Copy link
Copy Markdown
Contributor

Landed via rebase. Message editing now covers channels, direct messages, threads, and authenticated embeds, with retained drafts, conflict and error handling, responsive inline controls, and end-to-end regression coverage.

@jjjhenriksen
jjjhenriksen deleted the codex/message-editing-ready branch September 27, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants