The best way to control Claude Code, Codex and more from any computer or phone
Preserve $defs in Codex output schema and refine sidebar header
- include JSON Schema `$defs` when writing Codex output schema files - tighten sidebar wordmark sizing and spacing in Electron/web layouts
Julius Marminge committed
Mar 1, 2026 at 23:11 UTC
5ca9b54d6627e23ab9d3d4d14888770e9264a933
2 files changed
+21
-12
apps/server/src/git/Layers/CodexTextGeneration.ts
+12
-1
@@ -19,6 +19,17 @@ const CODEX_MODEL = "gpt-5.3-codex";
19
const CODEX_REASONING_EFFORT = "low";
20
const CODEX_TIMEOUT_MS = 180_000;
21
22
+function toCodexOutputJsonSchema(schema: Schema.Top): unknown {
23
+ const document = Schema.toJsonSchemaDocument(schema);
24
+ if (document.definitions && Object.keys(document.definitions).length > 0) {
25
+ return {
26
+ ...document.schema,
27
+ $defs: document.definitions,
28
+ };
29
+ }
30
+ return document.schema;
31
+}
32
+
33
function normalizeCodexError(
34
operation: string,
35
error: unknown,
@@ -204,7 +215,7 @@ const makeCodexTextGeneration = Effect.gen(function* () {
215
const schemaPath = yield* writeTempFile(
216
operation,
217
"codex-schema",
207
- JSON.stringify(Schema.toJsonSchemaDocument(outputSchemaJson).schema),
218
+ JSON.stringify(toCodexOutputJsonSchema(outputSchemaJson)),
219
);
220
const outputPath = yield* writeTempFile(operation, "codex-output", "");
221
apps/web/src/components/Sidebar.tsx
+9
-11
@@ -171,7 +171,7 @@ function T3Wordmark() {
171
return (
172
<svg
173
aria-label="T3"
174
- className="h-3 w-auto shrink-0 text-foreground"
174
+ className="h-2.5 w-auto shrink-0 text-foreground"
175
viewBox="15.5309 37 94.3941 56.96"
176
xmlns="http://www.w3.org/2000/svg"
177
>
@@ -312,7 +312,7 @@ export default function Sidebar() {
312
const status = target.cwd ? statusByCwd.get(target.cwd) : undefined;
313
const branchMatches =
314
target.branch !== null && status?.branch !== null && status?.branch === target.branch;
315
- map.set(target.threadId, branchMatches ? status?.pr ?? null : null);
315
+ map.set(target.threadId, branchMatches ? (status?.pr ?? null) : null);
316
}
317
return map;
318
}, [threadGitStatusCwds, threadGitStatusQueries, threadGitTargets]);
@@ -689,9 +689,7 @@ export default function Sidebar() {
689
void handleNewThread(projectId, {
690
branch: activeThread?.branch ?? activeDraftThread?.branch ?? null,
691
worktreePath: activeThread?.worktreePath ?? activeDraftThread?.worktreePath ?? null,
692
- envMode:
693
- activeDraftThread?.envMode ??
694
- (activeThread?.worktreePath ? "worktree" : "local"),
692
+ envMode: activeDraftThread?.envMode ?? (activeThread?.worktreePath ? "worktree" : "local"),
693
});
694
};
695
@@ -711,14 +709,14 @@ export default function Sidebar() {
709
};
710
711
const wordmark = (
714
- <div className={`flex items-center gap-2 ${isElectron ? "-translate-y-px" : ""}`}>
712
+ <div className="flex items-center gap-2">
713
<SidebarTrigger className="shrink-0 md:hidden" />
716
- <div className="flex min-w-0 flex-1 items-center gap-1">
714
+ <div className="flex min-w-0 flex-1 items-center gap-1 mt-2 ml-1">
715
<T3Wordmark />
718
- <span className="truncate text-base font-medium tracking-tight text-muted-foreground">
716
+ <span className="truncate text-sm font-medium tracking-tight text-muted-foreground">
717
Code
718
</span>
721
- <span className="rounded-full bg-muted/50 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-widest text-muted-foreground/60">
719
+ <span className="rounded-full bg-muted/50 px-1.5 py-0.5 text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground/60">
720
{APP_STAGE_LABEL}
721
</span>
722
</div>
@@ -740,10 +738,10 @@ export default function Sidebar() {
738
<>
739
{isElectron ? (
740
<>
743
- <SidebarHeader className="drag-region h-[52px] flex-row items-center gap-2 px-4 py-0 pl-[88px]">
741
+ <SidebarHeader className="drag-region h-[52px] flex-row items-center gap-2 px-4 py-0 pl-[82px]">
742
{wordmark}
743
</SidebarHeader>
746
- <div className="px-4 pb-2">{newThreadButton}</div>
744
+ <div className="px-4 py-2">{newThreadButton}</div>
745
</>
746
) : (
747
<SidebarHeader className="gap-3 px-3 py-2 sm:gap-2.5 sm:px-4 sm:py-3">