GeezerVison is showing github.com — fix: reconcile main's round-20 features after the rebase · pingdotgg/t3code@37088e9
File treeExpand file treeCollapse file tree Open diff view settings mobile/src/features/threads
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/threads/ThreadComposer.tsx +8-3Lines changed: 8 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -153,6 +153,11 @@ export const COMPOSER_LAYOUT_TRANSITION = | 153 | 153 | ? undefined | 154 | 154 | : LinearTransition.duration(COMPOSER_TRANSITION_DURATION_MS).reduceMotion(ReduceMotion.System); | 155 | 155 |
| | 156 | +const COMPOSER_ATTACHMENT_ENTERING = | | 157 | + Platform.OS === "android" | | 158 | + ? FadeIn.duration(160) | | 159 | + : FadeIn.delay(COMPOSER_TRANSITION_DURATION_MS).duration(160).reduceMotion(ReduceMotion.System); | | 160 | + | 156 | 161 | const AnimatedGlassSurface = Animated.createAnimatedComponent(GlassSurface); | 157 | 162 |
| 158 | 163 | export function ComposerSurface(props: { | @@ -622,10 +627,10 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer | 622 | 627 | onPickFiles={props.onPickDraftFiles} | 623 | 628 | /> | 624 | 629 | ) : null} | 625 | | - {isExpanded ? ( | | 630 | + {isExpanded && props.draftAttachments.length > 0 ? ( | 626 | 631 | <Animated.View | 627 | | - className={props.draftAttachments.length > 0 ? "px-[14px] pb-2.5" : undefined} | 628 | | - entering={FadeIn.duration(160)} | | 632 | + className="px-[14px] pb-2.5" | | 633 | + entering={COMPOSER_ATTACHMENT_ENTERING} | 629 | 634 | exiting={FadeOut.duration(120)} | 630 | 635 | > | 631 | 636 | <ComposerAttachmentStrip | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/cli/project.ts -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,6 @@ import * as ProjectFaviconResolver from "../project/ProjectFaviconResolver.ts"; | 31 | 31 | import * as RepositoryIdentityResolver from "../project/RepositoryIdentityResolver.ts"; | 32 | 32 | import * as ProjectService from "../project/ProjectService.ts"; | 33 | 33 | import * as T3ProjectFileLoader from "../project/T3ProjectFileLoader.ts"; | 34 | | -import * as ServerRuntimeStartup from "../serverRuntimeStartup.ts"; | 35 | 34 | import { | 36 | 35 | clearPersistedServerRuntimeState, | 37 | 36 | readPersistedServerRuntimeState, | @@ -513,7 +512,6 @@ const projectAddCommand = Command.make("add", { | 513 | 512 | projectId, | 514 | 513 | title, | 515 | 514 | workspaceRoot, | 516 | | - defaultModelSelection: ServerRuntimeStartup.getAutoBootstrapDefaultModelSelection(), | 517 | 515 | }); | 518 | 516 | return `Added project ${projectId} (${title}) at ${workspaceRoot}.`; | 519 | 517 | }), | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/environment/ServerEnvironment.test.ts +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -252,7 +252,9 @@ it.layer(NodeServices.layer)("ServerEnvironmentLive", (it) => { | 252 | 252 | expect(withFd.capabilities.serverSelfUpdate).toBe("desktop-managed"); | 253 | 253 | expect(withFd.capabilities.desktopAppUpdate).toBe(true); | 254 | 254 | expect(withFd.capabilities.serverSelfUpdateProgress).toBe(true); | 255 | | - expect(withFd.capabilities.serverUpdateThreadContinuation).toBe(true); | | 255 | + // v2 recovery terminalizes running runs on restart, so continuation | | 256 | + // stays unadvertised until the v2 runtime carries the markers. | | 257 | + expect(withFd.capabilities.serverUpdateThreadContinuation).toBeUndefined(); | 256 | 258 |
| 257 | 259 | const withoutFd = yield* describeWith({ mode: "desktop" }); | 258 | 260 | expect(withoutFd.capabilities.serverSelfUpdate).toBe("desktop-managed"); | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/environment/ServerEnvironment.ts +5-4Lines changed: 5 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -236,11 +236,12 @@ export const make = Effect.gen(function* () { | 236 | 236 | threadVisitedTracking: true, | 237 | 237 | threadPullRequestLinking: true, | 238 | 238 | ...(serverSelfUpdate === null ? {} : { serverSelfUpdate }), | | 239 | + // Running-thread continuation across a self-update (#9167) marks v1 | | 240 | + // provider session bindings; the v2 recovery path terminalizes running | | 241 | + // runs on restart instead, so the capability stays unadvertised until | | 242 | + // ProviderRuntimeRecoveryService grows an equivalent. | 239 | 243 | ...(serverSelfUpdate === "boot-service" || desktopAppUpdate | 240 | | - ? { | 241 | | - serverSelfUpdateProgress: true, | 242 | | - serverUpdateThreadContinuation: true, | 243 | | - } | | 244 | + ? { serverSelfUpdateProgress: true } | 244 | 245 | : {}), | 245 | 246 | ...(desktopAppUpdate ? { desktopAppUpdate: true } : {}), | 246 | 247 | }, | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ThreadLaunchService.ts +24-8Lines changed: 24 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -240,20 +240,36 @@ export const make = Effect.gen(function* () { | 240 | 240 | .pipe(Effect.mapError(mapError(input, "update-thread", threadId))); | 241 | 241 | } | 242 | 242 | let startRef = input.workspaceStrategy.baseRef; | 243 | | - if (input.workspaceStrategy.startFromOrigin === true) { | | 243 | + // "Start from origin" is a stored default; repos without the requested | | 244 | + // remote branch fall back to the local base branch. | | 245 | + const startFromOrigin = | | 246 | + input.workspaceStrategy.startFromOrigin === true && | | 247 | + (yield* git | | 248 | + .remoteExists({ cwd: project.workspaceRoot, remoteName: "origin" }) | | 249 | + .pipe(Effect.mapError(mapError(input, "provision-worktree", threadId)))); | | 250 | + if (startFromOrigin) { | 244 | 251 | yield* git | 245 | 252 | .fetchRemote({ cwd: project.workspaceRoot, remoteName: "origin" }) | 246 | 253 | .pipe(Effect.mapError(mapError(input, "provision-worktree", threadId))); | 247 | | - startRef = yield* git | 248 | | - .resolveRemoteTrackingCommit({ | | 254 | + const remoteBaseExists = yield* git | | 255 | + .remoteBranchExists({ | 249 | 256 | cwd: project.workspaceRoot, | 250 | 257 | refName: input.workspaceStrategy.baseRef, | 251 | | - fallbackRemoteName: "origin", | | 258 | + remoteName: "origin", | 252 | 259 | }) | 253 | | - .pipe( | 254 | | - Effect.map((resolved) => resolved.commitSha), | 255 | | - Effect.mapError(mapError(input, "provision-worktree", threadId)), | 256 | | - ); | | 260 | + .pipe(Effect.mapError(mapError(input, "provision-worktree", threadId))); | | 261 | + if (remoteBaseExists) { | | 262 | + startRef = yield* git | | 263 | + .resolveRemoteTrackingCommit({ | | 264 | + cwd: project.workspaceRoot, | | 265 | + refName: input.workspaceStrategy.baseRef, | | 266 | + fallbackRemoteName: "origin", | | 267 | + }) | | 268 | + .pipe( | | 269 | + Effect.map((resolved) => resolved.commitSha), | | 270 | + Effect.mapError(mapError(input, "provision-worktree", threadId)), | | 271 | + ); | | 272 | + } | 257 | 273 | } | 258 | 274 | const worktree = yield* git | 259 | 275 | .createWorktree({ | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ThreadSettlementService.ts +12-6Lines changed: 12 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -192,12 +192,18 @@ export const make = Effect.gen(function* () { | 192 | 192 | thread: (typeof candidates)[number], | 193 | 193 | ) { | 194 | 194 | if (thread.linkedPullRequest != null) { | 195 | | - const detail = yield* pullRequests.detail({ | 196 | | - projectId: thread.linkedPullRequest.projectId, | 197 | | - repository: thread.linkedPullRequest.repository, | 198 | | - number: thread.linkedPullRequest.number, | 199 | | - }); | 200 | | - return { state: detail.state, updatedAt: detail.updatedAt } satisfies SettlementPullRequest; | | 195 | + const summary = yield* pullRequests.summary( | | 196 | + { | | 197 | + projectId: thread.linkedPullRequest.projectId, | | 198 | + repository: thread.linkedPullRequest.repository, | | 199 | + number: thread.linkedPullRequest.number, | | 200 | + }, | | 201 | + { recoverTransientFailure: false }, | | 202 | + ); | | 203 | + return { | | 204 | + state: summary.state, | | 205 | + updatedAt: summary.updatedAt, | | 206 | + } satisfies SettlementPullRequest; | 201 | 207 | } | 202 | 208 | if (thread.branch === null) return null; | 203 | 209 | const workspaceRoot = workspaceRootByProjectId.get(thread.projectId); | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration/decider.ts +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -219,7 +219,10 @@ export const decideOrchestrationCommand = Effect.fn("decideOrchestrationCommand" | 219 | 219 | projectId: command.projectId, | 220 | 220 | title: command.title, | 221 | 221 | workspaceRoot: command.workspaceRoot, | 222 | | - defaultModelSelection: command.defaultModelSelection ?? null, | | 222 | + // Project creation has no user model choice. Older clients sent an | | 223 | + // automatic seed here, but only a metadata update records an | | 224 | + // explicit project default. | | 225 | + defaultModelSelection: null, | 223 | 226 | faviconPath: null, | 224 | 227 | scripts: command.scripts ?? [], | 225 | 228 | createdAt: command.createdAt, | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/persistence/Migrations.ts +20-18Lines changed: 20 additions & 18 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -55,15 +55,16 @@ import Migration0040 from "./Migrations/040_ProjectionProjectFaviconPath.ts"; | 55 | 55 | import Migration0041 from "./Migrations/041_AuthSessionClientConnection.ts"; | 56 | 56 | import Migration0042 from "./Migrations/042_ProjectionThreadLinkedPullRequest.ts"; | 57 | 57 | import Migration0043 from "./Migrations/043_ProjectionThreadsUnsettledAt.ts"; | 58 | | -import Migration0044 from "./Migrations/044_OrchestrationV2.ts"; | 59 | | -import Migration0045 from "./Migrations/045_OrchestrationV2Subagents.ts"; | 60 | | -import Migration0046 from "./Migrations/046_OrchestrationV2Foundation.ts"; | 61 | | -import Migration0047 from "./Migrations/047_OrchestrationV2ProviderSessionBindings.ts"; | 62 | | -import Migration0048 from "./Migrations/048_OrchestrationV2ThreadLaunchWorkflows.ts"; | 63 | | -import Migration0049 from "./Migrations/049_ApplicationEventSource.ts"; | 64 | | -import Migration0050 from "./Migrations/050_OrchestrationV2EffectCancellation.ts"; | 65 | | -import Migration0051 from "./Migrations/051_ScheduledTasks.ts"; | 66 | | -import Migration0052 from "./Migrations/052_LegacyV1ImportState.ts"; | | 58 | +import Migration0044 from "./Migrations/044_ClearAutomaticProjectModelDefaults.ts"; | | 59 | +import Migration0045 from "./Migrations/045_OrchestrationV2.ts"; | | 60 | +import Migration0046 from "./Migrations/046_OrchestrationV2Subagents.ts"; | | 61 | +import Migration0047 from "./Migrations/047_OrchestrationV2Foundation.ts"; | | 62 | +import Migration0048 from "./Migrations/048_OrchestrationV2ProviderSessionBindings.ts"; | | 63 | +import Migration0049 from "./Migrations/049_OrchestrationV2ThreadLaunchWorkflows.ts"; | | 64 | +import Migration0050 from "./Migrations/050_ApplicationEventSource.ts"; | | 65 | +import Migration0051 from "./Migrations/051_OrchestrationV2EffectCancellation.ts"; | | 66 | +import Migration0052 from "./Migrations/052_ScheduledTasks.ts"; | | 67 | +import Migration0053 from "./Migrations/053_LegacyV1ImportState.ts"; | 67 | 68 |
| 68 | 69 | /** | 69 | 70 | * Migration loader with all migrations defined inline. | @@ -119,15 +120,16 @@ const migrationEntries = [ | 119 | 120 | [41, "AuthSessionClientConnection", Migration0041], | 120 | 121 | [42, "ProjectionThreadLinkedPullRequest", Migration0042], | 121 | 122 | [43, "ProjectionThreadsUnsettledAt", Migration0043], | 122 | | - [44, "OrchestrationV2", Migration0044], | 123 | | - [45, "OrchestrationV2Subagents", Migration0045], | 124 | | - [46, "OrchestrationV2Foundation", Migration0046], | 125 | | - [47, "OrchestrationV2ProviderSessionBindings", Migration0047], | 126 | | - [48, "OrchestrationV2ThreadLaunchWorkflows", Migration0048], | 127 | | - [49, "ApplicationEventSource", Migration0049], | 128 | | - [50, "OrchestrationV2EffectCancellation", Migration0050], | 129 | | - [51, "ScheduledTasks", Migration0051], | 130 | | - [52, "LegacyV1ImportState", Migration0052], | | 123 | + [44, "ClearAutomaticProjectModelDefaults", Migration0044], | | 124 | + [45, "OrchestrationV2", Migration0045], | | 125 | + [46, "OrchestrationV2Subagents", Migration0046], | | 126 | + [47, "OrchestrationV2Foundation", Migration0047], | | 127 | + [48, "OrchestrationV2ProviderSessionBindings", Migration0048], | | 128 | + [49, "OrchestrationV2ThreadLaunchWorkflows", Migration0049], | | 129 | + [50, "ApplicationEventSource", Migration0050], | | 130 | + [51, "OrchestrationV2EffectCancellation", Migration0051], | | 131 | + [52, "ScheduledTasks", Migration0052], | | 132 | + [53, "LegacyV1ImportState", Migration0053], | 131 | 133 | ] as const; | 132 | 134 |
| 133 | 135 | export const migrationManifest = migrationEntries.map(([id, name]) => [id, name] as const); | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/persistence/Migrations/045_046_OrchestrationV2.test.ts +27-26Lines changed: 27 additions & 26 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,12 +8,12 @@ import * as NodeSqliteClient from "../NodeSqliteClient.ts"; | 8 | 8 |
| 9 | 9 | const layer = it.layer(Layer.mergeAll(NodeSqliteClient.layerMemory())); | 10 | 10 |
| 11 | | -layer("038_039_OrchestrationV2", (it) => { | | 11 | +layer("045_046_OrchestrationV2", (it) => { | 12 | 12 | it.effect("keeps released and private migration ids contiguous", () => | 13 | 13 | Effect.sync(() => { | 14 | 14 | assert.deepStrictEqual( | 15 | 15 | migrationEntries.map(([id]) => id), | 16 | | - Array.from({ length: 52 }, (_, index) => index + 1), | | 16 | + Array.from({ length: 53 }, (_, index) => index + 1), | 17 | 17 | ); | 18 | 18 | }), | 19 | 19 | ); | @@ -22,32 +22,32 @@ layer("038_039_OrchestrationV2", (it) => { | 22 | 22 | Effect.gen(function* () { | 23 | 23 | const sql = yield* SqlClient.SqlClient; | 24 | 24 |
| 25 | | - yield* runMigrations({ toMigrationInclusive: 45 }); | | 25 | + yield* runMigrations({ toMigrationInclusive: 46 }); | 26 | 26 |
| 27 | 27 | const migrations = yield* sql<{ | 28 | 28 | readonly migration_id: number; | 29 | 29 | readonly name: string; | 30 | 30 | }>` | 31 | 31 | SELECT migration_id, name | 32 | 32 | FROM effect_sql_migrations | 33 | | - WHERE migration_id IN (42, 43, 44, 45) | | 33 | + WHERE migration_id IN (43, 44, 45, 46) | 34 | 34 | ORDER BY migration_id | 35 | 35 | `; | 36 | 36 | assert.deepStrictEqual(migrations, [ | 37 | | - { | 38 | | - migration_id: 42, | 39 | | - name: "ProjectionThreadLinkedPullRequest", | 40 | | - }, | 41 | 37 | { | 42 | 38 | migration_id: 43, | 43 | 39 | name: "ProjectionThreadsUnsettledAt", | 44 | 40 | }, | 45 | 41 | { | 46 | 42 | migration_id: 44, | 47 | | - name: "OrchestrationV2", | | 43 | + name: "ClearAutomaticProjectModelDefaults", | 48 | 44 | }, | 49 | 45 | { | 50 | 46 | migration_id: 45, | | 47 | + name: "OrchestrationV2", | | 48 | + }, | | 49 | + { | | 50 | + migration_id: 46, | 51 | 51 | name: "OrchestrationV2Subagents", | 52 | 52 | }, | 53 | 53 | ]); | @@ -64,10 +64,10 @@ layer("038_039_OrchestrationV2", (it) => { | 64 | 64 | }), | 65 | 65 | ); | 66 | 66 |
| 67 | | - it.effect("backfills provider-session thread bindings in migration 047", () => | | 67 | + it.effect("backfills provider-session thread bindings in migration 048", () => | 68 | 68 | Effect.gen(function* () { | 69 | 69 | const sql = yield* SqlClient.SqlClient; | 70 | | - yield* runMigrations({ toMigrationInclusive: 46 }); | | 70 | + yield* runMigrations({ toMigrationInclusive: 47 }); | 71 | 71 | yield* sql` | 72 | 72 | INSERT INTO orchestration_v2_projection_provider_sessions ( | 73 | 73 | provider_session_id, | @@ -92,7 +92,7 @@ layer("038_039_OrchestrationV2", (it) => { | 92 | 92 | ) | 93 | 93 | `; | 94 | 94 |
| 95 | | - yield* runMigrations({ toMigrationInclusive: 47 }); | | 95 | + yield* runMigrations({ toMigrationInclusive: 48 }); | 96 | 96 |
| 97 | 97 | const bindings = yield* sql<{ | 98 | 98 | readonly provider_session_id: string; | @@ -110,10 +110,10 @@ layer("038_039_OrchestrationV2", (it) => { | 110 | 110 | }), | 111 | 111 | ); | 112 | 112 |
| 113 | | - it.effect("preserves turn items with colliding ordinals in migration 046", () => | | 113 | + it.effect("preserves turn items with colliding ordinals in migration 047", () => | 114 | 114 | Effect.gen(function* () { | 115 | 115 | const sql = yield* SqlClient.SqlClient; | 116 | | - yield* runMigrations({ toMigrationInclusive: 45 }); | | 116 | + yield* runMigrations({ toMigrationInclusive: 46 }); | 117 | 117 | yield* sql` | 118 | 118 | INSERT INTO orchestration_v2_projection_runs ( | 119 | 119 | run_id, | @@ -150,7 +150,7 @@ layer("038_039_OrchestrationV2", (it) => { | 150 | 150 | ('turn-item:d', 'thread:two', NULL, 42, 'assistant_message', 'completed', '2026-01-01T00:00:00.000Z', '{}') | 151 | 151 | `; | 152 | 152 |
| 153 | | - yield* runMigrations({ toMigrationInclusive: 46 }); | | 153 | + yield* runMigrations({ toMigrationInclusive: 47 }); | 154 | 154 |
| 155 | 155 | const positions = yield* sql<{ | 156 | 156 | readonly thread_id: string; | @@ -182,15 +182,15 @@ it.effect("upgrades a database already at released main migration 043", () => | 182 | 182 | assert.ok(snoozeColumns.some((column) => column.name === "snoozed_until")); | 183 | 183 | assert.ok(snoozeColumns.some((column) => column.name === "snoozed_at")); | 184 | 184 |
| 185 | | - yield* runMigrations({ toMigrationInclusive: 52 }); | | 185 | + yield* runMigrations({ toMigrationInclusive: 53 }); | 186 | 186 |
| 187 | 187 | const migrations = yield* sql<{ | 188 | 188 | readonly migration_id: number; | 189 | 189 | readonly name: string; | 190 | 190 | }>` | 191 | 191 | SELECT migration_id, name | 192 | 192 | FROM effect_sql_migrations | 193 | | - WHERE migration_id BETWEEN 39 AND 52 | | 193 | + WHERE migration_id BETWEEN 39 AND 53 | 194 | 194 | ORDER BY migration_id | 195 | 195 | `; | 196 | 196 | assert.deepStrictEqual( | @@ -201,15 +201,16 @@ it.effect("upgrades a database already at released main migration 043", () => | 201 | 201 | [41, "AuthSessionClientConnection"], | 202 | 202 | [42, "ProjectionThreadLinkedPullRequest"], | 203 | 203 | [43, "ProjectionThreadsUnsettledAt"], | 204 | | - [44, "OrchestrationV2"], | 205 | | - [45, "OrchestrationV2Subagents"], | 206 | | - [46, "OrchestrationV2Foundation"], | 207 | | - [47, "OrchestrationV2ProviderSessionBindings"], | 208 | | - [48, "OrchestrationV2ThreadLaunchWorkflows"], | 209 | | - [49, "ApplicationEventSource"], | 210 | | - [50, "OrchestrationV2EffectCancellation"], | 211 | | - [51, "ScheduledTasks"], | 212 | | - [52, "LegacyV1ImportState"], | | 204 | + [44, "ClearAutomaticProjectModelDefaults"], | | 205 | + [45, "OrchestrationV2"], | | 206 | + [46, "OrchestrationV2Subagents"], | | 207 | + [47, "OrchestrationV2Foundation"], | | 208 | + [48, "OrchestrationV2ProviderSessionBindings"], | | 209 | + [49, "OrchestrationV2ThreadLaunchWorkflows"], | | 210 | + [50, "ApplicationEventSource"], | | 211 | + [51, "OrchestrationV2EffectCancellation"], | | 212 | + [52, "ScheduledTasks"], | | 213 | + [53, "LegacyV1ImportState"], | 213 | 214 | ], | 214 | 215 | ); | 215 | 216 |
| |
Collapse file Copy file name to clipboard File renamed without changes.
|