feat: show forked from session id in /status (#9330)

Summary:
- Add forked_from to SessionMeta/SessionConfiguredEvent and persist it
for forked sessions.
- Surface forked_from in /status for tui + tui2 and add snapshots.
This commit is contained in:
Anton Panasenko authored and GitHub committed 2026-01-16 13:41:46 -08:00
1 parent f1653dd4d3
commit c26fe64539
19 files changed
+267

No files matched your search

+5
View File
@@ -57,6 +57,7 @@ pub struct RolloutRecorder {
pub enum RolloutRecorderParams {
Create {
conversation_id: ThreadId,
forked_from_id: Option<ThreadId>,
instructions: Option<String>,
source: SessionSource,
},
@@ -79,11 +80,13 @@ enum RolloutCmd {
impl RolloutRecorderParams {
pub fn new(
conversation_id: ThreadId,
forked_from_id: Option<ThreadId>,
instructions: Option<String>,
source: SessionSource,
) -> Self {
Self::Create {
conversation_id,
forked_from_id,
instructions,
source,
}
@@ -158,6 +161,7 @@ impl RolloutRecorder {
let (file, rollout_path, meta) = match params {
RolloutRecorderParams::Create {
conversation_id,
forked_from_id,
instructions,
source,
} => {
@@ -181,6 +185,7 @@ impl RolloutRecorder {
path,
Some(SessionMeta {
id: session_id,
forked_from_id,
timestamp,
cwd: config.cwd.clone(),
originator: originator().value,
+1
View File
@@ -641,6 +641,7 @@ async fn test_updated_at_uses_file_mtime() -> Result<()> {
item: RolloutItem::SessionMeta(SessionMetaLine {
meta: SessionMeta {
id: conversation_id,
forked_from_id: None,
timestamp: ts.to_string(),
instructions: None,
cwd: ".".into(),