Skip to content

fix(messagelist): update row display immediately on flag change#11

Closed
piratefinn wants to merge 1 commit into
castaway/feat-accessible-tablefrom
piratefinn/fix-flag-change-display
Closed

fix(messagelist): update row display immediately on flag change#11
piratefinn wants to merge 1 commit into
castaway/feat-accessible-tablefrom
piratefinn/fix-flag-change-display

Conversation

@piratefinn

Copy link
Copy Markdown

Flag changes (markSeen, flag/unflag) were round-tripping through the Xapian worker before the display updated. The Angular 16 upgrade (50b8e5d) shifted timing enough to make the delay visible — click a message, row stays bold until you click another one.

Now subscribes to messageFlagChangeSubject and updates display rows directly, bypassing the worker round-trip. Flag changes go through a separate non-debounced subject so the update is immediate. Optimistic overrides are tracked so enrichRows (scroll-triggered) doesn't revert them before the index data catches up.

Removes the 1-second setTimeout workaround in afterUpdateIndex.

9 unit tests in searchmessagedisplay.spec.ts.

Subscribe to messageFlagChangeSubject and update display rows directly
instead of waiting for the worker round-trip. Flag changes bypass the
300ms debounce via a separate subject for immediate UI feedback.

Optimistic overrides are tracked so scroll-triggered enrichRows doesn't
revert them before the index data catches up.

Removes the 1-second setTimeout workaround in afterUpdateIndex.

9 unit tests in searchmessagedisplay.spec.ts.
@piratefinn

Copy link
Copy Markdown
Author

Closing in favour of runbox#1990 which targets master directly with the root cause fix.

@piratefinn piratefinn closed this Jul 2, 2026
@piratefinn piratefinn deleted the piratefinn/fix-flag-change-display branch July 2, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant