Skip to content

Home (app): paint list and episodes together, neutral placeholder - #24541

Merged
Git-on-my-level merged 12 commits into
mainfrom
lane/homesettle
Nov 4, 2026
Merged

Git-on-my-level merged 12 commits into
mainfrom
lane/homesettle

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Requested by David

Home used to paint transcript fragments before the episode overlay arrived, then regroup them minutes later. Cold open now starts both providers concurrently and joins their first paint. If the overlay takes more than 500 ms after conversations arrive, a neutral finishing state holds the list until the merged view is ready. The first page's actual date range is covered, including older conversations. A successful newest-page refresh replaces overlapping IDs while keeping older cached storage pages; current live updates, discards and delete fences retain authority even when they arrive during the fetch. The cache boundary follows created_at, matching storage pagination even for delayed recordings. Episode history reports complete success separately from failure. Failed history reads keep the initial join pending for up to two seconds, with at most two retries, so a transient failure then success paints the merged episode once. The retry deadline starts on an observed failure; slow successful reads retain the joined neutral view until membership arrives. Persistent failures release the hold to the last cached projection with sources still reachable. Once that fallback paints, its episode membership and sort anchors stay fixed: a late history retry cannot absorb member rows or move an existing episode. Titles and live/ended or processing/composition status still update in place from the latest episode. New episodes are admitted immediately when neither their full conversation IDs nor member metadata intersects a painted standalone row or a held episode. Their first admitted membership and sort anchors are then retained too. A successful pull-to-refresh reads conversations and history together before releasing this layout; a failed refresh retains it. App resume from an actual background state and switching back to the Home tab also release the pin before Home paints again. A transient inactive state does not release it. Mounting Home again starts a fresh join. A thrown initial conversation fetch releases the hold; episode HTTP reads retain their existing transport timeout. The 500 ms cap replaces the startup shimmer with neutral finishing copy, while successful episode data still lands atomically with the list.

Uncomposed multi-member episodes show localized “Finishing up…” instead of the first member's transcript-echo title. Empty completed captures awaiting batch transcripts stay inside their episode placeholder, or share one localized “Processing” row per contiguous recorded run (at most two minutes between captures). Every member stays available through the row's episode page. Ready, locked, retryable and in-flight conversations retain their existing treatment. This removes both the fragment-to-episode first-paint sequence from TestFlight 4314 and the timestamp-only queued-audio rows described in David's follow-up.

Reachability: member suppression is acknowledged only for full cached completed source snapshots with a closed, composed multi-member episode replacement. If a late replacement is deferred by the painted layout, the list adapter still restores every omitted source snapshot, so its original conversation rows remain reachable until the next refresh boundary. Unknown/unfetched members, older pages without a held replacement, single/uncomposed episodes, episodes with any locked member, unsettled members, local deletions and filtered views keep their server payloads. Both the production typed API and legacy list path forward acknowledgements and retain exact omitted snapshots across overlay replacement, preserving source fields, raw-page pagination and truncation metadata. Failed or incomplete wider episode reads never claim cache coverage; identical in-flight reads coalesce to bound read cost. Search, Short clips, folder, starred, date and selection views show their exact source matches without episode grouping or suppression.

Backend/TestFlight split: backend behavior is PR #24497 and can deploy independently; this PR contains only app changes, its failure-class guard metadata and fixture UI evidence. A1/A2, safe acknowledgement support and queued-audio grouping ship in the next TestFlight. Audio-close attachment is the independent backend PR #24544. Only the rollout lead deploys; no production access was used.

Kill switches: existing episode capability/admission controls remain authoritative. HOME_HIDE_EPISODE_MEMBERS=off in the backend disables source-payload suppression; correctness does not depend on suppression. No new default-off client flag. Roll back this app commit to restore the previous startup/placeholder behavior. The backend HOME_HIDE_BELOW_FLOOR_ROWS switch is unchanged here.

Failure-Class: new

FC-home-paint-before-membership-ready is prevented by the shared startup join and Home row projection, with staggered-provider widget tests and member-reachability tests. Product contracts: INV-UI-1, INV-UI-3 and INV-PERF-1; existing row primitives, palette, localized strings and deferred daily-summary checks keep startup work bounded. Mobile changelog included; localization generated through scripts/l10n.py.

Validation through bin/omi-heavy, one worker:

  • 198 focused widget/provider/unit cases passed (11 files, one worker; includes all 15 startup widgets and 18 cache cases), including retained older cached pages, fresh overlapping titles, storage-boundary timestamp ties, delayed-recording storage boundaries, failed-history recovery without member paints, the two-second deadline and timer disposal before/after the 500 ms paint cap, the 00:30 date-filtered member of an episode beginning at 23:00 yesterday, staggered arrivals through a three-second successful history read and the 500 ms neutral hold, the cached older-page join, typed initial/older-page acknowledgement and exact snapshot restoration, queued processing runs, speaker-only search, locked-episode reachability, failed/in-flight episode windows, initial-fetch exceptions, merge fences and loaded-transcript retention.
  • 11 pending-row lifecycle widgets passed: an untitled finished fixture includes real speech; its original normal-row assertions remain. A new case proves the transcript-free server replacement remains reachable in a neutral Processing row and settles when speech lands.
  • 138 full spine tests passed; the focused C3 conversation contract also passed all 5 cases.
  • The round-three status and new-recording unit regressions and the app-resume/Home-re-entry widget regressions all fail by behavioral assertion against reviewed 1f9cd11f46ac, then pass after the changes. Additional coverage rejects absorption through either full IDs or member metadata, retains newly admitted episodes across later membership changes, and verifies tab re-entry keeps the same Home state and transient inactive/resumed does not release the pin.
  • The round-two late-retry widget fails against reviewed 9b06a035028f by assertion (three painted conversations regroup into two rows). It now proves unchanged row IDs, count, order and positions after the two-second deadline, an in-place title update, then grouping at the real pull-to-refresh callback. A unit test covers cached episode membership/sort anchors while title and processing status update in place.
  • The new cached-page and failed-history regressions both fail by behavioral assertion against reviewed e53045a07156, then pass with the fixes. The cross-midnight widget case already passes the reviewed code and now guards that behavior.
  • All 4 cold-open widget cases fail by behavioral assertion against original d673bb46 app sources, then pass with the implementation restored. No compilation failures are accepted as the regression proof.
  • make preflight: 28 selected checks passed, including UI evidence, UX, performance, changelog and localization contracts.
  • Touched Dart analysis: no issues. Localization consistency/generated freshness passed.
  • Both real Flutter fixture renders passed and were visually inspected: legible fonts, neutral after-title, no clipping. Tracked PNGs and evidence manifest are included. This review revision changes no row visuals or copy; the fixture renders were re-captured unchanged.

UI evidence: fixture-only real Flutter ProcessingConversationRow, iOS metrics, app fonts and palette, captured through flutter-render-evidence. Before reproduces the base adapter's first-member title; after renders the localized neutral placeholder. No customer data, simulator or production service.

Before: first-member fragment

After: Finishing up

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 116 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread app/lib/providers/episode_provider.dart Resolved
Comment thread app/lib/l10n/app_localizations_lv.dart Resolved
Comment thread app/lib/l10n/app_da.arb Resolved
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 7438d3d85de35e1e2eb61d634363d90d344276c1. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui e53045a07156a4a5eb01c45740516410db4a6aba. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 9b06a035028f7c96f24f93aed1318d8b0847e51a. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 1f9cd11f46aca13b4a0ea20a876c10c6668f0191. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 99ada46151cc0babfbd559deb2c2a24050731153. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

Watching HomeProvider rebuilt ConversationsPage for every notification
(tab taps, focus, loading), pushing the tab_switch perf gate over its
rebuilds/layouts/paints budgets. An edge-triggered listener now releases
the held outage layout only when re-entering Home with something pinned.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 40d05843fc6c27e97818fc7916d0e794b7604bb7. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@kodjima33

Copy link
Copy Markdown
Collaborator

/approve-ui 40d0584

@Git-on-my-level

Copy link
Copy Markdown
Member Author

David signed off this UI in Telegram on 2026-11-04. The CI check still needs kodjima33 to comment /approve-ui 40d05843fc6c27e97818fc7916d0e794b7604bb7 on this head.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Refreshing the UI approval check. kodjima33 already approved this head.

@Git-on-my-level
Git-on-my-level merged commit 7f271cf into main Nov 4, 2026
47 of 48 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/homesettle branch November 4, 2026 08:22
Git-on-my-level added a commit that referenced this pull request Nov 4, 2026
)

<!-- claude-projects-attribution: {"github_login":"Git-on-my-level"} -->
_Requested by **David**_

Batch captures previously stayed outside episodes until transcription
finished. Audio close now attaches retained captures by committed audio
bounds before queueing finalization, through the shared fenced
recorded-time membership transaction. Arrival and processing clocks
never select the episode or change its live pointer.

The membership transaction stamps a fixed pending-transcription entry
time and two-hour deadline. Replays preserve the deadline. Home shows
“Transcribing…” while awaiting the durable batch projection; a dead
letter, failed upload/status or elapsed deadline shows “Couldn't
transcribe” with the committed audio finish time. A later successful
projection restores ordinary member metadata. Audio and retry work
remain retained.

`EPISODE_BATCH_CLOSE_ATTACH_ENABLED` defaults on. Setting it to
false/off/0/no restores attach-after-transcription. Episode/cohort,
privacy, custom-STT, retention, lock, deletion and donor guards remain
authoritative. Attachment adds no model calls and does not require a
client-seen marker. Failure emits shared degraded-fallback telemetry and
leaves finalization as the repair path. The overdue metric is an
unlabeled read-observation counter; the info alert remains in the
pending catalog, with no monitoring provisioning in this PR.

Refreshed with merge commits through main `563e6c240944` (#24577,
#24579, #24582/#24604 and subsequent main changes, including #24509).
The resolution keeps batch 1's shared transaction/fence, attempt-local
candidate reuse, current canonical partition proof, visibility
validation, deduplicated memberships and recovery memo. Pending close
writes its deadline inside that transaction without claiming/resetting
completed transcript recovery. Close replay validates current committed
archive bounds, normalized through the same datetime conversion used at
admission, and is a true no-op with attach optimizations on or off.
Changed bounds still update the episode without renewing the deadline.
Composer settling, foreground promotion, Home read cuts and
recording-speaker carry remain intact.

The five original conflicts were in `episode_recorded_components.py`,
`episode_timeline.py`, `service.py`, the Firestore query-driver registry
and the generated feature-flag catalog. The sync callback and affected
tests now use the public `attach_recorded` helper. The final speaker-tip
merge was clean; the core episode resolution is unchanged.

Validation at `817784dced26`: **858 passed across 21 focused backend
files** through `backend/test.sh` with an explicit file list and four
workers; **4 real Firestore emulator replay cases passed**, covering
integer/fractional archive epochs and attach optimizations on/off. All
tests/build gates run through `omi-heavy` at low priority, with no
production credentials.

Emulator limitation: the full 28-case episode suite alternated SDK
transaction-lock timeouts between two old concurrency cases. Its last
full run was **27 passed / 1 failed**, not all green. Both concurrency
cases then passed together in a targeted run on exact main
`cf601889c67b` and exact candidate `b8633977345c`. All 28 cases have
passing candidate executions across full plus targeted runs; this does
not establish a cause for the intermittent timeout. Core
episode/emulator source is byte-identical after the final main merge,
and the four new replay cases were rerun on the final head. Firestore
clients now close at fixture teardown; test concurrency and transaction
retry budgets are unchanged.

Final hermetic e2e at `817784dced26`: **205 passed, 3 skipped, 2 xfailed
in 101.14s**, within the unchanged **120s** limit. Native-library
threads were capped at one; `--disable-warnings` suppressed only the
console warning summary, without filtering warnings or changing warning
assertions. Two earlier final-head attempts reached the wall limit (one
at 100% test progress while rendering warnings). The lead authorized a
documented 300s diagnostic if necessary, but it was **not used**.
Committed and remote-CI budgets remain 120s. `make preflight` passed
**43/43** before the final clean main merge; the normal push hook runs
the final required gates again.

Failure-Class: FC-finalize-hook-allowlist-omits-ingestion-path

Product invariants: INV-MEM-4 and INV-TASK-2. Canonical episode
ownership and task/enrichment authority remain unchanged.

No PR merge, deploy, production account access or GCP calls. GCP tier:
none. No rebase, force-push, workflow additions or firmware edits. The
lead owns merge and the backend/listen release train.

UI-Evidence: none -- backend response projection; related mobile fixture
evidence belongs to #24541.
Git-on-my-level added a commit that referenced this pull request Nov 19, 2026
… v3 window; day view hides what Home hides (#25721)

## Summary

A v3 smell audit (2026-11-18, prod at 9c88e7f, read-only, counts only)
found that Home stops early for **48 of 648 v3-active owners (7.4%)**,
leaving **37,540 visible rows** unreachable. It also found a stale
legacy row showing as a live tile, and a day view that shows rows Home
hides. This PR fixes all three on the server, for the TestFlight builds
already shipped, without an app release.

### F1: Home stops at a run of hidden rows
- **Cause, server side:** the indexed Home query (`discarded == False`)
still matches `home_hidden` v3 windows and recordings, and readers drop
them. Each page read at most 50 + `_RULE_DISCARD_PAGE_SKIP_CAP` = 64
rows. The cap counted every refill read, not only hidden rows. So a run
of 64 or more hidden rows returned a short page.
- **Cause, app side:** the app treats a page with fewer than 50 rows as
the end (`conversation_provider.dart:986/1379`). The longest measured
hidden run per owner is p99 93 and max 158. The product owner's run is
73 rows, so Home stopped after 16 rows.
- **Released apps already read a storage cursor.** Since #24541
(2026-11-04), the app adds `X-Omi-Conversation-Page-Size` to its offset,
and uses `>= 50` on that value for `hasMore`
(`conversation_provider.dart:985-986`, `1378-1379`;
`conversations.dart:199`; `conversation_home_list.dart:52`). The server
only sent that header while it suppressed episode members.

**Fix**
- **One shared page fill** (`_PageFill`) for the offset and cursor
paths:
  - Only hidden rows count against the cap. Visible rows never do.
- Under a request budget (the Home route) the cap is now
`_HIDDEN_ROW_PAGE_SKIP_CAP = 512`, so the longest measured run (158)
fits about 3 times over. Readers without a budget (full-document
internal callers of `get_conversations`) keep 64, so their worst case
does not grow.
- Refills start at the number of missing slots, then double. A long
hidden run therefore costs a few RPCs, not one RPC per row.
- The worst case is page + 512 rows, read with the list projection (no
transcript blobs). That is far inside the existing 25,000-document
request budget, which still charges every row.
- **`/v1/conversations` now always sends
`X-Omi-Conversation-Page-Size`**, set to the number of storage rows the
page consumed. This is the amount the next `offset` must advance by.
Released apps then:
- **page past a hidden run:** the value is at least 50 even when the
body is short;
- **stop re-serving rows:** the next offset lands exactly after the last
row read.
- **Offset semantics are unchanged.** The offset still counts storage
rows on the indexed path, so desktop and older clients that send their
visible count behave as before: some rows are re-served (deduped by id),
and none are skipped. Re-interpreting the offset as a visible count
would need a scan of every hidden row before a deep offset, and would
change desktop pagination, so I did not do it. The header carries the
exact advance instead. `include_discarded=true` keeps its visible-row
offset, and its header equals the page length.
- **New `X-Omi-Has-More: true|false`.** It is `false` only when the scan
reached the end of the query. A short page caused by the cap, or a page
cut by the budget, says `true`.
- **New optional `cursor` query parameter**, reusing the
`conversation_list_cursor` lever code (100% on prod). With the lever on,
the response carries `X-Omi-Next-Cursor`, and a cursor that decodes
replaces the offset. A malformed cursor falls back to offset, as before.
**The body is still a plain list.** OpenAPI and the generated TS and
Swift clients are regenerated (one optional parameter added).

### F3: `/v1/conversations/live` showed a stale legacy row
It returned the newest non-recording in-progress row. It did not require
`v3_derived`. #25719 (merged while this PR was open) added a 2-hour idle
cap in `utils/conversations/v3/live.py`.

**Fix:** the route no longer scans the general list. It reads v3 windows
through the existing `conversations_v3_derived_window` index
(`v3_derived ASC, finished_at ASC, started_at ASC`), in the new
`database/conversations_v3_live.recent_windows`:
- Filters: `v3_derived == True`, `finished_at >= now - MAX_IDLE` (2
hours) and `started_at <= now + 5 min`. This is the same query shape
`conversations_v3.py:284-288` already serves.
- `.select()` reads only the fields the route returns plus the
visibility flags. No transcript blobs are downloaded.
- The index is ascending by `finished_at`, so the newest window comes
last, and a read cannot stop early once it finds the open one. Reading
newest-first would need a new descending index, which this PR does not
add. The tile is polled every 15 seconds, so the read works in two bands
instead:
- **Recent band (last 10 minutes) first.** An open window's
`finished_at` is its latest speech, so a speaking window is almost
always here, and this band holds only a few rows.
- **The rest of the 2-hour window only if the recent band has no live
window**, for example an open window that has been quiet for a while.
The two bands do not overlap (`finished_at < now - 10 min` on the wider
one), so no row is read twice.
- **One 200-row cap for each call, shared by both bands.** Reaching it
is logged.
- `v3_live.active` then returns the newest row that is `in_progress`
with `tile_state == 'live'` and is not recording, `home_hidden`, deleted
or discarded.

A legacy in-progress row can never match, however new it is, and newer
legacy rows can no longer push the open window out of a fixed-size scan.

### F2: the day view showed rows Home hides
A date range turned off `hide_home`. **Decision: apply `hide_home` to a
date-only filter**, rather than add a Home drill-in flag:
- The day view is Home's own drill-in, so it should hide the same rows.
- A new flag would need an app release and would not help the shipped
builds.
- Explicit reveal filters still show hidden rows: `include_discarded`,
`sources`, `folder_id`, `starred` and non-default `statuses`.
- `/v1/conversations/count` is unchanged. Its hidden-row subtraction
with `hide_home` and a date range would need a new composite index, and
the day page does not call it.

### Not in this PR (owned elsewhere)
- The v3 `commit_projection`/reconcile size fix.
- The sync intake `mark_new` fix.
- F4, the live-tile clock: an app change, in #25725.

### Why the day-view change has no lever
Hiding the same rows in the day view that Home hides ships on, with no
read lever. This repo's rule is to ship on by default and to add a flag
only for real risk to users, data or cost:
- The change can only hide rows that Home already hides.
- Every explicit reveal filter still shows them.
- The response headers are additive.
- If it proved wrong, the rollback is a one-line revert of
`hide_home=not reveal`.

### Follow-up (deferred from review-20261119t003449-3d72)
- Tell a deadline exhaustion (a retry can succeed) apart from a document
exhaustion in `has_more`.
- Guard `recent_windows` against a zero page size. It is unreachable
today.
- Document the client rule: `X-Omi-Has-More: true` with no cursor means
fall back to offset paging.
- Pass `max_idle` into `active()`.
- A hidden-row run that ends exactly at the cap costs one extra empty
request.

### Known limits (intended)
- **A full page always says `X-Omi-Has-More: true`.** It does not probe
for a next row. When the query ends exactly on a page boundary, the
client makes one extra request and gets an empty page. A probe would
charge every full page one more read to avoid that rare, harmless
request.
- **The budget can run out before any row is read**: on the offset
charge, on the first read, or in the `include_discarded` scan. That page
returns empty with `X-Omi-Has-More: false`, because there is no position
to resume from and an identical retry would stop at the same place.
- **Clients that ignore the headers still end on a short page.** A page
cut at the 512 hidden-row cap is short but not final. Flutter Home reads
the headers (#24541, #25725). The Flutter day view
(`day_conversations_page.dart:133,159`) and web (`data.length ===
limit`) do not, so a date range holding more than 512 consecutive hidden
rows still stops early there. The longest measured run is 158, and the
follow-up is to have those views read `X-Omi-Has-More`.
- **The app's incremental refresh** (`_fetchNewConversations`) still
advanced by body length in the shipped build. #25725 makes it use the
storage count.
- **`/v1/conversations/count` with a date range** still counts hidden
rows. Subtracting them needs a composite index that does not exist (see
F2). For the record: macOS `ConversationRepository.swift:121-145` pairs
a date-filtered list with a date-filtered count. A day view there can
therefore show a count above the rows listed, until that index is added.

## App release needed?
No. F1, F2 and F3 take effect for released and TestFlight builds as soon
as this backend deploys. The cursor and `X-Omi-Has-More` headers are
additive. Using them in Flutter is optional follow-up work.

## Test plan
- New `backend/tests/unit/test_home_hidden_run_pagination.py`, synthetic
rows only. It mirrors the app's paging loop (`offset += header`,
`hasMore = header >= 50`):
- 30 visible, then 150 hidden (`home_hidden` or recording), then 100
visible. Every visible row is reached exactly once, in order, and each
page reads at most page + cap rows.
- The first page is full and reports `storage_rows=200`. The next page
starts exactly after it, with no re-served rows.
  - An app that ignores the header still reaches every row.
- A run longer than the cap (cap patched to 64) returns a short page
that still says `has_more` and keeps paging to the end.
- End of the collection reports `has_more=false`. A budget cut keeps its
prefix and says `has_more=true`.
  - A cursor walk across the run reaches every row.
- Route: the headers are set, the cursor round-trips, and the body stays
a list.
- Day view: `hide_home` stays on for a date range alone and turns off
for each reveal filter.
- `test_conversations_v3_contract.py`, live route (#25719's cases kept,
with v3 rows):
- only an open, visible v3 window is returned; hidden, deleted,
discarded, processing and recording rows are not;
  - a v3 window idle past the cap is not live;
  - when several qualify, the newest wins;
  - the read uses the v3 index filters and projection;
- a speaking window among 100 recent finished ones is found with one
recent-band read;
- a window quiet for 30 minutes is found by widening to the full window;
  - the wider band excludes the recent one;
- with nothing open, the cap is shared across both bands, and reaching
it is logged with the bound that applied.
- Updated: `test_fsr_wq4_cursor.py` (the cap counts hidden rows only)
and `test_pending_bridge_read_budget.py`:
  - without a budget, the bound is page + 64;
- with a budget, the bound is page + 512, reached in at most 5 RPCs with
growing batches.
- An offset charge that exhausts the budget returns `has_more: false`
with no reads.
- Firestore guard set passes locally (`test_firestore_query_shapes`,
caller and runtime witnesses, index rules, query contract):
  - the driver registry covers `_PageFill._run`;
- the cursor collector's entry and digest pin are removed, since it no
longer streams a query itself;
- the live route's old list caller witness and profile are removed, and
`recent_windows` is a registered driver covered by the existing v3
window index.

UI-Evidence: none -- only regenerated API client types change (one
optional query parameter on the conversation list); no screen changes

Line-Count-Exception: backend/database/conversations.py | 5257 -> 5292 |
one shared hidden-row page fill replaces the two refill loops; its
docstring states the storage-advance contract
Line-Count-Exception: backend/routers/conversations.py | 2909 -> 2919 |
optional cursor query parameter and page-header wiring; the helpers live
in utils/conversations/list_page_headers.py and
utils/conversations/v3/live.py and the live query in
database/conversations_v3_live.py

Failure-Class: FC-raw-page-limit-before-visibility-filter

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants