Skip to content

Commit d69f62f

Browse files
committed
chore: resolve stale rebase conflicts and fix types.ts overload error
- Resolve unresolved merge-conflict markers left in the onboarding UI files from an earlier aborted rebase; take the version from #2725 (merged) in all three cases, since that matches the now-live UI. - Remove three stale src/app/... files that were moved to apps/web/... upstream but lingered as "deleted by us" conflicts. - Fix tsgo overload error in services/gastown/src/types.ts: the .default({}) on the refinery sub-schema wasn't satisfied by the empty-object literal because the inner shape has no required optional fields from the compiler's perspective. Spell out the defaults explicitly.
1 parent 39164e2 commit d69f62f

3 files changed

Lines changed: 37 additions & 6 deletions

File tree

apps/web/src/app/(app)/gastown/onboarding/OnboardingStepModel.tsx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,22 +351,42 @@ export function OnboardingStepModel() {
351351
// Sync custom model state up to context whenever any field changes
352352
function handleSetCustomDefault(value: string) {
353353
setCustomDefault(value);
354-
setCustomModels({ defaultModel: value, mayor: customMayor, refinery: customRefinery, polecat: customPolecat });
354+
setCustomModels({
355+
defaultModel: value,
356+
mayor: customMayor,
357+
refinery: customRefinery,
358+
polecat: customPolecat,
359+
});
355360
}
356361

357362
function handleSetCustomMayor(value: string) {
358363
setCustomMayor(value);
359-
setCustomModels({ defaultModel: customDefault, mayor: value, refinery: customRefinery, polecat: customPolecat });
364+
setCustomModels({
365+
defaultModel: customDefault,
366+
mayor: value,
367+
refinery: customRefinery,
368+
polecat: customPolecat,
369+
});
360370
}
361371

362372
function handleSetCustomRefinery(value: string) {
363373
setCustomRefinery(value);
364-
setCustomModels({ defaultModel: customDefault, mayor: customMayor, refinery: value, polecat: customPolecat });
374+
setCustomModels({
375+
defaultModel: customDefault,
376+
mayor: customMayor,
377+
refinery: value,
378+
polecat: customPolecat,
379+
});
365380
}
366381

367382
function handleSetCustomPolecat(value: string) {
368383
setCustomPolecat(value);
369-
setCustomModels({ defaultModel: customDefault, mayor: customMayor, refinery: customRefinery, polecat: value });
384+
setCustomModels({
385+
defaultModel: customDefault,
386+
mayor: customMayor,
387+
refinery: customRefinery,
388+
polecat: value,
389+
});
370390
}
371391

372392
return (

apps/web/src/app/(app)/gastown/onboarding/onboarding.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ describe('presetToConfig', () => {
218218
});
219219

220220
test('uses defaultModel as fallback for unset role overrides', () => {
221-
const config = presetToConfig('custom', { defaultModel: 'openai/gpt-4.1', mayor: 'openai/gpt-4.1' });
221+
const config = presetToConfig('custom', {
222+
defaultModel: 'openai/gpt-4.1',
223+
mayor: 'openai/gpt-4.1',
224+
});
222225
expect(config.default_model).toBe('openai/gpt-4.1');
223226
expect(config.role_models).toEqual({
224227
mayor: 'openai/gpt-4.1',

services/gastown/src/types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,15 @@ export const TownConfigSchema = z.object({
291291
* 0 = immediate, null = disabled (require manual merge). */
292292
auto_merge_delay_minutes: z.number().int().min(0).nullable().default(5),
293293
})
294-
.default({}),
294+
.default({
295+
gates: [],
296+
auto_merge: true,
297+
require_clean_merge: true,
298+
code_review: true,
299+
review_mode: 'comments',
300+
auto_resolve_pr_feedback: true,
301+
auto_merge_delay_minutes: 5,
302+
}),
295303

296304
/** Alarm interval when agents are active (seconds) */
297305
alarm_interval_active: z.number().int().min(5).max(600).optional(),

0 commit comments

Comments
 (0)