Skip to content

fix(gui): release cache waits for materialized previews - #286

Merged
jlucaso1 merged 1 commit into
mainfrom
fix/gui-cache-wait-eligibility
Oct 30, 2026
Merged

jlucaso1 merged 1 commit into
mainfrom
fix/gui-cache-wait-eligibility

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

After a native history refresh preserves existing preview bytes alongside an incoming preview cache key, Status and channel previews could wait indefinitely for a cache read that the materialization scheduler would never admit. Use the scheduler's reference eligibility rule for UI wait decisions, and make Status use the same failure-aware wait predicate. A full cache key still receives its local attempt; missing full files release the wait without discarding the existing preview.

Follow-up to merged #284 and its Codex P2 finding. Based on current main 39fca7f; no changes to the merged branch.

Reproduction uses synthetic rows and the real Chat::insert_history_message path: retain preview bytes, refresh an empty row carrying only preview_cache_key, then check scheduling and wait decisions. The new regression test fails on main before this fix. A second test covers reopened image/video status, full-cache eligibility, failure release, and preview preservation.

Validation on 2507412:

  • Materialization tests: 16 passed.
  • Full GUI tests with all features: 616 passed, 9 ignored.
  • GUI Clippy across all targets/features with -D warnings: passed.
  • Workspace formatting and diff whitespace checks: passed.
  • Web check using nightly-2026-10-29, wasm32 and build-std: passed; existing warnings in unchanged paths remain.

This is a correctness follow-up; no new performance claim or real-account measurement. Remote CI and automatic review are pending.


Summary by cubic

Fixes Status and channel previews waiting indefinitely for a cache read that the materialization scheduler would never admit, which happened when a history refresh preserved existing preview bytes but introduced a new preview cache key. Wait decisions now use the scheduler's reference eligibility rule, and Status uses the same failure-aware predicate.

  • A full cache key still receives its local read attempt; a failed attempt releases the wait without discarding the preserved preview bytes.
  • Adds regression tests for preserved previews, reopened image/video status, full-cache eligibility, and failure release.

Written for commit 2507412. Summary will update on new commits.

View guided diff Turn on auto-fix

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jlucaso1
jlucaso1 marked this pull request as ready for review October 30, 2026 02:01
@jlucaso1
jlucaso1 merged commit fa54978 into main Oct 30, 2026
13 of 15 checks passed
@jlucaso1
jlucaso1 deleted the fix/gui-cache-wait-eligibility branch October 30, 2026 02:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T02:02:41.775430Z 2507412 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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