Cancelling More -> Edit loses unsent composer draft (and ArrowUp edits resurrect old drafts)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
The issue describes draft state being lost or restored incorrectly during message editing, but names no source files or tests. Start by tracing the composer draft state and the edit and cancel flows, including the ArrowUp path, then find the related tests. Done means cancelling an edit restores the current unsent draft and never resurrects an older draft; an open linked pull request (#44045) already addresses this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description:
When you have unsent text in the composer, clicking More -> Edit on an earlier message and then clicking Cancel (or pressing Escape) clears the composer and loses your draft.
In addition, editing a message via ArrowUp caches the unsent draft in ChatMessages.data and never clears it when editing ends, so a later More -> Edit -> Cancel brings back that old draft even after it was deleted or replaced with new text.
Steps to reproduce:
Case 1 (draft lost):
- Open a room with an existing message from your user and type
SOME TEXTin the composer (do not send). - Open the message menu on that message and click Edit.
- Click Cancel (or press
Escape).
Case 2 (old draft resurrected):
- Type
ANOTHER TEXTin the composer and edit the previous message usingArrowUp. - Press
Escapeto cancel, then deleteANOTHER TEXT(or replace it with new text). - Click More -> Edit on any message, then click Cancel.
Expected behavior:
- Case 1 restores
SOME TEXTin the composer, matchingArrowUp. - Case 2 either stays empty (if cleared) or restores the current draft, rather than bringing back
ANOTHER TEXT.
Actual behavior:
- Case 1:
SOME TEXTis lost and the composer becomes empty.
https://github.com/user-attachments/assets/0723789d-d2b4-4910-9b5f-8815c4b6643d
- Case 2:
ANOTHER TEXTreappears in the composer even after being cleared or replaced.
https://github.com/user-attachments/assets/def04a69-3cdf-41bc-b699-4e3ac45bbf73
Server Setup Information:
- Version of Rocket.Chat Server: 9.2.0-develop
- License Type: Community
- Number of Users: 1
- Operating System: Ubuntu (WSL 2)
- Deployment Method: Local development (
yarn dsv) - Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: v24.15.0
- MongoDB Version: 8.0
Client Setup Information
- Desktop App or Browser Version: Brave (Chromium)
- Operating System: Windows
Additional context
Discovered on current develop while testing composer draft handling alongside message edits.
Relevant logs:
No errors in server or browser console; client-side edit draft state issue.
- Lingua principale
- TypeScript
- Stelle
- 46.6k
- Fork
- 14.2k
- Merge medio
- 2g 21h
- PR unite (30g)
- 302
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RocketChat/Rocket.Chat
-
ModerationConsoleTable renders blank area instead of error state when query failsForse già presa @Siddharth-singh18 l’ha presa 2 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
RocketChat/Rocket.Chat#44109 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Composer clears message text when the first uploaded file's media confirmation failsForse già presa @Sravan-0802 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
RocketChat/Rocket.Chat#44087 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Subsequent OAuth logins overwrite persisted service fields (e.g. refreshToken) with nullForse già presa @ayushbuilds-code l’ha presa 4 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
RocketChat/Rocket.Chat#44053 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Custom OAuth callback times out when Merge roles from SSO is enabledForse già presa @Pantkartik l’ha presa 6 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
RocketChat/Rocket.Chat#44005 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Heads-up: Issue Dedupe workflow pins claude-sonnet-4-5-20250929, which Anthropic retires Nov 30Forse già presa @Ravichandra531 l’ha presa 6 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
RocketChat/Rocket.Chat#43944 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di RocketChat/Rocket.Chat
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
zabuton-app/meguri#875 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
iruzen-dono/workless#117 ·
I maintainer di solito rispondono entro 1 giorno
-
area:api area:web wave wave:trivial
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
vetro-protocol/vetro-monorepo#1321 ·
I maintainer di solito rispondono entro 1 giorno