Skip to content

fix(studio): restore recent-thread test selectors on chat sidebar - #84

Draft
marksverdhei wants to merge 1 commit into
htfrom
chore/restore-recent-thread-testid
Draft

marksverdhei wants to merge 1 commit into
htfrom
chore/restore-recent-thread-testid

Conversation

@marksverdhei

Copy link
Copy Markdown

Summary

The 2026-06-01 upstream catch-up rebase silently dropped three attributes from SidebarMenuButton in studio/frontend/src/components/app-sidebar.tsx:

  • data-testid="recent-thread"
  • data-thread-type={item.type}
  • data-thread-id={item.id}

tests/studio/playwright_chat_ui.py:1229 locates exactly that testid. Without it the Chat UI Tests step has been silently red across Studio UI CI, Mac Studio UI CI, and Windows Studio UI CI since the rebase — confirmed 10/10 fails across 5 different PR branches over ~14 hours (memory entry tagged it as a Playwright flake; that's wrong — it's a deterministic regression).

Diff

 <SidebarMenuItem key={item.id} className="group/recent-item relative">
   <SidebarMenuButton
+    data-testid="recent-thread"
+    data-thread-type={item.type}
+    data-thread-id={item.id}
     isActive={activeThreadId === item.id}

Three attributes restored verbatim from upstream (upstream/main:studio/frontend/src/components/app-sidebar.tsx:563-567). HT-side delete-button block at 418-428 untouched.

Scope guarantees

  • Purely additive — no behavior change, no removals, no behavior-affecting attribute (the test-id is reflected in the rendered DOM but unused by application code; data-thread-id/-type are likewise readonly data hooks)
  • No new tests — the upstream test selector that exists in tree (playwright_chat_ui.py:1229) is the validation surface
  • HT-CHANGELOG.md updated under ## Unreleased

Verification

  • Source: grep 'data-testid="recent-thread"' upstream/main:app-sidebar.tsx returns line 565; on ht returns nothing pre-PR, 1 hit post-PR
  • Local diff has 3 attribute additions, zero removals (vs the upstream alignment)

Why draft

Found during a §3 CI-health spare-cycles sweep; opening as draft because (1) the original §3 chore scoping suggested a "dedicated chore: restore HT-only UI hardening after 2026-06-01 rebase" PR but this is the first commit I've personally proposed against ht as the trimodal agent, and (2) Markus's standing "merge ready PRs" auth is fresh — leaving the flip-to-ready and merge call to him.

Closes the silent-failure surface; doesn't address the OTHER Class B rebase regressions in tests/studio/test_composer_rtl_bidi_attribute.py, test_cancel_id_wiring.py, test_studio_text_descender_clipping.py (noted in PR #63 comments, separate restorations).

The 2026-06-01 upstream catch-up rebase dropped data-testid="recent-thread"
+ data-thread-type + data-thread-id from the SidebarMenuButton in app-sidebar.tsx
(the HT-side delete-button block was merged in but the upstream test selectors
were lost). tests/studio/playwright_chat_ui.py:1229 locates exactly that
testid; without it the Chat UI Tests job has been red across Studio /
Mac Studio / Windows Studio UI CI workflows since the rebase landed —
10/10 fails across 5 different PR branches over the last ~14 hours.

Purely additive — three attributes, no behavior change, matches upstream
exactly. Will unblock the three Chat UI Tests workflows the next time CI runs.

Found during a §3 CI-health spare-cycles sweep.
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