fix(desktop): enable message editing in Inbox#2198
Conversation
Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz>
|
@codex review |
|
@builderbot review |
|
To use Codex here, create a Codex account and connect to github. |
Co-authored-by: npub1ft62tztwwm2x9xamk25smmuaj4sfckdkldksruf2x2jwqalffkrq0g7arr <4af4a5896e76d4629bbbb2a90def9d95609c59b6fb6d01f12a32a4e077e94d86@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1ft62tztwwm2x9xamk25smmuaj4sfckdkldksruf2x2jwqalffkrq0g7arr <4af4a5896e76d4629bbbb2a90def9d95609c59b6fb6d01f12a32a4e077e94d86@sprout-oss.stage.blox.sqprod.co>
brow
left a comment
There was a problem hiding this comment.
🤖 HomeView.tsx builds a just-sent Inbox reply echo with tags: emojiTags only (currently line 894), omitting the imetaTags and mentionTags already sent to the relay. The new Edit action can target this echo before refresh replaces it, so editing a just-sent attachment reply hydrates zero attachments and Save emits an explicit empty imeta set, silently deleting its media. Please preserve the full outbound tags on the echo, such as tags: [...imetaTags, ...emojiTags, ...mentionTags], and add a send-attachment-then-immediate-edit regression test.
brow
left a comment
There was a problem hiding this comment.
🤖 Late independent review at 8437854 (full PR plus the round-2 archived-channel delta). Scope: shared ownership check and agent-owner path, the known-and-unarchived channel gate (fails closed while the channel list is unresolved, since undefined === null is false), reply/edit target separation, composer hydration and edit-save wiring, structural-event hydrate/refresh (idempotent when the same edit/deletion event also arrives via the channel-window cache), and the E2E regression coverage including the archived-channel case.
No new issues from me. I verified end to end the one outstanding finding already filed in review 4740770432: the just-sent Inbox reply echo keeps only its emoji tags, so an immediate Edit of that echo hydrates zero attachments and Save emits an explicit empty imeta set, which is the wipe-attachments signal; that fix is in flight. All required checks are green at this head.
Submitting as COMMENT rather than approval because this authenticated GitHub account is also the PR author.
Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz>
c1288b4 to
0bb3722
Compare
|
🤖 Addressed in de273b8. The immediate Inbox echo now retains imeta, emoji, and reference-only mention tags. The new E2E withholds the relay echo, sends an attachment reply, edits the local echo, verifies the edit payload preserves the imeta tag, then releases the relay echo and confirms the attachment still renders. |
brow
left a comment
There was a problem hiding this comment.
🤖 Round-3 delta review at 0bb3722 (delta from my prior review at 8437854: fix de273b8 plus the main merge). Clean, no new issues.
Verified: (1) the echo fix carries exactly the three tag groups splitOutgoingTags produced for the outbound send, so imetaMediaFromTags hydrates the attachment on an immediate edit and Save no longer emits the empty wipe set; (2) the mock's new mentionTags arg mirrors the real send_channel_message Tauri surface (tauri.ts already passes it); (3) the defer/release echo seam is reset on mock install so deferred echoes cannot leak across tests, and only the send path is gated; (4) the new E2E asserts payload-level fidelity on both send_channel_message and edit_message while the relay echo is genuinely withheld, then releases exactly one echo and re-asserts text plus attachment rendering — the mediaTags assertion is the discriminating pre-fix failure; (5) the e2eBridge.ts merge overlap resolves correctly — diffed against both parents, the merge adds exactly the two main-side command mocks on one side and exactly the PR's changes on the other, with no lost edits or reverts.
All required checks are green at this head, including both Desktop E2E Integration shards. COMMENT rather than approval because this authenticated account is also the PR author.
What changed?
Inbox detail now gives the current user's messages the same ownership-gated Edit action as channel view. Editing reuses the existing composer and mutation flow, preserves attachment metadata, and refreshes structural overlays so the edited content appears immediately.
Foreign authors' messages remain non-editable, including grouped Inbox conversations whose selected event is not the representative item.
Why?
Inbox rows did not pass an edit handler into the shared message action bar, so a user's own messages could be edited from channel view but not from Inbox detail.
How is it tested?
Desktop checks, unit tests, and the full local CI gate passed. The focused Inbox Playwright regression passed 3 consecutive runs and covers current-user edit/save, foreign and archived-channel denial, and attachment preservation when a just-sent reply is edited before its relay echo arrives.
Added tests:
inbox-edit.spec.tsinboxViewHelpers.test.mjs🤖 This PR was authored with an agent.