Repository navigation
chore(sync): absorb upstream main through 5cbdf00481 - #317
Conversation
…k checkout (pingdotgg#33687) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…g#29179) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ake (pingdotgg#28876) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#33353) Co-authored-by: Grok 4.7 (Grok) <noreply@x.ai> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#28324) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…nder it (pingdotgg#23517) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…dotgg#29773) Co-authored-by: Taylor Dolezal <117500+onlydole@users.noreply.github.com> Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#29959) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#35599) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…s 1.8x faster (median 823 ms -> 461 ms) (pingdotgg#33946) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#29511) Co-authored-by: meutex <342316034+meutex@users.noreply.github.com> Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Elliot Drel <elliotdrel@gmail.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
pingdotgg#24141) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…9205) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#33558) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#28663) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ngdotgg#24012) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…pingdotgg#29461) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…tgg#33585) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…pingdotgg#24872) Co-authored-by: Julius Marminge <julius0216@outlook.com>
…33275) Co-authored-by: johan.thomas <johan.thomas@inceptionai.ai> Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
…gdotgg#24505) Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>
… forward (pingdotgg#30173) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merges 1316 upstream commits (67fdc53..5cbdf00). 47 files conflicted. - Retired fork-git-256-non-repository and server-repository-identity-base-remote: upstream now ships both fixes (pingdotgg#35005 also handles gh's owner/repo mark). - Followed upstream's removal of plan mode and the composer context meter (pingdotgg#33131): the fork's Build/Plan toggle styling and readout-slot meter are gone. - Re-homed fork hunks into upstream's StopGenerationButton, useFocusComposerOnThreadOpen, the moved scheduleLabel, and the fork's ComposerShell footer. - Ported upstream fixes into the five drifted override shadows and the fork sidebar. - Adapted new upstream browser tests to the fork's DOM; deleted the boring-sidebar drag test the fork cannot run; rebaselined three deferred lint rules. - Pinned four newly patched deps exactly for Release Smoke. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cker persistence Upstream pingdotgg#34094 limits desktop IPC to the main window, which rejected the fork's side chat. The fork's composer model picker also missed upstream's workspaceCwd (pingdotgg#24585) and the thread model-pick persistence (pingdotgg#31739). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NoahHendrickson
left a comment
There was a problem hiding this comment.
Code quality review of 82d83ec24b.
Scope: the 1,316 absorbed upstream commits are upstream's code, so I reviewed only the fork-authored parts: the two fix(sync) ports in the last commit and the conflict resolutions in ChatView, Sidebar and ChatComposer. Most of the resolutions are clean. They drop fork code where upstream now covers it (the thread-open focus effect becomes useFocusComposerOnThreadOpen with a pane-aware callback, and two customizations are retired), so I have no notes on them.
No blockers. Two of the new ports add more moving parts than they need. Both can be cut down without changing behavior:
- Desktop IPC side-chat gate. It adds a second registry for the same windows, and it repeats the top-frame check in another module. It can become one list of trusted windows checked by one predicate.
onDraftModelOptionsChange. It adds a fourth optional field toComposerModelTraitsInput, whose write target is already spread across three loose optionals and settled by early returns. Upstream'sTraitsPickermodels the same thing as a discriminated union. In the fork, the panel can apply the thread pick itself, so the callback isn't needed at all.
File size: ChatComposer (4,133), ChatView (4,534) and Sidebar (5,794) were already far past 1k lines before this PR and stay about the same size, so this sync isn't the place to split them. The inline Sidebar empty state (a nested ternary with two copies of the same button classes) would be a cheap thing to pull out into its own component next time someone touches it.
Not approving (the review bot never approves). The comments below are the actionable ones.
| } | ||
|
|
||
| // DesktopIpc answers only the main window's top frame; the side chat runs the same preload. | ||
| export function isForkAuxiliaryMainFrame(event: { |
There was a problem hiding this comment.
This works, but it adds a second registry (auxiliaryContents, a Map keyed by id with its own closed cleanup) next to the existing auxiliaryWindows WeakSet, for the same set of windows. It also rewrites DesktopIpc's "sender is this contents' top frame" check (contents.mainFrame === event.senderFrame) in a second module. The { sender: { id }, senderFrame?: unknown } parameter is DesktopIpcInvokeEvent declared again by hand. A type-only import of that interface would keep the two from drifting apart.
Simpler version: keep a single Set<BrowserWindow> here (delete on closed; it replaces the WeakSet) and export the live auxiliary windows. DesktopIpc then owns the predicate once:
const isTopFrameOf = (window: Electron.BrowserWindow, event: DesktopIpcInvokeEvent) =>
window.webContents.id === event.sender.id && window.webContents.mainFrame === event.senderFrame;
return make(ipcMain, (event) =>
Effect.map(electronWindow.main, (main) =>
[...Option.toArray(main), /* fork */ ...forkAuxiliaryWindows()].some((w) => isTopFrameOf(w, event)),
),
);That removes the Map, the duplicated predicate and the restated event type. The fence shrinks to one spread, and isForkAuxiliaryWindow stays a has() on the same set.
There was a problem hiding this comment.
Done in 7073f77: one Set<BrowserWindow> (deleted on closed) with forkAuxiliaryWindows(), and DesktopIpc owns the single isTopFrameOf predicate over the main window plus the auxiliary ones.
| const mainFrame = {}; | ||
| /* fork:begin fork-side-chat — see .fork/customizations.yaml#fork-side-chat */ | ||
| const sideChatFrame = {}; | ||
| markForkAuxiliaryWindow({ |
There was a problem hiding this comment.
This registers a fake window in module-level state and never removes it (once is a no-op, so the closed cleanup never runs). It stays registered for every later test that imports ForkAuxiliaryWindows in the same worker. CLAUDE.md says no module-level mutable state in tests. If the registry exposes an unregister function (or the closed handler is captured and called at the end), the test can clean up after itself. With the single-Set shape suggested on ForkAuxiliaryWindows.ts, the cast also gets smaller, because only webContents needs faking.
There was a problem hiding this comment.
Done in 7073f77: the test captures the closed listener and calls it at the end, so the fake window is unregistered.
| planModeEnabled: boolean; | ||
| includePlanAgent?: boolean | undefined; | ||
| /** Runs after a change is written to the draft. */ | ||
| onDraftModelOptionsChange?: () => void; |
There was a problem hiding this comment.
This adds a fourth optional field that decides where the picker's options go. The input already has three loose optionals (threadRef, draftId, onModelOptionsChange). resolveComposerModelTraits gates on all three being undefined, and updateDescriptors settles the order with early returns. Now there are two callbacks with nearly the same name, onDraftModelOptionsChange and onModelOptionsChange, which are meant to be mutually exclusive, and nothing in the type says so. Upstream's TraitsPicker has the same callback, but as a discriminated persistence union with never arms.
A simpler move is available here: the only caller that sets onDraftModelOptionsChange always passes () => applyThreadModelPick(threadRef) for the same threadRef it already passes. So threadRef present already means "write the draft, then apply the pick to the thread". ComposerModelTraitsPanel can call useApplyThreadModelPick() itself and run it after setProviderModelOptions when input.threadRef is set. That deletes this field, the optional call in ComposerModelPicker.tsx:236, and the conditional spread in ChatComposer. If you'd rather keep the callback, at least make the target a discriminated union ({ kind: "thread", threadRef } | { kind: "draft", draftId } | { kind: "controlled", onChange }) so the null-gate and the early returns go away.
There was a problem hiding this comment.
Done in 7073f77: the field is gone. ComposerModelTraitsPanel calls useApplyThreadModelPick() itself after writing the draft when input.threadRef is set.
| ...(routeKind === "server" | ||
| ? { | ||
| threadRef: routeThreadRef, | ||
| onDraftModelOptionsChange: () => void applyThreadModelPick(routeThreadRef), |
There was a problem hiding this comment.
The same "write options to the draft, then applyThreadModelPick" sequence is now in two places: here, through the picker callback, and inline in the effort-cycle shortcut around line 3157 (setProviderModelOptions(...) followed by applyThreadModelPick(composerDraftTarget)). If the persistence moves into one helper (or into the panel, as suggested on composerModelTraits.ts), the shortcut and the picker can't drift apart. For example, a new thread-pick rule that's added to one path and missed in the other.
There was a problem hiding this comment.
Declining for now: the effort-cycle shortcut path is upstream's code in ChatComposer, and the picker now applies the pick inside the panel, so there's no fork-side callback left to share. A shared helper would mean restructuring upstream's shortcut; worth doing upstream-first if the two drift.
NoahHendrickson
left a comment
There was a problem hiding this comment.
Correctness review of 82d83ec24b.
Scope. I reviewed the fork-authored parts of the merge, not the 1,316 upstream commits:
- the remerge-diff of the 83 conflicted files
- the
fix(sync)commit - the override shadows against upstream's drift since
67fdc53823 - a fence census against
custom
The earlier review on this commit already covers code quality, so this one is about behavior and CI.
Summary. The resolutions hold up, apart from two CI failures. One looks merge-caused and the other is a slow fork test that now goes past its timeout.
Blocking: CI is red on this head
1. The desktop launch check can't open a thread (Build and Typecheck, "Desktop launch check failed while opening the thread"). Likely cause: the newly ported shift guard. See the inline comment on Sidebar.tsx. The gate itself is new to PR CI (upstream pingdotgg#33146), so custom never ran it.
2. GitHubPrAutomation.test.ts times out (Test Server 7). The case "rejects an invalid signature before claiming the event; deduplicates…" hits the 120s limit at GitHubPrAutomation.test.ts:377.
- It was already slow before this PR: 74.8s on the last green
customrun, and 61s locally on this head, where it passes. - The sync didn't break it; it pushed an already-slow test past the limit. Most of the time is probably the
TestClock.adjust("29 days")/("2 days")steps walking the scheduler's wakeups. - Upstream's new
recordRunFailurefork now runs after every dispatch. With the harness's newgetThreadShellmock it gets as far as an unmockedgetProjectThreadRecords. - Per the no-retry rule, the fix is to make the case fast (shorter clock jumps, or a scheduler stub), not to raise the timeout.
3. Agent context budget fails. This one is expected for a sync. The gate compares against custom, and upstream grew claudeSystemAppendBytes (5366 → 5594) and codexAdditionalContextBytes (7096 → 7324). It needs the agent-context-increase label rather than a code change.
Non-blocking
4. Two fork sidebar surfaces miss upstream pingdotgg#28703. That PR moved the sidebar to useShownThreadRouteTarget().shownTarget, which keeps the open thread current while Settings or Usage is open. The fork Sidebar got the port at Sidebar.tsx:2465. These still read the raw route:
custom/CollapsedThreadTabs.tsx:166custom/CollapsedThreadTabs.tsx:286custom/SidebarV2ChromeRows.tsx:289
Result: with the sidebar collapsed, opening Settings or Usage clears the collapsed tab strip's highlight on the open thread, and the Chat row's lit state drops. It's a missed surface, not a regression. Those files aren't in the diff, so I'm noting them here instead of inline.
Checked and fine
- Side-chat IPC (
isForkAuxiliaryMainFrame). OnlyForkSideChatWindowmarks windows, and side-chat subframes are still rejected.MacPermissionHelperis the only othersenderFramecheck, and it is scoped to its own window. - Composer.
- The stop button and stop phase match upstream, with
withStopButtonaround fork dictation. - Submission-target gating matches upstream.
canOperateThreadgates are mirrored on the fork's stop controls.ChatComposerfences went 67 → 65 (twomeasureForkCompactnessfences merged) andComposerFooterControlswent 10 → 7 (the Build/Plan toggle followed upstream pingdotgg#33131).
- The stop button and stop phase match upstream, with
- Shadows. Upstream's drift is ported into all of them: ModelPickerContent, ProviderModelPicker, the pending panel, UsageLimitsPooled and DraftHeroHeadline.
- Sidebar.
- Fence counts are unchanged.
- These ports are correct: the rename race, the jump hints with
data-jump-hint, the empty state,SidebarFolderDrop,asLaunchingThread, title regeneration, and settled pagination. - The Sidebar.drag test deletion and the fenced-out render-isolation describe are right for the fork's layout.
- ChatView. The pane-aware
useFocusComposerOnThreadOpencallback, the window-focus pane check after upstream's guards, thependingHandoffsuppression on the resume card, and theThreadDetailsPanelprops, includingusage.contextWindow, all line up with upstream. - Server.
GitManager,storageCleanup,GitVcsDriverCoreandRepositoryIdentityResolverare now byte-identical to upstream.- In
RunFinalizationService, every observer exit returnslocal. ensureForkSchemaruns aftermigratein bothmakeLayerSetuppaths.- The fork's
resolveBootstrapThreadBranchcovers upstream'slaunchBranchfor thread creation.
- Desktop and release.
wireRendererWindowcarries upstream's mailto item, the popup context menus andsetIgnoreMenuShortcuts.- The Linux
StartupWMClasscom.t3tools.T3Code.ForkmatchesresolveLinuxDesktopEntryName. - The
release-upstream-onlygate is kept onupdate_feed.
- App init.
startI18nandstartDocumentTitlerun before the side-chat early return.
🤖 Generated with Claude Code
| const attachThreadListRef = useCallback((node: HTMLUListElement) => { | ||
| threadListRef.current = node; | ||
| const shiftGuard = createSidebarShiftGuard(node); |
There was a problem hiding this comment.
Likely cause of the red desktop launch check (Build and Typecheck, "Desktop launch check failed while opening the thread").
How the guard drops a click. createSidebarShiftGuard marks a row as moved when its offsetTop changes by at least half a row and the user hasn't pressed or typed in the last 500ms. For the next 500ms it then swallows pointerdown and click on that row at window capture. A whole list filling from empty is exempt (tops.size === 0), but nothing else is.
Why this fires in the fork and not upstream. The fork's list is not one flat fill. Section and group headers, the pinned block, and draft rows folded into the active list can commit before or above a thread row, so a row that shifts down afterwards is stamped as moved.
What the CI screenshot shows. The draft "New thread" row sits above "Release launch check". The smoke script waits for the row and clicks at once. The pointer parks on the row and opens its hover card, but the press is dropped, so the route stays on the draft. Old custom had no shift guard (it arrived with upstream pingdotgg#23517), and upstream passes because its list fills in one go.
User impact. This isn't only a CI artifact. Any row that slides down because a draft or header appeared above it ignores a click for half a second.
Confidence: medium. I haven't run the smoke check locally. To confirm, add a ~600ms pause before thread.click() in scripts/smoke-desktop-app.ts, or log movedAt hits in onPointerDown. If it's confirmed, the fix belongs in the fork wiring, for example not counting moves caused by fork-only rows such as drafts or headers. It shouldn't go in the smoke script.
There was a problem hiding this comment.
Confirmed in effect and fixed in ec04e1a. A browser repro against the smoke fixture (fresh profile, 6x CPU throttle) always painted the draft row in the same commit as the thread rows, so it couldn't reproduce the drop locally, but the CI screenshot matches the guard. The fork wiring now passes createSidebarShiftGuard an isOwnArrival predicate (draft rows, by draftIdByThreadKey), so rows pushed down by a draft the route landed on aren't marked. A new case in Sidebar.shiftGuard.browser.test.ts fails without it.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
… thread pick itself Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ms in SQL - main.test.ts mocks the fork's page-level installers. - Usage is a page in the fork, so it shows no thread behind it. - The worktree icon gets lucide's default size, so CSS-less tests measure it as a 24px glyph. - GitHubPrAutomation ages its claims instead of jumping the TestClock 29 days, which ran the 5s scheduler tick half a million times and timed out in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… while Settings is open Ports upstream pingdotgg#28703's useShownThreadRouteTarget to the fork's two sidebar surfaces that still read the raw route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nding draft arrives Upstream's shift guard (pingdotgg#23517) swallows a press on a row that moved in the last 500ms. In the fork the landing draft row can arrive above the thread list after it paints, so the desktop launch check's click on the seeded thread was dropped. A draft row arrives because the route landed on it, so the rows it pushes are not counted as moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ind its CI stall Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…centre On CI's Linux fonts the row's centre lands on its favorite star, which keeps the click, so the pick never happened and the test timed out. Also drops the temporary step markers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ind its CI failure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: - OrchestratorMcpService: the bot schedule refusal sits before upstream's binding-flip workspace reset in update_scheduled_task. - ScheduledTaskService: the bot wake hold wraps the non-missed fire; a missed fixed-time run keeps upstream's failed status and error. - ThreadNotificationCoordinator: the repeated-failure filter applies to upstream's request-keyed attention. Ports: the bots guard's notification observations carry upstream's requestId and backgroundWake, and the wake-hold test's thread mock answers upstream's destination-thread check and queued-occurrence lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts test The last assertion failed on some CI runs. The test's Date.now spy made every deadline due on subscribe, so pressing Control could not flip the jump-hint hold to false and back. The hook re-reads the modifiers only on that flip, so whenever 200ms of real time passed between the previous shortcut's release and the hold, the hint never rendered. A 280ms pause there failed it every time locally. The test now holds Control on fake timers and advances the hint delay, so the hold notifies the way it does for a user. The product is unchanged: with a real clock every modifier change sets a future deadline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction reads Upstream's new ThreadDetailsPanel browser test mocks a partial thread shell with no `source`. With bots merged in, the details card renders the bot Mascot section, which reads `source.tags`, so three cases threw. The mock now carries an empty tag list, in a fenced edit; real shells always have `source`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The other pane of a split read an older settled thread through the unlisted-thread path but never mounted its family, so its thread actions menu found no shell row. The pane now holds the family the way the route does, through upstream's useOpenThreadFamily, exported in a fence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…me labels Upstream's schedule label gained the server's short time zone, but the Scheduled page kept its own one-argument copy, so it read "Daily at 09:00" where Settings read "Daily at 09:00 PT". The page now calls upstream's label with the task list's time zone and next run, and the editor's trigger pill builds its fixed-time label the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fork's queued banner blanked an inline image reference whenever the row had a thumbnail, so "Compare [header.png] with the live page" read "Compare with the live page". It now keeps the label, as upstream's queued-runs control does since pingdotgg#33405. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Absorbs upstream
mainthrough 5cbdf00 (1,316 commits, 47 conflicted files).Followed upstream
fork-git-256-non-repository(upstream'sisNonRepositoryGitStderr) andserver-repository-identity-base-remote(upstream fix(server): project identity follows gh repo set-default pingdotgg/t3code#35005/fix(server): repository identity honors the gh default remote pingdotgg/t3code#21574, which also coversowner/reporemotes). Their fences, manifest entries and guard are removed.Ports
isForkAuxiliaryMainFrame); its subframes and preview guests stay rejected.workspaceCwd(fix(opencode): project-defined models appear in that project's picker pingdotgg/t3code#24585) and saves effort/option changes to the thread (fix(composer): persist model picks before the next message pingdotgg/t3code#31739).Sidebar.drag.browser.test.tsxis deleted and one Sidebar render-isolation describe is fenced out; both target upstream's sidebar layout. Other new upstream browser tests are adapted to the fork's controls..fork/lint-deferred.mjs(memo-dependencies 14, no-manual-memo 124, preserve-manual-memoization 1).Verification
Typecheck (web, server, desktop, mobile), format, lint,
.fork/lint-owned.mjsand knip pass. Fork guards 704/704; focused server (36 files), desktop 74/74,build-desktop-artifact56/56, and focused web unit and browser suites pass. Full suites were not run locally. The app was not run: the sidebar empty state, the shift guard, and the folder-drop wrapper under Inlet and Glass need a look invp run dev:desktop, as does the side chat connecting.Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on high. Sol verdict: approved
🤖 Generated with Claude Code