Persist names for paginated threads (#34229)

## Why

Paginated threads need explicit user-facing names to remain distinct from
derived titles and previews without requiring rollout metadata writes.

## What changed

- Add a nullable `name` column to persisted thread metadata and use it as the
  canonical name for paginated threads.
- Route paginated name updates through the state database while retaining the
  name index as best-effort compatibility data and preserving legacy thread
  behavior.
- Return persisted names when reading, listing, searching, and resuming
  paginated threads, and include them in state-database search matching.

## Testing

- Cover paginated name updates, reads, list/search results, and metadata-only
  resume behavior, including stale or unavailable compatibility data.

GitOrigin-RevId: 5ac4dfa2a83682b43d59ecc87e0f515580164dca
This commit is contained in:
Brent Traut authored and copyberry committed 2026-07-19 21:13:13 +00:00
1 parent 7844386e3d
commit 5a208c1fc3
13 files changed
+483 -148

No files matched your search

+1
View File
@@ -666,6 +666,7 @@ mod tests {
cwd: PathBuf::from("/tmp"),
cli_version: "0.0.0".to_string(),
title: String::new(),
name: None,
preview: None,
sandbox_policy: "read-only".to_string(),
approval_mode: "on-request".to_string(),