0.5.3 (2026-05-12)¶
Real-time AI response streaming, Python 3.12 upgrade, and infrastructure improvements.
✨ Features¶
- AI response streaming: Chat AI responses are now delivered progressively via Server-Sent Events (SSE), showing phase indicators ("Thinking…", "Analyzing your diagram…", "Generating code…", "Validating syntax…") instead of a generic spinner.
- New SSE endpoint:
POST /api/v1/chat-sessions/{session_id}/messages/streamcoexisting with the existing REST endpoint. - Streaming support for all 5 AI providers: OpenAI, Claude, Gemini, DeepSeek, and MiniMax.
- Automatic response mode detection ("text" vs "code"): when the user requests diagram modifications, only phase indicators are shown without internal text; when asking questions or requesting analysis, text is shown progressively.
- Real-time filtering of
<think>tags from reasoning models (DeepSeek, etc.) during streaming. - Automatic stream cancellation when closing the chat panel or switching diagrams.
- Retry button with maximum 3 consecutive attempts on streaming errors.
- Automatic fallback to non-streaming flow if the provider doesn't support streaming.
⬆️ Upgrades¶
- Python upgraded from 3.11 to 3.12 (Dockerfile, pyproject.toml, black, ruff, mypy).
- FastAPI pin updated to
>=0.115.0,<0.129.0(preparation for gradual upgrade). python-multipartupdated from^0.0.12to^0.0.18(required by recent FastAPI versions).- Docker base image updated to
python:3.12-slim-bookworm. - Dockerfile improved:
dist-upgradefor security patches, gcc cleanup post-build. - Frontend: added
dompurify^3.4.2 for SVG sanitization. - Frontend: security overrides for
lodash,uuid,mdast-util-to-hast.
🐛 Fixes¶
- Fix:
test_change_password_without_authtest updated to expect HTTP 401 (consistent with HTTPBearer behavior). - Fix: Mermaid rendering — node text labels now display correctly (DOMPurify no longer strips
foreignObjectfrom locally-rendered SVGs). - Fix: SVG sanitization applied only to server-rendered diagrams (Kroki), not to local Mermaid output.
♻️ Refactors¶
- Structure (folder) icon moved to the left of the diagram name in the editor toolbar for better UX.
- Removed generic "Diagram modified as requested" text — when no explanation is available, the message is empty and only the diff preview is shown.
- Chat
languageparameter now uses the user's active language (i18n) instead of hardcoded'es'.
🌐 Translations¶
- New i18n keys for streaming in
ai.streaming.*(12 keys in Spanish and English).
🔧 Internal¶
- 45 new tests: 19 unit tests (SSE events), 11 property-based (Hypothesis), 15 integration tests.
- New module
backend/app/api/v1/chat_sessions/sse_events.pyfor SSE event formatting. - New module
frontend/src/services/streamConsumer.tsfor SSE consumption via Fetch API. - New module
frontend/src/utils/diagramCodeAccumulator.tsfor diagram code extraction from streams. - New module
frontend/src/utils/sanitize.tsfor XSS sanitization of SVG and HTML. - New TypeScript types in
frontend/src/types/streaming.ts.