Persist chat attachment metadata across history reloads#647
Conversation
Persist chat attachment display metadata in a local sidecar so history reloads can rehydrate trusted attachment chips without storing attachment bytes. Escape untrusted marker-looking text to prevent pasted attachment marker spoofing, and cover reload, attachment-only, and spoofing cases in tray tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: found issues before merge. Reviewed June 2, 2026, 7:32 PM ET / 23:32 UTC. Summary Reproducibility: yes. Source inspection shows the underlying bug path and the patch findings: current main sends trimmed text while attachment chips are local, and PR head persists plaintext match text and matches repeated text by a broad time window. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the sidecar approach only after it stores minimized non-plaintext matching data and proves repeated same-text history entries hydrate the correct attachment chips. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the underlying bug path and the patch findings: current main sends trimmed text while attachment chips are local, and PR head persists plaintext match text and matches repeated text by a broad time window. Is this the best way to solve the issue? No. Writing after successful send is the right direction, but the sidecar should not store plaintext user messages and needs a safer identity/matching strategy before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against bfeb3b5c90be. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
Summary
Fixes #453.
Validation
OPENCLAW_REPO_ROOT=C:\oc453; .\build.ps1OPENCLAW_REPO_ROOT=C:\oc453; dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoreOPENCLAW_REPO_ROOT=C:\oc453; dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoreNote: validation was run via the short junction path
C:\oc453to avoid the WinAppSDK PRI expansion/path issue seen from the generated long worktree path.