Skip to content

A chat without a composer is read-only: its messages offer only Copy and Delete for Everyone - #302

Merged
pitis merged 5 commits into
mainfrom
fix/request-menu
Nov 29, 2026
Merged

pitis merged 5 commits into
mainfrom
fix/request-menu

Conversation

@pitis

@pitis pitis commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

What changed

A chat without a composer is read-only, as in Signal. That covers a message request, a blocked chat, a group invitation and a join request (the cases answer_first covers). A message there now offers only Copy and Delete for Everyone…:

  • Reply and Edit are gone from its right-click menu, its … menu and the menu Return opens from the keys (Messages can be reached from the keyboard: ↑ and ↓ select one in the timeline, Return opens its menu #294). The hover Reply button is gone too. Picking either one used to give the keys to a composer that isn't drawn.
  • React is gone from the same menus. The hover React button, and with it the reaction picker (reachable from the keyboard), are gone too. Our own reaction's Remove in the pill's list goes as well, since that sends a reaction too. The pill still lists who reacted.
  • Retry is gone from the menus. A failed send's time line now shows ⚠ Not sent (the existing tick) instead of the pressable ⚠ Retry.

How it's built:

  • actions::menu takes composer. Without one, it offers only Copy and Delete. The row's items come from it.
  • The hover React and Reply buttons, the bubble's Retry and the pill's Remove show only when items has React, Reply or Retry. So the menus and the buttons follow one rule.
  • row() passes !answer_first(c). The keyboard menu and timeline_key (Esc) ask a new has_composer() about the open chat. That replaces the copy timeline_key had inline.
  • --snapshot gains request-menu: the request's "Hi!" with its menu open from the keys, showing only Copy. demo_selected now takes which message to select.
  • DESIGN.md has a line for the rule.

Why

#295 asked for Reply and Edit. The orchestrator widened it to React and Retry, because both send something to the other person, and Signal keeps a message request read-only: no reacting to a stranger before accepting, nothing sent to someone blocked. Delete for Everyone… and Copy stay, by that same decision. The Mac app had the same gap, so this follows the decision, not the Mac.

Not changed:

  • A group we left still has a composer in the desktop app (answer_first doesn't cover it), so it keeps everything.
  • A reply or edit that is already open when the open chat loses its composer is a separate issue.

How it was tested

  • Window test actions::window_tests::a_chat_without_a_composer_offers_only_copy_and_delete. It was written first for each step, and each version failed on the code before it: first because Reply was second, then because React was first ("the keys' menu: left None, right Some("On my way, 20 minutes")"). The Family group is made a request, then:
    • On our "On my way", Copy is the first item in both the keyboard menu and the right-click menu. So React, Reply and Edit aren't there.
    • On our failed "Running a bit late", Copy is the last item (↑ from none), so Retry isn't there. Tab never reaches a Retry by its time, and no reply or edit starts.
    • Back to a normal chat, that message's last item is Retry, not Copy, and Tab reaches its Retry. The right-click menu's second item replies ("Replying to yourself") and the keyboard menu's third edits ("Editing message").
  • Unit our_sent_message_offers_everything_and_theirs_no_changes. With no composer, our message offers only Copy and Delete, and a failed one only Copy.
  • Gate. make format && make check on 2675a11, which already has origin/main c3f74e7 merged: cargo fmt --check passes; cargo clippy --all-targets -D warnings passes, plain and with --features hush-desktop/snapshot; cargo test --features hush-desktop/snapshot passes (403 + 553 tests, 4 ignored as before).
  • Snapshots (cargo run -p hush-desktop --features snapshot -- --snapshot <dir>):
    • request-menu-light: the request's "Hi!" with its menu showing only Copy.
    • chat-light: the group's failed message still shows ⚠ Retry.
    • Earlier, before React and Retry were added: selected-menu-light (the group's menu, unchanged) and reply-light (the group's hover buttons, unchanged).

Not covered by a test:

  • The hover React and Reply buttons' absence. They show only under the pointer, and the window tests can't find them.
  • The pill's Remove. Its button has no selector a test can find.

All three follow the same items the menus are tested on.

Closes #295

A message request, a blocked chat, an invitation or a join request has no composer: its
messages' menus (right-click, …, and the one Return opens from the keys) no longer offer
Reply or Edit, and the hover Reply button doesn't show. A --snapshot of the request's menu.
@pitis

pitis commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Review (/pr-review-toolkit:review-pr on git diff origin/main...HEAD: code, tests, comments; no error handling or new types, so no silent-failure or type review).

Critical: none. Important: none.

Suggestions, and what was done:

  • Comments: the row_actions doc named view::answer_first, which in that file means actions::view. Fixed: it says super::view::answer_first (5739cfd).
  • Comments: beside's doc still said Reply always shows on hover. Fixed: "Reply (where its menu has it)" (5739cfd).
  • Comments: demo_selected's doc listed its callers' messages, which would go stale. Fixed: dropped (5739cfd).
  • Comments: DESIGN.md could say "More's menu" in place of "its menus". Declined: "its menus" also covers the keyboard menu, which isn't More's.
  • Tests: the hover Reply button's absence isn't tested. Declined: it is invisible() until hovered, and it reads the same row.items the right-click leg proves has no Reply. Only reverting the .then(...) itself would slip through. Said so in the PR body.
  • Tests: "up up up up" depends on the demo's message order, and could select by text. Declined: the window tests from Messages can be reached from the keyboard: ↑ and ↓ select one in the timeline, Return opens its menu #294 select the same way. A new demo message breaks the test loudly, not silently.
  • Tests: the Edit check could also compare the bar's detail, and the no-composer unit case could be its own test. Declined: minor. The keys picked are the same ones that copied "On my way" a step earlier.
  • Code: attach.rs's writable() repeats has_composer()'s lookup. Declined: it is outside this issue, in a file other work touches, and has nothing to do with menus.
  • Code, already on main and not a way to start a reply: if a reply or edit is open and the open chat then becomes one with no composer (blocked from the sidebar, or a sync), it stays held until the chat has a composer again. For the owner: a separate issue if it matters.
  • Code, a product question: React and Retry stay in requests and blocked chats, as the issue says ("the other items stay"). Both send something to the other side. For the owner if they should go too.

Gate after the fixes, on 2cd3443 (merged with origin/main c3f74e7): make format && make check pass (fmt, both clippy runs, 403 + 553 tests, 4 ignored as before).

… its messages

No React (menu, hover button and its picker), no Retry (menu, or by a failed send's time,
which says Not sent), and our reaction can't be removed: as Signal, a request or a blocked
chat sends nothing else to the other side before it is answered.
@pitis pitis changed the title A chat without a composer no longer offers Reply or Edit on its messages A chat without a composer is read-only: its messages offer only Copy and Delete for Everyone Nov 29, 2026
@pitis

pitis commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Widened on the orchestrator's call (2675a11). In a chat without a composer, React and Retry go too, because both send something to the other person. Signal keeps a request read-only, and nothing goes to someone blocked.

  • React is gone from the menus, along with the hover React button and its picker.
  • Retry is gone from the menus. A failed send's time now shows ⚠ Not sent instead of ⚠ Retry.
  • Our reaction's Remove in the pill's list is gone too, since it is a reaction as well. Say if it should stay.
  • Copy and Delete for Everyone… stay.

The window test is now a_chat_without_a_composer_offers_only_copy_and_delete, and it failed first. In a request, Copy is the first item in both menus and the last on a failed message, and Tab finds no Retry. In a normal chat, Retry, Reply and Edit are all still there.

DESIGN.md has the rule. The request-menu snapshot shows only Copy.

Gate on 2675a11, which already has origin/main merged: make format && make check passes (403 + 553 tests, 4 ignored as before).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A message request's menu doesn't offer Reply or Edit

1 participant