feat: resolve merge conflicts for app commands (#2538)
## Summary
- Resolve stash merge conflicts in `app_handlers.ts` — use
`updateAppCommands` handler without `withLock`
- Resolve stash merge conflicts in `app_commands.spec.ts` — consolidate
into a single E2E test covering validation, cancel, configure/edit/clear
flows
- Include updated `test_helper.ts` and `package-lock.json`
## Test plan
- [ ] Verify `npm run ts` passes (type checks)
- [ ] Verify `npm test` passes (unit tests)
- [ ] Run app commands E2E test: `PLAYWRIGHT_HTML_OPEN=never npm run e2e
-- --grep "configure app commands"`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2538"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Removes per-app locking from `updateAppCommands`, which could allow
concurrent updates to race and overwrite command values. Other changes
are test and dependency/lockfile adjustments with limited production
impact.
>
> **Overview**
> Improves the app-commands E2E coverage by consolidating previously
separate tests into a single `configure app commands` flow that now
exercises **required-field validation**, **cancel**, **save/edit**, and
**clear-to-default** behavior end-to-end.
>
> Updates the Playwright helper `waitForToastWithText` to use the shared
`Timeout.MEDIUM` default (instead of a fixed 5s) to reduce CI flakiness.
>
> In `app_handlers.ts`, removes `withLock` usage from the
`updateAppCommands` IPC handler while keeping the same trimming +
“both-or-neither” validation before persisting commands. Also bumps the
app version to `0.36.0` and refreshes `package-lock.json` accordingly.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4dfd2931629fee1d89af85a227c97981788fa0a9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Resolved merge conflicts and finalized the app commands flow. Simplified
the updateAppCommands handler and consolidated E2E coverage to reduce
flakiness.
- **Refactors**
- updateAppCommands no longer uses withLock; validates paired commands
and updates the DB directly.
- Merged app commands E2E into a single test covering validation,
cancel, and configure/edit/clear flows.
- Standardized toast waiting to Timeout.MEDIUM in test_helper to reduce
flakes.
- Updated package-lock.json to 0.36.0.
<sup>Written for commit 4dfd2931629fee1d89af85a227c97981788fa0a9.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
Co-authored-by:
Claude Opus 4.6 <noreply@anthropic.com>
正在显示
差异被折叠。
请
注册
或者
登录
后发表评论