mirror of
https://github.com/openai/codex.git
synced 2026-09-07 15:40:00 +00:00
## Why New non-ephemeral threads have no persisted rollout or preview until their first turn, so moving them into a section could leave them absent from section-filtered thread lists. ## What changed - Materialize and flush a non-ephemeral thread before applying an explicit section move. - Include explicitly sectioned threads with empty previews in section-filtered queries, and update the partial indexes to cover them. ## Testing - Add an app-server test that moves a newly started thread into and out of the pinned section before its first turn. - Cover empty-preview threads in recency and section-position query tests. GitOrigin-RevId: aa3c4daf9890f06c08b93cd60f146099cbc6cfb2
11 lines
407 B
SQL
11 lines
407 B
SQL
DROP INDEX idx_threads_section_recency_at_ms;
|
|
DROP INDEX idx_threads_section_position;
|
|
|
|
CREATE INDEX idx_threads_section_recency_at_ms
|
|
ON threads(archived, thread_section_id, recency_at_ms DESC, id DESC)
|
|
WHERE thread_section_id IS NOT NULL;
|
|
|
|
CREATE INDEX idx_threads_section_position
|
|
ON threads(archived, thread_section_id, section_position ASC, id ASC)
|
|
WHERE thread_section_id IS NOT NULL;
|