Release YI (v0.51.679): parallelize fresh sidebar boot fetches (#4992, fixes #4759) - #4996
Conversation
|
| Filename | Overview |
|---|---|
| static/sessions.js | Extracts _loadSidebarSessionListPayload to fire /api/projects concurrently with /api/sessions; error handling and generation/embargo guards are preserved. |
| tests/test_issue4759_parallel_sidebar_boot_fetch.py | New test file with 4 Node.js harness tests validating parallel call ordering, project failure fallback, cold-boot opts, and warm-refresh opts — all assertions are logically sound. |
| tests/test_issue4766_sidebar_source_pushdown.py | Adds _ensure_async helper and injects _loadSidebarSessionListPayload into the scope_mismatch test so _runRenderSessionListRefresh can resolve its new dependency. |
| tests/test_session_sidebar_resilience.py | Updates text-search assertions to match the refactored structure: delegates/call-site assertions moved to the new helper, structural assertions updated accordingly. |
| CHANGELOG.md | Adds v0.51.679 release entry describing the parallel fetch change; changelog update is correct per the release process. |
Sequence Diagram
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant RSL as renderSessionList()
participant RR as _runRenderSessionListRefresh()
participant LS as _loadSidebarSessionListPayload()
participant API_S as /api/sessions
participant API_P as /api/projects
RSL->>RR: call (opts, gen)
RR->>LS: call (sessionListQS, sessionRequestOpts)
Note over LS: BEFORE (sequential)
LS->>API_S: await api(sessions)
API_S-->>LS: sessData
LS->>API_P: await api(projects)
API_P-->>LS: projData
Note over LS: AFTER (parallel)
LS->>API_P: start projectPromise (IIFE, no await yet)
LS->>API_S: await api(sessions)
API_S-->>LS: sessData
API_P-->>LS: projData (already in flight)
LS-->>RR: "{sessData, projData}"
Note over LS: Project failure path
API_P--xLS: error caught internally
LS-->>RR: "{sessData, projData:{projects:_allProjects||}}"
RR->>RSL: _applySessionListPayload(sessData, projData)
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant RSL as renderSessionList()
participant RR as _runRenderSessionListRefresh()
participant LS as _loadSidebarSessionListPayload()
participant API_S as /api/sessions
participant API_P as /api/projects
RSL->>RR: call (opts, gen)
RR->>LS: call (sessionListQS, sessionRequestOpts)
Note over LS: BEFORE (sequential)
LS->>API_S: await api(sessions)
API_S-->>LS: sessData
LS->>API_P: await api(projects)
API_P-->>LS: projData
Note over LS: AFTER (parallel)
LS->>API_P: start projectPromise (IIFE, no await yet)
LS->>API_S: await api(sessions)
API_S-->>LS: sessData
API_P-->>LS: projData (already in flight)
LS-->>RR: "{sessData, projData}"
Note over LS: Project failure path
API_P--xLS: error caught internally
LS-->>RR: "{sessData, projData:{projects:_allProjects||}}"
RR->>RSL: _applySessionListPayload(sessData, projData)
Reviews (1): Last reviewed commit: "Release YI (v0.51.679): parallelize fres..." | Re-trigger Greptile
Release YI (v0.51.679) — faster fresh sidebar boot
Ships #4992 (@rodboev) — fixes #4759 (bug+performance: opening a new tab is slow to populate the sidebar).
What it fixes
Cold boot fetched
/api/sessionsthen/api/projectssequentially. They're independent reads, so they now run concurrently (project fetch kicked off immediately, awaited after the session fetch).Gate
projectPromiseand falls back to{projects:_allProjects||[]}so it can't reject the boot or drop sessions; the session-fetch error/timeout/scope path is unchanged; result assembly intorenderSessionListis identical to the sequential version. No regression risk.Credit @rodboev.