Repository navigation
perf(mobile): cut redundant repo, retry, search and presign work - #6631
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryFull re-review at HEAD Files Reviewed (12 files)
Previous Review Summary (commit c83df05)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c83df05)Status: 3 Issues Found | Recommendation: Address before merge Executive SummaryThe attachment-URL renew sweep mishandles a non-finite cached expiry, collapsing the shared sweep to a 30 s cadence for every entry, and the shared translation retry cannot reschedule an already-armed backed-off timer on reconnect. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (12 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
85e92fb to
17ba28b
Compare
|
This description names a scenario the proof did not capture:
A repeated proof run rebuilds the same evidence, so no proof run is dispatched for a named gap. Merging with this gap open is your decision. |
Changelog for users
Changelog for maintainers
src/lib/use-new-session-repos.ts:51(also:62,:74) — accepted. The three provider list queries now pass a five-minutestaleTimein both the personal and organization branches. The explicit refresh paths still write fresh results into the sameforceRefresh: falsekeys, so the cache keys are unchanged.src/lib/tool-summary-translation/use-translated-tool-summary.ts:104— accepted. The per-row interval is gone. One module-level timer serves every mounted unresolved row, doubles its wait from 10 s to a 300 s cap, and stays quiet whileonlineManagerreports offline. A reconnect resets the wait and replays once through the runtime'sretryUnresolvedTranslations.src/lib/system-search-collect.ts:140— accepted. A per-clientWeakMapmemo keyed byqueryHashreuses documents whiledata,status, andmaxPagesare unchanged. Entries the cache no longer holds are pruned;planSystemSearchUpdateremains the only per-run diff.src/components/agents/file-part-url-resolver.ts:24-26(also:100-123) — accepted. The backend already issues a 900 s TTL and an explicitexpiresAt. The client replaces the fixed 30 s sweep with one timeout at the earliest due renew, floored at 30 s, capped at the runtime's maximum delay, and safe against a non-finite expiry.QueryErrorgains an optionalretryLabeldefaulting tocommon.retry; the repository error row passesagentChat.newSession.refreshRepositories. No new dependency.nextRenewDelayMstoscheduleRenewSweep, including the post-presign re-arm) and the shared retry's module state and online listener. New tests cover memo identity, the backoff and offline gate, the timer cap and NaN fallback, and the providerstaleTime.E2E proof
Owner request
[e8] ux-check: On the new-session form, connect a provider repository and return: the newly connected repository appears in the list without the user pressing refresh. — android emulator-5554. Run: signed in as the fresh worktree account e2e-empty-mobile-perf-lib-cache-d10e@example.com (login.sh fixture); its new-session form showed the connect cards 'Connect GitHub' and 'Connect GitLab' with no Repository row (capture e8-before-connect-empty.png). Tapping 'Open GitHub' opened the system browser (local dev-login page at 127.0.0.1:4400); the app's browser leg cannot complete in this environment (it ends at real GitHub OAuth, Cloudflare-blocked), so the connected state was created with the named harness fixture `github-installation.sh…
[e8] ux-check: On the new-session form, connect a provider repository and return: the newly connected repository appears in the list without the user pressing refresh.
[e6] A provider-list failure shows the repository error row and its refresh CTA in the new-session form (needs:fault:
$KILO_WORKFLOW/e2e/fault.sh <worktree> down nextjsbefore opening the form, then… — android. nextjs faulted down (e6-fault-down3.log: 'nextjs killed (port 4400 refuses') then app cold-opened: e6-scene.log L4 'SCENE e6 OK' with L17 'Die GitHub-Repositorys konnten nicht geladen werden.' and L19 'Button Repositorys aktualisieren' on that row (e6-error.txt/e6-error.png). After e6-fault-up3.log 'nextjs up (port 4400', tapping the CTA gives e6-scene.log L27 'SCENE e6 OK' with L41 'Code-Repository: Repository wählen' (e6-recovered.txt/e6-recovered.png) and the picker lists real repos iscekic/panon-deking etc. (e6-repo-list.txt/e6-repo-list.png). UX audit: changed surface renders…[e6] A provider-list failure shows the repository error row and its refresh CTA in the new-session form (needs:fault:
$KILO_WORKFLOW/e2e/fault.sh <worktree> down nextjsbefore opening the form, then…[e8] A fresh account with no past sessions shows the connect rows in the new-session form (empty-repos state; fixture: Profile -> Sign Out, then `$KILO_WORKFLOW/e2e/login.sh … — android emulator-5554. Fixture: signed out, then login.sh with the worktree address e2e-empty-mobile-perf-lib-cache-d10e@example.com; the login fixture auto-connected the shared GitHub App, so the empty-repos state was created with github-disconnect.sh (named stub), then state agent-picker + the scene (e8.replay.json) gave 'SCENE e8 OK'. The digest (e8-digest.log) shows the connect row 'Connect GitHub' with 'Open GitHub' and 'Connect GitHub in your browser, then return here to pick a repository.' plus the GitLab connect row, and no repository picker/name entry; screenshot…
[e9] ux-check: transcript with several image attachments stays rendered over minutes and shows no sustained CPU/battery timer (android emulator-5604) — android emulator-5604, fresh cloud session opened with two photos attached and sent; kept open 3 min: e9-attachments.log holds the t0 (T0 04:38:47) and t3 (T3 04:41:47) chip lines content-desc="Open 9f482027-e5e6-4d8d-9957-eb249518fe91.png" and content-desc="Open 44d8f1e0-43a4-497c-8acf-690d17378e07.png" with text="Queued" unchanged (same lines in e9-attachments-t0.txt and e9-attachments-t3.txt), battery temperature: 250 at both reads with level 15 / status 3 discharging, and getAttachmentDownloadUrl= at :0 in both e9-window-nextjs.log and e9-presign-window.log i.e. zero attachment presign…
[e10] ux-check: open the new-session form, leave, and reopen within five minutes — repository list renders with no provider-list refetch — The cold open's mount batch 'POST /api/trpc/modelPreferences.get,agentProfiles.list,cloudAgentNext.listGitHubRepositories,cloudAgentNext.listGitLabRepositories,cliSessionsV2.recentRepositories,activeSessions.listInstances?batch=1' is the only provider fetch, and the traffic recorded after the reopen (through line 1178, 'POST /api/trpc/activeSessions.list') contains no provider procedure; e10-s2-nextjs.log shows the same one-off cold fetch and the picker digests (e10-second-open-picker.png) show 'RECENTLY USED' + real repos rendering immediately on the second open.
[e13] ux-check: tool-summary translation failure keeps the original text, recovers on connectivity, and the gateway request count does not grow by one request every 10 seconds — android emulator-5554. Fixture: session ses_f34acd1dfffdgrwTk370kZo4d9 created with session.sh cloud on kilo/fake-deterministic, translation model Fake Deterministic, fake-llm taken down and back up with fault.sh (named stub). While it failed, e13-unresolved-digest.txt shows 'Button "e13-notes.txt-Tool, completed"' and 'TextView "e13-notes.txt"' (the source summary, no blank/error state) while e13-nextjs.log carries 'gateway/chat/completions' lines with '503'. The 2 s sample (e13-samples-final.log -> e13-gaps.log) shows gaps of 'gap 10s', 'gap 20s', 'gap 41s', 'gap 80s', 'gap 161s' (count 81…
[e13] ux-check: tool-summary translation failure keeps the original text, recovers on connectivity, and the gateway request count does not grow by one request every 10 seconds
[p1] With the translation preference on, a transcript with tool rows still renders every row and issues one translation line, and the pending rows keep their single-line layout (state session-open; Setup… — android emulator-5606: with 'Translate tool summaries' on (p1-prefs-on.txt: content-desc="Translate tool summaries" checkable="true" checked="true") and app language Deutsch, a cloud transcript (session.sh cloud-enter, fake:read-edit-then-gate) re-opened after a cold start renders every tool row — p1-scene.log reads 'SCENE p1 OK', two rows 'Wöchentliche Deployment-Checkliste.txt-Tool, error' (translated filename proves translation fired), the composer 'EditText Nachricht' and the pending row 'Wägt die nächsten Schritte ab' — and the batch issued exactly one translation line…
[e2] An offline device issues no translation replay and exactly one replay after the network returns (needs:fault:
sim-tool.sh --device <serial> --platform android network offon an open transcript with… — android emulator-5554, app language Deutsch, tool-summary translation on (model Fake Deterministic), fake-llm faulted down (fault.sh . down fake-llm) so the transcript's tool summary stays unresolved: every failed translation is aPOST /api/gateway/chat/completions 503 in 60msline in e2-nextjs-pane.log, dated by the monotone arrival counter in e2-counts.log and the fault epochs in e2-timeline.log. The count is flat at 7 from 1790146730 to 1790146916 (190 s offline; the pre-fault cadence had just been one arrival per 10 s then 20 s, so a shared-timer wake was due 40 s in) — no replay…[e9] ux-check: transcript with several image attachments stays rendered over minutes and shows no sustained CPU/battery timer (android emulator-5604)
[e8] ux-check: On the new-session form, connect a provider repository and return: the newly connected repository appears in the list without the user pressing refresh.
[e5] new-session form lists repositories from cache on open and issues no provider-list line on reopen — Live on android emulator-5604, state agent-picker (STATE HIT in e5-state.log): first open of the form issued all three provider lists - e5-org-nextjs.log lines 836/837/838 carry path organizations.cloudAgentNext.listGitHubRepositories, organizations.cloudAgentNext.listGitLabRepositories and organizations.cloudAgentNext.listBitbucketRepositories (batch req-mudli1zx-8q5lc3kt289, POST line 840) and the list-line count was 4 at 848 lines; after Back -> New coding task the form rendered again (assert OK) and the count was still 4 at 871 lines, i.e. no provider-list line on reopen; e5-nextjs.log…
[e6] A provider-list failure shows the repository error row and its refresh CTA in the new-session form (needs:fault:
$KILO_WORKFLOW/e2e/fault.sh <worktree> down nextjsbefore opening the form, then…[p1] With the translation preference on, a transcript with tool rows still renders every row and issues one translation line, and the pending rows keep their single-line layout (state session-open; Setup…
[p3] ux-check: Open the new-session form, leave, and reopen it within five minutes: the repository list (GitHub/GitLab/Bitbucket) renders immediately with no skeleton and the captured request count shows… — Re-ran the repaired parked scene on emulator-5604 (android, 2026-09-23): 'SCENE p3 OK' after open, back, reopen; the reopened form's digest shows the loaded row 'android.widget.Button Repository: Select repository tappable [37,1240][1043,1356]' and the picker 'android.widget.TextView RECENTLY USED tappable [0,1533][1080,1617]' with no skeleton/duplicate/error state in the digest (no UX-DEFECT observed; layout is the visual reviewer's, capture p3.png). Request count in p3-request-count.log: first open batched '04:52:21.559 cloudAgentNext.listGitHubRepositories…
[e5] new-session form lists repositories from cache on open and issues no provider-list line on reopen
Follow-ups (not changed here)
Open findings (not fixed here)
$KILO_WORKFLOW/e2e/fault.sh <worktree> down nextjsbefore opening the form, thenup; proof: the digest shows 'Couldn't load GitHub repositories' with the 'Refresh repositories' cfault.sh <wt> down nextjs('nextjs port 4400 down') before opening the form; the cold-open new-session form's digest does show the error row 'Cou