Skip to content

Fix shell_and_cli CI: command backstack CSS selector and LLM request timeout#2046

Merged
robgruen merged 2 commits intodev/robgruen/glasswormfrom
copilot/fix-shell-and-cli-workflow-again
Mar 23, 2026
Merged

Fix shell_and_cli CI: command backstack CSS selector and LLM request timeout#2046
robgruen merged 2 commits intodev/robgruen/glasswormfrom
copilot/fix-shell-and-cli-workflow-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

Two independent test failures in the shell_and_cli (windows-latest) CI job: the command backstack test picks up stale @exit history entries, and the create_update_clear_list test times out waiting for LLM-routed agent responses.

CSS selector bug — command backstack test

initializeChatHistory adds .history to the parent wrapper elements (direct children of the scroll container), not to .chat-message-container-user elements themselves. The backstack query was filtering on the wrong element:

// Before — checks the user message element itself (never has .history)
".chat-message-container-user:not(.history):not(.chat-message-hidden) .chat-message-content"

// After — checks the parent wrapper via child combinator
":not(.history) > .chat-message-container-user:not(.chat-message-hidden) .chat-message-content"

Without this fix, @exit messages saved from previous test sessions are not excluded from the backstack, causing "Expected @history, Received @exit".

Timeout — create_update_clear_list test

sendUserRequestAndWaitForCompletion had a hardcoded 30 s timeout. The listAgent test sends 8 natural-language requests that each require multi-agent LLM routing by the dispatcher — considerably heavier than the direct shell commands used by other tests. On Windows CI this routing consistently exceeded 30 s.

  • Added an optional timeout parameter to sendUserRequestAndWaitForCompletion (default 90 s, backward-compatible).
  • Increased the Playwright per-test timeout from 300 s → 600 s to ensure the full 8-request listAgent suite can complete within a single test budget.
Original prompt

Fix the failing GitHub Actions workflow shell_and_cli (windows-latest, 22)
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 68112362987
Job URL: https://github.com/microsoft/TypeAgent/actions/runs/23416309554/job/68112362987


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

- Fix CSS selector in chatView.ts: change `.chat-message-container-user:not(.history)` to `:not(.history) > .chat-message-container-user` so that the history filter checks the parent wrapper (where the .history class is actually applied in initializeChatHistory) rather than the user message element itself. This fixes the `command backstack` test failure where old session messages like `@exit` incorrectly appeared in the backstack.

- Add optional timeout parameter to sendUserRequestAndWaitForCompletion (default 90s vs old 30s hardcoded). Fixes `create_update_clear_list` timeout failures where LLM-routed requests take longer than 30s on Windows CI.

- Increase Playwright global test timeout from 300s to 600s to accommodate the listAgent test's 8 LLM-routed requests each with up to 90s timeout.

Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/TypeAgent/sessions/cc1f6aa4-aa85-4558-8315-98a9c00255d3
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow shell_and_cli Fix shell_and_cli CI: command backstack CSS selector and LLM request timeout Mar 23, 2026
Copilot AI requested a review from robgruen March 23, 2026 01:29
@robgruen robgruen marked this pull request as ready for review March 23, 2026 01:56
@robgruen robgruen merged commit 596a22d into dev/robgruen/glassworm Mar 23, 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.

2 participants