[codex] add configurable automatic git fetch interval #2605
Mergedjuliusmarmingemerged 11 commits into
main fromrefs/pull/2605/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -253,2 +266,2 @@253266254267 const retainRemotePoller = Effect.fn("VcsStatusBroadcaster.retainRemotePoller")(function* (
juliusmarminge changed the title
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/serverSettings.ts line 142OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -117,4 +139,4 @@117139 Layer.effect(118140 ServerSettingsService,119141 Effect.gen(function* () {120- const currentSettingsRef = yield* Ref.make<ServerSettings>(142+ const initialSettings = yield* normalizeServerSettings(
- apps/server/src/serverSettings.ts line 63OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -49,8 +49,15 @@4949 import { applyServerSettingsPatch } from "@t3tools/shared/serverSettings";5050 import { ServerSecretStoreLive } from "./auth/Layers/ServerSecretStore.ts";5151 import { ServerSecretStore } from "./auth/Services/ServerSecretStore.ts";52-const decodeServerSettings = Schema.decodeEffect(ServerSettings);52+const encodeServerSettingsSync = Schema.encodeSync(ServerSettings);53+const decodeServerSettings = Schema.decodeUnknownEffect(ServerSettings);53545455 const textEncoder = new TextEncoder();5556 const textDecoder = new TextDecoder();565758+function settingsInputForDecode(settings: ServerSettings): unknown {59+ return {60+ ...settings,61+ automaticGitFetchInterval: Duration.toMillis(settings.automaticGitFetchInterval),62+ };63+}
- apps/server/src/serverSettings.ts line 60Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -49,8 +49,10 @@4949 import { applyServerSettingsPatch } from "@t3tools/shared/serverSettings";5050 import { ServerSecretStoreLive } from "./auth/Layers/ServerSecretStore.ts";5151 import { ServerSecretStore } from "./auth/Services/ServerSecretStore.ts";52-const decodeServerSettings = Schema.decodeEffect(ServerSettings);52+const encodeServerSettingsSync = Schema.encodeSync(ServerSettings);53+const decodeServerSettings = Schema.decodeUnknownEffect(ServerSettings);53545455 const textEncoder = new TextEncoder();5556 const textDecoder = new TextDecoder();565758+const normalizeServerSettings = (
- apps/server/src/serverSettings.ts line 458OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -430,5 +447,12 @@430447 };431448 });432449433- const writeSettingsAtomically = (settings: ServerSettings) => {434- const sparseSettings = stripDefaultServerSettings(settings, DEFAULT_SERVER_SETTINGS) ?? {};450+ const writeSettingsAtomically = Effect.fnUntraced(451+ function* (settings: ServerSettings) {452+ const sparseSettingsJson = yield* Effect.flatten(453+ Effect.zipWith(454+ encodeServerSettings(settings),455+ encodeServerSettings(DEFAULT_SERVER_SETTINGS),456+ (a, b) => encodeServerSettingsJson(stripDefaultServerSettings(a, b) ?? {}),457+ { concurrent: true },458+ ),
juliusmarminge merged this34ec8a8
juliusmarminge closed this
Sign in to join this conversation.





Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
a8142f3b-71c8-431b-bb02-6e809c80d787You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.