GeezerVison is showing github.com — chore: sync with upstream/main (1451e7cb2) by Fryuni · Pull Request #72 · Fryuni/t3code
Conversation
Fryuni
commented
Oct 19, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
The fork is 386 commits behind upstream/main. This sync keeps the features recorded in docs/adr and uses upstream's implementation wherever it can.
Change
Merged pingdotgg/t3code main at 1451e7cb23034d29774338608368a15d8845df36. 18 files conflicted. Most of the conflicts came from upstream's React Compiler pass on mobile, a restructured scheduled-task dialog, and upstream's own fix for the same dead-key bug as ADR 0018.
Overlaps with upstream (ADR notes added)
None of these 386 commits implements a fork feature. Two overlap one:
- ADR 0018, dead keys. Upstream fix(web): Compose input no longer adds stray quotes pingdotgg/t3code#20350 fixed stray Compose quotes inline in the rich-text editor, with a composing guard and a selection-range guard. Its rule still wraps selected text when the dead key's final DOM replacement lands after
compositionend. I checked this by dropping the fork's guard: 3 of the fork's regressions fail. The fork keeps its shared handler, adds upstream's range guard to it, and runs both upstream's tests and its own.
- ADR 0016, scheduled tasks. Upstream fix(server): thread-bound scheduled tasks run on the thread's current provider pingdotgg/t3code#18467 makes a thread-bound run follow the thread's current provider, so the stored selection only seeds fresh threads. The fork's web options picker and MCP
target stay as they were. The ADR now says stored options only apply to tasks that launch their own thread.
Fork features re-applied on upstream's new code
- Existing-branch worktrees and start-from-remote (ADR 0008/0009). These are re-applied on upstream's compiler-friendly mobile new-task flow and context pickers, without
useMemo/useCallback. On web they go into upstream's inlined ThreadDetailsPanel props, useQuietThreadShell, and the split ScheduledTaskEditorForm.
- Mobile default base branch (ADR 0009). Upstream fix(mobile): branch naming text saves when you leave the screen pingdotgg/t3code#18381 now queues settings saved while another write is pending. The fork's
persist helper now takes a settle callback. Normal writes keep upstream's queue and resend. The project-only base-branch write and the clear-overrides write drop the queued patch.
- Release define (ADR 0011) sits next to upstream's new
__T3CODE_TELEMETRY_CHANNEL__. Origin remoteUrl (ADR 0022) sits next to fix(server): preserve repository display casing pingdotgg/t3code#19202's display casing. The "Show project's PRs" header hook (ADR 0014) sits next to the new "No project" label.
Tests adapted to upstream changes
- Upstream moved every DOM/React web test into real Chromium and dropped jsdom and
react-test-renderer. Five fork tests move to *.browser.test.*: branch selector, PR-link opener, shared PR summaries, sidebar PR scope, and dead-key DOM.
- Upstream's new delegation test expects "cannot run a child task". The fork's shared resolver also serves schedule tools, so it says "cannot be used" (ADR 0016).
- Upstream's fix(server): find existing PR worktrees beyond the first branch page pingdotgg/t3code#18407 PR-worktree test assumes 110 partial matches push an exact branch off the first
listRefs page. The fork lists exact matches first (ADR 0009), so the test now asserts the branch stays on page one. The reuse behavior it tests still passes.
CI (ADR 0011)
Upstream only touched release.yml, release-desktop.yml and desktop-macos-preview.yml, which the fork deletes, so they stay deleted. The release define is unchanged.
Upstream pingdotgg#21210 sets the web build's desktop release links from T3CODE_DESKTOP_UPDATE_REPOSITORY, falling back to GITHUB_REPOSITORY. In the fork's CI that resolved to Fryuni/t3code, so 5 of upstream's release-link tests failed. Fork-built bundles would also have linked to desktop releases the fork never publishes. ci.yml and server-linux-release.yml now pin it to pingdotgg/t3code. I reproduced the failure locally with GITHUB_REPOSITORY=Fryuni/t3code and confirmed the pin fixes it.
ADRs now compare against 1451e7cb2. git show --remerge-diff HEAD on the merge commit shows the whole fork-side resolution.
Verification
- Typecheck is clean for contracts, shared, client-runtime, source-control-forgejo, server, web, mobile, desktop and scripts.
vp fmt --check is clean on every file that differs from upstream. vp lint on those files reports warnings only.
- I ran the tests next to every conflicted file, plus every test file that differs from upstream. Browser tests ran in real Chromium.
- web: 25 files and 1062 tests pass, plus the composer and chat header tests next to the conflicts.
- server: 31 files pass. Some failures here come from this machine's environment, not the code:
- 5
GitManager own-name tests fail under this machine's global push.default=upstream and pass with GIT_CONFIG_GLOBAL=/dev/null. These are the same five the last sync reported.
- mobile: 62 files and 740 tests pass, and the React Compiler coverage ratchet holds.
- contracts, shared, client-runtime, forgejo and scripts all pass.
- desktop passes once the ambient
T3CODE_TELEMETRY_ENABLED from the T3 Code host is unset.
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
…g#20980)
Co-authored-by: Paul <paul@local>
Merge 386 upstream commits into the fork. None of them implements a fork
ADR's feature; two overlap fork decisions and are recorded in the ADRs.
- Upstream pingdotgg#20350 fixed stray quotes from Compose/dead keys inline in the
rich-text editor with composing and selection-range guards. Its rule still
surrounds selected text when a dead key's final DOM replacement lands after
compositionend, so it fails ADR 0018's regressions. The fork keeps its
shared handler, adopts upstream's range guard there, and runs both test
suites (ADR 0018).
- Upstream pingdotgg#18467 runs thread-bound scheduled tasks on the thread's current
provider; the stored selection only seeds fresh threads. ADR 0016 now says
stored provider options apply to tasks that launch their own thread, and
why the shared resolver's error wording differs from upstream's test.
- Upstream moved every React/DOM web test into real Chromium and dropped
jsdom and react-test-renderer. The fork's branch selector, PR link, shared
PR summary, sidebar PR scope, and dead-key tests move to *.browser.test
files. Browser mocks snapshot their exports, so registry overrides go
through a proxy, and the draft store is driven with setState like
upstream's tests. The sidebar test seeds environmentPresentations'
server configs, which useServerConfigs reads since upstream pingdotgg#20821.
- Upstream's React Compiler pass reached mobile. The new task flow and
context pickers keep the fork's existing-branch and start-from-remote
logic without manual memoization (ADRs 0008, 0009).
- Upstream pingdotgg#18381 queues mobile server settings saved during a pending
write. The project-only default base branch keeps its own write path,
which drops a queued patch like clearing overrides does (ADR 0009).
- Upstream pingdotgg#18407's PR worktree test assumes an exact branch can fall off
the first listRefs page; the fork lists exact matches first, so the test
asserts it stays on page one (ADR 0009).
- Upstream pingdotgg#20860's useQuietThreadShell, pingdotgg#19721's "No project" chat header
label, the telemetry build define, and pingdotgg#19202's display casing for origin
remotes are merged beside the fork's branch selector, PR menu, release
define, and origin remoteUrl (ADRs 0008, 0011, 0014, 0022).
- CI (ADR 0011): upstream only touched release.yml, release-desktop.yml and
desktop-macos-preview.yml, which the fork deletes; they stay deleted.
- ADRs compare against 1451e7c.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-19T12:02:29.340426Z |
9b2270a |
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.
Upstream pingdotgg#21210 makes the web build link desktop update releases to
T3CODE_DESKTOP_UPDATE_REPOSITORY, falling back to GITHUB_REPOSITORY. In the
fork's CI that resolves to Fryuni/t3code, which publishes no desktop
builds, so upstream's release-link tests failed and fork-built bundles
would link to releases that do not exist. Both workflows pin it to
pingdotgg/t3code (ADR 0011).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for this big cross-surface batch. Most of it is careful, well-tested work, and I found only one thing that needs a change before merge.
Overview
Summary
This PR touches desktop, mobile and shared code across many features:
- Desktop: the single-instance lock now happens before Clerk bootstraps on every platform, the Linux theme-icon install is now idempotent, and Tailscale and LAN endpoint selection is more accurate. It also fixes backend-pool scoping and update-install recovery, makes preview-browser debugger sessions recover after a drop, unifies Ctrl+wheel zoom, and improves SnapShot error reporting.
- Mobile: adds an in-app PDF preview, fixes the native gallery transitions, adds an IME-safe composer rebuild, fixes Android switch and dialog behaviour and Android workspace reset, makes iOS diff rows scroll horizontally, serializes Live Activity push-token registration, and adds a render-measurement tool.
The only risky change I found is in the mobile composer, described below.
Good points
- 🟢 The single-instance lock is now taken right after userData is set, and early second-instance argv is buffered and replayed in order (
apps/desktop/src/app/DesktopClerk.ts). Second launches quit before any heavy startup work, and deep links that arrive during startup are no longer dropped.
- 🟢 A CGNAT address is only advertised when it is on a native Tailscale adapter or listed in the tailnet status (
apps/desktop/src/backend/tailscaleEndpointProvider.ts). This stops another VPN's 100.64/10 address from becoming the pairing URL, and the tests cover every fallback.
- 🟢 Failed-install recovery restarts only the backends that were running before the install, tracked in
installRunningBackendsRef (apps/desktop/src/updates/DesktopUpdates.ts). A primary backend the user disabled stays off.
- 🟢 Live Activity token registration takes a per-activity-id semaphore on both the lookup and listener paths (
apps/mobile/src/features/agent-awareness/remoteRegistration.ts). A stale token can no longer overwrite a rotated one at the relay.
Main Issues
⚫️ apps/mobile/src/components/ComposerEditor.tsx line 58: createComposerDraftContextHistory() is no longer keyed by draftKey. When the same editor instance switches drafts, the history (and its retained files) is no longer reset or disposed. It also now relies on the React Compiler to keep a stateful object alive.
Additional Notes
- apps/desktop/src/backend/DesktopBackendPool.ts, line 222: the new comment says to provide the scope "after" the context, but in the pipe
Scope.provide(instanceScope) comes first. Rewording it to say the instance scope must be the innermost provide would stop someone from swapping the lines back.
- apps/desktop/src/app/DesktopLinuxUrlHandler.ts, line 250: the
installThemeIcons catch logs error._tag, which is always "PlatformError". Logging error.reason._tag, as the icon-copy handler nearby does, would make failures diagnosable.
- apps/mobile/src/components/PdfPreview.tsx, line 12: the iOS PDF WebView has no
onShouldStartLoadWithRequest. Tapping a link in a PDF navigates inside the preview, while Android opens it externally through pdfLinkUrl/tryOpenExternalUrl.
- apps/mobile/src/components/ui/Dialog.tsx, line 25: iOS
Alert.prompt ignores the new placeholder field. Consider documenting it as Android-only in Dialog.types.ts.
- apps/mobile/scripts/measure-renders.mts, line 239:
Effect.timeout fails with TimeoutError instead of returning Option.none, so the "reply never started streaming" message never shows on a timeout. Using Effect.timeoutOption plus Option.flatten would fix it.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks. Every file in this review is identical to upstream/main (1451e7cb2). These are upstream changes brought in by the sync, not fork code or conflict resolutions, so I'm not changing them in this PR:
| Note |
File |
Upstream source |
Main issue: context history not keyed by draftKey |
apps/mobile/src/components/ComposerEditor.tsx |
pingdotgg#21137 |
| Scope-provide comment wording |
apps/desktop/src/backend/DesktopBackendPool.ts |
pingdotgg#18575 |
installThemeIcons logs error._tag |
apps/desktop/src/app/DesktopLinuxUrlHandler.ts |
pingdotgg#14471 |
| iOS PDF WebView link handling |
apps/mobile/src/components/PdfPreview.tsx |
pingdotgg#21095 |
iOS Alert.prompt ignores placeholder |
apps/mobile/src/components/ui/Dialog.tsx |
pingdotgg#20394 |
Effect.timeout vs timeoutOption |
apps/mobile/scripts/measure-renders.mts |
pingdotgg#21001 |
The ComposerEditor concern looks real: the compiler caches a no-input call once per instance. The inline thread has the same answer. It should be fixed upstream, or as its own fork change with an ADR, not inside the sync merge.
The fork-side changes in this PR are the ones listed in its description. git show --remerge-diff 6a5c622e5 shows the conflict resolutions, and 9b2270ace pins the desktop update repository in CI.
|
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.
|
|
? preferencesResult.value.composerEnterBehavior
|
|
|
: undefined;
|
|
|
const contextHistory = useMemo(() => createComposerDraftContextHistory(), [draftKey]);
|
|
|
const contextHistory = createComposerDraftContextHistory();
|
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.
⚫️ [PROBLEM] Composer context history is no longer reset when draftKey changes
⚫ [PROBLEM] Before this change, useMemo(() => createComposerDraftContextHistory(), [draftKey]) created a new undo/file-retention history each time draftKey changed, and the [contextHistory] effect on line 59 then disposed the old one. The new inline call doesn't read any reactive values. With reactCompiler: true (apps/mobile/app.config.ts:496), the compiler caches it once per component instance, so it is no longer tied to draftKey. Putting the old useMemo back won't fix this either, because the compiler works out dependencies from the callback body and will drop the unused draftKey.
draftKey can change while the editor stays mounted. NewTaskDraftScreen passes flow.draftKey, which changes when the selected project changes, and ThreadComposer falls back to scopedThreadKey(environmentId, threadId). When the draft switches, the old draft's preview file retains stay held until unmount. The old context records also stay in the restore map, so contextHistory.restore inside changeText can bring the previous draft's context and attachments into the new one.
If the component ends up uncompiled (a bailout), it gets worse: every render creates a new history and the effect disposes the previous one, so undo/restore stops working.
Fix: make draftKey an actual input to the history's lifecycle. One option is to key the editor by draftKey at both call sites (<ComposerEditor key={draftKey} …>). Another is to create and dispose the history in state plus an effect keyed on draftKey.
const [contextHistory, setContextHistory] = useState(createComposerDraftContextHistory);
useEffect(() => {
const history = createComposerDraftContextHistory();
setContextHistory(history);
return () => history.dispose();
}, [draftKey]);
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This PR covers a lot of ground across desktop and mobile, and most of it is careful lifecycle and ordering work with tests to back it up. Nice job on a big sync.
Overview
Summary
On desktop, the PR:
- Moves the single-instance lock ahead of Clerk bootstrap on every platform.
- Fixes how the backend pool scopes each instance so that
unregister actually stops it.
- Restarts only the backends that were already running after an update install fails.
- Stops advertising another VPN's CGNAT address as a Tailscale endpoint.
- Hardens preview-browser debugger sessions and the recording warmup.
- Unifies Ctrl+wheel and menu zoom, and adds a step to refresh Linux theme icons.
On mobile, it:
- Turns on the React Compiler.
- Adds native PDF and gallery previews.
- Protects IME composition in the iOS composer.
- Adds horizontal scrolling to the review diff.
- Pins fbjni.
- Fixes ordering of Live Activity token registration.
The main risk I see comes from turning on the React Compiler while dropping useMemo dependency keys that existed for lifecycle reasons, not for memoization.
Good points
- 🟢
Scope.provide(instanceScope) now sits inside Effect.provide(factoryContext) (apps/desktop/src/backend/DesktopBackendPool.ts), so the instance's child scope is no longer hidden behind the pool's scope, and a regression test pins this down. That closes a real WSL backend leak on unregister.
- 🟢 Taking the single-instance lock before
createDesktopClerkBridge, and buffering early second-instance argv (apps/desktop/src/app/DesktopClerk.ts), means a second launch has no side effects. Deep links that arrive during startup are delivered in order.
- 🟢
isTailscaleInterface (apps/desktop/src/backend/tailscaleEndpointProvider.ts) identifies Tailscale by adapter name or ULA prefix, and falls back to status checked against a single cached status read. Other VPNs' 100.64/10 addresses no longer break pairing, and no extra CLI spawns are added.
- 🟢 Detach recovery in
apps/desktop/src/preview/Manager.ts removes a session only if it is still the current one, and never calls detach() on a dropped session. A stale finalizer therefore can't break the replacement debugger session.
Main Issues
- ⚫️
apps/mobile/src/components/ComposerEditor.tsx line 58: the PR replaces useMemo(..., [draftKey]) with an inline createComposerDraftContextHistory(). Under the React Compiler (apps/mobile/app.config.ts:496), that history is cached once per mount and no longer resets when draftKey changes. Context records and file retains from the previous draft can then carry over into the new one.
Additional Notes
apps/desktop/src/app/DesktopLinuxUrlHandler.ts, line 251: the theme-icon install catch logs error._tag, which for filesystem and spawn failures is always "PlatformError". Logging error.reason._tag, as the icon-copy warning nearby already does, would make failures easier to diagnose.
apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/T3TerminalView.kt, line 25: the comment refers to importantForAutofill=no, but the hidden inputView never sets it. Either set IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS or reword the comment.
|
Sorry, something went wrong.
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.
|