Fix disappearing user message and implement real-time SSE streaming#77
Conversation
- Backend: Update `SendMessageResponse` to include the confirmed user message. - Backend: Implement `on_token` callback in `process_turn` and pass to specialist agents. - Backend: Update `run_coach`, `run_intake`, `run_feedback` to stream tokens via `astream_events`. - Frontend: Update `ChatThread` to replace temporary user message with server-confirmed one. - Frontend: Update `ChatThread` to handle `message.chunk` SSE events for real-time streaming. - E2E: Add tests for disappearing message fix and user story walkthroughs (settings, updates). Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
… fix CI issues - Backend: Update `SendMessageResponse` to include the confirmed user message. - Backend: Implement `on_token` callback in `process_turn` and pass to specialist agents. - Backend: Update `run_coach`, `run_intake`, `run_feedback` to stream tokens via `astream_events`. - Backend: Fix missing imports (`Callable`, `Coroutine`) in `engine.py`. - Frontend: Update `ChatThread` to replace temporary user message with server-confirmed one. - Frontend: Update `ChatThread` to handle `message.chunk` SSE events for real-time streaming. - E2E: Add tests for disappearing message fix and user story walkthroughs (settings, updates). - E2E: Fix `scripts/seed_e2e.py` to be idempotent to prevent CI failures. - E2E: Use robust locators in `settings.spec.ts` and `updates.spec.ts`. Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
- Refactor `run_coach`, `run_intake`, `run_feedback` to use shared `run_agent` in `api/app/agents/runner.py`. - Fix E2E tests for settings (specific locator) and updates (idempotent seed). - Fix backend unit test imports (`Callable`, `Coroutine`). - Clean up unused imports. Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
- Refactor `run_coach`, `run_intake`, `run_feedback` to use shared `run_agent` in `api/app/agents/runner.py`. - Fix CI formatting failure by running `ruff format` (updated `api/app/routes.py`). - Fix `web/e2e/settings.spec.ts` by waiting for "Notification Settings" button visibility. - Fix `web/e2e/updates.spec.ts` by waiting for onboarding URL before interacting. - Fix `F821` and `F401` linting errors in `api/app/agents/engine.py` (proper imports, remove unused). Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
- Refactor `run_coach`, `run_intake`, `run_feedback` to use shared `run_agent` in `api/app/agents/runner.py`. - Fix CI formatting failure by running `ruff format` (updated `api/app/routes.py`). - Fix `web/e2e/settings.spec.ts` by waiting for "Notification Settings" button visibility. - Fix `web/e2e/updates.spec.ts` by waiting for onboarding URL before interacting. - Fix `F821` and `F401` linting errors in `api/app/agents/engine.py` (proper imports, remove unused). Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
- Refactor `run_coach`, `run_intake`, `run_feedback` to use shared `run_agent` in `api/app/agents/runner.py`. - Fix CI formatting failure by running `ruff format` (updated `api/app/routes.py`). - Fix `web/e2e/settings.spec.ts` by waiting for "Notification Settings" button visibility and using `waitForResponse` to handle navigation. - Fix `web/e2e/updates.spec.ts` by waiting for onboarding URL before interacting and using `waitForResponse` to handle navigation. - Fix `F821` and `F401` linting errors in `api/app/agents/engine.py` (proper imports, remove unused). - Fix `scripts/seed_e2e.py` to be idempotent. Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
- Refactor `run_coach`, `run_intake`, `run_feedback` to use shared `run_agent` in `api/app/agents/runner.py`. - Fix CI formatting failure by running `ruff format` (updated `api/app/routes.py`). - Fix `web/e2e/settings.spec.ts` by waiting for "Notification Settings" button visibility and using `waitForResponse` to handle navigation. - Fix `web/e2e/updates.spec.ts` by waiting for onboarding URL before interacting and using `waitForResponse` to handle navigation. - Fix `F821` and `F401` linting errors in `api/app/agents/engine.py` (proper imports, remove unused). - Fix `scripts/seed_e2e.py` to be idempotent. - Add wait for dashboard redirect in user registration flow in `settings.spec.ts` and `updates.spec.ts` to ensure profile sync before joining project. Co-authored-by: ToolchainLab <263750431+ToolchainLab@users.noreply.github.com>
This PR addresses two main issues:
on_tokencallback pattern in the backend agent engine and updated the specialist agents to stream tokens. The frontend now listens formessage.chunkevents and updates the UI incrementally.Additionally, I added E2E test files for settings and updates walkthroughs to improve coverage.
PR created automatically by Jules for task 5111495665824634712 started by @ToolchainLab