Skip to content

Job code AI assistant: Show statuses streamed after the text answer#4833

Merged
josephjclark merged 5 commits into
mainfrom
ai-streaming-code-edits
Jun 10, 2026
Merged

Job code AI assistant: Show statuses streamed after the text answer#4833
josephjclark merged 5 commits into
mainfrom
ai-streaming-code-edits

Conversation

@hanna-paasivirta

Copy link
Copy Markdown
Contributor

Description

If Apollo streams a thinking status (e.g. "Writing code…") after the text answer while job code is still being generated, it will now be displayed below the answer using the same indicator style as the pre-text "Thinking…" status.

Closes #4832

Currently the order of events from Apollo when there are code changes is strictly stream status -> text -> stream status -> code. However, I tried to implement this in a way that will also work if we add more interleaved text/stream statuses.

Validation steps

  1. Open a workflow step.
  2. Ask the assistant (not the experimental global assistant) for code changes, or new code if generating from scratch. Ask for extensive changes requiring more than a couple of lines of changes.
  3. Verify that you see:
    -> streaming statuses
    -> text explanation of what the assistant is going to do
    -> new: another streaming status
    -> code diffs are noted in the chat and displayed the code.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation Bot moved this to New Issues in Core Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Security Review ✅

  • S0 (project scoping): N/A — frontend-only change to AI assistant streaming status UI (MessageList.tsx, AIChannelRegistry.ts, createAIAssistantStore.ts); no queries or data access modified.
  • S1 (authorization): N/A — no new web-layer entrypoints, LiveView events, or controller actions; only client-side store/component behavior for rendering streaming status.
  • S2 (audit trail): N/A — no config-resource writes or Ecto.Multi changes; backend untouched.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.3%. Comparing base (f590caa) to head (3a2e9e4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4833     +/-   ##
=======================================
- Coverage   90.3%   90.3%   -0.0%     
=======================================
  Files        444     444             
  Lines      22577   22577             
=======================================
- Hits       20393   20392      -1     
- Misses      2184    2185      +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

elias-ba added 2 commits June 9, 2026 09:20
Add AIChannelRegistry tests driving the streaming_chunk path: a text chunk over
the wire clears an active status, and a status streamed after the text survives
the char-by-char drain. Also dedupe the bouncing-dots indicator into a small
shared component in MessageList.
Fold the last inline copy of the dots into the shared component, so all three
indicators (pre-text loading, post-text status, processing) use it.

@elias-ba elias-ba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, this is a clean fix. Nice job @hanna-paasivirta. I pushed two small additions on top: a test in AIChannelRegistry covering the streaming_chunk path end to end, and pulled the bouncing-dots indicator into a shared component now used by all three indicators

@elias-ba

elias-ba commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Hey @josephjclark can you merge this when you have time

@josephjclark josephjclark merged commit 6d02928 into main Jun 10, 2026
7 checks passed
@josephjclark josephjclark deleted the ai-streaming-code-edits branch June 10, 2026 08:40
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Job code assistant: Show statuses streamed after the text answer

3 participants