fix(messages): route edits to the owning composer - #6575
Conversation
|
AI-authored update (Rizz): Persisted thread replies could render from the independently loaded thread data but could not resolve as edit targets, so choosing Edit appeared to do nothing. Fixed in Validation at that commit: the pre-seeded regression fails against the prior implementation and passes with the fix; fresh built E2E covers root → main composer and persisted reply → thread composer with immediate focus (2/2); desktop typecheck and all 5,398 desktop unit tests pass; pre-push branch-skew, file-size, desktop-check, typecheck, and desktop-test gates pass. |
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
c50988f to
c93b0ad
Compare
|
AI-assisted update (Rizz): addressed Mongo’s F1–F5 blockers.
Validated at |
Refuse cross-message edit transitions while preserving unsaved text, and let Escape cancel focus-drawer edits before drawer dismissal. Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
8f8f59f to
f3dfb9e
Compare
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Category: fix
User Impact: Editing a channel message now opens in the main composer, while editing a thread reply stays in the thread composer, with focus ready for typing.
Problem: When a thread was open, Buzz treated its root message as thread-owned and opened edits in the thread composer. Menu-driven edits also lacked regression coverage for immediate focus.
Solution: Carry the message's semantic root/reply classification into the edit target, route only actual replies to the thread composer, and use the menu primitive's selection event for a reliable handoff. End-to-end tests cover placement and focus for both paths.
File changes
desktop/src/features/channels/ui/ChannelPane.tsx
Routes edit targets by semantic thread ownership rather than membership in the open thread panel.
desktop/src/features/channels/ui/ChannelPane.types.ts
Uses the shared composer edit-target type so routing metadata stays attached to the target.
desktop/src/features/messages/lib/draftMentionRefs.ts
Classifies each edit target as a root or true thread reply from its event tags.
desktop/src/features/messages/lib/draftMentionRefs.test.mjs
Covers semantic ownership for root and reply edit targets.
desktop/src/features/messages/ui/MessageActionBar.tsx
Handles Edit through the dropdown menu's selection event so focus restoration and edit startup share the intended lifecycle.
desktop/src/features/messages/ui/MessageComposer.types.ts
Adds semantic thread ownership to the edit-target contract.
desktop/tests/e2e/messaging.spec.ts
Verifies root edits use and focus the main composer, while reply edits use and focus the thread composer.
Reproduction Steps
Screenshots
Editing a channel-root message uses the main composer
Editing an actual thread reply uses the thread composer