Repository navigation
fix: preserve chat comment controls when transcript or composer changes - #148763
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 15, 2026, 12:54 AM ET / 04:54 UTC (Revision 3). ClawSweeper reviewWhat this changesPreserves saved chat comment controls across transcript and composer changes, prevents duplicate controls during plugin fallback, and retains formatted selections in sent previews. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful fix for behavior still present on inspected main. The prior duplicate-controls finding is addressed, and no new blocking correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI stages selected transcript passages as editable comment attachments alongside the draft. Composer controls edit those attachments before sending, while transcript markers locate their original passages and sent previews recover their text. flowchart TD
A[Selected transcript passage] --> B[Draft comment attachment]
B --> C[Session comment controller]
C --> D[Edit or delete comment]
B --> E[Built-in or plugin composer]
E --> F[Send attachment]
F --> G[Sent comment preview]
C --> H[Available transcript marker]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +141, Tests +539. Total +680 across 14 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep comment mutations owned by the chat session, source markers owned by the transcript, and old attachment formats readable through the existing parser. Do we have a high-confidence way to reproduce the issue? Yes, from source: replacing the built-in transcript removes main's comment-action owner, and formatted selection length can differ from its recorded DOM span. The contributor supplies targeted regression evidence; this review did not run the application. Is this the best way to solve the issue? Yes. Moving the existing mutation responsibility outside the replaceable transcript and extending the existing attachment parser resolves the defects without competing state or a new public plugin API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3dbc8e2ffe76. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…es (openclaw#148763) * fix: keep saved chat comments accessible * fix: avoid duplicate comments in delegated composers
What Problem This Solves
Follow-up to #148649: saved comments could lose their edit/delete controls when history or the built-in transcript disappeared, and selections spanning formatted line breaks could revert to file cards after sending.
User Impact
Comments remain available through the existing composer hover preview, including with replacement composers and transcripts. Editing an offscreen comment stays open. Formatted selections retain their sent preview after reload. Plugins delegating to the built-in composer, or falling back after an error, show one set of comment controls.
Why This Change Was Made
Comment editing belongs to the chat session, so its owner survives transcript replacement while source markers remain attached to the transcript. Replacement composers display the existing comment chip; the plugin view owns its visibility so built-in delegation and failure fallback do not duplicate it. The attachment records rendered text length separately from DOM source offsets; previously sent files retain their validated legacy parsing path.
Evidence
The regression tests reproduced inaccessible retained comments, replacement-transcript actions without a handler, offscreen edits dismissing themselves, and the formatted-text parsing failure before their fixes. Browser coverage exercises edit/delete/send after clearing history with either composer, transcript replacement, offscreen editing, and formatted send/hover/reload.
Matching 600 × 300 crops aligned to the composer, from the real Control UI with deterministic Gateway and plugin fixtures. The original feature PR retains the inspected before/after desktop/mobile comparisons and recordings of the UI flow and real Gateway delivery.
Inspected recording of formatted selection/send/hover followed by clearing history and editing/deleting the retained comment (deterministic Gateway fixture):
claw-827-proof.mp4
Validation: 14 integrated browser tests and 61 focused unit tests passed; UI source types, changed-file checks, and the production UI build passed. Independent review through P2 found no actionable defects. The task Gateway preview also verified persisted comment hover through an authenticated Tailnet browser.
The delegated and failing composer regressions each reproduced two chips before the fix. Both now verify one chip, edit/delete, preserved draft, and the sent attachment. Matching 1000×300 composer crops:
CI note: the first run on
71c5ac1e8ab7passed every browser job but hit the existing cron stop/restart assertion in checks-node-compact-large-3. Core source, shared helpers, scripts, workflows, and dependency inputs are unchanged from the previous head, where that job passed. All four tests in the failing file also pass locally on the current head. The single failed-job rerun and required CI gate passed on the unchanged commit; the original failure remains linked here.Playback verification: the latest automated review found no code defects but could not play the recording on its host. Direct playback in the GitHub PR was verified in a fresh Chromium session: the 20.76-second, 1440×900 video advanced normally with no media error. The rendered player and all six loaded comparison images were inspected.