Collapsible long messages: remember "Read more" expansion per message for the session #152

Closed
opened 2026-09-17 22:49:23 -04:00 by jared · 1 comment
Owner

Expanding a collapsed long message currently resets on re-render/scroll-away (verify: virtualised timeline unmounts rows). Keep a session-scoped Set<eventId> of expanded messages (module atom, not persisted) so scrolling away and back, or a re-render, keeps it open. Cleared on reload.

Expanding a collapsed long message currently resets on re-render/scroll-away (verify: virtualised timeline unmounts rows). Keep a session-scoped `Set<eventId>` of expanded messages (module atom, not persisted) so scrolling away and back, or a re-render, keeps it open. Cleared on reload.
jared added this to the Features 2026-Q4 milestone 2026-09-17 22:49:23 -04:00
jared added the enhancementpriority: lowuxarea: messaging labels 2026-09-17 22:49:23 -04:00
jared self-assigned this 2026-09-17 22:49:23 -04:00
Author
Owner

Done in the last commit (fix(timeline): remember 'Read more' expansion per message for the session): CollapsibleBody seeds its collapsed flag from a module-level Set<eventId> of expanded messages (never persisted, cleared on reload) and updates it on toggle, so a row that the windowed timeline unmounts and remounts comes back expanded. Verified headless that expanding, scrolling 80 messages down and back keeps 'Show less'; the remount case is covered by construction (state comes from the set, not the component).

Done in the last commit (`fix(timeline): remember 'Read more' expansion per message for the session`): `CollapsibleBody` seeds its collapsed flag from a module-level `Set<eventId>` of expanded messages (never persisted, cleared on reload) and updates it on toggle, so a row that the windowed timeline unmounts and remounts comes back expanded. Verified headless that expanding, scrolling 80 messages down and back keeps 'Show less'; the remount case is covered by construction (state comes from the set, not the component).
jared closed this issue 2026-09-19 17:32:18 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#152