You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): sort and date sessions by conversation recency - #1297
An imported Codex conversation could finish yesterday but appear as “just now” at the top of the Web sidebar after its history or metadata was written today. The catalog requested updated_at, and Web list summaries and opened-session projections also used updatedAt, even when the Host supplied an older recencyAt.
Changes
Request native catalog pages in recency_at order and merge native/external rows using the same activity timestamp.
Use recencyAt ?? updatedAt for local and remote session labels, recent ordering, remote search results, and opened-session list metadata. Catalog updates notice recency-only changes without rebroadcasting metadata-only timestamp changes.
Preserve native updatedAt for history and usage refreshes. Missing/null recency falls back to the existing timestamp; zero remains a valid timestamp.
Type the optional recency field in snapshot/remote row contracts and align the existing feature documentation.
Validation
Confirmed the new local/remote regressions fail on the baseline because metadata update time is projected as conversation activity; catalog expectations also fail on the baseline's updated_at query.
npx vitest run --config tests/vitest.config.js packages/host-runtime/test/thread-catalog.test.ts — 20 passed.
npx vitest run --config tests/vitest.config.js packages/host-runtime/test/app-server-host.thread-catalog.test.ts — 6 passed after aligning all public-entry, cold-start, archive, and repeat-read sort-key expectations.
Targeted TypeScript builds completed for the affected packages and their dependencies (packages/host-runtime and packages/web-server).
npm run build:web:ui completed. Manually opened the real Web UI through an isolated synthetic CDP fixture in Chrome: the recent conversation appears first, the older conversation shows “1天”, and opening its history preserves that label and order. No live Harness turn or user data was used.
git diff --check passed. Full repository checks are left to CI.
Demo
Both synthetic conversations have the same current metadata update time; their conversation activity is approximately five minutes ago and one day ago. Screenshot captured and visually inspected after opening the older conversation.
Session labels and ordering now follow conversation activity, falling back to the update time when recency is missing. No concrete merge-blocking risk was found; the native server's handling of the recency sort key was not verifiable from the repository.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
标题“fix(web): sort and date sessions by conversation recency”概括了主要变更:Web 会话的排序与时间标签改用会话最近活动时间(recencyAt,回退到 updatedAt)。原始变更摘要显示目录分页键、ch-thread-time、ch-sessions、remote-sessions 等文件都围绕该主题修改,标题与变更集一致。
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
@iruriQ 补充 #1297 最新 CI 结果。你指出的 app-server-host.thread-catalog.test.ts 现在 6 项全部通过。全仓 Vitest 的 6 条失败都在 renderer-binding-probe-host-catalog.test.ts,错误是 node.matches is not a function,已经逐项和 main 的日志核对,测试名和错误一致。 #1297 Vitest · main Vitest
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
awaiting-authorWaiting for the author to respond or update the PR.
2 participants
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.
Problem
An imported Codex conversation could finish yesterday but appear as “just now” at the top of the Web sidebar after its history or metadata was written today. The catalog requested
updated_at, and Web list summaries and opened-session projections also usedupdatedAt, even when the Host supplied an olderrecencyAt.Changes
recency_atorder and merge native/external rows using the same activity timestamp.recencyAt ?? updatedAtfor local and remote session labels, recent ordering, remote search results, and opened-session list metadata. Catalog updates notice recency-only changes without rebroadcasting metadata-only timestamp changes.updatedAtfor history and usage refreshes. Missing/null recency falls back to the existing timestamp; zero remains a valid timestamp.Validation
updated_atquery.npx vitest run --config tests/vitest.config.js packages/host-runtime/test/thread-catalog.test.ts— 20 passed.npx vitest run --config tests/vitest.config.js packages/host-runtime/test/app-server-host.thread-catalog.test.ts— 6 passed after aligning all public-entry, cold-start, archive, and repeat-read sort-key expectations.node --import tsx --test packages/web-server/test/ch-list-summary.test.ts packages/web-server/test/ch-catalog-updates.test.ts packages/web-server/test/remote-sessions.test.ts— 58 passed.packages/host-runtimeandpackages/web-server).npm run build:web:uicompleted. Manually opened the real Web UI through an isolated synthetic CDP fixture in Chrome: the recent conversation appears first, the older conversation shows “1天”, and opening its history preserves that label and order. No live Harness turn or user data was used.git diff --checkpassed. Full repository checks are left to CI.Demo
Both synthetic conversations have the same current metadata update time; their conversation activity is approximately five minutes ago and one day ago. Screenshot captured and visually inspected after opening the older conversation.