Skip to content

fix(streaming): reconnectable streams + UI/branding updates#16

Merged
an7tang merged 8 commits intomainfrom
fix/reconnectable-streams
Mar 27, 2026
Merged

fix(streaming): reconnectable streams + UI/branding updates#16
an7tang merged 8 commits intomainfrom
fix/reconnectable-streams

Conversation

@an7tang
Copy link
Copy Markdown
Collaborator

@an7tang an7tang commented Mar 27, 2026

Summary

  • Reconnectable streams: Decouple agent execution from HTTP lifecycle so browser refresh no longer kills in-flight agent responses. Agent runs as background task with event buffer; frontend auto-reconnects via GET /stream endpoint.
  • UI/branding: Rebrand HexAgent to ClawWork, replace logos/icons, make Cowork default mode, translate Chinese text to English.
  • Skills: Add bundled example and public skills (excluding pptx-plus-linux).
  • Electron: Replace app icons with UniAI branding.
  • Docs: Remove obsolete docs.

Test plan

  • Start a conversation with a long-running tool call
  • Refresh browser mid-stream — verify it reconnects and continues streaming
  • Verify assistant message is persisted after agent completes (even if no client connected)
  • Open two tabs on same conversation mid-stream — both show live updates
  • Verify "Thought for Xs" shows correct duration after refresh (not 0.1s)
  • Verify no RuntimeError or CancelledError in backend logs on disconnect

an7tang added 5 commits March 27, 2026 23:24
Troubleshooting and checklist docs are no longer needed.
Rename the display brand name across the frontend UI — page title,
sidebar, welcome screens, onboarding wizard, and Electron error dialog.
Internal package names, storage keys, and code identifiers unchanged.
Cowork is now the primary experience. Chat mode is hidden by default
and only appears when explicitly enabled via a toggle in Settings >
Sandbox, which also requires an E2B API key.

- Default mode changed from "chat" to "cowork" (frontend + backend)
- Added chat_enabled flag to SandboxConfig
- Mode toggle in header hidden unless chat_enabled && e2b_api_key set
- URL routing guards redirect /chat to /cowork when Chat unavailable
- Onboarding wizard no longer shows E2B setup (legacy feature)
- Settings sandbox tab: VM card first, Chat Mode card with toggle
- Brand color updated to red gradient matching new logo
Swap the old favicon SVG for the new uniai.png brand logo in the
sidebar header.
- WelcomeScreen: translate mounting/preparing status messages
- OnboardingWizard, SettingsModal: remove Chinese from restart-detection regex
- vmSetup: remove Chinese from restart regex and WSL status labels
Comment thread libs/hexagent_demo/backend/hexagent_api/routes/chat.py Dismissed
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Generative Art Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Generative Art Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
an7tang added 3 commits March 28, 2026 01:35
Add 12 skill packages (data-insight-report, deep-research, doc,
email-mail-master, excel-xlsx, find-skills, frontend-dev, mcp-builder,
pdf, pptx-plus-linux, skill-creator, web-design-guidelines) to both
examples/ and public/ directories. Update .gitignore to track these
bundled skills.
…nnectable streams

Agent responses now run as background asyncio tasks that write SSE events
into a per-conversation buffer. This fixes the crash when users refresh
during streaming (RuntimeError: aclose() on running generator) and enables
reconnecting to in-flight streams after page refresh.

Key changes:
- Add StreamManager with ConversationStream (event buffer + fan-out)
- Extract _generate_events() from event_stream(), run via background task
- Add GET /api/chat/{id}/stream endpoint for reconnecting subscribers
- Frontend auto-reconnects to active streams on page load via subscribeToStream()
- Include server-side timestamps in SSE events for accurate thinking durations on replay
- Make STREAM_START idempotent to handle duplicate events during replay
@an7tang an7tang force-pushed the fix/reconnectable-streams branch from 665c11b to 58de927 Compare March 27, 2026 17:36
@an7tang an7tang merged commit 98864d3 into main Mar 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants