fix(fork): print confirmation with forked session name (#576)#600
fix(fork): print confirmation with forked session name (#576)#600merchloubna70-dot wants to merge 1 commit into
Conversation
After a successful fork, print a brief confirmation line showing the new session name so the user knows what was created and can resume it.
There was a problem hiding this comment.
Code Review
This pull request adds a notification message when forking a session in the TUI, displaying the source title and truncated IDs for both the source and the new session. A review comment suggests optimizing the truncate_id helper function by returning a string slice to avoid unnecessary allocations and using a safer slicing method.
| fn truncate_id(id: &str) -> String { | ||
| let limit = id.len().min(8); | ||
| format!("{}", &id[..limit]) | ||
| } |
There was a problem hiding this comment.
The truncate_id function can be simplified to avoid unnecessary allocations and the use of format!. Returning a &str instead of a String is more efficient since the result is only used for printing. Additionally, using get(..8) is a safer way to handle potential slicing issues.
fn truncate_id(id: &str) -> &str {
id.get(..8).unwrap_or(id)
}…wn#600) Implemented using `deepseek exec --model deepseek-v4-flash`. 🐋
…wn#600) Implemented using `deepseek exec --model deepseek-v4-flash`. 🐋
After `deepseek fork` saves the forked session, surface the source session title and the truncated source/new session ids so the user sees what was created before the TUI takes over the screen. Implementation differs slightly from the original PR: - Reuse the existing `session_manager::truncate_id` helper instead of defining a second copy in `main.rs`. - Guard against an empty saved-title string so the line stays readable for unnamed sessions. This is a UX-only addition that does not address the broader `/fork` request from #576; that one is asking for an in-TUI fork picker, which is out of scope for v0.8.15. Integrates #600. Co-authored-by: macworkers <Mann_Juarezxgs@cash4u.com>
|
Integrated as #919 and merged into The fork confirmation slice landed as
This does not address the broader Closing as integrated. |
Closes #576.
Root cause: After forking a session, the TUI gave no visual feedback about what was created, leaving users unsure if the fork succeeded.
Fix: Print a brief confirmation line after successful fork showing the new session name, so users know it worked and can
deepseek resume <name>immediately.Implemented using
deepseek exec --model deepseek-v4-flash. 🐋