Skip to content

Preserve connecting status while a turn starts#4101

Open
D3OXY wants to merge 4 commits into
pingdotgg:mainfrom
D3OXY:d3oxy/fix-pending-turn-startup
Open

Preserve connecting status while a turn starts#4101
D3OXY wants to merge 4 commits into
pingdotgg:mainfrom
D3OXY:d3oxy/fix-pending-turn-startup

Conversation

@D3OXY

@D3OXY D3OXY commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What Changed

Preserve the connecting thread status while provider readiness arrives with a turn start still pending. The thread transitions directly to working once the turn starts instead of briefly appearing inactive.

Why

Status-grouped thread lists currently jump between sections during provider startup because readiness temporarily exposes an idle state.

Fixes #4099

Verification

  • vp check
  • vp run typecheck
  • vp test: lifecycle coverage passed; the unrelated ACP timeout passed 14/14 on targeted retry.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • UI screenshots included
  • Video included

Note

Preserve "connecting" status during turn start in provider session orchestration

  • When a turn start is pending, session status is reported as "starting" instead of "ready" to avoid a brief flash of the connected state before the turn begins.
  • In ProviderCommandReactor.ts, ensureSessionForThread accepts a new pendingTurnStart flag; the turn.start handler passes this flag to trigger the status override.
  • In ProviderRuntimeIngestion.ts, session.state.changed, session.started, and thread.started events check projectionTurnRepository.getPendingTurnStartByThreadId and emit "starting" instead of "ready" when a pending turn start exists.

Macroscope summarized bb2e8be.

@github-actions github-actions Bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 18a4b49d-cfa7-46d0-8124-970850bff560

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:M 30-99 changed lines (additions + deletions). label Jul 17, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Small, focused fix to preserve 'starting' status during turn initialization rather than briefly showing 'ready'. Changes are limited to status mapping logic with clear intent and minimal risk.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread briefly becomes inactive while a turn starts

1 participant