feat: add Dev Mode branch preview#1024
Conversation
db7cd5a to
f0b990d
Compare
47118c9 to
1d56ffc
Compare
1d56ffc to
1423c06
Compare
|
@EKKOLearnAI please review this feature. It could significantly speed up future development and testing. If this feature can be integrated, I'll build about 5 new features on top of it, as dev tools have already been a huge help to me, and it will be much easier for me to build on top of them. I'm not sure dev tools are necessary for all users, so I've tried to hide them a bit. There might be a better way, but for now, the current implementation seems acceptable to me. I can make some minor edits if you wish. Just Ask. I hope this will be useful for you and other contributors! |
|
I really like the direction here. A branch preview / dev-mode preview flow would be very useful. That said, the current implementation feels more like a maintainer/local-development build checker than a feature that real production users can benefit from. It depends on the running Web UI being inside a git checkout, having the full source tree available, having What I would really like from this feature is something production users can actually use: the ability to preview a new Web UI version before switching to it. For example, a user could see that a newer version is available, start a preview instance for that version in isolation, open it in the browser, verify the UI/behavior, and then decide whether to upgrade or roll back. So my suggestion is to keep this direction, but consider shifting the product goal from “build a selected git branch in a local worktree” toward “preview an available new version safely for end users.” The branch/worktree approach can still be useful for maintainers, but it may be better as an internal/dev-only mode rather than the main user-facing preview experience. |
|
Thanks for the feedback! The comments were helpful. I'll try to design a typical user scenario and implement it in the next few days. |
Summary
This PR pivots Dev Mode branch builds from a branch-build-only concept to a preview-deployment architecture. It introduces a generic
PreviewInstancemodel, serves previews under clean URLs at/preview/:previewId/, and keeps branch/worktree builds as a dev-only provider behind the existing maintainer tool workflow.Why
We need a stable, shareable preview surface that can be activated, tested, and discussed without exposing internal implementation details or tying the product model to branch-build mechanics. Clean preview URLs also make QA and future deployment flows easier to reason about.
What changed
PreviewInstancerecords./preview/:previewId/.Safety / non-goals
Manual QA
Stable: https://hermes.kiraproject.ru/
Preview: https://hermes.kiraproject.ru/preview/preview-3e0fd7ff6c56/
Please verify:
Tests
Limitations / next step
upstream/mainby 10 commits and behind by 1 commit; no force-push or rebase was performed.upstream-pr/dev-mode-branch-preview, so this file is the ready-to-post PR body.Notes
upstream-pr/dev-mode-branch-previewd41e144feat: register branch builds as preview instances8e1567afeat: add preview runtime path handling42f7584fix: mark stopped preview instances explicitlyefc284efeat: add preview registry lifecycle APIs82f1cabIntroduce generic preview domain types3fc61c8feat: migrate app routing to clean URLs1423c06test(dev-mode): cover branch preview workflow0f77d9dfeat(settings): add branch preview developer tools9756193feat(dev-mode): add branch preview build runner