GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): project reset skips environments that cannot store the over… · flamboh/t3code@7ccf473

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components/settings
    • scopedSettings.test.ts
    • scopedSettings.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/settings/scopedSettings.test.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/components/settings/scopedSettings.test.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,13 +935,17 @@ describe("environments that cannot store a setting", () => {
935935
environmentWideWrites: planScopedSettingsPatch(all, afterFirstSave, {
936936
defaultAutoPull: false,
937937
}).serverWrites.map(({ label }) => label),
938+
projectReset: planScopedSettingsClear(project, afterFirstSave, [
939+
"defaultAutoPull",
940+
]).serverWrites.map(({ label }) => label),
938941
}).toEqual({
939942
failed: ["Server"],
940943
projectSecondClick: ["Laptop"],
941944
projectMixed: false,
942945
serverCheckout: "Update T3 Code on Server to use this setting.",
943946
environmentWideMixed: true,
944947
environmentWideWrites: ["Laptop", "Server"],
948+
projectReset: ["Laptop"],
945949
});
946950
});
947951
});
Collapse file

‎apps/web/src/components/settings/scopedSettings.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/components/settings/scopedSettings.ts
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,12 @@ export function planScopedSettingsClear(
459459
) {
460460
const serverWrites =
461461
scope.kind === "project" || scope.kind === "checkout"
462-
? projectOverrideWrites(scope, environments, (_current, settings, projectId) =>
463-
clearProjectSettingsOverrides(settings, projectId, keys),
464-
)
462+
? projectOverrideWrites(scope, environments, (_current, settings, projectId, environment) => {
463+
const unsupported = resolveUnsupportedSettingKeys(environment, true);
464+
return keys.every((key) => unsupported.has(key))
465+
? undefined
466+
: clearProjectSettingsOverrides(settings, projectId, keys);
467+
})
465468
: [];
466469
return {
467470
clientPatch: {} as ClientSettingsPatch,

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.