mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 16:09:43 +02:00
COD-143 retain session name when resuming from the session manager
resumeHistorySession ignored the row's name and always synthesized a fresh w<N>-<dir> name from the working dir, so resuming a custom-named session lost its name. Thread the name through resumeHistorySession(sessionId, workingDir, name) and extract the choice into a pure _resolveResumeName helper: prefer a non-empty existing name, else generate the next free w<N>-<dir>. Forward s.name at all three call sites (terminal-ui.js history-item + session-manager menu, session-ui.js run-mode history); sessions without a name fall back to the generated name (unchanged behavior). The unified session rows already carry name, so session-manager rows resume with it. TDD: test/resume-name.test.ts drives the real _resolveResumeName via vm-harness. (cherry picked from commit 56c7906a48d8b453ed55810a02ec70f72d34ed32)
This commit is contained in:
@@ -424,7 +424,7 @@ Object.assign(CodemanApp.prototype, {
|
||||
btn.append(dirSpan, metaSpan);
|
||||
btn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
this.resumeHistorySession(s.sessionId, s.workingDir);
|
||||
this.resumeHistorySession(s.sessionId, s.workingDir, s.name);
|
||||
});
|
||||
container.appendChild(btn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user