Show OpenRouter first in onboarding provider dialog - #4379
Conversation
|
|
||
| testSetup("setup ai provider", async ({ po }) => { | ||
| const dialog = await openAiSetupDialog(po); | ||
| const providerButtons = dialog.locator(".grid").getByRole("button"); |
There was a problem hiding this comment.
π‘ MEDIUM
Ordering assertion anchored to Tailwind .grid utility class
The new ordering assertion resolves the provider buttons through the Tailwind utility class .grid. The Base UI dialog popup itself also carries a grid class (src/components/ui/dialog.tsx:53); this works today only because Locator.locator() matches descendants rather than the root. Because a chained locator over several .grid matches does not raise a strict-mode error, adding any grid-classed wrapper inside the dialog later would silently change which elements nth(0)/nth(1) resolve to, turning a real ordering regression into a passing (or confusingly failing) test rather than a clear failure. Styling classes are not a stable contract for structural assertions.
π‘ Suggestion: Add a stable hook to the provider row in SetupBanner.tsx (e.g. data-testid="provider-options") and locate via dialog.getByTestId("provider-options").getByRole("button"), so the assertion no longer depends on Tailwind class names.
π Dyadbot Code Review SummaryVerdict: π€ NOT SURE - Potential issues Small, well-scoped presentation change: the three "use your own API key" buttons in Existing coverage still holds: The one thing worth flagging is the selector the new assertion relies on. It targets the provider row via the Tailwind utility class The Diff was complete (not truncated), so confidence in the scope assessment is high. Issues Summary
π’ Low Priority Notes (3 items)
Generated by Dyadbot persona-based code review |
π Playwright Test Resultsβ All tests passed!
Total: 294 tests passed (12 skipped)π View full report |
Summary
Make OpenRouter the first bring-your-own-key choice in the onboarding provider dialog, while keeping Google available immediately beside it.
npm install --ignore-scripts.