Add setting to keep app previews running forever (#3273)
## Summary
- Adds a `previewIdleTimeoutPolicy` enum setting (`"default"` |
`"never"`) that controls the 10-minute idle GC for app previews.
- When set to `"never"`, the idle GC is skipped so previews stay warm
across app switches (more memory, faster preview loads).
- Exposes a new toggle in Workflow Settings: **Keep app previews running
forever** (disabled by default).
## Test plan
- [ ] Leave the toggle off: open an app preview, switch to another app,
wait 10+ minutes — original preview should be stopped as before.
- [ ] Turn the toggle on: do the same — the original preview should keep
running after the idle window.
- [ ] Toggling off should restore GC on the next minute-interval.
- [x] All existing unit tests pass (snapshots updated).
- [x] Lint + typecheck pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3273"
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 in Devin Review">
</picture>
</a>
<!-- devin-review-badge-end -->
---------
Co-authored-by:
Will Chen <7344640+wwwillchen@users.noreply.github.com>
Co-authored-by:
Claude Opus 4.7 (1M context) <noreply@anthropic.com>
正在显示
请
注册
或者
登录
后发表评论