Skip to content

fix(app): load sessions beyond the first 200 records - #4783

Merged
yomgui merged 1 commit into
devfrom
fix/unarchived-session-list
Sep 10, 2026
Merged

yomgui merged 1 commit into
devfrom
fix/unarchived-session-list

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member

Root cause

Workspace session loading requested one prefix of 200 records. Archived records and sub-agent children consumed that budget before sidebar filtering; Show more only expanded the already-loaded subset. Older active conversations were therefore undiscoverable in large workspaces.

Fix

  • Exhaust v1 lists with explicit expanding limits (the legacy API has no older-page cursor).
  • Follow opaque v2 cursors, including empty workspace-filtered pages; retain directory and remote-token isolation.
  • Fail atomically on later-page errors, reject cursor cycles, and preserve current archive/child/pin behavior.
  • Add eight synthetic transport-and-sidebar regression tests to the core CI selection.

Verification

On PR head 88e7ec9, local lane (Daytona credentials unavailable):

  • pnpm evals:pr specs/route-session-list.test.ts — exit 0; 8 passed, 0 failed, 0 skipped.
  • pnpm --filter @openwork/app typecheck — exit 0 (initial combined invocation exceeded the shell timeout; standalone retry passed without code changes).
  • pnpm check:outbound-access — exit 0.
  • node scripts/i18n-audit.mjs --ci — exit 0.

Testkit assertion evidence will be attached to this PR. This proof exercises real SDK/adapter HTTP transports and sidebar row derivation, not an Electron UI run. No private session data or screenshots are included.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 6:17am UTC
openwork-den Ready Ready Preview Sep 10, 2026 6:17am UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 6:17am UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 6:17am UTC

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (103777 ms), confidentiality-review (47965 ms), spec-provenance-review (161583 ms), desktop-den-sync-review (85159 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (88e7ec9359c6cef0311a96e3e6c8fa17dfc07df2). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 6/6 tests · 7/7 assertions · 5 images

Commit 88e7ec9359c6cef0311a96e3e6c8fa17dfc07df2 · selected evidence

Open review report

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Passed — session inventory regression evidence

Verified commit: 88e7ec9359c6cef0311a96e3e6c8fa17dfc07df2.

Local lane (Daytona credentials unavailable). Command: pnpm evals:pr specs/route-session-list.test.ts, exit 0, 8 passed / 0 failed / 0 skipped. Each of the eight ambient testkit records has outcome passed, one passed assertion artifact, zero failed expectations, and zero pending judgments.

Source spec and executable assertions. Source records are under evals/results/test-runs/, with the exact run identifiers below. Evidence is reproduced inline rather than linking a hosted review. No screenshots: these are synthetic HTTP-transport and sidebar-derivation tests, not an Electron UI test. No private session data is included.

1. Passed — v1 explicit expanding limits

Source run: 2026-09-10T05-58-27-793Z-v1-exhausts-explicit-expanding-limits-at-empty-below-exact-and-above-boundaries

Assertions: all 0, 199, 200, 201, 400, 401, and 1201 synthetic sessions were returned exactly. Requests doubled explicit limits from 200 until exhaustion, retained the owning credential, and sent no cursor.

2. Passed — v1 older active roots and workspace isolation

Source run: 2026-09-10T05-58-28-455Z-v1-loads-old-active-roots-behind-over-200-archives-and-children-without-crossing

Assertions: 251 active roots behind 230 archives and 230 children were recovered, including an older root with archived=0. Preview showed six roots; expansion returned all 251 without another request. Pinning retained the older root. Concurrent remote loading returned only its 401 sessions; directories and credentials stayed isolated. Each workspace used limits 200, 400, 800.

3. Passed — v1 atomic errors and bounded retry

Source run: 2026-09-10T05-58-28-705Z-v1-rejects-later-page-errors-atomically-and-retries-only-transient-failures-with

Assertions: later-page 401, 403, 404, 503 and socket failures rejected instead of returning partial history. Status/code remained intact. Only 503 retried, restarting at limit=200; one retry recovered all 201 sessions in four total requests. No request changed remote identity.

4. Passed — v2 older active roots and filtered-empty pages

Source run: 2026-09-10T05-58-29-018Z-v2-loads-old-active-roots-behind-over-200-archives-and-children-without-crossing

Assertions: recovered the same 251 active roots behind archives/children; preview, expansion and pinning retained their semantics. Each workspace traversed seven limit=200 requests, continuing through pages emptied by workspace filtering. No remote sessions or credentials crossed workspace boundaries.

5. Passed — v2 atomic errors and bounded retry

Source run: 2026-09-10T05-58-29-303Z-v2-rejects-later-page-errors-atomically-and-retries-only-transient-failures-with

Assertions: later-page HTTP and socket failures never produced partial success. Authorization/not-found failures were not retried. One 503 retry restarted without a cursor and recovered all 201 sessions in five total requests, preserving remote mount and credential.

6. Passed — v1 stale prefix replacement

Source run: 2026-09-10T05-58-29-676Z-v1-replaces-expanded-prefixes-instead-of-retaining-removed-or-stale-session-reco

Assertions: after a synthetic deletion and title change between requests, the expanded read exactly matched the replacement snapshot. Removed records and stale titles were not retained. Exactly two authenticated requests occurred.

7. Passed — v2 boundary exhaustion and tied timestamps

Source run: 2026-09-10T05-58-29-900Z-v2-follows-terminal-cursors-at-boundaries-and-preserves-sessions-with-tied-times

Assertions: all IDs were returned in order for 0, 199, 200, 201, 400, and 401 sessions with the same timestamp. Exactly ceil(count/200)+1 requests followed the cursor through the terminal empty page; a short page was not mistaken for exhaustion.

8. Passed — v2 overlap, cycles and malformed responses

Source run: 2026-09-10T05-58-30-219Z-v2-deduplicates-overlapping-pages-and-rejects-cyclic-cursors-or-malformed-succes

Assertions: overlapping pages returned each ID once and preserved an opaque cursor with URL-sensitive characters. A two-cursor cycle rejected after three requests. Non-array data and numeric next-cursor payloads each rejected after one request instead of silently truncating history.

Additional verification

  • pnpm --filter @openwork/app typecheck — exit 0. The initial combined invocation hit the shell timeout; the standalone rerun passed without code changes.
  • pnpm check:outbound-access — exit 0.
  • node scripts/i18n-audit.mjs --ci — exit 0.
  • Build and core checks — passed, including the new spec in the core selection and packaged desktop smoke checks.

Workflow jobs excluded by path/schedule classification are not claimed as executed tests.

@yomgui
yomgui merged commit 47818bf into dev Sep 10, 2026
27 checks passed

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — 88e7ec93 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — 88e7ec93 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — 88e7ec93 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — 88e7ec93 Deployed Sep 10, 2026 by vercel[bot]
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