mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 21:46:49 +00:00
f19b52fb20
On the phone, attaching a file to a note, detaching one or deleting a note with attachments left the trip's Files tab on the old list until a reload. The desktop panel fires the local collab-files-changed event that useTripWebSocket listens for, because the server leaves the writer's own socket out of its broadcast; the phone notes tab never fired it. The event now lives in the shared useCollabNotesData hook: uploadNoteFiles announces it once after a batch, and announceNoteFilesChanged is what both shells call after deleting a note or a note file. The desktop no longer fires it by hand after an upload. Red before the fix: tests/unit/mobile/trip/MCollabNotes.test.tsx FE-MOB-CNOTE-034 failed with "expected 0 to be 1" on the event count after detaching a file. FE-COLLAB-NOTESDATA-009 covers the hook. No existing assertions changed.