Skip to content

feat(chat): confirm message actions and show edits - #183

Closed
assisjp wants to merge 10 commits into
oxidezap:mainfrom
assisjp:feat/message-actions-attachment-preview
Closed

assisjp wants to merge 10 commits into
oxidezap:mainfrom
assisjp:feat/message-actions-attachment-preview

Conversation

@assisjp

@assisjp assisjp commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Por que

Evitar exclusões e envios acidentais, permitir corrigir mensagens próprias e tornar visível quando uma mensagem foi editada, inclusive se veio de outra pessoa ou de um grupo.

O que muda

  • Adiciona edição de texto enviado e as ações distintas Apagar para mim e Apagar para todos na GUI, reutilizando a sessão e as operações já existentes via IPC/daemon. O resultado do servidor continua autoritativo; falhas não são apresentadas como sucesso.
  • Exige confirmação antes das duas formas de exclusão, identificando conversa, horário, prévia e escopo; cancelar não envia a requisição e confirmar a consome uma única vez.
  • Mostra editada junto ao horário somente após uma edição aceita, para mensagens próprias ou recebidas, em conversas diretas e grupos. O estado persiste ao recarregar o histórico.
  • Exige confirmação explícita antes de enviar anexos escolhidos no seletor ou por arrastar e soltar, inclusive lotes e recusas parciais. Cancelar não envia; confirmar envia cada item aceito uma única vez. Preserva a confirmação de imagem colada.
  • Permite selecionar e copiar apenas um trecho do texto visível da mensagem, preservando formatação, links e a ação de copiar a mensagem inteira.
  • Inclui testes e registros das stories 1.6, 1.7 e 1.8.

Dependência da PR #182

Esta branch foi criada sobre 61fb458, então head da PR #182, que já foi integrada a main. O histórico segue empilhado e o branch agora conflita com main; integrar a base e revisar o delta próprio deste PR antes de rodar CI e tirá-lo de Draft.

Verificação

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-features -q (fora do sandbox para permitir o socket local exigido por um teste da CLI)
  • cargo build --release --bin oxidezap --bin oxidezapd
  • Aplicativo macOS instalado, assinado ad hoc, assinatura verificada e GUI/daemon iniciados
  • O usuário testou manualmente no app macOS combinado todas as funções desta PR — edição, exclusões, indicador de edição, confirmação de anexos e seleção de trecho de texto — e relatou funcionamento correto. A limitação entre duas janelas descrita abaixo permanece.
  • Runtime web ainda não foi testado manualmente.

Verificação e teste manual informados somente no app macOS combinado em macOS 26.5 arm64. Linux, Windows e WASM não foram testados manualmente em runtime. As stories seguem Ready for Review; o branch permanece Draft por conflitos com main e precisa de integração e CI no head resultante antes de ficar Ready.

Limitação conhecida

Apagar para mim em uma GUI pode não convergir visualmente em uma segunda janela já aberta. A segunda janela pode continuar mostrando a mensagem até reconstruir a conversa; sincronização entre janelas requer follow-up separado e não está resolvida neste PR.


Summary by cubic

Adds message editing and deletion with confirmation, an edited indicator, attachment confirmation, and partial text selection to the desktop GUI, and fixes stale archive/read state and fragile notification clicks in the reliability follow-up.

  • Editing your own sent text updates the message in place; once the server accepts, an "edited" label appears next to the time, also on received messages.
  • Delete (for me or for everyone) now shows a confirmation dialog with conversation, time, preview, and scope before sending the request; cancel never sends, confirm sends exactly once.
  • Attachments added via picker, drag-and-drop, or paste go through a confirmation preview; each accepted file is sent once, and cancel discards the selection.
  • Message text can be selected and copied partially, preserving formatting and links.
  • Archived chats get their own filter, and desktop notifications honor mute/archive state while still alerting on direct mentions; macOS alerts are native, and clicking one opens the conversation even when chat hydration is still in flight.
  • The session no longer announces presence automatically so WhatsApp keeps routing new-message attention to the phone, and server acknowledgements are no longer reported to plugins as peer delivery.
  • Known limitation: delete-for-me may not converge in a second already-open window.

Written for commit 590ddec. Summary will update on new commits.

Review in cubic

Route screenshot paste through a confirmation preview and surface live
server acknowledgements. Complete archived chat discovery, recover
group subjects, and keep phone notifications eligible with manual
companion presence. Desktop alerts inherit mute/archive policy with
a direct-mention exception.

Add preference-provenance migration; legacy rows refresh on the next
history sync because prior source precedence cannot be reconstructed.
An absent archive field from older frames is unknown, not false.
Carry the optional store answer so the GUI can unarchive promptly
without pulling archived chats into the active list on unknown state.
Require confirmation before deleting messages or sending picker/drop attachments. Surface accepted edits on own and received bubbles, and allow copying selected message text.
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Prevent stale archive and read state during asynchronous sync, and retain notification clicks through chat hydration. Keep macOS alerts ordered and audible where notification policy permits.
…s-attachment-preview

# Conflicts:
#	crates/gui/src/app/mod.rs
@assisjp

assisjp commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by PR #200, which includes the message-action, confirmation, and partial-text-selection work from this draft in a single branch based on current main. The discussion and commits here remain available as history. Closing this draft to keep review on #200; its branch will not be deleted.

@assisjp assisjp closed this Sep 23, 2026
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.

1 participant