Skip to content

fix: sort new threads within project lists - #1777

Open
k9ight000 wants to merge 3 commits into
BigPizzaV3:mainfrom
k9ight000:codex/project-thread-pin-fix
Open

fix: sort new threads within project lists#1777
k9ight000 wants to merge 3 commits into
BigPizzaV3:mainfrom
k9ight000:codex/project-thread-pin-fix

Conversation

@k9ight000

Copy link
Copy Markdown

Problem

A newly created thread can temporarily use a client-new-thread id without a backend sort timestamp. CodexPlusPlus only corrected ordering in the top-level Chats list, so project thread lists could leave the new thread below older conversations until the temporary id settled or the app refreshed.

Fix

  • Give temporary client-new-thread rows a stable provisional timestamp.
  • Group visible sidebar rows by their actual Chats/project list and sort each list independently.
  • Continue preferring backend updated_at_ms values when available.
  • Batch /thread-sort-keys requests in groups of 200 for large sidebars.
  • Add injection-script regression coverage.

Validation

  • node --check assets/inject/renderer-inject.js
  • cargo test -p codex-plus-core --test cdp_bridge -j 1 — 95 passed
  • git diff --check

The published diff contains only the renderer injection script and its Rust regression test, and was scanned for credentials and local user paths.

@BigPizzaV3

Copy link
Copy Markdown
Owner

按每个 Chats/项目列表分别排序、为临时 client-new-thread 提供稳定时间戳的方向合理,但当前 renderer 注入脚本已在 main 继续演进,分支处于冲突状态,不能直接采用旧 DOM 选择器和整段排序逻辑。请 rebase 最新 main,确认不会跨列表移动节点,并补实际 DOM fixture 覆盖 Chats、两个项目列表、pin 和临时会话后重新跑注入测试。

@k9ight000
k9ight000 force-pushed the codex/project-thread-pin-fix branch from 2601891 to 65340ce Compare August 24, 2026 06:49
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.

2 participants