| author | |
| committer | |
| log | 6d1d549441be84f19696ab59ed7e2fbf305280d4 |
| tree | 3ccaa13109c29d21097478dc6af126250a252976 |
| parent | f17165a76b1a782831eb6a05a4383b27283df15d |
| signature | Signed by PGP key B5690EEEBB952194 |
3 files changed, 5 insertions(+), 5 deletions(-)
apps/web/src/clientPersistenceStorage.test.ts+2-2| ... | ... | @@ -114,13 +114,13 @@ describe("clientPersistenceStorage", () => { |
| 114 | 114 | expect(settings).not.toHaveProperty("diffWordWrap"); |
| 115 | 115 | }); |
| 116 | 116 | |
| 117 | it("keeps the default diff file state across reloads and defaults it to expanded", async () => { | |
| 117 | it("keeps the default diff file state across reloads and defaults it to collapsed", async () => { | |
| 118 | 118 | const testWindow = getTestWindow(); |
| 119 | 119 | const { readBrowserClientSettings, writeBrowserClientSettings } = |
| 120 | 120 | await import("./clientPersistenceStorage"); |
| 121 | 121 | |
| 122 | 122 | testWindow.localStorage.setItem("t3code:client-settings:v1", JSON.stringify({})); |
| 123 | expect(readBrowserClientSettings()?.diffFilesCollapsed).toBe(false); | |
| 123 | expect(readBrowserClientSettings()?.diffFilesCollapsed).toBe(true); | |
| 124 | 124 | |
| 125 | 125 | writeBrowserClientSettings({ ...DEFAULT_CLIENT_SETTINGS, diffFilesCollapsed: true }); |
| 126 | 126 | expect(readBrowserClientSettings()?.diffFilesCollapsed).toBe(true); |
packages/contracts/src/settings.test.ts+2-2| ... | ... | @@ -227,8 +227,8 @@ describe("ClientSettings notifications", () => { |
| 227 | 227 | }); |
| 228 | 228 | |
| 229 | 229 | describe("ClientSettings default diff file state", () => { |
| 230 | it("keeps files expanded when existing settings omit the preference", () => { | |
| 231 | expect(decodeClientSettings({}).diffFilesCollapsed).toBe(false); | |
| 230 | it("keeps files collapsed when existing settings omit the preference", () => { | |
| 231 | expect(decodeClientSettings({}).diffFilesCollapsed).toBe(true); | |
| 232 | 232 | }); |
| 233 | 233 | |
| 234 | 234 | it.each([true, false])("preserves a saved collapsed preference of %s", (diffFilesCollapsed) => { |
packages/contracts/src/settings.ts+1-1| ... | ... | @@ -356,7 +356,7 @@ export const ClientSettingsSchema = Schema.Struct({ |
| 356 | 356 | dismissedProviderUpdateNotificationKeys: Schema.Array(TrimmedNonEmptyString).pipe( |
| 357 | 357 | Schema.withDecodingDefault(Effect.succeed([])), |
| 358 | 358 | ), |
| 359 | diffFilesCollapsed: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), | |
| 359 | diffFilesCollapsed: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), | |
| 360 | 360 | diffIgnoreWhitespace: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), |
| 361 | 361 | diffLayout: DiffLayout.pipe(Schema.withDecodingDefault(Effect.succeed(DEFAULT_DIFF_LAYOUT))), |
| 362 | 362 | environmentIdentificationMode: EnvironmentIdentificationMode.pipe( |