GeezerVison is showing github.com — chore: sync with upstream/main (cc61cdb1e) by Fryuni · Pull Request #98 · Fryuni/t3code
Conversation
Problem
The fork is 795 commits behind upstream/main. This sync keeps the features recorded in docs/adr, using upstream's implementation wherever it can.
Change
Merges pingdotgg/t3code main at cc61cdb1e. 69 files had conflicts. git show --remerge-diff HEAD shows the whole resolution.
Workflows (ADR 0011). 22 conflicts were upstream edits to workflows the fork deletes; they stay deleted. New upstream-only files are dropped too: mobile-eas-preview-build.yml, mobile-eas-production-build.yml, set-release-version.cjs, set-mobile-version.cjs, and workflow-credentials.test.cjs, which only checks upstream's release and preview workflows. ci.yml keeps the fork's layout. setup-ci-deps takes upstream's split restore/save of the Vite+ cache.
Implemented upstream (fork code dropped, upstream's kept)
Conflicts with new upstream behavior
- ADR 0016 / fix(server): only a full-access MCP caller can pick an agent's own mode pingdotgg/t3code#39489. Upstream refuses a target that picks the agent's own mode below Full access, and reads that from the parent thread. The fork's resolver has no parent, so it now takes
callerRuntimeMode: the parent thread's for delegation, and the caller's limits for schedule_task and its update. A mode counts as held when the inherited selection already has it. A new test covers the schedule path and fails without the change. The MCP tool list measures 63,134 bytes: upstream's 62,140 plus the fork's 994.
- ADR 0010 / fix(server): the background service prints how to pair instead of pairing details pingdotgg/t3code#43052. Upstream split headless startup output for the background service. The public URL now goes into the shared
resolveServeConnectionString, so both outputs advertise it. The fork's startup test runs through headlessServeOutput.
- ADR 0002 and 0020 / fix(server): Azure DevOps PRs read by number get their full URL pingdotgg/t3code#41472. The PR target resolver keeps the clone-host mapping and takes upstream's Azure bare-name lookup. It folds the repository with
normalizeSourceControlRepository instead of lower-casing it, and builds URLs from webUrl.
- ADR 0008 / fix(web): a draft moved to another machine takes that project's default workspace pingdotgg/t3code#43205. Upstream records an explicit workspace choice (
workspaceExplicit). Choosing Check out in worktree now counts as one, so a draft moved to another machine keeps it. The draft store carries both createNewBranch and workspaceExplicit.
- ADR 0023. Upstream's
deriveComposerSendTitle reads the snapshot's text. Single and multiple-model sends pass it the prompt left after the leading commands are split off.
- ADR 0014 / perf(web): one shared tooltip serves every trigger in the app pingdotgg/t3code#42671. The sidebar's Pull requests button uses upstream's shared tooltip. While disabled, it sits in a focusable wrapper that shows the reason. The chat header menu passes upstream's
contextMenuSourceOf.
- User docs / docs(user): copy pass on user docs, add missing feature guides and onboarding index pingdotgg/t3code#43206. Upstream rewrote
docs/user in a shorter style. Eight files took upstream's text, with the fork's content condensed into it: fork releases, leading commands, the keybinding migration, OhMyPi presets, provider sync, the default base branch, Add checkout, cleanup Never, external reverse proxy, existing-branch worktrees, and fork updates.
- Smaller merges, keeping both sides: the desktop WSL config carries
publicUrl and readiness. Storage cleanup keeps the fork's removing flag and upstream's leftover tracking. The update-everything skip reasons put the fork's check after upstream's new ones. ForgejoCli takes upstream's scheme source and keeps the fork's retry. Upstream's new Codex approval test sits beside the fork's. One fork storage-cleanup test gets upstream's new projectCommands argument. The i18n catalogs are the union of both, regenerated.
ADRs. Every ADR now compares against cc61cdb1e. Notes were added to ADRs 0002, 0007, 0008, 0010, 0011, 0014, 0016, 0022 and 0023. ADR 0011's version example moved to 0.1.12.
Verification
vp run check:changed upstream/main: format (after fixing the files it flagged), unused patches, GraphQL, knip, lint and typecheck (43 packages) pass. vp run i18n:check passes, and no fork key is left untranslated.
- Focused tests pass: server (
startupAccess, pullRequest/*, ThreadLaunchService, storageCleanup, OrchestratorMcpService, AgentContextBudget, GitManager with GIT_CONFIG_GLOBAL=/dev/null, CodexAdapterV2), the full suites of client-runtime, shared, source-control-forgejo and apps/mobile, and 67 web unit test files (sidebar, settings logic, draft store, hooks, ChatView.logic, BranchToolbar.logic, lib).
- Three
apps/desktop tests fail here (CaptureShortcutConfig, HyprlandSnapShot, and the executed WSL install script). They assert file permission bits, got 0o600 instead of 0o640, most likely from this host's umask. Their files are the same as upstream's.
Not run locally: web browser tests (Chromium can't start on this host), a manual pass in a real client, the mcp-tool-use eval, the marketing astro check, and the fork release workflow end to end.
Model: Claude Opus 5.5; harness: Claude Code in T3 Code.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
fryuni-proval[bot] reacted with eyes emoji
All reactions
-
👍
1 reaction
-
👀
1 reaction
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-26T11:05:53.900287Z |
e782e01 |
New commits |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
@Fryuni, thanks for this one. It's a big change, and the orphan recovery and readiness work clearly took careful thought.
Overview
Summary
This PR adds recovery for orphaned local backends. Tracking and recovery run in a separate worker, and every kill is tied to a kernel process identity. Readiness is now one challenge-response signal per launch instead of a race between two signals, and the bootstrap token waits until the backend reports ready. The preview webview moves to contextIsolation=true with a narrow page-world bridge, and the loopback tunnel's owner check now covers macOS. Clerk token storage is simplified, DO_NOT_TRACK is now passed through every shell path, the CI cache save is split so project code can't change it, and there are i18n and docs updates. The main risk is that the Clerk simplification drops file-permission hardening that the old code had on purpose.
Good points
- 🟢
apps/desktop/src/backend/DesktopBackendRecovery.ts only signals a PID after ownsOrphan() confirms the launcher is gone, the token matches, and the parent has changed, and it checks again before escalating to SIGKILL. That rules out killing an unrelated process after a PID is reused.
- 🟢
apps/desktop/src/backend/DesktopBackendConfiguration.ts creates a fresh secret for each launch, and the readiness probe adds a new challenge each time, so an old backend or some other process on the port can't pretend to be ready.
- 🟢 In
apps/desktop/src/preview/WebviewPreferences.ts and PickPreload.ts, preview pages now run isolated, and everything coming back from the page world is checked for type before it goes over IPC.
- 🟢
apps/desktop/src/backend/DesktopBackendRecovery.test.ts uses real subprocesses to test frozen orphans, survivors whose launcher is still alive, wrong-version tokens, and isolation between homes.
Main Issues
- 🚨
apps/desktop/src/app/DesktopClerk.ts line 90: Clerk tokens now go straight to electron-store. The 0700 directory, the symlink rejection and the 0600 re-tightening from the deleted ClerkTokenStore.ts are all gone, so tokens can end up world-readable.
- ⚫️
apps/desktop/src/preview/LoopbackTunnel.ts lines 398–411: on macOS, every tunnelled connection now spawns and waits for lsof before it is served, with no caching. If the lookup times out, the connection is refused.
Additional Notes
apps/desktop/src/app/DesktopClerk.ts, line 143: the old migrateLegacyClerkTokenFile step is gone. Users upgrading from builds that still have only <stateDir>/clerk-tokens.json will be signed out unless that layout is confirmed to be unsupported.
apps/desktop/src/backend/DesktopBackendRecoveryProcess.ts, line 96: recover forks a worker on every cold start. A cheap readdir that skips the fork when there are no *.json records would keep that cost off the startup path.
apps/desktop/src/backend/DesktopBackendRecoveryWorker.ts, line 24: worker errors forward only operation. Including the error message would make failures in the field much easier to diagnose.
apps/desktop/src/backend/DesktopBackendRecovery.ts, line 246: on Linux, .partial files left by an interrupted track are never cleaned up, because recover only matches names ending in .json.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks. Every file this review covers (DesktopBackendRecovery*.ts, DesktopClerk.ts, preview/*) is byte-for-byte upstream's at cc61cdb1e. This PR is a sync, and those changes came from upstream PRs (#41752, #42413, #41988, among others) that no fork ADR covers. Per the fork's sync rule, upstream code stays as upstream wrote it, so the main issues and additional notes are declined here, with replies on both inline threads. The fork's own changes in this merge are listed in the PR description: the MCP target resolver's caller runtime mode, the startup public URL, the PR target resolver, the draft workspace flag, and the user docs.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff0e4d62d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@Fryuni, thanks for turning the Codex P2 on SSH passwords around so fast. This push is small and does what it says.
Overview
Summary
Since the last review, withoutRemoteUrlCredentials (packages/shared/src/cloneUrl.ts, lines 35–45) has also removed the password from non-HTTP scheme URLs. It keeps the user, so ssh://git:pw@host/... becomes ssh://git@host/.... HTTP(S) URLs are handled as before: userinfo and the query are dropped. The ADR has been updated to match.
I checked the regex ^([a-z][a-z0-9+.-]*:\/\/[^/:@]*):[^/]*@ by hand against the cases most likely to break:
ssh://host.test:22/... is left alone. After :22 the next character is /, so there's no @ to match.
ssh://git@host:22/... is left alone, because the user part stops at @ before any colon.
- scp-style
[email protected]:o/r.git is left alone, because it has no ://.
- A password containing
@ is cut correctly. The greedy [^/]* backtracks to the last @ before the path.
Good points
- 🟢 The new
withoutRemoteUrlCredentials tests (packages/shared/src/cloneUrl.test.ts, lines 240–255) cover the same cases: the @-in-password case, host:port with and without a user, and scp-style. A later change to the regex can't quietly leak credentials or break valid SSH addresses.
- 🟢 Only the password is removed and the
user@host address is kept (packages/shared/src/cloneUrl.ts, line 36). RepositoryIdentityResolver and PullRequestReviewGuideService both use this helper, so they still compare the same address.
Main Issues
None in this push.
Additional Notes
- The new regex is in
packages/shared/src/cloneUrl.ts, line 36. A remote locator saved before this push from an ssh:// URL with a password would no longer equal the newly normalized URL. This seems unlikely in practice, because Git's SSH transport ignores passwords.
The earlier threads on LoopbackTunnel.ts and DesktopClerk.ts are still declined as upstream parity, and this push doesn't touch either file.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@Fryuni, thanks for tracking down the flaky Test job so quickly. This push is small, and I found nothing you need to act on.
Summary
This push raises the per-test timeout for the non-web Test job to 60 seconds (.github/workflows/ci.yml, line 129). It reuses the same test --testTimeout=60000 trailing-arg pattern that the Test Web steps already use. ADR 0011 and the testing guide now explain why. The new flag only raises timeouts. The suites that already allowed 60s or more stay where they were, and desktop (15s) and client-runtime (vitest's 5s default) go up.
Good points
🟢 docs/adr/0011-fork-release-source.md (line 75) gives the fork-only reason for the change. Four parallel package suites pushed the megabyte approval-text test (pingdotgg#43049) past client-runtime's 5s default. With that written down, a later upstream sync is unlikely to drop the override without knowing why it exists.
🟢 You updated docs/internals/15_testing.md (line 21) in the same push, so it now names both the Test and Test Web jobs and stays in line with ci.yml.
Main Issues
None in this push.
Additional Notes
None.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|