Repository navigation
feat(home): fold noise clips into one quiet line per day - #23853
Merged
Merged
Conversation
… place Co-Authored-By: Claude Opus 5.5 <[email protected]>
…day's noise rows Counts come from GET /v1/conversations/hidden-noise-counts for the loaded window (newest 31 days, device zone); a failed read keeps what was shown. Show fetches that day's discarded rows and keeps content_kind media/noise, the same rule the count uses. Revealed clips read like ordinary rows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… views never merge folded rows GLM review of #23853: - clearUserData and the show-discarded toggle reset the fold, and a reply for the previous account or mode is dropped (no cross-account rows). - Only the plain default view folds; search, folder, selection and show-discarded lists never draw the line or merge folded rows, and a revealed row already on the list is not drawn twice. - A local delete leaves the fold; a refresh drops cached rows so a clip unhidden or deleted elsewhere does not come back; load-more refreshes counts; a double tap on Show fetches once; fetch failures stay silent. - Unused perf-harness helpers removed from the test (analyzer ratchet). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 28, 2026
…rst build, device perf harness (#23859) * fix(mobile-perf): physical iOS batches die on macOS bash 3.2 before launch HOST_GUARD is empty on every physical-device run, and macOS /usr/bin/env bash (3.2) treats "${HOST_GUARD[@]}" of an empty array as unbound under set -u, so every physical iPhone batch failed before receipt 1. Expand it only when set. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mobile-perf): frame total spans go negative on iOS 27 devices On an iPhone 15 Pro Max (iOS 27.0.1) about one frame in seven starts building ~0.85 ms before its recorded vsync, so FrameTiming.totalSpan (raster finish - vsync) is negative. Total p50/p90 were contaminated in every window, and cold_start's p50 went negative, failing report validation for every batch. Measure total from the earlier of vsync and build start. This changes the total metric: earlier total percentiles are not comparable; qualify a new baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(mobile-perf): live preview, live episode, Device Settings and On the Way windows Three heavy-profile windows after the unchanged five, for the changes in #23819, #23822 and #23853: - home_live_preview: Home with the live episode row while a scripted on-device preview revises its newest line every 200 ms over a ~1,000-segment session (LivePreviewCoverage on every update and clock tick). - live_episode_page: LiveEpisodePage on the transcript tab over the same session, scrolled while words arrive. - device_settings_on_the_way: Device Settings (Catching up) and On the Way (day-grouped) over the 6,500-WAL backlog, each opened and scrolled. The preview controller is installed through CaptureController.installLivePreview and admitted through LivePreviewController.admit; only the socket admission flag is asserted, since the fixture runs no listen socket. Device Settings gets an interface fake: the production DeviceProvider subscribes to ServiceManager, which this harness never initializes. Reports now require the eight windows; comparisons list windows absent from the reference instead of failing. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(changelog): heavy perf harness windows (internal only) Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(mobile-perf): main-isolate stalls, field-shaped WAL index and an idle sync window The field lag log that matters (iPhone 15 Pro Max, 10-26) is 133 main-isolate stalls, mostly on idle Home and around sync phases, with a 71,536-record WAL index. Drawn-frame timings could not see any of it. - HeavyStallProbe: every window reports stalls over 50/100 ms, blocked time and the worst stall from a 20 ms timer's late ticks; reported, never variance-gated. - --synced-wals N (0..80000): adds synced history on top of the pending backlog; such a batch changes the dataset and is never baseline-eligible. - home_idle_sync_refresh: Home left alone while SyncProvider refreshes the inventory five times, as sync phase ends and upload callbacks do. - Runner preflight: refuses a phone that is not on a wired USB connection before the multi-minute build. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(home): live row computes uncovered preview once per clock tick The Semantics label called previewText() twice per 1 s rebuild; each call runs LivePreviewCoverage.uncovered over every final segment. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(mobile): live transcript opens at the newest rows; Tasks first frame stays cheap Measured on an iPhone 15 Pro Max (heavy profile harness): - Opening LiveEpisodePage on the transcript tab took one 153 ms layout with 1,775 builds (140-157 ms every run) and peaked RSS at 612 MB: following the latest jumped to maxScrollExtent on a variable-height lazy list, laying out every row. TranscriptWidget now anchors layout at the newest segment; a 1,000-segment open builds 9 rows and lands on the newest. - Preview revisions (every ~200 ms) no longer rebuild the transcript or rescan final history: LivePreviewCoverage prepares merged final spans once per transcript snapshot and answers each line by binary search, same results. - The first Tasks tab switch spent 128 ms in one build (240-319 ms frame): ActionItemsPage now uses one lazy delegate across date sections, deferring offscreen sorting, headers and rows. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(sync): WAL index work scales with what changed, not with every record ever kept A heavy phone's index held 71,536 records (66,222 synced). Its lag watchdog logged 133 main-isolate stalls over ~10 h (24 s blocked, worst 1.6 s), mostly on idle Home and ~20x more often right after sync phases and uploads. Every index save copied, keyed and fingerprinted every record on the main isolate and copied the full List<Wal> into an encoding isolate; sync screens rescanned the inventory on every notify; reconcile polled ~2/s after a reconnect. - Saves: Wal persisted-field setters mark dirty identities; a long-lived index worker owns the serialized rows and receives only changed JSON maps and removed tokens. Durable is acknowledged only after flush + atomic rename; failed deltas are retained and retried. No whole-index fingerprint. - Load: decode and Wal construction run off-isolate; the worker seeds unchanged rows from disk, so the first save sends zero unchanged records. - Format: unchanged version-1 wals.json, backup and quarantine recovery; retired/foreign/synced records and upload-order tie-breaks preserved. - Views: SyncProvider derives pending/uploaded/attention/refusal lists and per-day totals incrementally (WalDerivedViews); Home, On the Way and Device Settings read them. Integration and widget fakes derive the same views from their raw inventory (WalDerivedSyncViews). - Reconcile: visits uploaded rows only, joins an active pass, spaces passes by 20 s; job backoff, fairness and acknowledgement unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(mobile): newest-anchored transcript renders short lists on the first frame The newest-anchored layout needed extra frames for its anchor correction, so a short live transcript (even one segment) was blank on its first frame; capturing_empty_state_test failed 20 of 23. The viewport now measures its anchor and initial latest position during layout, before paint. Short transcripts show immediately; a 1,000-segment open still builds about one screen of rows. The extra pumps added to episodes_ui_test are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mobile): live transcript keeps the reader's row fixed when rows above grow Review finding (GLM): on a short scrollable live transcript, a photo group or an older row growing during a drag or fling changed the newest-anchored viewport's anchor with pixels unchanged, moving every visible row by the inserted height under the reader's finger, and the correction bailed for the whole gesture. The viewport now compensates the leading-edge shift with offset.correctBy in the same layout pass. Regression tests cover short and long histories, photo insertion/growth and older-row growth across drag, fling and idle; first-frame rendering and 1,000-segment laziness still hold. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(sync): WAL index worker death, backup seeding and repair writes recover in-session Review findings (GLM) on the delta index worker: - A dead worker isolate (OOM/VM kill) left apply() awaiting forever, wedging every later save and the capture flush queue. Exit/error listeners now fail pending requests and release the queue; the replacement worker is seeded from a full snapshot of the in-memory index, preserving tokens, admitted deltas and every custody bucket. - After loading from the backup because wals.json was corrupt and could not be quarantined, the worker seeded from the corrupt main file and every save failed for the session. Workers now receive the exact source the loader validated; a failed startup retries from memory. - The load-time invalid-entry repair used the legacy whole-file writer on the same wals.json(.tmp) as the live worker with no shared lock. Loading, quarantine/repair, worker seeding and writes now share one lock. Every failure fails closed: no durable acknowledgement before flush + rename. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(mobile-perf): field-shaped synced WALs survive the startup retention sweep Dated syncedAt stamps were older than the synced-copy retention cutoff, so the startup sweep removed all seeded synced records and Home saw only the pending backlog. Legacy syncedAt 0 is never auto-removed, matching a long-lived phone. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(mobile): move transcript row highlight and live viewport into a part file Keeps transcript.dart under its line-count ratchet (1590) after the newest-anchored viewport landed; no behavior change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(dead-code): allowlist the derived sync views shared by SyncProvider stand-ins Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(mobile-perf): timeline runs name each widget build Attribution-only runs (never baselines) enable debugProfileBuildsEnabled so a slow first build, such as the first Tasks switch, names its widget in the trace. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(mobile): transcript scroll reporting stays bounded by the visible rows Device regression (iPhone 15 Pro Max, 3 runs before/after): opening a saved conversation's transcript and flinging it went from 0/101/100 ms of main-isolate stalls per run to 223/257/116 ms. The trace put ~15% of samples in _TranscriptPlaybackScrolling._reportTopVisibleSegment, which walked the sliver tree on every scroll notification. Sliver discovery is now cached, each sliver needs one reveal calculation, and remaining row positions use existing layout offsets; first-frame layouts and reveal calls per frame are unchanged from 120 to 1,200 rows (test). Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(mobile): kill switch for the delta WAL index writer PostHog mobile-wal-delta-index-off (ops_kill, default false). True makes the next launch save every index change through the pre-delta full-snapshot writer; both writers produce the same version-1 file, so flipping either way needs no migration. Read once per process with a 1 s bound; offline or failed reads keep the delta writer on. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
On Home, each day's noise and junk clips (lone "ừ", "Mm-", 2-second fragments) fold into one quiet line at the end of that day: "4 short clips hidden · Show". Tapping it reveals the clips in place, in time order, and "Hide 4 short clips" folds them back. David approved this from real-app renders on 10-28.
Depends on #23851, which adds
GET /v1/conversations/hidden-noise-counts. Merge this after #23851 is deployed. Until then the count request fails, and the app keeps showing nothing extra.How it works
ConversationProvider.refreshFoldedNoiseCountsruns after the initial load. It asks for counts over the loaded days (newest 31 at most) in the device time zone. A failed read keeps what was shown and is never treated as "nothing hidden". With "Show discarded" on, nothing folds, because those rows are already listed.include_discarded=truerows and keepsdiscarded && content_kind in (media, noise), the same rule the server count uses. A clip discarded by hand never appears.ServerConversationnow carriescontentKind, which was already on the wire.Review follow-up (GLM, FIX-FIRST round 1)
All fixed, with tests:
Not changed: a day whose only content is folded noise still has no row of its own. That's a follow-up if it matters.
UI evidence
Verification
test/widgets/home_noise_fold_test.dart, 5 cases:Line-Count-Exception: app/lib/providers/conversation_provider.dart | 2401 -> 2410 | the fold logic lives in its own mixin; the provider keeps only its import, the mixin clause, two @OverRide markers, and the reset/refresh/delete hooks at its existing sign-out, toggle, delete and load paths
Failure-Class: none
🤖 Generated with Claude Code