Repository navigation
Match chat messages by role testid, not data-message-id - #18781
Merged
Merged
Conversation
PA 1.4.0 (#2395) added a per-turn footer that carries data-message-id and renders after the message row, so messageItem.last() resolved to a cost and timing row reading "8:54 PM" instead of the reply. Every chat test that asserts on the last message failed on all three platforms, and the dead-turn detector read those footers as non-substantive, reporting them as the provider dropping turns mid-stream. Match the ChatMessage row wrapper and the MessageRenderer content div instead, so the locator tracks what a message is rather than what shares its id. The matched set is unchanged against the currently released assistant, so the suite runs against both it and the pre-release builds the gate exercises. Route the two inline [data-message-id] locators in conversation-history through the page object so there is one definition to keep correct.
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:27 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:27 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:30 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:30 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:32 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:32 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:37 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:37 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:37 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:37 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:37 — with
GitHub Actions
Inactive
gtritchie
temporarily deployed
to
e2e-playwright
September 10, 2026 22:37 — with
GitHub Actions
Inactive
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
gtritchie
added a commit
that referenced
this pull request
Sep 12, 2026
* Match chat messages by role testid, not data-message-id (#18781) PA 1.4.0 (#2395) added a per-turn footer that carries data-message-id and renders after the message row, so messageItem.last() resolved to a cost and timing row reading "8:54 PM" instead of the reply. Every chat test that asserts on the last message failed on all three platforms, and the dead-turn detector read those footers as non-substantive, reporting them as the provider dropping turns mid-stream. Match the ChatMessage row wrapper and the MessageRenderer content div instead, so the locator tracks what a message is rather than what shares its id. The matched set is unchanged against the currently released assistant, so the suite runs against both it and the pre-release builds the gate exercises. Route the two inline [data-message-id] locators in conversation-history through the page object so there is one definition to keep correct. (cherry picked from commit 9bae5ac) * Tolerate U+200E in the skill-selection e2e assertion (#18782) Posit Assistant 1.4.0 began prefixing every tool-call caption with U+200E (LEFT-TO-RIGHT MARK) so that an rtl-truncated file path keeps its leading slash on the left, in posit-dev/assistant d6d3901e7. JavaScript's \s character class spans \u2000-\u200a and so does not match U+200E. The assertion therefore failed against a rendered string that is visually identical to what it expected, deterministically on Windows, Linux and macOS in the 1.4.1 release gate. Match the mark explicitly. The class also accepts the bare whitespace that 1.3.1 and earlier emit, so the test passes against both released versions. (cherry picked from commit 904450a) * e2e: keep a slow posit ai sign-in from failing the whole shard (#18780) A slow redirect after submitting the password on login.posit.cloud was classified as a credential failure (the step was marked fatal), which failed the auth setup project and left every dependent test as "did not run". Click with noWaitAfter so the 30s URL wait owns that budget instead of the runner's 10s actionTimeout, and only treat the step as fatal when the page actually shows a rejection message; a stalled redirect now falls through to the transient path and the @ai tests skip. Also give the readline-notification test the same settle window the rest of the suite gives an assistant turn (the agent keeps working after readline() returns), size its timeout for two turns, and spell out in the prompt that the code must be run with the executeCode tool rather than written to a file. (cherry picked from commit 2309310) --------- Co-authored-by: Kevin Ushey <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The Posit Assistant chat suite fails on every platform against PA 1.4.0. The release gate
run for 1.4.0 (34528484543)
failed six tests on Linux, macOS and Windows, on every retry:
chat-messaging.test.ts:50multi-turn conversationchat-guardrails.test.ts:206write to project directory is allowedchat-user-skills.test.ts:243both custom skills are discoveredconversation-history.test.ts:23history preserves and restores conversationsdetachable-sidebar.test.ts:29conversation continuity across detach and reattachshiny-app-r.test.ts:110create and run R Shiny tip calculatorChatPane.messageItemwas[data-message-id]. That is an application attribute theassistant stamps on anything tied to a message, not a marker for messages, and PA 1.4.0
(posit-dev/assistant#2395) began stamping it on a per-turn footer rendered as a sibling
after the message row.
messageItem.last()therefore resolved to a cost and timing row:The same shift made
isLastMessageSubstantive()read those footers as non-substantive,so
askAssistantreported the failures asthe provider appears to be dropping turns mid-stream— which sent triage after a provider problem that did not exist.Approach
Match the two hooks that mark message content — the
ChatMessagerow wrapper, whichcarries the role testid, and the
MessageRenderercontent div nested inside it:'[data-testid="chat-message-user"], [data-testid="chat-message-assistant"], [data-message-id].message-content'Both hooks are present unchanged in the released assistant and in 1.4.0, so the matched
set is identical against the current GA build and the suite runs against either. Being an
allowlist keyed on what a message is, rather than on a shared id, it also does not admit
whatever gets decorated with
data-message-idnext.Both clauses are load-bearing:
TurnRetryCallout, whose "Retry" / "Continue" button text counts as reply content inisLastMessageSubstantive()— reporting a genuinely dead turn as substantive anddisabling the retry that predicate exists to trigger.
MessageRenderer(application events, attachment-only) have no content div, and would drop out of
getMessageCount()sowaitForResponsewaits on growth that never arrives.conversation-history.test.tsbuilt the same locator inline twice, bypassing the pageobject; those now use
chatPane.messageItemso there is one definition to keep correct.Automated Tests
This is a change to the test suite. Verified by driving Chromium against fixtures of both
DOM shapes, built from
ChatMessage.tsx,MessageRenderer.tsxandConversationViewport.tsxat the released and 1.4.0 tags, using the selector read back out of the edited file:
"8:54 PM"footerfalse, retry still firesnpm run typecheckine2e/rstudiopasses.Not yet confirmed by a live suite run — that needs the gate, which can run against the
1.4.0 build already published to the test manifest.
QA Notes
None. Test-only change; no product code is touched.
Documentation
None required.
Checklist
NEWS.md