Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1bb4fc3
fix: PR diffs fold Viewed files the way GitHub does, on web and mobil…
arifali123 Nov 16, 2026
cf8a07f
fix(server): GitLab reads with no project on the host name the host, …
juliusmarminge Nov 16, 2026
0e21244
fix(server): T3 Connect error 1016 tells you to link again instead of…
YasserDRIF Nov 16, 2026
90d5a37
fix(web): the PR author filter says "1 merge loaded", not "1 merges l…
preetsuthar17 Nov 16, 2026
f25ee5b
fix(pi): health checks no longer run Pi extensions in the server's fo…
juliusmarminge Nov 16, 2026
ebf8641
fix(mobile): Duo scroll views recheck their bleed after a fold (#37571)
juliusmarminge Nov 16, 2026
fd4ad4a
perf(mobile): switching back to a thread lays its feed out once (#37578)
juliusmarminge Nov 16, 2026
07f5946
fix(web): typing in a file after a find match stays in the file (#37674)
juliusmarminge Nov 16, 2026
1b226b5
fix(server): Codex health checks no longer kill ssh mid SSH-agent req…
juliusmarminge Nov 16, 2026
477b34d
fix(shell): Windows PATH probe reads User and Machine registry (#37632)
dieterstemmet Nov 16, 2026
0223080
fix(web): published themes keep their CSS when a saved theme shares t…
elias1218 Nov 16, 2026
b563dd7
fix(web): find in thread no longer announces streamed count refreshes…
juliusmarminge Nov 16, 2026
ad74719
fix(ssh): verify runtime archives in homes containing newlines (#37150)
Lucenx9 Nov 16, 2026
c1e165d
fix(web): model picker options no longer jump a pixel on hover (#37661)
Yash-Singh1 Nov 16, 2026
9894bd4
fix(mobile): long threads no longer jump to the bottom after they app…
juliusmarminge Nov 16, 2026
e7d9bc8
fix(client-runtime): a relative "Add project starts in" opens the pic…
juliusmarminge Nov 16, 2026
9a99870
fix(web): clicks beside an open file's find bar reach the code again …
juliusmarminge Nov 16, 2026
970e97c
fix(server): recover gateway cooldown after last error (#37692)
MaxFabian25 Nov 16, 2026
1742a9b
fix(mobile): sent videos no longer flash black and queued attachments…
juliusmarminge Nov 16, 2026
0c7cfe5
fix(composer): show local command actions while running (#32912)
Marker-bit Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/desktop/src/shell/DesktopShellEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
mergePathValues,
readUserLoginShell,
setWindowsPath,
windowsEnvironmentValueCommand,
} from "@t3tools/shared/shell";
import * as Context from "effect/Context";
import * as Duration from "effect/Duration";
Expand Down Expand Up @@ -232,7 +233,7 @@ const captureWindowsEnvironmentCommand = (names: ReadonlyArray<string>) =>
...names.flatMap((name) => {
return [
`Write-Output '${startMarker(name)}'`,
`$value = [Environment]::GetEnvironmentVariable('${name}')`,
windowsEnvironmentValueCommand(name),
"if ($null -ne $value -and $value.Length -gt 0) { Write-Output $value }",
`Write-Output '${endMarker(name)}'`,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ final class T3ScrollEdgeBleedView: ExpoView {
/// React Native's clipping, saved while bleeding. React Native only rewrites it when the
/// `overflow` style changes, so it stays off while bleeding.
private var containerClipped: Bool?
/// The bar's side is read from the root view controller, whose traits can settle after this
/// view's own during a fold; with no size change after that, nothing else would recheck.
private weak var observedWindow: UIWindow?
private var windowTraitRegistration: (any UITraitChangeRegistration)?

required init(appContext: AppContext? = nil) {
super.init(appContext: appContext)
Expand All @@ -38,9 +42,33 @@ final class T3ScrollEdgeBleedView: ExpoView {

override func didMoveToWindow() {
super.didMoveToWindow()
observeWindowTraits()
if window == nil { detach() } else { setNeedsLayout() }
}

override func safeAreaInsetsDidChange() {
super.safeAreaInsetsDidChange()
setNeedsLayout()
}

private func observeWindowTraits() {
guard observedWindow !== window else { return }
if let observedWindow, let windowTraitRegistration {
observedWindow.unregisterForTraitChanges(windowTraitRegistration)
}
observedWindow = window
windowTraitRegistration = nil
#if canImport(UIKit, _version: 9127.0.85)
if #available(iOS 27.1, *), let window {
windowTraitRegistration = window.registerForTraitChanges(
UITraitCollection.systemTraitsAffectingVerticalBarEdge
) { [weak self] (_: UIWindow, _: UITraitCollection) in
self?.setNeedsLayout()
}
}
#endif
}

override func didAddSubview(_ subview: UIView) {
super.didAddSubview(subview)
setNeedsLayout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ function setup(integrated = false) {
const onDebug: NonNullable<NativeReviewDiffViewProps["onDebug"]> = (event) =>
handlePullRequestDiffDebugEvent(event, {
rowCount: data.rows.length,
lastShownRowIndex: data.rows.length - 1,
targetFileId,
focusIndex: -1,
isIos: true,
Expand Down
52 changes: 35 additions & 17 deletions apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import {
isFileDiffCollapsed,
withFileDiffFold,
type FileDiffFoldChoices,
} from "@t3tools/client-runtime/pull-request-diff-fold";
import {
parsePullRequestAnchor,
pullRequestAnchorMatchesUrl,
Expand Down Expand Up @@ -130,8 +135,6 @@ import {
sourceControlClients,
} from "@t3tools/client-runtime/source-control-clients";

const EMPTY_IDS: readonly string[] = [];

function usePullRequestActivityRows(params: PullRequestParams, filter: ActivityFilter) {
const navigation = useNavigation();
const result = useEnvironmentQuery(composerPullRequests.activity(requestTarget(params)));
Expand Down Expand Up @@ -1088,7 +1091,26 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {
const focusIndex = focusedRows.length
? data.rows.findIndex((row) => row.id === focusedRows[0]?.id)
: -1;
const [collapsedIds, setCollapsedIds] = useState<readonly string[]>(EMPTY_IDS);
const [foldChoices, setFoldChoices] = useState<FileDiffFoldChoices>(() => new Map());
const [foldScope, setFoldScope] = useState(`${scopeKey}:${commit ?? "all"}`);
const [revealedFileId, setRevealedFileId] = useState<string | null>(null);
if (foldScope !== `${scopeKey}:${commit ?? "all"}`) {
setFoldScope(`${scopeKey}:${commit ?? "all"}`);
setFoldChoices(new Map());
setRevealedFileId(null);
}
const requestedFileId =
(jumpPath ? data.files.find((file) => file.path === jumpPath)?.id : null) ?? null;
// A linked file must stay open if its Viewed response arrives after the first native draw.
if (requestedFileId !== revealedFileId) {
setRevealedFileId(requestedFileId);
if (requestedFileId)
setFoldChoices((current) => withFileDiffFold(current, requestedFileId, false));
}
const viewedIdSet = new Set(viewedIds);
const collapsedIds = data.files
.filter((file) => isFileDiffCollapsed(file.id, null, foldChoices, viewedIdSet.has(file.id)))
.map((file) => file.id);
const [visibleFileId, setVisibleFileId] = useState<string | null>(null);
const nativeView = useRef<NativeReviewDiffViewHandle>(null);
// The filter the current jump was made under. Hiding or showing test files replaces the rows,
Expand All @@ -1114,7 +1136,7 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {
jumpedUnder.current = null;
const file = data.files.find((entry) => entry.path === path);
if (!file) return;
setCollapsedIds((ids) => ids.filter((id) => id !== file.id));
setFoldChoices((current) => withFileDiffFold(current, file.id, false));
scrollToFile(file.id);
});
// Subscribed for the whole screen, so a pick made while the diff is still loading is kept for
Expand All @@ -1138,9 +1160,14 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {
useEffect(() => {
if (!targetFile) loadMore();
}, [targetFile, loadMore]);
const lastFileRowIndex = data.rows.findLastIndex((row) => row.kind === "file");
const lastFileId = data.rows[lastFileRowIndex]?.fileId;
const lastShownRowIndex =
lastFileId && collapsedIds.includes(lastFileId) ? lastFileRowIndex : data.rows.length - 1;
const onDebug: NonNullable<NativeReviewDiffViewProps["onDebug"]> = (event) =>
handlePullRequestDiffDebugEvent(event, {
rowCount: data.rows.length,
lastShownRowIndex,
targetFileId: targetFile?.id,
focusIndex,
isIos: Platform.OS === "ios",
Expand All @@ -1155,8 +1182,8 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {
const onToggleFile: NonNullable<NativeReviewDiffViewProps["onToggleFile"]> = (event) => {
const id = event.nativeEvent.fileId;
if (!id) return;
setCollapsedIds((ids) =>
ids.includes(id) ? ids.filter((value) => value !== id) : [...ids, id],
setFoldChoices((current) =>
withFileDiffFold(current, id, !isFileDiffCollapsed(id, null, current, viewedIdSet.has(id))),
);
};
const visibleFile = data.files.find((file) => file.id === visibleFileId) ?? targetFile;
Expand Down Expand Up @@ -1270,7 +1297,7 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {
setDiffHead({ scopeKey, sha: detail.data?.headSha ?? null });
jumpedUnder.current = null;
setSelectedRowId(null);
setCollapsedIds(EMPTY_IDS);
setFoldChoices(new Map());
}}
/>
</View>
Expand Down Expand Up @@ -1311,16 +1338,7 @@ function PullRequestFileRouteContent({ route }: PullRequestFileRouteProps) {
onToggleViewedFile={(event) => {
const file = data.files.find((file) => file.id === event.nativeEvent.fileId);
if (!file || (!commit && !viewed.canToggle)) return;
const wasViewed = commit
? commitViewedPaths.has(file.path)
: viewed.isViewed(file.path);
setCollapsedIds((ids) =>
wasViewed
? ids.filter((id) => id !== file.id)
: ids.includes(file.id)
? ids
: [...ids, file.id],
);
setFoldChoices((current) => withFileDiffFold(current, file.id, undefined));
if (commit)
setCommitViewedPaths((current) => {
const next = new Set(current);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ it.each([true, false])(
lastRowIndex: nativeEvent.lastRowIndex as number,
});
};
let lastShownRowIndex = 999;
const emit = (nativeEvent: Record<string, unknown>) =>
handlePullRequestDiffDebugEvent({ nativeEvent } as Parameters<typeof onDebug>[0], {
rowCount: 1000,
lastShownRowIndex,
targetFileId: "last-file",
focusIndex: -1,
isIos,
Expand Down Expand Up @@ -74,6 +76,10 @@ it.each([true, false])(
expect(loadMore).not.toHaveBeenCalled();
emit({ message: "visible-range", firstRowIndex: 950, lastRowIndex: 990, totalRows: 1000 });
expect(loadMore).toHaveBeenCalledOnce();
// A folded final file ends at its header, short of the full payload's tail.
lastShownRowIndex = 920;
emit({ message: "visible-range", firstRowIndex: 880, lastRowIndex: 920, totalRows: 1000 });
expect(loadMore).toHaveBeenCalledTimes(2);
} finally {
scheduler.cancel();
vi.useRealTimers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export function handlePullRequestDiffDebugEvent(
event: Parameters<NonNullable<NativeReviewDiffViewProps["onDebug"]>>[0],
input: {
readonly rowCount: number;
/** The last row native can draw: a folded final file ends at its header. */
readonly lastShownRowIndex: number;
readonly targetFileId: string | undefined;
readonly focusIndex: number;
readonly isIos: boolean;
Expand Down Expand Up @@ -60,5 +62,9 @@ export function handlePullRequestDiffDebugEvent(
}
if (!drawn) return;
const lastRow = event.nativeEvent.lastRowIndex;
if (typeof lastRow === "number" && lastRow >= input.rowCount - 40) input.loadMore();
if (
typeof lastRow === "number" &&
lastRow >= Math.min(input.rowCount - 40, input.lastShownRowIndex)
)
input.loadMore();
}
43 changes: 28 additions & 15 deletions apps/mobile/src/features/threads/ThreadComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
hasProviderUsageLimits,
isUsageLimitsCommand,
} from "@t3tools/shared/usageLimits";
import { parseSideChatCommand } from "@t3tools/shared/composerTrigger";
import { StackActions, useFocusEffect, useNavigation } from "@react-navigation/native";
import type { ReactNode } from "react";
import { useEffect, useEffectEvent, useRef, useState, type RefObject } from "react";
Expand Down Expand Up @@ -101,7 +100,10 @@ import { useComposerTextRole, type ScaledTextRole } from "../settings/appearance
import type { RemoteClientConnectionState } from "../../lib/connection";
import { MOBILE_TYPOGRAPHY } from "../../lib/typography";
import { Menu } from "../../components/ui/Menu";
import type { ActiveTurnComposerAction } from "@t3tools/client-runtime/state/composer-dispatch";
import {
composerRunsDraftLocally,
type ActiveTurnComposerAction,
} from "@t3tools/client-runtime/state/composer-dispatch";
import type { FollowUpBehavior } from "../../lib/followUpBehavior";
import {
resolveComposerSendPresentation,
Expand Down Expand Up @@ -502,7 +504,11 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
const [previewVideo, setPreviewVideo] = useState<VideoPreviewSource | null>(null);
const composerOwnerKey = scopedThreadKey(props.environmentId, props.selectedThread.id);
const composerDraftKey = props.draftKey ?? composerOwnerKey;
const { text: draftMessage, attachments: draftAttachments } = useComposerDraft(composerDraftKey);
const {
text: draftMessage,
attachments: draftAttachments,
context: draftContext,
} = useComposerDraft(composerDraftKey);
const queuedEdit = props.queuedEdit ?? null;
const hasContent =
draftMessage.trim().length > 0 ||
Expand Down Expand Up @@ -534,18 +540,6 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
serverConfig: props.serverConfig,
states: uploadStates,
});
const sendPresentation = resolveComposerSendPresentation({
editingQueuedMessage: queuedEdit !== null,
// A side-chat command starts a side chat; it never queues or steers the running turn.
running:
props.activeThreadBusy &&
(props.redirectsApproval || parseSideChatCommand(draftMessage) === null),
canSteer: props.canSteerActiveTurn,
followUpBehavior: props.followUpBehavior,
deliveryDeferred:
props.connectionState !== "connected" || props.queueCount > 0 || attachmentsUploading,
});
const sendLabel = sendPresentation.label;
const currentModelSelection = props.selectedThread.modelSelection;
const modelUnavailable =
props.connectionState === "connected" &&
Expand Down Expand Up @@ -582,6 +576,25 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
props.serverConfig?.providers ?? [],
props.serverConfig?.usageLimitSources ?? [],
);
const draftRunsLocally = composerRunsDraftLocally({
text: draftMessage,
holdsOnlyText: draftAttachments.length === 0,
// A redirect's text answers its approval, so `/side` there is that text.
sideChat: !props.redirectsApproval,
usageLimits: usageLimitsOffered,
codexFeedback: selectedProviderStatus?.driver === "codex",
freshSession: props.onFreshSession !== undefined && draftContext === undefined,
});
const sendPresentation = resolveComposerSendPresentation({
editingQueuedMessage: queuedEdit !== null,
running: props.activeThreadBusy && !draftRunsLocally,
canSteer: props.canSteerActiveTurn,
followUpBehavior: props.followUpBehavior,
deliveryDeferred:
!draftRunsLocally &&
(props.connectionState !== "connected" || props.queueCount > 0 || attachmentsUploading),
});
const sendLabel = sendPresentation.label;
const openUsageLimits = () => {
const report = collectProviderUsageLimits(
currentModelSelection.instanceId,
Expand Down
13 changes: 8 additions & 5 deletions apps/mobile/src/features/threads/ThreadDetailScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ import { useBarOverlap } from "../../components/ui/useBarInset";
import {
useWorkspaceContentWidth,
WorkspaceSettledContentWidthContext,
useWorkspaceSettledContentWidth,
} from "../layout/workspace-content-width";
import { useAdaptiveWorkspaceLayout } from "../layout/adaptive-workspace-context";
import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns";
Expand Down Expand Up @@ -328,12 +329,14 @@ export interface ThreadDetailScreenProps {
// iOS questions overlay the controls; Android questions stack with child approvals.
const ComposerPanels = Platform.OS === "android" ? Animated.ScrollView : Animated.View;

/** Hands the feed the screen width measured for a native column; elsewhere keeps the inherited one. */
/**
* Hands the feed the screen width measured for a native column; elsewhere keeps the inherited one.
* Always the same element, so the feed below is not remounted when the width arrives.
*/
function ColumnWidth(props: { readonly width: number | null; readonly children: React.ReactNode }) {
return props.width === null ? (
props.children
) : (
<WorkspaceSettledContentWidthContext value={props.width}>
const inherited = useWorkspaceSettledContentWidth();
return (
<WorkspaceSettledContentWidthContext value={props.width ?? inherited}>
{props.children}
</WorkspaceSettledContentWidthContext>
);
Expand Down
Loading