AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

[Bug]: Preview of document in "All documents" not updated when content changes

Open ahd71 opened this issue 1 month ago • 2 comments

What happened?

In the web view for "all documents" the body text is not reflecting the latest content if the body starts with a table and then had some texts that was deleted/modified. Not even when refreshing the browser.

Distribution version

macOS x64 (Intel)

App Version

0.25.2

What browsers are you seeing the problem on if you're using web version?

Chrome

Are you self-hosting?

  • [x] Yes

Self-hosting Version

0.25.2

Relevant log output


Anything else?

No response

ahd71 avatar Nov 05 '25 00:11 ahd71

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar Nov 05 '25 00:11 affine-issue-bot[bot]

A summary of the changes CodeRabbit can apply:

  • Add logic to packages/common/reader/src/reader.ts (after line 769 in readAllBlocksFromDoc) to append table cell text to the document summary (respecting maxSummaryLength), so table content is included in "All documents" previews and previews update correctly when content changes.

  • Update packages/common/reader/src/reader.ts to append table cell text (joined contents) into the generated summary and decrement maxSummaryLength accordingly so table data is included in summaries and summary length accounting is adjusted.

  • [ ] ✅ Create PR with these edits
  • [ ] 📋 Get copyable edits

coderabbitai[bot] avatar Nov 05 '25 00:11 coderabbitai[bot]

Hi! Is anyone currently working on this issue? If not, I’d love to help and can open a PR to implement this feature. Can you assign it to me implement the feature?

VaideshWaranR avatar Nov 05 '25 07:11 VaideshWaranR