[lexical-playground] Chore: Pick a day that has a button in the date picker tests #10001
[vc]: #5VYH8HUpZPhEuULbEU7DYZ3JJ9rmvHv08tGZHwaEEH8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJsZXhpY2FsLXBsYXlncm91bmQiLCJwcm9qZWN0SWQiOiJwcmpfZWE4MnZMajY4NFh6U1JkZU83SlNkMFFOa2F3cyIsInYwIjpmYWxzZSwicm9vdERpcmVjdG9yeSI6InBhY2thZ2VzL2xleGljYWwtcGxheWdyb3VuZCIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9mYm9wZW5zb3VyY2UvbGV4aWNhbC1wbGF5Z3JvdW5kL3BRSzd2ZDVldU5XMXBYNE1HRmhOalc1TXhHU0IiLCJwcmV2aWV3VXJsIjoibGV4aWNhbC1wbGF5Z3JvdW5kLWdpdC1mb3JrLW1heXJhbmctZml4LWRhdC0yNDQ3OTQtZmJvcGVuc291cmNlLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQifSx7Im5hbWUiOiJsZXhpY2FsIiwicHJvamVjdElkIjoicHJqX01SYU1PMzFlRklrWTYxU0JxcVBEUjJPank4cVAiLCJ2MCI6ZmFsc2UsInJvb3REaXJlY3RvcnkiOiJwYWNrYWdlcy9sZXhpY2FsLXdlYnNpdGUiLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vZmJvcGVuc291cmNlL2xleGljYWwvOHBjU2VWYTdtdmdqWWJKamU4aHNOb29GMVp6dCIsInByZXZpZXdVcmwiOiJsZXhpY2FsLWdpdC1mb3JrLW1heXJhbmctZml4LWRhdGV0aW1lLXRlc3QtNmZlMDk0LWZib3BlbnNvdXJjZS52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIn1dLCJyZXF1ZXN0UmV2aWV3VXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3ZlcmNlbC1hZ2VudC9yZXF1ZXN0LXJldmlldz9vd25lcj1tZXRhJnJlcG89bGV4aWNhbCZwcj0xMDAwMSJ9
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated |
| :--- | :----- | :------ | :------ |
| <a href="https://vercel.com/fbopensource/lexical"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_MRaMO31eFIkY61SBqqPDR2Ojy8qP&teamId=team_QNIQyH5DJlqUjeCckcCcBEjE&s=32" width="16" height="16" align="middle" alt="" /></sup></a> lexical | !Ready Ready | Preview | <relative-time datetime="2026-12-01T08:14:09.549Z">Dec 1, 2026 8:14am UTC</relative-time> |
| <a href="https://vercel.com/fbopensource/lexical-playground"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_ea82vLj684XzSRdeO7JSd0QNkaws&teamId=team_QNIQyH5DJlqUjeCckcCcBEjE&s=32" width="16" height="16" align="middle" alt="" /></sup></a> lexical-playground | !Ready Ready | Preview | <relative-time datetime="2026-12-01T08:14:09.549Z">Dec 1, 2026 8:14am UTC</relative-time> |
<a href="https://vercel.com/vercel-agent/request-review?owner=meta&repo=lexical&pr=10001" rel="noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://agents-vade-review.vercel.sh/request-review-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://agents-vade-review.vercel.sh/request-review-light.svg"><img src="https://agents-vade-review.vercel.sh/request-review-light.svg" alt="Request Review"></picture></a>
AI review status for this pull request.
| Review status | Updated |
| :--- | :--- |
| 🟢 Reviewed (for maintainers only) | <relative-time datetime="2026-12-01T08:22:44Z">Dec 1, 2026, 8:22 AM UTC</relative-time> |
<!-- codebunny-status:1 r=318341089 p=10001 rv=2 -->
<details><summary><b>lexical</b></summary><p>
npm i https://pkg.pr.new/lexical@10001
</p></details>
<details><summary><b>@lexical/a11y</b></summary><p>
npm i https://pkg.pr.new/@lexical/a11y@10001
</p></details>
<details><summary><b>@lexical/clipboard</b></summary><p>
npm i https://pkg.pr.new/@lexical/clipboard@10001
</p></details>
<details><summary><b>@lexical/code</b></summary><p>
npm i https://pkg.pr.new/@lexical/code@10001
</p></details>
<details><summary><b>@lexical/code-core</b></summary><p>
npm i https://pkg.pr.new/@lexical/code-core@10001
</p></details>
<details><summary><b>@lexical/code-prism</b></summary><p>
npm i https://pkg.pr.new/@lexical/code-prism@10001
</p></details>
<details><summary><b>@lexical/code-shiki</b></summary><p>
npm i https://pkg.pr.new/@lexical/code-shiki@10001
</p></details>
<details><summary><b>@lexical/compiler</b></summary><p>
npm i https://pkg.pr.new/@lexical/compiler@10001
</p></details>
<details><summary><b>@lexical/devtools-core</b></summary><p>
npm i https://pkg.pr.new/@lexical/devtools-core@10001
</p></details>
<details><summary><b>@lexical/dragon</b></summary><p>
npm i https://pkg.pr.new/@lexical/dragon@10001
</p></details>
<details><summary><b>@lexical/eslint-plugin</b></summary><p>
npm i https://pkg.pr.new/@lexical/eslint-plugin@10001
</p></details>
<details><summary><b>@lexical/extension</b></summary><p>
npm i https://pkg.pr.new/@lexical/extension@10001
</p></details>
<details><summary><b>@lexical/fast-check</b></summary><p>
npm i https://pkg.pr.new/@lexical/fast-check@10001
</p></details>
<details><summary><b>@lexical/file</b></summary><p>
npm i https://pkg.pr.new/@lexical/file@10001
</p></details>
<details><summary><b>@lexical/hashtag</b></summary><p>
npm i https://pkg.pr.new/@lexical/hashtag@10001
</p></details>
<details><summary><b>@lexical/headless</b></summary><p>
npm i https://pkg.pr.new/@lexical/headless@10001
</p></details>
<details><summary><b>@lexical/history</b></summary><p>
npm i https://pkg.pr.new/@lexical/history@10001
</p></details>
<details><summary><b>@lexical/html</b></summary><p>
npm i https://pkg.pr.new/@lexical/html@10001
</p></details>
<details><summary><b>@lexical/internal</b></summary><p>
npm i https://pkg.pr.new/@lexical/internal@10001
</p></details>
<details><summary><b>@lexical/link</b></summary><p>
npm i https://pkg.pr.new/@lexical/link@10001
</p></details>
<details><summary><b>@lexical/list</b></summary><p>
npm i https://pkg.pr.new/@lexical/list@10001
</p></details>
<details><summary><b>@lexical/mark</b></summary><p>
npm i https://pkg.pr.new/@lexical/mark@10001
</p></details>
<details><summary><b>@lexical/markdown</b></summary><p>
npm i https://pkg.pr.new/@lexical/markdown@10001
</p></details>
<details><summary><b>@lexical/mdast</b></summary><p>
npm i https://pkg.pr.new/@lexical/mdast@10001
</p></details>
<details><summary><b>@lexical/offset</b></summary><p>
npm i https://pkg.pr.new/@lexical/offset@10001
</p></details>
<details><summary><b>@lexical/overflow</b></summary><p>
npm i https://pkg.pr.new/@lexical/overflow@10001
</p></details>
<details><summary><b>@lexical/plain-text</b></summary><p>
npm i https://pkg.pr.new/@lexical/plain-text@10001
</p></details>
<details><summary><b>@lexical/react</b></summary><p>
npm i https://pkg.pr.new/@lexical/react@10001
</p></details>
<details><summary><b>@lexical/rich-text</b></summary><p>
npm i https://pkg.pr.new/@lexical/rich-text@10001
</p></details>
<details><summary><b>@lexical/selection</b></summary><p>
npm i https://pkg.pr.new/@lexical/selection@10001
</p></details>
<details><summary><b>@lexical/table</b></summary><p>
npm i https://pkg.pr.new/@lexical/table@10001
</p></details>
<details><summary><b>@lexical/tailwind</b></summary><p>
npm i https://pkg.pr.new/@lexical/tailwind@10001
</p></details>
<details><summary><b>@lexical/text</b></summary><p>
npm i https://pkg.pr.new/@lexical/text@10001
</p></details>
<details><summary><b>@lexical/utils</b></summary><p>
npm i https://pkg.pr.new/@lexical/utils@10001
</p></details>
<details><summary><b>@lexical/y</b></summary><p>
npm i https://pkg.pr.new/@lexical/y@10001
</p></details>
<details><summary><b>@lexical/yjs</b></summary><p>
npm i https://pkg.pr.new/@lexical/yjs@10001
</p></details>
_commit: <a href="https://github.com/meta/lexical/runs/142495967568"><code>f271a97</code></a>_
Nit (optional): the button-less days are not limited to the first days of a month. The picker opens on the current month, and its grid starts with hidden cells all month whenever the 1st is not a Sunday (11 of the 12 months of 2027), which is why the old helper failed every day of December. Maybe: "The picker opens on the current month and hides the days of the months around it, which have no button; most months start with some."
Optional, non-blocking: these tests still read the real date, so the day clicked is the 1st of whatever month CI runs in while every chip is dated November 2026. Pinning the date in a beforeEach (for example vi.useFakeTimers({toFake: ['Date']}) with vi.setSystemTime(new Date(2026, 10, 15)), and vi.useRealTimers() afterwards) would make the grid and the picked day the same on every run.
Thanks for tracking this down — the change looks good. The picker opens on the current month with showOutsideDays={false}, so in December 2026 the grid starts with two hidden cells (29 and 30 November) that carry data-day but no button, and the old find stopped on the first of them. Requiring a button in pickOtherDay fixes that without weakening any assertion: every test still checks the value for the day it clicked.
Two optional, non-blocking suggestions:
1. Pin the clock (packages/lexical-playground/__tests__/unit/DateTimeComponent.test.tsx:143). The tests still read the real date, so the day clicked is the 1st of whatever month CI runs in, while every chip is dated November 2026. Setting the date in a beforeEach, for example vi.useFakeTimers({toFake: ['Date']}) with vi.setSystemTime(new Date(2026, 10, 15)) and vi.useRealTimers() afterwards, would make the grid and the picked day the same on every run.
2. Comment wording (DateTimeComponent.test.tsx:141-142). The button-less days are not limited to the first days of a month: they are there all month whenever the 1st is not a Sunday (11 of the 12 months of 2027), which is why the old helper failed every day of December. Something like: "The picker opens on the current month and hides the days of the months around it, which have no button; most months start with some."
No changeset is needed: AGENTS.md says tests and the playground need none.
Automated review (maintainer link)
<!-- codebunny-pub:1 k=f9670035485410e129843a2c0f0d90972f550d62943997962b4f988b298a5f55 -->
Reworded in f271a979d: the hidden days are there whenever the 1st is not a Sunday.
Pinned in f271a979d to 15 December 2026, so the grid still starts with hidden days and the button check stays covered.
Thanks for the quick follow-up, the change looks good. Both earlier suggestions are in: the clock is pinned to 15 December 2026 (packages/lexical-playground/__tests__/unit/DateTimeComponent.test.tsx:93-96), so the picker, which opens on today's month, always shows a grid that starts with hidden days, and the helper comment now says those days appear whenever the 1st is not a Sunday. With showOutsideDays={false} those cells carry data-day but no button; requiring a button in pickOtherDay (:163-167) skips them without weakening any assertion, since every test still checks the value for the day it clicked. That is the failure CI's core-tests / unit (24.x) hit on #9999 today, at the old helper's assert.
One optional, non-blocking nit:
DateTimeComponent.test.tsx:91-92). Nothing checks that the pin reaches the picker: if it ever stopped doing so, the tests would pick the 1st of the real month and still pass, and the comment would quietly be wrong. An expect(day).toBe('2026-12-01') after pickOtherDay() in test (a) would keep it honest.No changeset is needed: AGENTS.md and CONTRIBUTING.md say test and playground changes need none.
Automated review (maintainer link)
<!-- codebunny-pub:1 k=340cd80c30602fa47623f8147a71217e436719a437c11fb0dcf70c55bd4ce7ae -->
Approved these changes.
zurfyx
mayrang
Description
pickOtherDayin theDateTimeComponenttests clicks the first day cell that is not selected. The picker opens on the current month and hides the days of the months around it (showOutsideDays={false}), which leaves their cells without a button; a month whose first day is not a Sunday starts with such cells. November 2026 starts on a Sunday, so the helper passed until December, when it found one of those cells and failed withexpected a day to pick: 8 tests fail on any branch, as in thecore-tests / unitjobs of #9999. The helper now picks a cell that is not selected and has a button, and the tests run on a pinned date (15 December 2026), so the month no longer depends on when CI runs.Test plan
Before
After
The same with
TZ=Asia/SeoulandTZ=America/Los_Angeles, run on 2026-12-01.