From 1683ee7b112dce0886b354a3fff7c8625bf95d7e Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Thu, 5 Mar 2026 18:20:21 -0800 Subject: [PATCH] Fix post-rebase typecheck regressions Co-authored-by: codex --- apps/web/src/components/ChatView.browser.tsx | 10 ++++------ apps/web/src/components/ChatView.tsx | 14 -------------- packages/contracts/src/orchestration.ts | 6 +++--- packages/contracts/src/terminal.ts | 2 +- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/apps/web/src/components/ChatView.browser.tsx b/apps/web/src/components/ChatView.browser.tsx index d3f3ede9663265f96b41548e9f122eb7ee35ec13..7ae275480b414cf522dead478dac9af289f3b747 100644 --- a/apps/web/src/components/ChatView.browser.tsx +++ b/apps/web/src/components/ChatView.browser.tsx @@ -6,7 +6,6 @@ import { type MessageId, type OrchestrationReadModel, type ProjectId, - type ProviderSessionId, type ServerConfig, type ThreadId, type WsWelcomePayload, @@ -204,6 +203,8 @@ function createSnapshotForTargetUser(options: { projectId: PROJECT_ID, title: "Browser test thread", model: "gpt-5", + interactionMode: "default", + runtimeMode: "full-access", branch: "main", worktreePath: null, latestTurn: null, @@ -212,15 +213,13 @@ function createSnapshotForTargetUser(options: { deletedAt: null, messages, activities: [], + proposedPlans: [], checkpoints: [], session: { threadId: THREAD_ID, status: "ready", providerName: "codex", - providerSessionId: "session-1" as ProviderSessionId, - providerThreadId: null, - approvalPolicy: "on-failure", - sandboxMode: "workspace-write", + runtimeMode: "full-access", activeTurnId: null, lastError: null, updatedAt: NOW_ISO, @@ -552,7 +551,6 @@ describe("ChatView timeline estimator parity (full app)", () => { projects: [], threads: [], threadsHydrated: false, - runtimeMode: "full-access", }); }); diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index e783d379ef0bcb8f2c7beee2f5b4287ecf8d97ca..e338865940f6f2f6af3bff3c41b2e740b253a9ca 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -4716,20 +4716,6 @@ type TimelineRow = } | { kind: "working"; id: string; createdAt: string | null }; -function estimateTimelineMessageHeight(message: TimelineMessage): number { - const textLength = message.text.length; - if (message.role === "assistant") { - const estimatedLines = Math.max(1, Math.ceil(textLength / 72)); - return 78 + Math.min(estimatedLines * 22, 820); - } - - const estimatedLines = Math.max(1, Math.ceil(textLength / 56)); - const attachmentCount = message.attachments?.length ?? 0; - const attachmentRows = Math.ceil(attachmentCount / 2); - const attachmentHeight = attachmentRows * 124; - return 96 + Math.min(estimatedLines * 22, 620) + attachmentHeight; -} - function estimateTimelineProposedPlanHeight(proposedPlan: TimelineProposedPlan): number { const estimatedLines = Math.max(1, Math.ceil(proposedPlan.planMarkdown.length / 72)); return 120 + Math.min(estimatedLines * 22, 880); diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.ts index 6201ec72d0b7e6ef77d5992825d1d2971685e678..c57e26472e6b6a279bb9c617657e30585e5b88f2 100644 --- a/packages/contracts/src/orchestration.ts +++ b/packages/contracts/src/orchestration.ts @@ -263,7 +263,7 @@ export const OrchestrationReadModel = Schema.Struct({ }); export type OrchestrationReadModel = typeof OrchestrationReadModel.Type; -const ProjectCreateCommand = Schema.Struct({ +export const ProjectCreateCommand = Schema.Struct({ type: Schema.Literal("project.create"), commandId: CommandId, projectId: ProjectId, @@ -337,7 +337,7 @@ const ThreadInteractionModeSetCommand = Schema.Struct({ createdAt: IsoDateTime, }); -const ThreadTurnStartCommand = Schema.Struct({ +export const ThreadTurnStartCommand = Schema.Struct({ type: Schema.Literal("thread.turn.start"), commandId: CommandId, threadId: ThreadId, @@ -980,7 +980,7 @@ export const TurnCountRange = Schema.Struct({ ), ); -const ThreadTurnDiff = TurnCountRange.mapFields( +export const ThreadTurnDiff = TurnCountRange.mapFields( Struct.assign({ threadId: ThreadId, diff: Schema.String, diff --git a/packages/contracts/src/terminal.ts b/packages/contracts/src/terminal.ts index 088e87e027f93616363641e170096fb64c321153..e7c20242b1f00450c243f7bd1c704c31735da37c 100644 --- a/packages/contracts/src/terminal.ts +++ b/packages/contracts/src/terminal.ts @@ -23,7 +23,7 @@ const TerminalIdWithDefaultSchema = TerminalIdSchema.pipe( Schema.withDecodingDefault(() => DEFAULT_TERMINAL_ID), ); -const TerminalThreadInput = Schema.Struct({ +export const TerminalThreadInput = Schema.Struct({ threadId: TrimmedNonEmptyStringSchema, }); export type TerminalThreadInput = Schema.Codec.Encoded; -- 2.54.0