From adc80f9be9708eab460771ad667ab06a0d538b06 Mon Sep 17 00:00:00 2001 From: Henry Chu Date: Thu, 29 Oct 2026 13:18:06 -0400 Subject: [PATCH] Fix the Fable 5.1 review findings for the 6d450a4284 sync Runtime modes: - Claude and Codex report only the safe modes until their probe reads the workspace policy, so a run recovered at helper start cannot get a mode the policy disables. - When no offered mode is at or below the selected one, RuntimePolicy runs the narrowest offered mode, as the composer shows, instead of approval-required. - ComposerFooterControls drops a stale Coder: comment. Sync tooling: sync-resolve-deleted.mjs and sync.md no longer list the carried assets/ modules and http.ts asset route as deleted; comments name everything auth/ and components/preview/ keep. Bookkeeping: Coder: markers and coder-only.md entries for unmarked cuts (lastErrorCode, metrics, guest share menu items, desktop theme, add-to-machine, forge sign-in, feedback upload, pullRequests routing tests); coder-only.md corrects the legacy-sidebar and large-paste lines. Docs: composer.md drops the removed collapse-on-scroll composer and describes large pastes as text-file attachments; keybindings.md covers mod+Alt+Enter in existing threads. Co-Authored-By: Claude Opus 5.5 --- .../src/orchestration-v2/ProjectionStore.ts | 1 + .../src/orchestration-v2/RuntimePolicy.ts | 23 +++++++--- apps/server/src/provider/ClaudeProvider.ts | 4 +- apps/server/src/provider/CodexProvider.ts | 3 ++ .../scheduledTasks/ScheduledTaskService.ts | 1 + apps/server/src/secrets/SecretRequests.ts | 1 + .../web/src/components/BranchToolbar.logic.ts | 1 + apps/web/src/components/Sidebar.tsx | 1 + .../chat/ComposerFooterControls.tsx | 1 - .../src/components/threadActionMenu.logic.ts | 1 + apps/web/src/contextMenuFallback.ts | 1 + apps/web/src/hooks/useThreadActionMenu.ts | 1 + apps/web/src/state/sourceControlActions.ts | 1 + apps/web/src/themePalette.ts | 1 + docs/internals/coder-only.md | 42 +++++++++++++------ docs/internals/sync.md | 5 ++- docs/user/composer.md | 18 ++++---- docs/user/keybindings.md | 11 ++--- .../src/state/pullRequests.test.ts | 2 + .../src/state/threadCommands.ts | 1 + scripts/sync-resolve-deleted.mjs | 14 ++++--- 21 files changed, 89 insertions(+), 45 deletions(-) diff --git a/apps/server/src/orchestration-v2/ProjectionStore.ts b/apps/server/src/orchestration-v2/ProjectionStore.ts index b1a2307da5295..dc3c8b119cdef 100644 --- a/apps/server/src/orchestration-v2/ProjectionStore.ts +++ b/apps/server/src/orchestration-v2/ProjectionStore.ts @@ -1610,6 +1610,7 @@ type ShellThreadState = { readonly activityRunStartedAt: DateTime.Utc | null; readonly lastError: string | null; readonly lastErrorClass: OrchestrationV2ThreadShell["lastErrorClass"]; + // Coder: no `lastErrorCode` (#23361's managed-Codex error codes are not carried). readonly usageLimitResetAt: OrchestrationV2ThreadShell["usageLimitResetAt"]; readonly pendingRuntimeRequest: OrchestrationV2PendingRuntimeRequestSummary | null; readonly latestUserMessageAt: DateTime.Utc | null; diff --git a/apps/server/src/orchestration-v2/RuntimePolicy.ts b/apps/server/src/orchestration-v2/RuntimePolicy.ts index 827c16f55ca6c..5667d8396e20d 100644 --- a/apps/server/src/orchestration-v2/RuntimePolicy.ts +++ b/apps/server/src/orchestration-v2/RuntimePolicy.ts @@ -62,8 +62,8 @@ export const layer: Layer.Layer = Layer.succeed(RuntimePolicyV2 }); // Coder: a mode the provider does not offer (a workspace policy can disable modes) steps down to -// the broadest offered mode below it, as `delegatedTaskModes.resolveRuntimeMode` does, instead of -// upstream's approval-required. +// the broadest offered mode below it, as `delegatedTaskModes.resolveRuntimeMode` does, or else +// runs in the narrowest offered mode, as the composer shows; upstream runs approval-required. function providerRuntimeMode( runtimeMode: RuntimeMode, supportedRuntimeModes: ReadonlyArray | undefined, @@ -72,10 +72,21 @@ function providerRuntimeMode( supportedRuntimeModes.length === 0 || supportedRuntimeModes.includes(runtimeMode) ? runtimeMode - : (supportedRuntimeModes - .filter((mode) => runtimeModeRank(mode) <= runtimeModeRank(runtimeMode)) - .toSorted((left, right) => runtimeModeRank(right) - runtimeModeRank(left))[0] ?? - "approval-required"); + : stepDownRuntimeMode(runtimeMode, supportedRuntimeModes); +} + +function stepDownRuntimeMode( + runtimeMode: RuntimeMode, + supportedRuntimeModes: ReadonlyArray, +): RuntimeMode { + const ranked = supportedRuntimeModes.toSorted( + (left, right) => runtimeModeRank(left) - runtimeModeRank(right), + ); + return ( + ranked.findLast((mode) => runtimeModeRank(mode) <= runtimeModeRank(runtimeMode)) ?? + ranked[0] ?? + "approval-required" + ); } export const layerFromProjectStore: Layer.Layer< diff --git a/apps/server/src/provider/ClaudeProvider.ts b/apps/server/src/provider/ClaudeProvider.ts index c28716e8a2538..264a0d8eaa000 100644 --- a/apps/server/src/provider/ClaudeProvider.ts +++ b/apps/server/src/provider/ClaudeProvider.ts @@ -53,7 +53,7 @@ import { resolveClaudeModelsForVersion, resolveClaudeUpdateRequiredModels, } from "./ClaudeModelCatalog.ts"; -import { buildSupportedRuntimeModes } from "./runtimeModeCapabilities.ts"; +import { buildSupportedRuntimeModes, SAFE_RUNTIME_MODES } from "./runtimeModeCapabilities.ts"; const DEFAULT_CLAUDE_MODEL_CAPABILITIES: ModelCapabilities = createModelCapabilities({ optionDescriptors: [], @@ -63,6 +63,8 @@ const CLAUDE_PRESENTATION = { displayName: "Claude", showInteractionModeToggle: true, reportsContextWindow: true, + // Coder: only the safe modes until the probe reads the workspace's runtime-mode policy. + supportedRuntimeModes: SAFE_RUNTIME_MODES, } as const; function toTitleCaseWords(value: string): string { const parts: Array = []; diff --git a/apps/server/src/provider/CodexProvider.ts b/apps/server/src/provider/CodexProvider.ts index 2ca4bbeb97dd7..a170a6c8e695e 100644 --- a/apps/server/src/provider/CodexProvider.ts +++ b/apps/server/src/provider/CodexProvider.ts @@ -41,6 +41,7 @@ import { decodeCodexRuntimeRequirementsResponse, resolveCodexSupportedRuntimeModes, } from "./CodexRuntimeModes.ts"; +import { SAFE_RUNTIME_MODES } from "./runtimeModeCapabilities.ts"; import { buildServerProvider, COMPACT_SLASH_COMMAND, @@ -85,6 +86,8 @@ const CODEX_PRESENTATION = { displayName: "Codex", showInteractionModeToggle: true, reportsContextWindow: true, + // Coder: only the safe modes until the probe reads the workspace's runtime-mode policy. + supportedRuntimeModes: SAFE_RUNTIME_MODES, } as const; export interface CodexAppServerProviderSnapshot { diff --git a/apps/server/src/scheduledTasks/ScheduledTaskService.ts b/apps/server/src/scheduledTasks/ScheduledTaskService.ts index 9ca18a8473c60..0ccd233879e44 100644 --- a/apps/server/src/scheduledTasks/ScheduledTaskService.ts +++ b/apps/server/src/scheduledTasks/ScheduledTaskService.ts @@ -1610,6 +1610,7 @@ export const layer = Layer.effect( deliveryId: string, prompt: string, ) { + // Coder: webhook metrics are not carried; outcomes and delays stay span annotations only. const runOutcome = (outcome: "started" | "skipped" | "failed") => Effect.annotateCurrentSpan({ "scheduled_task.webhook.run_outcome": outcome }); const dispatched = yield* Ref.make(false); diff --git a/apps/server/src/secrets/SecretRequests.ts b/apps/server/src/secrets/SecretRequests.ts index 0a1123152bf8c..e1fb4901cbdb5 100644 --- a/apps/server/src/secrets/SecretRequests.ts +++ b/apps/server/src/secrets/SecretRequests.ts @@ -185,6 +185,7 @@ const make = Effect.gen(function* () { // Serialize get/remove so concurrent consumers cannot read the same one-use ref. const consumeLock = yield* Semaphore.make(1); + // Coder: no `secretRefsConsumedTotal` metric. const consume: SecretRequests["Service"]["consume"] = (input) => consumeRef(input).pipe(consumeLock.withPermits(1), Effect.withSpan("SecretRequests.consume")); diff --git a/apps/web/src/components/BranchToolbar.logic.ts b/apps/web/src/components/BranchToolbar.logic.ts index 4393604fe16d4..1ebb161ae87cf 100644 --- a/apps/web/src/components/BranchToolbar.logic.ts +++ b/apps/web/src/components/BranchToolbar.logic.ts @@ -18,6 +18,7 @@ export interface EnvironmentOption { machine: EnvironmentMachineKind; } +// Coder: no "Add to another machine" (#22180), so no `ADD_TO_MACHINE_LABEL_CLASS`. export const EnvMode = Schema.Literals(["local", "worktree"]); export type EnvMode = typeof EnvMode.Type; diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 7c38d263b1915..519b41caa2028 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -2557,6 +2557,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve canSnoozeNow: canSnooze(thread, { now: new Date().toISOString() }), isRegeneratingTitle, isRunning: !threadRuntimeCanArchive(thread.runtime), + // Coder: no guest sharing, so no "Share with guest" item. canTurnIntoProject: canTurnThreadIntoProject(threadRef), supports: { settlement: configLoaded, diff --git a/apps/web/src/components/chat/ComposerFooterControls.tsx b/apps/web/src/components/chat/ComposerFooterControls.tsx index 3d3efb30d7231..46de66194dd0d 100644 --- a/apps/web/src/components/chat/ComposerFooterControls.tsx +++ b/apps/web/src/components/chat/ComposerFooterControls.tsx @@ -30,7 +30,6 @@ export const ComposerFooterModeControls = memo(function ComposerFooterModeContro showInteractionModeToggle: boolean; interactionMode: ProviderInteractionMode; runtimeMode: RuntimeMode; - /** Coder: only safe modes are offered until the provider is ready. */ runtimeModeOptions: ReadonlyArray; size?: "sm" | "xs"; hidden?: boolean; diff --git a/apps/web/src/components/threadActionMenu.logic.ts b/apps/web/src/components/threadActionMenu.logic.ts index 339420b92e877..533406a745dd2 100644 --- a/apps/web/src/components/threadActionMenu.logic.ts +++ b/apps/web/src/components/threadActionMenu.logic.ts @@ -1,3 +1,4 @@ +// Coder: the browser-only context menu type; no guest sharing, so no "share-guest" action. import type { ContextMenuItem } from "../localApiTypes"; import type { SnoozePreset } from "@t3tools/client-runtime/state/thread-settled"; diff --git a/apps/web/src/contextMenuFallback.ts b/apps/web/src/contextMenuFallback.ts index e19efe5345c58..45cb931f0d58d 100644 --- a/apps/web/src/contextMenuFallback.ts +++ b/apps/web/src/contextMenuFallback.ts @@ -1,3 +1,4 @@ +// Coder: the browser-only context menu type; no "user-plus" icon, since guest sharing is cut. import type { ContextMenuItem } from "./localApiTypes"; const SVG_NS = "http://www.w3.org/2000/svg"; diff --git a/apps/web/src/hooks/useThreadActionMenu.ts b/apps/web/src/hooks/useThreadActionMenu.ts index 5336b07b4f67f..e81697d572524 100644 --- a/apps/web/src/hooks/useThreadActionMenu.ts +++ b/apps/web/src/hooks/useThreadActionMenu.ts @@ -60,6 +60,7 @@ export function useThreadActionMenu(input: { readonly threadRef: ScopedThreadRef | null; readonly projectCwd: string | null; readonly onStartRename: () => void; + // Coder: no guest sharing, so no `canShareWithGuest` input or "share-guest" action. }) { const { threadRef, projectCwd, onStartRename } = input; const router = useRouter(); diff --git a/apps/web/src/state/sourceControlActions.ts b/apps/web/src/state/sourceControlActions.ts index c35f2ffbca17d..1a79c79ba3bcd 100644 --- a/apps/web/src/state/sourceControlActions.ts +++ b/apps/web/src/state/sourceControlActions.ts @@ -285,6 +285,7 @@ export function useSourceControlPublishRepositoryAction(scope: SourceControlActi ), ); } + // Coder: no forge app sign-in (#26245), so publishing suggests no app access. return publishRepository({ environmentId: target.environmentId, input: { diff --git a/apps/web/src/themePalette.ts b/apps/web/src/themePalette.ts index 1c538f53e3c63..49d9abfbca136 100644 --- a/apps/web/src/themePalette.ts +++ b/apps/web/src/themePalette.ts @@ -1658,6 +1658,7 @@ export function resolveThemeAppearance( return getThemePreferenceMode(theme) ?? "light"; } +// Coder: no `resolveDesktopTheme`; the desktop app is not carried. export function isKnownThemePreference(theme: string): boolean { if (theme === "light" || theme === "dark" || theme === "system") return true; return getThemeDefinition(theme) !== null; diff --git a/docs/internals/coder-only.md b/docs/internals/coder-only.md index ff8118f856efd..bff3ad47647ab 100644 --- a/docs/internals/coder-only.md +++ b/docs/internals/coder-only.md @@ -484,7 +484,8 @@ listed here is drift to remove rather than fork behavior to keep. browser. `WorkspaceEntries` has no `listIgnoredFiles`, `ws.ts` serves no `projects.listIgnoredFiles` (`ignoredFileListing` is in `CODER_OMITTED_CAPABILITIES`), client-runtime's `projectCommands.ts` has no matching command, `BranchToolbar.tsx` has no - menu entry, and `ChatView.tsx` shows no file-copy banner or send block. + menu entry (`BranchToolbar.logic.ts` has no `ADD_TO_MACHINE_LABEL_CLASS`), and `ChatView.tsx` + shows no file-copy banner or send block. - Coder-only methods live in `coderWs.ts` (`CODER_WS_METHODS`): local ref status, managed branch/worktree rename with `moveWorktree`, chunked review files, the gateway's asset stream (`coder.serveAsset`), fixed project-config reads, merge-request diffs, and upstream's HTTP bounded thread snapshot, @@ -502,7 +503,9 @@ listed here is drift to remove rather than fork behavior to keep. - Guest thread sharing (#24104) is not carried: guests reach a share over upstream's server HTTP routes and T3 Connect, neither of which exists here. `apps/server/src/guest/**`, its HTTP route, the share RPC handler, web `components/guest/**`, `routes/guest.tsx`, `guestPage.ts`, - the share controls, menu and palette entries, the guest-message footer and bubbles + the share controls, menu and palette entries (the "share-guest" thread action in + `threadActionMenu.logic.ts`, `useThreadActionMenu.ts`, `Sidebar.tsx`, and its `user-plus` icon + in `contextMenuFallback.ts`), the guest-message footer and bubbles (`ChatView.tsx`'s timeline footer, `TimelineUserMessageRow.tsx`, and `QueuedRunsControl.tsx`, which has no guest names or per-item `editable` flag), the sidebar's guest-request pill and badge (`Sidebar.logic.ts`, `SidebarThreadRow.tsx`), Labs' Beta section with its guest-links row @@ -603,7 +606,9 @@ listed here is drift to remove rather than fork behavior to keep. `coderServer.ts` provides `DocumentText.layer` at the bottom of the runtime services, where upstream's `layerPlatformServices` provides it; `ProviderHostLive` carries upstream's `resolveExtractedTextPath`. - - `Orchestrator.ts` and `ProjectService.ts` have no `withCommandMetrics` wrapper (#23966), and + - `Orchestrator.ts` and `ProjectService.ts` have no `withCommandMetrics` wrapper (#23966), + `ScheduledTaskService.ts` records no webhook metrics, `SecretRequests.ts` counts no consumed + secret refs, and `RunExecutionService.ts` reports no browser-preview agent activity (`PreviewAgentActivity`, #25184), since metrics and the browser preview are not carried. - A thread dropped on the composer from another workspace attaches upstream's saved transcript @@ -809,8 +814,8 @@ listed here is drift to remove rather than fork behavior to keep. `CodexManagedTokenBroker` (which renews the managed runtime's ChatGPT sign-in token, #21786/#21787) and the `__managed-chatgpt-token` CLI entry are not carried. `CodexAdapterV2` does not rewrite failures through `CodexManagedErrors` (ChatGPT Business admin request, #23361), and - the server's `threadErrorSummary` and client-runtime's `ThreadRuntimeSummary` carry no - `lastErrorCode`; the contract field stays. + the server's `threadErrorSummary`, `ProjectionStore.ts`'s shell state, and client-runtime's + `ThreadRuntimeSummary` carry no `lastErrorCode`; the contract field stays. - Provider drivers, snapshots, and the registry are upstream's. Coder deltas: `CodexDriver` offers no T3-managed Codex install (`setupMode: "managed"`), neither driver redeems rate-limit reset credits, and `ClaudeDriver` does not read the Claude organization id that @@ -820,7 +825,9 @@ listed here is drift to remove rather than fork behavior to keep. upstream's provider-level `supportedRuntimeModes` from workspace policy: Claude's effective `disableAutoMode`/`disableBypassPermissionsMode` settings (read through `ClaudeCli`, failing closed to the safe modes) and Codex's `configRequirements/read`, which runs in upstream's - parallel probe step (safe modes when it cannot be read). At session start, + parallel probe step (safe modes when it cannot be read); before the first probe finishes, + both report the safe modes. The fork-only `provider/runtimeModeCapabilities.ts` builds the + mode lists and `provider/CodexRuntimeModes.ts` maps Codex's requirements. At session start, `ClaudeAdapterV2.resolveBypassAvailability` reads the settings files (cached remote, user, project, local, and managed) where upstream calls the SDK's runtime `resolveSettings` (#21806); a mode any source disables is off, so `Drivers/ClaudeSkills.ts` keeps @@ -836,7 +843,8 @@ listed here is drift to remove rather than fork behavior to keep. - Absent: client-origin attribution, orchestration and provider metrics (including the run outcome metrics of `RunMetrics.ts`, #22094, so `EventSink.ts` records none), turn analytics, NDJSON event logs (`EventNdjsonLogger` and `ProviderEventLoggers` keep only the no-op service), - provider sign-in commands and credential-change guards, Codex feedback upload, SnapShot + provider sign-in commands and credential-change guards, Codex feedback upload (client-runtime + `threadCommands.ts` has no `uploadFeedback`), SnapShot sources, data-URL uploads, preview-tool metadata, and the agent device shim. - **Authorization scopes.** Coder owns authentication, so upstream's per-session scopes always grant: web `useEnvironmentScope`, `readEnvironmentScope`, and `useFilesystemReadAccess` @@ -948,7 +956,8 @@ listed here is drift to remove rather than fork behavior to keep. - **Composer, timeline, and work log.** Upstream's context records, upload queue, chips, and work-log module (`client-runtime/work-log/toolPresentation.ts`), minus preview annotations, element captures, SnapShot (with its open question-draft tracker in `questionAttachments.ts`), - upstream's large-paste-to-file folding, and remote icons. `work-log/presentation.ts` formats + and remote icons. Upstream's large-paste folding (#11442) is carried: a paste at or over the + limit becomes a `text/plain` file attachment (`useComposerAttachmentIntake.ts`). `work-log/presentation.ts` formats token counts inline, since upstream's `@t3tools/shared/usageFormat` belongs to the omitted usage dashboard. Draft file and video attachments preview as on main. A context fragment pasted from another workspace downloads its attachments from the @@ -989,7 +998,7 @@ listed here is drift to remove rather than fork behavior to keep. reporting, favorite-editor command (OpenInPicker is not carried), or desktop paste-as-text. The keybindings reload toast (`KeybindingsUpdateToast.tsx`) shows the reload's message without upstream's config-warning actions, which open the desktop editor. `shortcuts/chatRouteCommands.ts` - has no preview commands or legacy-sidebar check, `state/entities.ts` keeps only + has no preview commands (its legacy-sidebar check is upstream's), `state/entities.ts` keeps only `initializeActiveEnvironmentId` (the first welcome sets the primary), and client-runtime's `state/presentation.ts` shows an available placeholder as connecting without upstream's `entry.enabled` and `unsupportedReason`, which Coder entries lack. The "failed to start" screen @@ -1157,7 +1166,8 @@ listed here is drift to remove rather than fork behavior to keep. field, and the `sourceControl.signIn*` and `sourceControl.appAccess` RPCs in upstream's dormant `WsRpcGroup` only; `CoderWsRpcGroup` omits them. In the clients, web `SourceControlAppAccessNotice.tsx`, `T3AppIcon.tsx`, `settings/SourceControlAppSignInSettings.tsx` - and `sourceControlAppAccessToast.ts` are cut, and client-runtime `state/sourceControl.ts` and + and `sourceControlAppAccessToast.ts` are cut (`state/sourceControlActions.ts` suggests no app + access after publishing), and client-runtime `state/sourceControl.ts` and `sourceControlClients.ts` have no app-access or sign-in atoms and no `appSignInTargetForRemote`. - GitLab's definition (`source-control-gitlab/src/shared/definition.ts`) has three deltas: `isChangeRequestReference` accepts a merge request URL on any HTTP(S) host, because @@ -1327,8 +1337,10 @@ listed here is drift to remove rather than fork behavior to keep. `state/shell.ts` treats every workspace as remote (no primary local target). - `lib/runtime.ts` has no primary-environment HTTP client, relay, DPoP, or tracer, and `branding.ts` fixes the "T3 Coder" name without a desktop bridge or hosted channel. - - Upstream's desktop IPC contract (`contracts/ipc.ts`) is not carried; `localApiTypes.ts` keeps - its context-menu and confirm-dialog types, and `localApi.ts` opens only HTTP(S) links. + - Upstream's desktop IPC contract (`contracts/ipc.ts`) is not carried, nor `themePalette.ts`'s + desktop-only `resolveDesktopTheme`; `localApiTypes.ts` keeps + its context-menu and confirm-dialog types (web modules that import `ContextMenuItem` from + `contracts` upstream import it from there), and `localApi.ts` opens only HTTP(S) links. `ThreadNotificationCoordinator.tsx` focuses the tab on a notification click without upstream's desktop window reveal. - client-runtime `errors/diagnostics.ts` is the `[t3-error]` DevTools reporting described in @@ -1429,10 +1441,14 @@ listed here is drift to remove rather than fork behavior to keep. `storageCleanup.test.ts` its saved-usage-cache test, and `PullRequestService.test.ts` its GitHub-credential branch deletion, GitHub Enterprise listing, Bitbucket paging, routing, Forgejo, replacement-read retry, Azure environment viewed-file, and repository-identity - resolution tests; upstream's OTLP `config.test.ts` is not carried. + resolution tests; client-runtime's `pullRequests.test.ts` uses one connection target without + upstream's cross-environment routing tests (shared probes, alternates, routed viewed marks and + writes); upstream's OTLP `config.test.ts` is not carried. `presentation.test.ts` omits upstream's disabled and unsupported connection tests, since Coder catalog entries have neither state. `GitManager.test.ts`'s pull request draft-status test and `SourceControlRepositoryService.test.ts`'s HTTPS clone-retry tests run on GitLab. + The fork-only `hooks/useThreadActionMenu.test.tsx` keeps upstream's deleted hook test beside + upstream's `useThreadActionMenu.test.ts`. Replay fixtures (`orchestration-v2/testkit/fixtures`) carry only the Claude, Codex, Pi, and ACP Registry providers; `ProviderReplayFixtures.ts` lists only those drivers. client-runtime's `threadShell.test.ts` omits upstream's switched-off environment test, because diff --git a/docs/internals/sync.md b/docs/internals/sync.md index cff4dff67586f..7821e778e5326 100644 --- a/docs/internals/sync.md +++ b/docs/internals/sync.md @@ -168,7 +168,8 @@ mobile's `microphonePriority.ts` into `packages/shared`) arrives as an added fil - Auth and pairing (`apps/server/src/auth`, web `components/auth`, client-runtime `authorization`). - Preview and browser (`apps/server/src/preview`, web `browser`, `components/preview`). - Device (`apps/server/src/device`, web `components/device`, client-runtime `device`). -- HTTP routes and assets (`apps/server/src/assets`, `http.ts` route files). +- HTTP routes (`http.ts` route files other than the server's signed asset route in + `apps/server/src/http.ts`, and the uncarried `assets/` modules). - Forgejo, GitHub, Azure DevOps, Bitbucket, and GitCafe (`packages/source-control-*` except core, gitlab, and testing). - Other provider packages (`packages/provider-{cursor,fx,grok,muse,opencode}`, @@ -200,7 +201,7 @@ git -c diff.renameLimit=0 diff --no-renames --name-status "$MB" origin/coder-onl ## 4. Conflict magnets - `apps/server/src/server.ts`: upstream's file minus the cut surfaces. Upstream's edits to the - carried declarations merge; keep their three `Coder:` changes and the export block. Conflicts + carried declarations merge; keep their `Coder:` changes and the export block. Conflicts sit in regions the fork deletes (`layerMakeServer`, `layerRuntimeCoreDependencies*`, HTTP, auth, preview, and telemetry layers): keep the deletion, and port a new service or provide the helper needs into `coderServer.ts`'s matching composition (`CoderRuntimeCoreLive`, diff --git a/docs/user/composer.md b/docs/user/composer.md index 6b008c4dd75b1..c7f91053be8bf 100644 --- a/docs/user/composer.md +++ b/docs/user/composer.md @@ -4,12 +4,11 @@ Messages can contain up to 120,000 characters. If a draft is longer, T3 Coder ke composer and shows how many characters need to be removed. Shorten the draft or split it into multiple messages, then send again in the same thread. -In an existing thread, scrolling a conversation that overflows the viewport can rest the composer -into one line. Losing focus does not collapse it, and multiline drafts remain expanded. Control -scroll collapse with **Collapse composer on scroll** under **Settings → Chat**. When the thread-context strip has room, the -model and mode controls remain available beside it; otherwise they return when the composer is -focused. Focus the composer or start typing to expand it again. New-thread layouts keep the full -composer. +Pasting 32 KiB or more of text adds that fragment as a text-file attachment so +the agent can inspect it without filling the model context. A smaller paste also +becomes an attachment when inserting it would exceed the message limit. On a +hardware keyboard, use `Cmd+Shift+V` on Apple devices or `Ctrl+Shift+V` elsewhere +to keep a large paste editable in the composer instead. Pasting plain text while the conversation itself is focused moves that text into the composer. Paste remains with a terminal, menu, dialog, editor, or other interactive control when one of those @@ -97,11 +96,8 @@ confirming removal removes both the thumbnail and its references. In an existing thread, select a file mention to open the current file in **Files**. Skill chips show their descriptions; **View instructions** opens the skill file in **Files**. -Pasted plain-text fragments of at least 32,768 characters fold into a **Long text** chip. Select it to -read or edit the text. Folding keeps the full text in the prompt: it counts toward the message -limit and is sent to the provider as text. Unsent drafts and stashed prompts, including terminal -excerpts, images, and upload IDs, are kept in browser storage, as on main. Credentials are never -saved there. +Unsent drafts and stashed prompts, including terminal excerpts, images, and upload IDs, are kept +in browser storage, as on main. Credentials are never saved there. ## Images and files diff --git a/docs/user/keybindings.md b/docs/user/keybindings.md index 86e5e7a23d0c2..12117d14c9ac6 100644 --- a/docs/user/keybindings.md +++ b/docs/user/keybindings.md @@ -11,11 +11,12 @@ inserts a new line. This applies to the composer at desktop widths. **Follow-up behavior** chooses Queue or Steer while the agent runs. Use `mod+Enter` to do the opposite for one message, even when the send shortcut -requires a modifier. In a new thread, `mod+Alt+Enter` starts the thread in the -background and opens a fresh composer. Change either shortcut in -**Settings → Keybindings** under **Composer: Opposite Queue or Steer Action** or -**Composer: Start in Background**. These bindings take priority over the send -shortcut. Click the send button to use the configured follow-up behavior. +requires a modifier. `mod+Alt+Enter` sends, keeps that thread running in the +background, and opens a fresh new-thread composer. In a new thread, `mod+Enter` +does the same. Change these shortcuts in **Settings → Keybindings** under +**Composer: Opposite Queue or Steer Action**, **Composer: Start in Background**, +or **Composer: Send and Start New Thread**. These bindings take priority over the +send shortcut. Click the send button to use the configured follow-up behavior. When an active turn has queued messages, `mod+Shift+Enter` sends the first as a steer. Change it under **Queue: Send First Queued Message** in Keybindings. diff --git a/packages/client-runtime/src/state/pullRequests.test.ts b/packages/client-runtime/src/state/pullRequests.test.ts index 02927640011ed..68a4e4ad4cc44 100644 --- a/packages/client-runtime/src/state/pullRequests.test.ts +++ b/packages/client-runtime/src/state/pullRequests.test.ts @@ -34,6 +34,8 @@ import { executeAtomQuery } from "./runtime.ts"; class MutationRefused extends Data.TaggedError("MutationRefused") {} +// Coder: one connection target; upstream's cross-environment routing tests (shared probes, +// alternates, routed viewed marks and writes) are not carried with that routing. const TARGET = new ConnectionTarget({ environmentId: EnvironmentId.make("environment-1"), label: "Test environment", diff --git a/packages/client-runtime/src/state/threadCommands.ts b/packages/client-runtime/src/state/threadCommands.ts index 7a05f2259df51..869d1b5c9a3f3 100644 --- a/packages/client-runtime/src/state/threadCommands.ts +++ b/packages/client-runtime/src/state/threadCommands.ts @@ -8,6 +8,7 @@ import { type EnvironmentId, type OrchestrationV2ShellSnapshot } from "@t3tools/ import { createOptimisticThreadLifecycle } from "./threadLifecycle.ts"; import * as DateTime from "effect/DateTime"; +// Coder: no `uploadFeedback` command (Codex feedback upload is not carried). import { createAtomCommandScheduler, createEnvironmentCommand } from "./runtime.ts"; import { type InterruptThreadTurnInput, diff --git a/scripts/sync-resolve-deleted.mjs b/scripts/sync-resolve-deleted.mjs index 1cf1aa7449fd9..8505f2a97ebf6 100644 --- a/scripts/sync-resolve-deleted.mjs +++ b/scripts/sync-resolve-deleted.mjs @@ -11,7 +11,7 @@ import { execFileSync } from "node:child_process"; // `git diff --name-status origin/coder-only | grep ^D`. const DELETED_PATHS = { // Auth and pairing: Coder owns authentication; no sessions, pairing, OAuth, DPoP, or scopes. - // The server's auth/ keeps only ServerSecretStore, which a modify/delete cannot name. + // The server's auth/ keeps only ServerSecretStore and utils, which a modify/delete cannot name. "auth and pairing": [ "apps/server/src/auth/", "apps/server/src/persistence/AuthPairingLinks.ts", @@ -34,7 +34,8 @@ const DELETED_PATHS = { "packages/shared/src/oauthScope.ts", ], // Preview and browser: no in-app browser, preview panel, or headless browser automation. - // web's browser/ keeps only useOpenLink.ts and components/preview/ only the panel shell. + // web's browser/ keeps only useOpenLink.ts, and components/preview/ only the panel shell and + // its resize handle. "preview and browser": [ "apps/server/src/mcp/PreviewAutomationBroker.ts", "apps/server/src/mcp/toolkits/preview/", @@ -67,11 +68,12 @@ const DELETED_PATHS = { "packages/client-runtime/src/device/", "packages/client-runtime/src/state/device.ts", ], - // HTTP routes and assets: the helper serves stdio RPC only; no HTTP server, routes, or signed - // asset URLs. + // HTTP routes and assets: the helper serves stdio RPC; its only HTTP route is the signed asset + // route in http.ts, which assets/ backs, so both stay. No native app icons or credentialed + // source-control media. "HTTP routes and assets": [ - "apps/server/src/assets/", - "apps/server/src/http.ts", + "apps/server/src/assets/NativeAppIconResolver.ts", + "apps/server/src/assets/sourceControlMediaResponse.ts", "apps/server/src/httpCors.ts", "apps/server/src/mcp/McpHttpServer.ts", "apps/server/src/mcp/OrchestratorMcpToolkit.integration.test.ts",