feat: implement environment separation for simultaneous debugging#1128
Merged
piorpua merged 4 commits intoiOfficeAI:mainfrom Mar 17, 2026
Merged
feat: implement environment separation for simultaneous debugging#1128piorpua merged 4 commits intoiOfficeAI:mainfrom
piorpua merged 4 commits intoiOfficeAI:mainfrom
Conversation
added 2 commits
March 17, 2026 15:08
…ection - Add WEBUI_DEFAULT_PORT to src/common/constants.ts (25808 prod, 25809 dev) - Replace all hardcoded 25808 port references across renderer, webserver, and browser adapter with the shared constant - Remove unnecessary useState for port in WebuiModalContent - Simplify misleading import-order comments in index.ts
…paration # Conflicts: # src/index.ts # src/renderer/components/SettingsModal/contents/WebuiModalContent.tsx
ringringlin
previously approved these changes
Mar 17, 2026
Add typeof check before calling app.setName() in configureChromium.ts to prevent TypeError in test environments where electron app is partially mocked without setName.
be8de38 to
228b1a9
Compare
piorpua
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
描述 (Description)
本 PR 实现了 AionUi 客户端的开发/正式环境完全隔离功能,允许开发者在调试开发版本(
just dev)时,与已打包的正式版应用同时运行且互不干扰,避免开发时数据异常影响正式环境的数据。主要改动如下:
app.setName设置为AionUi-Dev,使开发版的缓存和配置存储在独立的AppData\Roaming\AionUi-Dev目录下,保护正式版的本地核心数据库(SQLite)不被污染。25808端口,开发版默认使用独立的25809端口,解决端口占用冲突。app.getName(),不仅隔离了存储,也使得开发版本获取到了独立的单实例锁(Single Instance Lock),彻底实现了双端双开。关联的 Issue (Related Issues)
变更类型 (Type of Change)
测试情况 (Testing)
prek全部格式化与校验)截图 (Screenshots)
补充信息 (Additional Context)
为了确保环境隔离能真正生效,
app.setName('AionUi-Dev')已通过调整提升至文件加载的最早期(即置于 ESM 的最初静态执行阶段),以防止内置 Chromium 或数据库在命名被修改前提前锁定默认(AionUi)沙盒路径。感谢为 AionUi 做出贡献! 🎉