From 471151910d82fd56e445a31c3fadec8bd8906269 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sat, 14 Nov 2026 14:57:53 -0800 Subject: [PATCH] Read scope opacity for share links from the mask, as feather is The share state took the opacity the slider last showed, which a show-only update can leave apart from the mask; it now reads the mask itself, as the feather does. The test reset also restores full opacity. Co-authored-by: Manjunath Paparaju --- src/scopeMask.js | 1 + src/ui/applicationShell.js | 1 + src/ui/visualSettings.js | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scopeMask.js b/src/scopeMask.js index 510ea151a..b7b60c711 100644 --- a/src/scopeMask.js +++ b/src/scopeMask.js @@ -591,6 +591,7 @@ export function _resetScopeMaskForTest() { _viewer = null; _enabled = true; _featherRatio = SCOPE_FEATHER_RATIO_DEFAULT; + _maskOpacity = 1; _terminusAlpha = SCOPE_OUTSIDE_ALPHA; _terminusOverride = null; _terminusRepaints = 0; diff --git a/src/ui/applicationShell.js b/src/ui/applicationShell.js index a7d6fa29f..ec912be87 100644 --- a/src/ui/applicationShell.js +++ b/src/ui/applicationShell.js @@ -226,6 +226,7 @@ export class StyleManager extends ShellFacade { getDetectionTuning: services.getDetectionTuning, getKeyholeFadeTuning: services.getKeyholeFadeTuning, getScopeMaskFeather: services.getScopeMaskFeather, + getScopeMaskOpacity: services.getScopeMaskOpacity, getScopeTerminusOverride: services.getScopeTerminusOverride, governorRequestRender: services.governorRequestRender, holdContinuousRender: services.holdContinuousRender, diff --git a/src/ui/visualSettings.js b/src/ui/visualSettings.js index 2b67847cd..e6cf4d180 100644 --- a/src/ui/visualSettings.js +++ b/src/ui/visualSettings.js @@ -225,6 +225,7 @@ export class VisualSettings { // What the Scope and Celestial controls show; null until first set. this._scopeEnabledShown = null; this._scopeFeatherShown = null; + this._scopeOpacityShown = null; this._celestialShown = null; this.activeStyle = 'normal'; this._preCyberStyle = null; @@ -895,6 +896,7 @@ export class VisualSettings { getDetectionTuning, isScopeMaskEnabled, getScopeMaskFeather, + getScopeMaskOpacity, getScopeTerminusOverride, } = this.services; const detection = this._shareableDetectionState(); @@ -915,7 +917,7 @@ export class VisualSettings { celestialRingEnabled: this.celestialRingEnabled, scopeEnabled: isScopeMaskEnabled(), scopeFeatherPct: Math.round(getScopeMaskFeather() * 100), - scopeOpacityPct: this._scopeOpacityShown ?? 100, + scopeOpacityPct: Math.round((getScopeMaskOpacity?.() ?? 1) * 100), // null when adaptive — the share layer omits `sce` entirely in that case. scopeTerminusPct: getScopeTerminusOverride() == null