mirror of
https://github.com/openai/codex.git
synced 2026-12-01 15:42:13 +00:00
Add persisted sections for organizing threads (#35722)
## What changed - Replace the `isPinned` thread metadata and filters with an optional persisted `section` and `sectionId`. - Add the paginated `threadSection/list` app-server method so clients can discover sections even when they contain no threads. - Seed a stable `Pinned` section, validate section assignments, and support filtering for a specific section or for unsectioned threads. ## Testing - Cover section protocol serialization, listing and pagination, metadata updates, filtering, persistence, migration compatibility, and operation without SQLite state. GitOrigin-RevId: 7972b5471d29317b9387bfd90aa9f573f691ad4c
This commit is contained in:
1 parent
9291a123fb
commit
85c6da1c79
85 files changed
+1826
-419
No files matched your search
@@ -472,7 +472,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
/*section*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await
|
||||
@@ -582,7 +582,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
/*section*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await;
|
||||
@@ -612,7 +612,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
/*section*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await
|
||||
@@ -653,7 +653,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
/*section*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await
|
||||
@@ -733,7 +733,7 @@ impl RolloutRecorder {
|
||||
cwd_filter.as_ref().map(std::slice::from_ref),
|
||||
/*relation_filter*/ None,
|
||||
/*archived*/ false,
|
||||
/*is_pinned*/ None,
|
||||
/*section*/ None,
|
||||
/*search_term*/ None,
|
||||
)
|
||||
.await
|
||||
@@ -1202,7 +1202,7 @@ fn fill_missing_thread_item_metadata(item: &mut ThreadItem, state_item: ThreadIt
|
||||
thread_id: _state_thread_id,
|
||||
first_user_message,
|
||||
preview,
|
||||
is_pinned,
|
||||
section,
|
||||
cwd,
|
||||
git_branch,
|
||||
git_sha,
|
||||
@@ -1225,7 +1225,7 @@ fn fill_missing_thread_item_metadata(item: &mut ThreadItem, state_item: ThreadIt
|
||||
if item.preview.is_none() {
|
||||
item.preview = preview;
|
||||
}
|
||||
item.is_pinned = is_pinned;
|
||||
item.section = section;
|
||||
if item.cwd.is_none() {
|
||||
item.cwd = cwd;
|
||||
}
|
||||
@@ -1961,7 +1961,7 @@ fn thread_item_from_state_metadata(
|
||||
thread_id: Some(item.id),
|
||||
first_user_message: item.first_user_message,
|
||||
preview: item.preview,
|
||||
is_pinned: item.is_pinned,
|
||||
section: item.section,
|
||||
cwd: Some(item.cwd),
|
||||
git_branch: item.git_branch,
|
||||
git_sha: item.git_sha,
|
||||
|
||||
Reference in new issue
Block a user