Claude
9fdbe341be
feat(chat): implement web chat interface with accessibility
...
Core implementation:
- chat_app.py: Chainlit entry point with @cl.on_chat_start,
@cl.on_message (streaming via llm.stream_complete), @cl.on_chat_end
Reuses Config, KnowledgeBase, ConversationStore, AdminNotifier from src/
Handles registration completion, post-completion updates, new-child flow
- src/llm.py: add stream_complete() generator (litellm stream=True)
alongside existing complete(); tests added in tests/test_llm.py
- src/agent/response_parser.py: extract parse_llm_response(),
apply_updates(), fallback_message() from EmailAgent into shared module
EmailAgent now delegates to these functions (no logic change)
Chainlit configuration:
- chainlit.toml: telemetry off, German default, custom CSS + JS paths
- chainlit.md: German welcome page with playgroup info
Accessibility (WCAG 2.1 AA):
- public/custom.css: contrast overrides (≥4.5:1), prefers-reduced-motion
(static "…" replaces animated dots), skip link styles, 100dvh fix
- public/accessibility.js: MutationObserver injects aria-live="polite"
on message list, focus management after agent replies, skip link element
Other:
- .gitignore: add .chainlit/ (Chainlit runtime, auto-generated)
- openspec/config.yaml: populate context field with tech stack
- openspec/changes/implement-web-chat/tasks.md: mark completed tasks
95 tests pass.
https://claude.ai/code/session_01SUWzMzFvSfWiHXA2p6rPg9
2026-02-22 07:42:29 +00:00
Claude
08bee013f9
docs(opsx/implement-web-chat): revise tasks to match existing ecosystem
...
Key corrections from codebase analysis:
- Use `uv add chainlit` (not requirements.txt) — project already uses uv+pyproject.toml
- Remove .env.example task — file already exists with full config
- Add task to extend src/llm.py with stream_complete() using litellm streaming
instead of calling Anthropic SDK directly
- Reuse existing src/ modules directly in chat_app.py:
Config, KnowledgeBase, ConversationStore, AdminNotifier, prompts.py
- chat_app.py lives at project root (parallel to main.py), not in a new app/ dir
- Parse LLM response with existing _parse_llm_response logic from core.py
- Session state stored in cl.user_session, keyed by Chainlit session ID
https://claude.ai/code/session_01SUWzMzFvSfWiHXA2p6rPg9
2026-02-22 07:20:18 +00:00
Claude
da0e6823f0
docs(openspec): add tasks for implement-web-chat change
...
35 implementation tasks across 9 groups:
1. Project setup (requirements.txt, .env, chainlit.toml, dirs)
2. Chainlit app shell (on_chat_start, on_message, welcome message)
3. Accessibility CSS (contrast overrides, reduced-motion, skip link, dvh)
4. Agent core stub (process_message, session state wiring)
5. ARIA and focus management (live region, post-reply focus move)
6. Session management (refresh persistence, disconnect message)
7. Mobile testing (iOS Safari, Android Chrome, landscape)
8. Accessibility verification (axe-core, keyboard, VoiceOver, motion)
9. Final integration check
https://claude.ai/code/session_01SUWzMzFvSfWiHXA2p6rPg9
2026-02-22 05:21:23 +00:00