Files
agent-ui/frontend/public/loading.html
josedario87 25bca2625b feat: centralized PTY-scoped session state, sync engine debug panel, lifecycle states, WS monitor
- Refactor session state to use ptySessionId as primary key across all components
- Add SessionStateManager with PTY-scoped hook processing, approval tracking, notifications
- Add sync-engine debug panel (AgentStatesSection, HookTimelineSection, TerminalRegistrySection, WsMonitorSection)
- Add useLifecycleStates composable for continuous state chips (session, responding, tool, subagent, compacting)
- Add WS monitor endpoint and composable for real-time connection health
- Enhance SessionLifecycleStatus with animated state chips and badge counts
- Enhance SystemMessage with expanded content and better formatting
- Update hooks (approval-permission, approval-plan, notify) with pty_session injection
- Update approval system to derive pending lists from PTY-scoped state
- Update ChatContainer with PTY-derived agent status and lifecycle events
- Update AgentBadge with PTY-scoped status colors
- Improve PiP window, approval window, and loading window handling
2026-02-24 20:10:31 -06:00

57 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; background: transparent; overflow: hidden; }
body { display: flex; align-items: center; justify-content: center; }
.wrap { position: relative; width: 36px; height: 36px; }
.dot {
width: 36px; height: 36px;
border: 2.5px solid rgba(255,255,255,0.06);
border-top-color: #6366f1;
border-radius: 50%;
animation: spin 0.6s linear infinite;
filter: drop-shadow(0 0 8px rgba(99,102,241,0.5));
}
.badge {
display: none;
position: absolute; top: -4px; right: -6px;
background: #ef4444; color: #fff;
font: 700 9px/1 -apple-system, sans-serif;
min-width: 14px; height: 14px;
border-radius: 7px;
text-align: center;
padding: 2px 3px;
}
.badge.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
</style>
</head>
<body>
<div class="wrap">
<div class="dot"></div>
<div class="badge" id="b"></div>
</div>
<script>
var badge = document.getElementById('b');
function updateBadge(n) {
if (n > 1) { badge.textContent = n; badge.className = 'badge show'; }
else { badge.className = 'badge'; }
}
// Initial count from query param
var c = new URLSearchParams(location.search).get('n');
if (c) updateBadge(parseInt(c));
// Live updates via Tauri event (no module imports needed)
var T = window.__TAURI_INTERNALS__;
if (T) {
var handler = T.transformCallback(function(ev) { updateBadge(ev.payload); });
T.invoke('plugin:event|listen', { event: 'loading:count', target: { kind: 'Any' }, handler: handler });
}
</script>
</body>
</html>