Skip to content

🤖 tests: fix Pixel phone-viewport story failing on main - #3929

Merged
ibetitsmike merged 2 commits into
mainfrom
mike/fix-pixel-phone-viewport-story
Aug 23, 2026
Merged

🤖 tests: fix Pixel phone-viewport story failing on main#3929
ibetitsmike merged 2 commits into
mainfrom
mike/fix-pixel-phone-viewport-story

Conversation

@ibetitsmike

Copy link
Copy Markdown
Contributor

Summary

Fixes the Pixel commit status failing on main since #3923: the new ProjectCreateModal PhoneViewport story's play function timed out with Unable to find a label with the text of: Add project.

Background

#3923 added a Pixel phone-viewport story that opens the Add Project modal by clicking the sidebar's "Add project" button. The app auto-collapses the left sidebar when window.innerWidth <= 768, and the collapsed sidebar does not render that button. Only Pixel executes the play at the pinned 390px viewport (the Storybook test-runner ignores viewport globals and runs at desktop width), so PR CI stayed green while every Pixel build on main since cc633c9 reported "1 test failed" (build 1772).

Implementation

Adds an expandLeftSidebar() helper to stories/helpers/uiState.ts (mirroring the existing collapseLeftSidebar) and calls it in the shared setupProjectCreateStory(), following the same pattern ScratchPage stories already use for mobile-viewport plays. Expanded is the desktop default, so the two desktop stories are unaffected.

Validation

  • Red-green via Storybook + agent-browser at a 390x844 viewport: without the fix the "Add project" button and dialog never appear (the exact CI failure); with it the dialog opens showing all three modes wrapping within the narrow dialog.
  • Re-checked the desktop LocalFolder/CloneRepo stories still open the dialog at 1200px.
  • make static-check passes.

Note: tests/ui/storybook/budget.test.ts fails on clean main already (budget drifted; CI never runs that file, it is jest-ignored and outside the CI unit-test find src glob). This change adds no stories or matrix variants, so it does not move those counts.


Generated with xum • Model: anthropic:claude-fable-5 • Thinking: xhigh

@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2eda69300

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/stories/helpers/uiState.ts Outdated
Comment thread src/browser/stories/helpers/uiState.ts Outdated
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

@codex review

Addressed both findings: expandLeftSidebar now routes through updatePersistedState, and the helper comment no longer repeats the numeric breakpoint.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 24b2e9ee69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

This comment has been minimized.

@ibetitsmike
ibetitsmike added this pull request to the merge queue Aug 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 23, 2026
@ibetitsmike
ibetitsmike added this pull request to the merge queue Aug 23, 2026
Merged via the queue into main with commit 517c20c Aug 23, 2026
20 of 21 checks passed
@ibetitsmike
ibetitsmike deleted the mike/fix-pixel-phone-viewport-story branch August 23, 2026 08:48
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.

1 participant