From e1c3ec00e2ee43bbc46e6e8be3bed126a724ab1c Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Tue, 8 Sep 2026 23:53:56 +0800 Subject: [PATCH] fix(web): count the scoped mutate branch and draw the breadcrumb separator as a hairline Awaiting inside each arm of the scope ternary left v8 with a negative else count on the response check, which the coverage gate read as an uncovered branch; the request is now chosen first and awaited once. The breadcrumb separator was a 1px filled divider where every other neutral line is 0.5px. --- .../src/client/PluginManagerSettingsTab.module.css | 2 +- .../client/ui-settings/src/client/settings-scope.ts | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/client/ui-settings-plugin-manager/src/client/PluginManagerSettingsTab.module.css b/packages/client/ui-settings-plugin-manager/src/client/PluginManagerSettingsTab.module.css index 7a32aa8e20..173e325818 100644 --- a/packages/client/ui-settings-plugin-manager/src/client/PluginManagerSettingsTab.module.css +++ b/packages/client/ui-settings-plugin-manager/src/client/PluginManagerSettingsTab.module.css @@ -487,7 +487,7 @@ } .crumbSep { - width: 1px; + width: 0.5px; height: 12px; background: var(--dsw-alias-border-l3); } diff --git a/packages/client/ui-settings/src/client/settings-scope.ts b/packages/client/ui-settings/src/client/settings-scope.ts index 540cdc2e7a..603a36dbc5 100644 --- a/packages/client/ui-settings/src/client/settings-scope.ts +++ b/packages/client/ui-settings/src/client/settings-scope.ts @@ -132,10 +132,13 @@ export class SettingsScopeController implements SettingsScope { return this.enqueue(async () => { const revision = expectedRevision ?? this.pendingRevision ?? this.getSnapshot().revision // The wire method takes an optional trailing scope; the global instance - // sends three arguments rather than an explicit undefined. - const response = this.spec.scope === undefined - ? await this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision) - : await this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision, this.spec.scope) + // sends three arguments rather than an explicit undefined. One await + // after the choice: awaiting inside each arm splits the continuation so + // that v8 counts the branch below it negative. + const request = this.spec.scope === undefined + ? this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision) + : this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision, this.spec.scope) + const response = await request if (!response.ok) { await this.recover(generation) return