Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(settings): resolve t3.json inside the project settings resolver #12954

Mergedjuliusmarmingemerged 9 commits intoworktree-submodules/t3json fromrefs/pull/12954/headmerged by juliusmarminge View on GitHub

Showing 25 changed files with 67 additions and 6 deletions (loading 22).

x
0 of 25 viewed, 25 left
20 additions and 5 deletionsapps/mobile/src/features/settings/SettingsServerControlsRouteScreen.tsxModified
View file
@@ -50,10 +50,16 @@
};
​
const WORKSPACE_CHOICES: ReadonlyArray<{
- readonly mode: ThreadEnvMode;
+ readonly mode: ThreadEnvMode | null;
readonly label: string;
readonly description: string;
}> = [
+ // Only offered at environment scope; a project falls back through "Use defaults".
+ {
+ mode: null,
+ label: "Inherit",
+ description: "Use the repository's t3.json, or the current checkout.",
+ },
mode: "local",
label: "Current checkout",
@@ -126,6 +132,10 @@
const value = reference.settings[key];
return displayTargets.every((entry) => entry.settings[key] === value) ? value : null;
+ // `uniform` folds a real null into "mixed"; nullable keys need the distinction.
+ const isMixed = (key: keyof ServerSettings) =>
+ reference === null ||
+ displayTargets.some((entry) => entry.settings[key] !== reference.settings[key]);
const updateSettings = useAtomCommand(serverEnvironment.updateSettings, {
label: "environment settings update",
reportFailure: true,