mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 16:39:42 +02:00
fix: allow reopening completed subagent windows + add Agent label
- Subagent windows now always minimize instead of being removed - restoreSubagentWindow recreates window if it was deleted - Badge now shows "Agent 1" instead of just "1" - Use activeSessionId as fallback parent for orphan agents Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ When user says "COM": 1) Increment version in BOTH `package.json` AND `CLAUDE.md
|
|||||||
|
|
||||||
Claudeman is a Claude Code session manager with a web interface and autonomous Ralph Loop. It spawns Claude CLI processes via PTY, streams output in real-time via SSE, and supports scheduled/timed runs.
|
Claudeman is a Claude Code session manager with a web interface and autonomous Ralph Loop. It spawns Claude CLI processes via PTY, streams output in real-time via SSE, and supports scheduled/timed runs.
|
||||||
|
|
||||||
**Version**: 0.1385 (must match `package.json`)
|
**Version**: 0.1386 (must match `package.json`)
|
||||||
|
|
||||||
**Tech Stack**: TypeScript (ES2022/NodeNext, strict mode), Node.js, Fastify, Server-Sent Events, node-pty
|
**Tech Stack**: TypeScript (ES2022/NodeNext, strict mode), Node.js, Fastify, Server-Sent Events, node-pty
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claudeman",
|
"name": "claudeman",
|
||||||
"version": "0.1385",
|
"version": "0.1386",
|
||||||
"description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence",
|
"description": "The missing control plane for Claude Code - run 20 autonomous agents with real-time monitoring and session persistence",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
+17
-15
@@ -1980,7 +1980,7 @@ class ClaudemanApp {
|
|||||||
onmouseenter="app.showSubagentDropdown(this)"
|
onmouseenter="app.showSubagentDropdown(this)"
|
||||||
onmouseleave="app.scheduleHideSubagentDropdown(this)"
|
onmouseleave="app.scheduleHideSubagentDropdown(this)"
|
||||||
onclick="event.stopPropagation(); app.pinSubagentDropdown(this);">
|
onclick="event.stopPropagation(); app.pinSubagentDropdown(this);">
|
||||||
<span class="subagent-count">${minimizedAgents.size}</span>
|
<span class="subagent-label">Agent</span><span class="subagent-count">${minimizedAgents.size}</span>
|
||||||
<div class="subagent-dropdown" onmouseenter="app.cancelHideSubagentDropdown()" onmouseleave="app.scheduleHideSubagentDropdown(this.parentElement)">
|
<div class="subagent-dropdown" onmouseenter="app.cancelHideSubagentDropdown()" onmouseleave="app.scheduleHideSubagentDropdown(this.parentElement)">
|
||||||
${agentItems.join('')}
|
${agentItems.join('')}
|
||||||
</div>
|
</div>
|
||||||
@@ -5752,14 +5752,14 @@ class ClaudemanApp {
|
|||||||
if (!windowData) return;
|
if (!windowData) return;
|
||||||
|
|
||||||
const agent = this.subagents.get(agentId);
|
const agent = this.subagents.get(agentId);
|
||||||
const parentSessionId = agent?.parentSessionId;
|
const parentSessionId = agent?.parentSessionId || this.activeSessionId;
|
||||||
|
|
||||||
|
// Always minimize to tab (use active session if no parent)
|
||||||
|
windowData.element.style.display = 'none';
|
||||||
|
windowData.minimized = true;
|
||||||
|
|
||||||
|
// Track minimized agent for the session
|
||||||
if (parentSessionId) {
|
if (parentSessionId) {
|
||||||
// Minimize to tab instead of removing
|
|
||||||
windowData.element.style.display = 'none';
|
|
||||||
windowData.minimized = true;
|
|
||||||
|
|
||||||
// Track minimized agent for the parent session
|
|
||||||
if (!this.minimizedSubagents.has(parentSessionId)) {
|
if (!this.minimizedSubagents.has(parentSessionId)) {
|
||||||
this.minimizedSubagents.set(parentSessionId, new Set());
|
this.minimizedSubagents.set(parentSessionId, new Set());
|
||||||
}
|
}
|
||||||
@@ -5767,15 +5767,10 @@ class ClaudemanApp {
|
|||||||
|
|
||||||
// Update tab badge to show minimized agents
|
// Update tab badge to show minimized agents
|
||||||
this.renderSessionTabs();
|
this.renderSessionTabs();
|
||||||
|
|
||||||
// Persist the state change
|
|
||||||
this.saveSubagentWindowStates();
|
|
||||||
} else {
|
|
||||||
// No parent session - fully remove the window
|
|
||||||
windowData.element.remove();
|
|
||||||
this.subagentWindows.delete(agentId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Persist the state change
|
||||||
|
this.saveSubagentWindowStates();
|
||||||
this.updateConnectionLines();
|
this.updateConnectionLines();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5820,8 +5815,15 @@ class ClaudemanApp {
|
|||||||
|
|
||||||
restoreSubagentWindow(agentId) {
|
restoreSubagentWindow(agentId) {
|
||||||
const windowData = this.subagentWindows.get(agentId);
|
const windowData = this.subagentWindows.get(agentId);
|
||||||
|
const agent = this.subagents.get(agentId);
|
||||||
|
|
||||||
|
// If window doesn't exist but agent does, recreate it
|
||||||
|
if (!windowData && agent) {
|
||||||
|
this.createSubagentWindow(agentId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (windowData) {
|
if (windowData) {
|
||||||
const agent = this.subagents.get(agentId);
|
|
||||||
const settings = this.loadAppSettingsFromStorage();
|
const settings = this.loadAppSettingsFromStorage();
|
||||||
const activeTabOnly = settings.subagentActiveTabOnly ?? false;
|
const activeTabOnly = settings.subagentActiveTabOnly ?? false;
|
||||||
|
|
||||||
|
|||||||
@@ -2958,11 +2958,11 @@ kbd {
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-width: 16px;
|
gap: 2px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
padding: 0 4px;
|
padding: 0 5px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-size: 0.65rem;
|
font-size: 0.6rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
color: white;
|
color: white;
|
||||||
@@ -2972,7 +2972,14 @@ kbd {
|
|||||||
|
|
||||||
.session-tab .tab-subagent-badge:hover {
|
.session-tab .tab-subagent-badge:hover {
|
||||||
background: var(--accent-hover);
|
background: var(--accent-hover);
|
||||||
transform: scale(1.1);
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.session-tab .tab-subagent-badge .subagent-label {
|
||||||
|
font-size: 0.55rem;
|
||||||
|
opacity: 0.85;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.session-tab .tab-subagent-badge .subagent-count {
|
.session-tab .tab-subagent-badge .subagent-count {
|
||||||
|
|||||||
Reference in New Issue
Block a user