feat: add global environment variables in launcher settings #31
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 213 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.321
Real PR Conversation Timeline
1 comments
"Review active on #31"
general
weight: 0.35
coderabbitai[bot]
修改内容
设置页最底部新增「全局环境变量」,支持按行填写
KEY=VALUE、校验和显式保存,统一应用到所有本地实例的下一次启动。此前只能逐个实例配置同样的变量。KIRA_LAUNCH_SOURCE仍由启动器固定为launcher。Path/PATH重复导致覆盖失效。设置类型、持久化、渲染进程保存队列、实例启动和相关测试夹具需要同步修改,因此在同一个功能 PR 中交付。
回归验证
npm run build:通过(Vue/前端/Electron TypeScript);Vite 提示产物 chunk 大小警告,未阻止构建。node --test --test-reporter=spec tests/.test.mjs:172 项全部通过。git diff --cached --check:通过。影响范围与潜在回归点
调用链:设置页 → IPC settings.save → settings.json → 本地实例启动时合并环境。共享校验也用于单实例高级设置和项目配置读取;完整回归测试包含运行环境、部署、启停、会话恢复、更新和 WebUI 登录。
主要回归点为保存其他设置时丢失全局变量、变量覆盖优先级和 Windows 名称大小写,已增加相应断言。云实例和依赖安装路径保持既有行为。未进行真实桌面界面点击测试或连接实际 KiraAI 服务的端到端启动测试。
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added settings for global environment variables, which are applied to local project processes the next time they start.
Global variables can be entered as
KEY=valuelines and saved in the app. Project-specific values take precedence over global values, which take precedence over system values.* Invalid entries are rejected with a validation message. Variables are stored locally as plain text and do not apply to dependency installation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->