You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "orangeCatDeveloper (via GitHub)" <gi...@apache.org> on 2026/08/29 20:40:27 UTC

[PR] test(desktop): wait for the picker menu to open [maka]

orangeCatDeveloper opened a new pull request, #4225:
URL: https://github.com/apache/maka/pull/4225

   Fixes #4224
   
   `new-task-draft-target.spec.ts` fails every run on macOS: after choosing 无项目 it reopens the workspace picker, and that click opens nothing, so the wait for the Project menu item times out at 30s.
   
   Root cause is a guard inside `DropdownMenu` (`@astryxdesign/core`), not our picker:
   
   ```js
   if (Date.now() - lastHideTimeRef.current < 50) {
     return;
   }
   ```
   
   It exists so iOS Safari's light dismiss — pointerdown hides the menu, then the trigger's own click arrives — cannot instantly reopen it. But `usePopover({ onHide: handleLayerHide })` stamps that timestamp on every hide, so choosing a menu item arms it the same way. Whether a reopen survives then depends on how long the assertions between the two clicks happen to take, which is why this fails on one machine and passes in CI. No user reaches it: nobody clicks a trigger 50ms after picking from its menu.
   
   So the spec stops assuming the click took, and waits for the menu it asked for — which also holds if that 50ms ever changes.
   
   Before / after, `--repeat-each=5` on this spec:
   
   ```
   TimeoutError: locator.click: Timeout 30000ms exceeded.
   Call log:
     - waiting for getByRole('menuitem', { name: 'new-task-project', exact: true })
     78 |   await page.getByRole('menuitem', { name: NEW_TASK_PROJECT_NAME, exact: true }).click();
   
   20 passed (56.8s)
   ```
   
   One caveat worth stating: with the deterministic failure gone, 25 runs surfaced a separate ~4% flake this spec was hiding — `page.keyboard.type` occasionally scrambles the draft at line 75, before the picker is touched (`Received: "dzaijecten before choosing a proraft writt"`). Left alone here: it is a different defect, and typing a delay in would paper over it rather than explain it.
   
   Generative tooling: Claude Code (Opus 5) investigated and wrote this change; the commit carries a `Generated-by` trailer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] test(desktop): stop the picker spec racing two upstream guards [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4225:
URL: https://github.com/apache/maka/pull/4225


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org