Skip to content

feat(web): 种子配置默认锁定 + 空 TZ 跟随 SOCKS5(#612 拆分) - #613

Merged
dofastted merged 3 commits into
mainfrom
cursor/seed-lock-tz-follow-d795
Oct 19, 2026
Merged

dofastted merged 3 commits into
mainfrom
cursor/seed-lock-tz-follow-d795

Conversation

@dofastted

@dofastted dofastted commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

意图(源自被拒 #612 / fix/remote-slot-refresh 拆分)

在 tip #611 只读契约键(TZ/LANG 不经 extra_env)之上,增量交付:

  1. 默认锁定:种子页配置默认锁定,需确认解锁后才能编辑;播种前再次确认。
  2. TZ/LANG 基础选项:时区 en/cn/jp 与语言 en/cn/jp 选择器;契约 env 仍只读展示,写入走槽位字段而非 extra_env。
  3. 空/跟随 SOCKS5:非手动钉住时区时跟随当前 SOCKS5 出口;播种 PUT 传 timezone_follow_proxy;可改固定 IANA 或改回跟随。

实现要点

  • Web:SeedPolicyCard 锁定 UX + ZoneField/LocaleField;seedSaveBody 附带 timezone / timezone_follow_proxy / locale,extra_env 仍剥离 TZ/LANG(feat(seed): 可编辑 env/theme + 调试上传 40 条脱敏(#610 拆分) #611 契约)。
  • API:PUT /seed-settings 在写文件前应用 locale 与 timezone/timezone_follow_proxy(与 PATCH 时区规则一致)。
  • 文档:CHANGELOG 未发布、docs/PANEL_API.md seed-settings 行。

明确不含

测试

  • test/unit/panel-vm-seed-settings.test.mjs(PUT 跟随代理时区 + locale)
  • web/src/features/vm/seed-settings.test.ts(save body 不含 extra_env TZ)
Open in Web Open in Cursor 

Note

Medium Risk
改动 VM 播种 API 与槽位时区/语言持久化路径,有误配或代理地理缺失时 PUT 会 400;UI 锁定降低误操作但不改变契约 env 的写入规则。

Reviewed by Cursor Bugbot for commit 6e055dc. Configure here.

cursoragent and others added 3 commits October 19, 2026 14:21
从 tip(#608+#611)干净重做 #612 拆分:解锁/播种确认流;时区与语言 en/cn/jp 选项;
跟随当前 SOCKS5 经 timezone_follow_proxy 写入,固定时区经 timezone,不经 extra_env。

不含 egress/migration/auto_compact/thread-betas/VERSION。

Co-authored-by: ted <kuhlmangarry24@gmail.com>
Co-authored-by: ted <kuhlmangarry24@gmail.com>
Co-authored-by: ted <kuhlmangarry24@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6e055dc. Configure here.

}
const pinned = persistVmTimezone(cfg.paths.project, id, zone, { source: 'manual' })
if (!pinned) return json(res, 404, { ok: false, error: { message: 'vm not found' } })
Object.assign(vm, pinned)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seed pin overwrites live VM record

High Severity

Pinning a timezone on seed PUT assigns persistVmTimezone's summarizeVm result onto the full slot record and writes that back. The summary redacts proxy.password to *** and injects panel-only fields, so a seed that pins TZ can wipe the SOCKS password and pollute vms/<id>.json.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6e055dc. Configure here.

locale: draft.locale,
}
if (draft.timezoneFollow) body.timezone_follow_proxy = true
else if (draft.timezoneFixed) body.timezone = draft.timezoneFixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seed save requires proxy timezone

High Severity

seedSaveBody always sends timezone_follow_proxy when timezone_source is not manual. Seed PUT then fails closed if SOCKS geo has no IANA zone, so editing theme, env, or claude.setting cannot save on unpinned slots without a detected exit timezone.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6e055dc. Configure here.

vm.timezone_source = 'proxy_geo'
}
}
if (nextLocale) vm.locale = nextLocale

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locale seed skips fingerprint locale

Medium Severity

Seed PUT writes vm.locale only. Timezone persist also copies the zone onto fingerprint.timezone, but locale does not update fingerprint.locale. Outbound identity still prefers the fingerprint, so LANG in seed files can disagree with workstation locale until a fingerprint reset.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6e055dc. Configure here.

@dofastted
dofastted merged commit 819ee2a into main Oct 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants