Skip to content

fix(chat-app): wait for trace run redirect - #161

Merged
rowan-stein merged 2 commits into
mainfrom
noa/fix-chat-trace-deeplink
May 28, 2026
Merged

fix(chat-app): wait for trace run redirect#161
rowan-stein merged 2 commits into
mainfrom
noa/fix-chat-trace-deeplink

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • Updates the chat-app trace-link E2E to treat /message/<messageId>?orgId=<orgId> as a transitional tracing deeplink.
  • Waits up to 180s for the tracing app to redirect to /<orgId>/runs/<runId>.
  • Handles the tracing-app empty state by asserting No run found for message., clicking Retry, and continuing to wait.
  • Keeps the success condition on the run page widgets/events instead of the message page.

Related to chat-app PR #104.

Test & lint summary

  • npm ci --no-fund --no-audit: dependencies installed successfully.
  • npx buf generate: generated protobuf sources successfully.
  • npx tsc --noEmit: type/lint check passed with no errors.
  • CI=true E2E_BASE_URL=https://chat.agyn.dev npx playwright test test/e2e/chat-trace-link.spec.ts --list: 2 tests discovered, 0 failed, 0 skipped.
  • Full targeted Playwright execution against https://chat.agyn.dev was attempted after installing browsers, but the currently deployed tracing app did not resolve the generated chat message IDs to runs within 180s, so this PR preserves the requested behavior for rerun with chat-app PR fix(chat-app): send agent availability enum #104.

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Test & lint summary

  • npm ci --no-fund --no-audit: dependencies installed successfully.
  • npx buf generate: generated protobuf sources successfully.
  • npx tsc --noEmit: type/lint check passed with no errors.
  • CI=true E2E_BASE_URL=https://chat.agyn.dev npx playwright test test/e2e/chat-trace-link.spec.ts --list: 2 tests discovered, 0 failed, 0 skipped.
  • Full targeted Playwright execution against https://chat.agyn.dev was attempted after installing browsers, but the currently deployed tracing app did not resolve the generated chat message IDs to runs within 180s. This PR changes the E2E to the requested success condition for rerun with chat-app PR fix(chat-app): send agent availability enum #104: wait for the run page and assert run widgets/events, with retry handling for the tracing-app message deeplink empty state.

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Final validation summary

  • npm ci --no-fund --no-audit: dependencies installed successfully.
  • npx buf generate: generated protobuf sources successfully.
  • npx tsc --noEmit: type/lint check passed with no errors.
  • CI=true E2E_BASE_URL=https://chat.agyn.dev npx playwright test test/e2e/chat-trace-link.spec.ts --list: 2 tests discovered, 0 failed, 0 skipped.
  • GitHub CI e2e: passed, 1/1 checks passed.

@noa-lucent noa-lucent 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.

Thanks for the update. I found one blocking flake in the deeplink wait helper: it now requires the intermediate /message/... URL even when the tracing app has already redirected successfully to the run page. Please adjust the helper to accept that fast success path before merge.

Comment thread suites/playwright-chat-app/test/e2e/chat-trace-link.spec.ts Outdated

@noa-lucent noa-lucent 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.

Approved. I verified the follow-up change now accepts both deeplink states: the helper returns immediately when already on the run page, otherwise it waits for either the message deeplink or the run URL before polling. The previous blocking thread is resolved.

Validated locally: npm ci --no-fund --no-audit, npx buf generate, and npx tsc --noEmit.

@rowan-stein
rowan-stein merged commit 2bef8bd into main May 28, 2026
1 check passed
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.

3 participants