Skip to content

test: expose source selector hooks#631

Merged
siddharthvaddem merged 2 commits into
siddharthvaddem:mainfrom
AjTheSpidey:codex/source-selector-test-hooks
Jun 2, 2026
Merged

test: expose source selector hooks#631
siddharthvaddem merged 2 commits into
siddharthvaddem:mainfrom
AjTheSpidey:codex/source-selector-test-hooks

Conversation

@AjTheSpidey
Copy link
Copy Markdown
Contributor

@AjTheSpidey AjTheSpidey commented May 21, 2026

This just wires the source picker UI up to the selectors already used by the Windows smoke test. The HUD source button now has the expected test id, and each source card exposes its test id plus whether it came from a screen or window source. No visual/UI behavior changes intended here.\n\nChecked locally:\n- npx.cmd biome check src/components/launch/LaunchWindow.tsx src/components/launch/SourceSelector.tsx\n- npm.cmd run build-vite\n- npm.cmd run test:e2e -- tests/e2e/windows-native-checklist.spec.ts -g " source selector\

Summary by CodeRabbit

  • Tests
    • Added stable test identifiers to the source selector UI and its source cards to improve automated test reliability and reduce flakiness during UI checks.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85a0dc2e-184a-4528-88c7-25112883083e

📥 Commits

Reviewing files that changed from the base of the PR and between ea09fdc and a18dc39.

📒 Files selected for processing (2)
  • src/components/launch/LaunchWindow.tsx
  • src/components/launch/SourceSelector.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/components/launch/SourceSelector.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/launch/LaunchWindow.tsx

📝 Walkthrough

Walkthrough

Added test instrumentation to source selector components. LaunchWindow's source selector button now has a data-testid for test targeting. SourceSelector derives source kind from the source id and exposes both test ID and source kind as data attributes on the card container.

Changes

Test Instrumentation for Source Selector

Layer / File(s) Summary
Test IDs and source kind attributes
src/components/launch/LaunchWindow.tsx, src/components/launch/SourceSelector.tsx
LaunchWindow's source selector button gains data-testid="launch-source-selector-button". SourceSelector's renderSourceCard derives sourceKind from source.id (e.g., screen vs window) and sets data-testid="source-selector-card" and data-source-kind on the card container.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • siddharthvaddem

Poem

at 2am the tests feel blessed
buttons wear ids, cards confess
screen or window, labeled kind
lowkey tidy, tests aligned 🎯

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description covers the core purpose and changes, but is missing formal sections from the template like Type of Change, Related Issue(s), Screenshots/Video, and Testing sections. Fill out the PR template sections more completely, especially the Type of Change (likely Refactor/Code Cleanup), Related Issue(s), and explicit testing steps for reviewers.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding test hooks (data-testid attributes) to the source selector UI components.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@siddharthvaddem
Copy link
Copy Markdown
Owner

resolve conflict 🙏

@siddharthvaddem siddharthvaddem merged commit 6873b80 into siddharthvaddem:main Jun 2, 2026
9 checks 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