Skip to content

fix(ui): keep provisioning chat routes polling until ready#172

Merged
onutc merged 1 commit intomainfrom
codex-provision-ready-transition
Mar 27, 2026
Merged

fix(ui): keep provisioning chat routes polling until ready#172
onutc merged 1 commit intomainfrom
codex-provision-ready-transition

Conversation

@onutc
Copy link
Copy Markdown
Member

@onutc onutc commented Mar 27, 2026

TL;DR

This keeps fresh agent chat routes polling until the instance is actually ready, instead of stopping after the first unchanged provisioning response.
It also adds regressions for both repeated provisioning polls and delayed direct-route discovery.

Summary

  • keep the /c/:name provisioning poll loop alive until the route becomes chat-ready
  • stop polling cleanly once the route resolves and a real conversation is opened
  • stabilize the notice mock in chat tests so the polling lifecycle matches the real app
  • add regressions for delayed readiness and delayed direct-route discovery

Review focus

  • the polling stop condition after fetchAgents returns a ready route
  • test coverage for direct-route instances that are missing from /spritzes for several polls

Test plan

  • pnpm test -- src/pages/chat.test.tsx src/components/acp/sidebar.test.tsx
  • pnpm typecheck

@onutc onutc merged commit eca52ca into main Mar 27, 2026
1 check passed
@onutc onutc deleted the codex-provision-ready-transition branch March 27, 2026 15:17
@gitrank-connector
Copy link
Copy Markdown

👍 GitRank PR Analysis

Score: 20 points

Metric Value
Component Other (1× multiplier)
Severity P2 - Medium (20 base pts)
Final Score 20 × 1 = 20

Eligibility Checks

Check Status
Issue/Bug Fix
Fix Implementation
PR Documented
Tests
Lines Within Limit

Impact Summary

This PR fixes a polling lifecycle bug in the chat provisioning flow where the application would stop checking for route readiness after the first unchanged response. The fix ensures continuous polling until the route becomes chat-ready and a conversation is successfully opened. Two comprehensive regression tests are added to cover delayed provisioning and delayed direct-route discovery scenarios.

Analysis Details

Component Classification: This PR affects UI chat routing logic and does not fit into a specific high-impact category. It's classified as OTHER since it's a general bug fix in the chat page provisioning flow.

Severity Justification: This is a P2 (Medium) severity bug fix. It addresses a functional issue where provisioning chat routes stop polling prematurely instead of waiting until the instance is ready, causing user-facing failures. However, it's not a critical service outage or security risk, and users have a workaround (manual refresh).

Eligibility Notes: Issue: True - PR clearly describes a bug fix for premature polling termination. Fix Implementation: True - code changes align with the stated goal of keeping polling alive until readiness. PR Linked: True - comprehensive description with TL;DR, summary, and test plan. Tests: True - 140 lines of test additions with two new regression test cases. Tests Required: True - this is a business logic bug fix in the chat routing system that requires test coverage to prevent regressions.


Analyzed by GitRank 🤖

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant