fix(panel): replace native width input, fix select menu open reflow, and gate context window settings behind risk consent

- Replace native <input type="number"> in popover width settings with CustomNumberInput stepper and hide native number spinbuttons globally
- Eliminate single/multi-select option reflow on open by removing scale(0.985) GPU layer teardown in anim-popover-in, floating .scrollbar-rail without flex width squeeze, and reconciling options before unhiding .select-menu
- Gate Model Context Settings behind a persistent risk consent mask (contextWindowRiskAccepted, default false and re-locked on factory reset)
This commit is contained in:
fish
2026-11-16 18:10:31 +09:00
parent 3b36ade911
commit 4670dd0a0e
17 changed files with 503 additions and 102 deletions
@@ -441,6 +441,9 @@ function isEquivalentTelemetry(prev, next) {
if ((pSet?.language ?? 'zh-CN') !== (nSet?.language ?? 'zh-CN')) return false;
if ((pSet?.themeAccent ?? 'host') !== (nSet?.themeAccent ?? 'host')) return false;
if ((pSet?.fontScale ?? 'md') !== (nSet?.fontScale ?? 'md')) return false;
if (Boolean(pSet?.contextWindowRiskAccepted) !== Boolean(nSet?.contextWindowRiskAccepted)) {
return false;
}
if (
JSON.stringify(pSet?.modelContextWindows) !== JSON.stringify(nSet?.modelContextWindows) ||
JSON.stringify(prev.contextWindowModels) !== JSON.stringify(next.contextWindowModels)
@@ -1190,6 +1193,9 @@ export async function saveSettingsPatch(patch) {
if (Object.prototype.hasOwnProperty.call(safePatch, 'popoverWidth')) {
safePatch.popoverWidth = normalizeClientPopoverWidth(safePatch.popoverWidth);
}
if (Object.prototype.hasOwnProperty.call(safePatch, 'contextWindowRiskAccepted')) {
safePatch.contextWindowRiskAccepted = Boolean(safePatch.contextWindowRiskAccepted);
}
if (Object.prototype.hasOwnProperty.call(safePatch, 'orchestratorIdMode')) {
safePatch.orchestratorIdMode = normalizeClientOrchestratorIdMode(safePatch.orchestratorIdMode);
}