Repository navigation
chore: sync with upstream/main (348f217a8) - #65
Conversation
…crashes (pingdotgg#18566) Disable WaylandWpColorManagerV1 before Electron is ready only on native Wayland Hyprland sessions running a stock 0.48.0-0.50.1 release, which advertise FEATURE_SET_PRIMARIES but reject set_primaries (hyprwm/Hyprland#9444; fixed in 0.51.0 by hyprwm/Hyprland#11499). Any probe failure or explicit feature override keeps the default. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pingdotgg#18654) Co-authored-by: T3 Code Test <t3code-test@example.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…g#18679) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…g#18608) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…page (pingdotgg#18666) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#16554) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… you to a new draft (pingdotgg#18672) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ct (pingdotgg#18824) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…stead of crash-looping (pingdotgg#15925) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: PR Batch Tester <agent@local.test>
… resync after a downgrade (pingdotgg#15937) Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: PR Batch Tester <agent@local.test>
… MCP servers (pingdotgg#17058) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…ught (pingdotgg#18887) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…ingdotgg#18878) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…is offline (pingdotgg#18698) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…18853) Co-authored-by: SAPHID <saphid@users.noreply.github.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
…s at the same time (pingdotgg#19411) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…vent loop (pingdotgg#19430) Co-authored-by: Aaron Queen <bompus@users.noreply.github.com> Co-authored-by: Daniyal <115576848+daniyal-sh@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…d silently (pingdotgg#19417) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…otgg#19429) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…pingdotgg#19432) Co-authored-by: puccez <emanuele.puccetti@icloud.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: luke2x <97411838+luke2x@users.noreply.github.com>
…keep their own history (pingdotgg#19425) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e history (pingdotgg#19423) Co-authored-by: Eldar Politkin <32969822+EldarPolitkin@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…gdotgg#19418) Co-authored-by: Tanner Sharon <tannermsharon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…text (pingdotgg#18923) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…ngdotgg#14642) Co-authored-by: maria-rcks <maria@kuuro.net>
…gdotgg#18706) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merge 157 upstream commits into the fork. - Update everything uses upstream's new targets/skipped split; fork-built servers are listed as skipped because they update from their own releases instead of being dropped silently (ADR 0011). - The scheduled task dialog keeps the fork's wrapper around the model and option pickers, which already covers upstream's no-shift fix (ADR 0016). - Mobile PR search keeps the fork's shared repository normalization beside upstream's linked-PR suggestions (ADR 0002). - Fork schedule-tool tests use upstream's test layer, which mocks the launch service and git driver that delegate_task worktree isolation needs. - Upstream's dropped-setting warning now covers the default base branch; a test pins it (ADR 0009). Delegated worktrees stay on upstream's create-a-branch behavior (ADR 0008). - Upstream's cursor-hygiene-webhook workflow stays deleted (ADR 0011). - ADRs compare against 348f217. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@fryuni-s-proval Please review this upstream sync at This is a maintainer-requested sync, not a feature PR. Its parents are fork main Review units (
|
|
My recommendation is to approve. I checked each of your review units against the head snapshot and found nothing that blocks the merge. I can't submit a formal GitHub review, so this comment is the recommendation. What I checked
Not covered
|
| const DEFAULT_BACKEND_TERMINATE_GRACE = Duration.seconds(2); | ||
| // Same as the service launcher. A killed backend leaves its agents running, | ||
| // and a busy one needs a few seconds to stop every provider session. | ||
| const DEFAULT_BACKEND_TERMINATE_GRACE = Duration.seconds(5); |
There was a problem hiding this comment.
⚫️ [PROBLEM] Quit-path stop timeout now equals the SIGKILL grace, so forced kill can be skipped
⚫ [PROBLEM] This change sets DEFAULT_BACKEND_TERMINATE_GRACE to 5s, and line 507 uses it as forceKillAfter. On quit, stopAllPoolInstances still calls instance.stop({ timeout: Duration.seconds(5) }) (apps/desktop/src/app/DesktopApp.ts:158; the same call is in apps/desktop/src/updates/DesktopUpdates.ts:763). closeRun (lines ~375-379) forks the scope close and returns once timeoutOption(timeout) expires. Before this change, SIGKILL fired at 2s, well inside the 5s budget. Now both fire at about 5s, so the app can finish shutting down before the forced kill runs.
Impact: a backend that is slow to handle SIGTERM, or ignores it, can be left orphaned after quit along with its agents. It still holds the state-dir lock, so on the next launch the server exits with SERVER_EXIT_CODE_STATE_DIR_OWNED. With this PR, that shows the "T3 home is unavailable" dialog and quits.
Fix: keep the quit-path stop timeout strictly longer than the terminate grace. The simplest way is to derive both from one exported constant so they can't drift apart.
// DesktopApp.ts / DesktopUpdates.ts
(instance) => instance.stop({ timeout: Duration.seconds(7) }), // must exceed DEFAULT_BACKEND_TERMINATE_GRACE (5s)| const connected = useWorkspaceEnvironments() | ||
| .filter((environment) => environment.connectionState === "connected") | ||
| .map((environment) => String(environment.environmentId)) | ||
| .join("\n"); | ||
| const fallback = useMemo( | ||
| () => pullRequestFallbackEnvironment(params, projects, new Set(connected.split("\n"))), | ||
| [params, projects, connected], | ||
| ); | ||
| useEffect(() => { | ||
| if (fallback) navigation.setParams(fallback); | ||
| }, [fallback, navigation]); |
There was a problem hiding this comment.
⚫️ [PROBLEM] PR route permanently switches environments during transient connecting/reconnecting
⚫ [PROBLEM] Any environment whose connectionState !== "connected" counts as down here, and that includes the brief connecting/reconnecting phases. On a cold start, when the app returns from the background, or during a short network blip, another environment with the same repo can reach connected first. The effect then calls navigation.setParams(fallback) and rewrites environmentId/projectId. Nothing ever switches it back. Review drafts are keyed by environmentId and projectId (pullRequestReviewKey, pullRequestReviewDrafts.ts:17-25), so an in-progress review seems to disappear, and later actions go to a different machine than the one the user opened.
Fix: fall back only when the original environment is definitely unreachable (offline/error/unsupported, or after a grace period). Also consider carrying drafts over when the route changes. Could be wrong if useWorkspaceEnvironments never reports transitional phases for already-known environments.
const UNREACHABLE = new Set(["offline", "error", "unsupported"]);
const environments = useWorkspaceEnvironments();
const ownDown = environments.some(
(e) => String(e.environmentId) === params.environmentId && UNREACHABLE.has(e.connectionState),
);
// only compute/apply the fallback when ownDown is true| const legacyOwnerIsLive = Effect.fn("legacyOwnerIsLive")(function* ( | ||
| state: PersistedServerRuntimeState, | ||
| ) { | ||
| if (!isProcessAlive(state.pid)) return false; |
There was a problem hiding this comment.
⚫️ [PROBLEM] Legacy record naming this process's own PID can block startup when the start-time probe fails
⚫ [PROBLEM] legacyOwnerIsLive never checks state.pid === process.pid. A record from a crashed pre-lock server that names our own PID is always "alive". That's common in containers, where the server is often PID 1. Telling it apart then depends entirely on ps -p … -o lstart= or PowerShell, and any probe failure returns true (line 79). Examples: ps is missing in slim/distroless images, BusyBox ps doesn't support these flags, or PowerShell takes more than 2s to start cold.
Impact: the server refuses to start with exit 78 even though no other server exists. The supervisors treat 78 as final and stop retrying, and the user is told to stop a server that doesn't exist.
Fix: a record that names the current process can't be another live owner, so short-circuit before running the external probe.
// oxlint-disable-next-line t3code/no-global-process-runtime
if (state.pid === process.pid || !isProcessAlive(state.pid)) return false;| if ( | ||
| state.notAppliedVersion !== undefined && | ||
| (state.downloadedVersion ?? state.availableVersion) === state.notAppliedVersion | ||
| ) { | ||
| return { | ||
| action: "done", | ||
| outcome: "failed", | ||
| reason: `Update ${state.notAppliedVersion} did not apply on this machine. Retry it from the desktop app there.`, | ||
| }; | ||
| } |
There was a problem hiding this comment.
⚫️ [PROBLEM] Not-applied guard fires during checking/error states and blocks newer updates
⚫ [PROBLEM] This guard compares (state.downloadedVersion ?? state.availableVersion) with notAppliedVersion but never looks at state.status. The check-start and check-failure reducers in updateMachine.ts keep availableVersion. So if a remote run arrives while the poller is checking, or after a check error, and the last-seen version is the one that didn't apply, the run ends right away as failed. It doesn't wait for the in-flight check, which could find a newer release, and it doesn't re-check. The web tooltip (desktopUpdate.logic.ts ~74-77) already limits the same predicate to available/downloaded.
Impact: a server-triggered update can report "did not apply" and skip a newer release the machine could have installed.
Fix: block only when the stale version would actually be acted on, and let checking/downloading/error fall through to the existing branches.
const blockedVersion = isInstallableDesktopUpdateState(state)
? state.downloadedVersion
: state.status === "available"
? state.availableVersion
: null;
if (state.notAppliedVersion !== undefined && blockedVersion === state.notAppliedVersion) {
return {
action: "done",
outcome: "failed",
reason: `Update ${state.notAppliedVersion} did not apply on this machine. Retry it from the desktop app there.`,
};
}|
Thanks for this one. It's a big change that spans server, desktop, mobile and web, and most of it is careful work with solid tests behind it. OverviewSummary
The main risks are in the new lifecycle edges: quit timing, remote update gating, and PR route fallback. They're covered below. Good points Main Issues⚫️ Additional Notes
|
Problem
The fork is 157 commits behind
upstream/main. This sync has to keep the features recorded indocs/adrwhile using upstream's implementations wherever it can.Change
Merged
pingdotgg/t3codemain at348f217a853dd4a23d7fa4834dedb05f545c2075into the fork. None of the 157 commits implement a fork feature, so every ADR stays accepted. Four files conflicted; the rest merged cleanly.{ targets, skipped }and names every skipped machine in the confirmation. Fork-built servers go intoskippedwith "updates from its own releases" instead of being dropped silently. They are still never targeted.divso the dialog stops shifting (fix(web): scheduled task model picker no longer shifts the dialog pingdotgg/t3code#18940). The fork's wrapper around the model and option pickers already provides this, so the fork's side stays.normalizeSourceControlRepositorycomparisons beside upstream's new linked-PR suggestions.useSidebarProjectGroupsand the fork's project-PR-list hook (ADR 0014).delegate_taskisolation (feat(server): run delegated tasks in separate worktrees pingdotgg/t3code#19102) builds its own strategy withoutcreateBranch/startFromRemote, so delegated worktrees stay on upstream behavior. The fork's schedule-tool tests now use upstream's test layer, which mocks the launch service and git driver that isolation added.cursor-hygiene-webhook.ymlare not taken; the workflow stays deleted.348f217a8and record each adaptation.Verification
T3CODE_TELEMETRY_ENABLEDis unset. CI is the source of truth for these.server-linux-release.ymlstill setsT3CODE_RELEASE_REPOSITORY, andapps/server/vite.config.tsstill turns it into the release define.Model: Claude Opus 5.5; harness: Claude Code in T3 Code.
🤖 Generated with Claude Code