Skip to content

agentHost: give chats a turn before moving them in read-state tests - #344327

Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
agents/fix-read-state-tests-turnless-move
Oct 26, 2026
Merged

Sandeep Somavarapu (sandy081) merged 1 commit into
mainfrom
agents/fix-read-state-tests-turnless-move

Conversation

@sandy081

Copy link
Copy Markdown
Member

Main is red after #344057 (refuse moving a chat that has not sent a message) met #344244 (read-state-across-moves tests), which moved chats that never ran a turn.

Three tests in agentService.test.ts ("read state across moves") now complete a turn on each moved chat with the existing completeTurn helper, before the read state under test is set, so the turn does not change what each test asserts:

  • moving the only unread chat to a read session
  • a session moved under a read session
  • reordering the chats of a session marked unread

The product rule is unchanged.

Validation:

  • Reproduced on main: --grep "read state across moves" gave 3 failing.
  • With the fix: 4 passing; whole src/vs/platform/agentHost/test/node folder: 13546 passing, 0 failing; eslint clean.

Copilot AI balanced review requested due to automatic review settings October 26, 2026 15:49
@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.145.0 milestone Oct 26, 2026

Copilot AI 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.

🟢 Approval recommended

The narrowly scoped test setup changes preserve read-state assertions and production behavior, with no unresolved findings.

No open issues 🎉

What changed in this PR

This test-only fix reconciles the read-state-across-moves tests with the rule that chats must start a turn before they can move.

Changes:

  • Uses the existing completeTurn helper to make moved chats eligible in three tests.
  • Completes turns before setting read state, preserving existing assertions and production behavior.
File Description
src/​vs/​platform/​agentHost/​test/​node/​agentService.test.ts Updates chat-move, session-move, and reorder test setup to satisfy move eligibility.

Review effort: Balanced

@sandy081
Sandeep Somavarapu (sandy081) merged commit 8a24b67 into main Oct 26, 2026
88 of 90 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the agents/fix-read-state-tests-turnless-move branch October 26, 2026 16:21
Ladislau Szomoru (lszomoru) added a commit that referenced this pull request Oct 26, 2026
Picks up #344327, which fixes the agentService read-state tests that #344057 broke on main.
Benjamin Christopher Simmonds (benibenj) added a commit that referenced this pull request Oct 26, 2026
* sessions: keep artifact details stable on hover and refresh

Center row content when item actions appear, and omit transient loading labels without hiding errors or sign-in requirements. Cover hover, rerun spinners, and refresh geometry with regression tests.

Co-authored-by: Copilot <[email protected]>

* agentHost: give chats a turn before moving them in read-state tests (#344327)

Co-authored-by: Copilot <[email protected]>

* sessions: preserve accessible artifact loading states

Expose activity-history and main/contribution loading through the details view models and aria-busy, without adding visible loading messages or moving existing rows.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Sandeep Somavarapu <[email protected]>
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