Skip to content

fix(timeline): refresh rows whose event decrypted after they were cached - #1583

Open
eleboucher wants to merge 1 commit into
devfrom
fix/timeline-decrypted-row-cache
Open

fix(timeline): refresh rows whose event decrypted after they were cached#1583
eleboucher wants to merge 1 commit into
devfrom
fix/timeline-decrypted-row-cache

Conversation

@eleboucher

@eleboucher eleboucher commented Aug 2, 2026

Copy link
Copy Markdown
Member

Description

messages in encrypted rooms only showed up if they arrived while the app was foregrounded. anything from cache stayed blank until you cleared it.

the append-only fast path in useProcessedTimeline validated its cache on mEvent identity, but decryption mutates the event in place. rows built while the event was still encrypted kept the ciphertext content, and later live messages reused the stale prefix. #1555 exposed this. before it, still-encrypted events were filtered out so nothing stale got cached.

entries now carry clearType/clearContent when the event is encrypted, and the prefix guard compares those too.

also coalesced handleDecrypted onto one frame. decryptions land in separate tasks, so a 25 event backlog meant 25 full reprocesses.

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-1583-sable.raspy-dream-bb1d.workers.dev 9505467 pr-1583 Sun, 02 Aug 2026 09:45:28 GMT

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant