mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 07:59:42 +02:00
- Hide the new btn-session-manager header button on phones: add it to the @media (max-width: 430px) display:none block in mobile.css (next to .btn-away-digest) and to KNOWN_PHONE_HIDDEN in the mobile-header policy test, closing the recurring phone-header-leak regression that was PR #153's red CI job. - Put the session-manager header button on its own line in index.html (was crammed onto the away-digest line). - app.js: drop session:updated from the unified-list SSE refresh trigger — it is batch-broadcast ~every 500ms per active session and would turn an open modal / visible welcome list into a sustained ~1 Hz full projects rescan loop; created/deleted (structural changes) are sufficient. - terminal-ui.js _fetchUnifiedSessions: check the ApiResponse envelope and throw on failure so a 5xx surfaces via the caller's catch instead of rendering an empty history. - terminal-ui.js _openSessionRowMenu: on re-entry, invoke the previous menu's close fn (stored as _openRowMenuClose) so its document/window listeners are detached rather than leaked; use claudeSessionId || sessionId in the 'Resume session' menu item to match the main-row and Session Manager resume routing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1426,8 +1426,11 @@ class CodemanApp {
|
||||
// visible welcome list) on session structural changes. Extra listeners on the
|
||||
// same EventSource — EventSource supports multiple listeners per event — so the
|
||||
// existing handlers above are untouched. Registered through addListener so they
|
||||
// are torn down with the rest on reconnect.
|
||||
for (const event of [SSE_EVENTS.SESSION_CREATED, SSE_EVENTS.SESSION_UPDATED, SSE_EVENTS.SESSION_DELETED]) {
|
||||
// are torn down with the rest on reconnect. Only structural events (created /
|
||||
// deleted) trigger a refetch: session:updated is batch-broadcast every ~500ms
|
||||
// per active session, which would otherwise turn an open modal / visible welcome
|
||||
// list into a sustained ~1 Hz full ~/.claude/projects rescan loop.
|
||||
for (const event of [SSE_EVENTS.SESSION_CREATED, SSE_EVENTS.SESSION_DELETED]) {
|
||||
addListener(event, () => this._onSessionListMaybeChanged());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user