Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c2d813c
feat(projects): a project can track several repositories
juliusmarminge Nov 12, 2026
a4e4a8c
feat(projects): turn changes and diffs cover tracked repositories
juliusmarminge Nov 13, 2026
cfb1671
feat(projects): Git actions and pull requests per tracked repository
juliusmarminge Nov 13, 2026
7bfc727
feat(projects): new worktree threads isolate every tracked repository
juliusmarminge Nov 13, 2026
140dd32
feat(projects): tracking rules follow a folder, and the scan looks on…
juliusmarminge Nov 16, 2026
baa90dc
fix(server): a pull request opened in a tracked repository links by t…
juliusmarminge Nov 16, 2026
6350de6
feat(projects): a worktree thread's repositories share a base branch …
juliusmarminge Nov 16, 2026
b846e44
feat(web): uncommitted and branch diffs for the repositories a thread…
juliusmarminge Nov 16, 2026
408cbfa
feat(projects): a project can lay out its own worktree thread folder
juliusmarminge Nov 16, 2026
b142305
fix(mobile): rules are not counted as repositories, and are marked in…
juliusmarminge Nov 16, 2026
89d2172
fix(mobile): a failed Git action is shown over the sheet, and changed…
juliusmarminge Nov 16, 2026
9ebe0d8
feat(projects): single-repo layout commands, Git changes of every rea…
juliusmarminge Nov 16, 2026
123e6fe
docs(user): a guide to projects with several repositories
juliusmarminge Nov 16, 2026
c0a0f9f
fix(web): a rescan no longer re-adds repositories a rule already follows
juliusmarminge Nov 16, 2026
346d65a
refactor(projects): a project covers the repositories inside its fold…
juliusmarminge Nov 17, 2026
88a6cd8
fix(web): opening the repositories control no longer crashes the app
juliusmarminge Nov 17, 2026
944e1aa
fix(projects): a project's layout command is rolled back, torn down a…
juliusmarminge Nov 17, 2026
2afb5a9
fix(projects): a rewind names the repositories it could not restore
juliusmarminge Nov 18, 2026
d32cbcc
Merge main into the multi-repo stack
juliusmarminge Nov 21, 2026
05be2ca
fix(projects): review findings across repositories, worktree folders,…
juliusmarminge Nov 21, 2026
c070d64
Merge main into the multi-repo stack
juliusmarminge Nov 21, 2026
9b45bdd
Merge main into the multi-repo stack
juliusmarminge Nov 21, 2026
0ed2473
fix(projects): second round of review findings, and translations for …
juliusmarminge Nov 21, 2026
98f000e
Merge main into the multi-repo stack
juliusmarminge Nov 21, 2026
1667638
test(server): the coordinator wake test waits for the wake instead of…
juliusmarminge Nov 21, 2026
877c687
Merge main into the multi-repo stack
juliusmarminge Nov 21, 2026
427c534
fix(web): repository rewind stays offered after a project stops track…
juliusmarminge Nov 21, 2026
b5d2d1d
fix(projects): worktree threads survive a repository with no commits,…
juliusmarminge Nov 21, 2026
486f3fa
Merge remote-tracking branch 'origin/main' into t3/multi-repo-4-workt…
juliusmarminge Nov 21, 2026
885dc91
fix(projects): close the review findings on task folders, rewind and …
juliusmarminge Nov 21, 2026
5333557
Merge remote-tracking branch 'origin/main' into t3/multi-repo-4-workt…
juliusmarminge Nov 21, 2026
1ffe42b
fix(projects): harden task folder rollback, adoption and layout commands
juliusmarminge Nov 21, 2026
14688c3
Merge remote-tracking branch 'origin/main' into t3/multi-repo-4-workt…
juliusmarminge Nov 21, 2026
59ae5ce
fix(projects): a repository whose worktree is not kept gets its share…
juliusmarminge Nov 21, 2026
b46724c
Merge remote-tracking branch 'origin/main' into t3/multi-repo-4-workt…
juliusmarminge Nov 21, 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
7 changes: 7 additions & 0 deletions apps/mobile/src/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import { AddProjectSourceRoute } from "./features/projects/AddProjectSourceRoute
import {
NewTaskBranchPickerRouteScreen,
NewTaskEnvironmentPickerRouteScreen,
NewTaskRepositoriesPickerRouteScreen,
} from "./features/threads/NewTaskContextPickerScreens";
import {
ExistingThreadSettingsRouteScreen,
Expand Down Expand Up @@ -206,6 +207,7 @@ const ROUTE_TITLES: Readonly<Record<string, string>> = {
NewTaskProject: msg("Choose project"),
NewTaskEnvironment: msg("Environment"),
NewTaskBranch: msg("Branch"),
NewTaskRepositories: msg("Repositories"),
AddProject: msg("Add project"),
ThreadFiles: msg("Files"),
SettingsLegal: msg("Legal"),
Expand Down Expand Up @@ -669,6 +671,11 @@ const RootStackConfig = createWorkspaceStackNavigator({
screen: NewTaskBranchPickerRouteScreen,
options: pageRoute(),
}),
NewTaskRepositories: createNativeStackScreen({
linking: "new/draft/repositories",
screen: NewTaskRepositoriesPickerRouteScreen,
options: pageRoute(),
}),
AddProject: createNativeStackScreen({
linking: "new/add-project",
screen: AddProjectSourceRoute,
Expand Down
14 changes: 12 additions & 2 deletions apps/mobile/src/components/ComposerToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export function ComposerInlineControl(props: {
readonly accessibilityLabel?: string;
readonly disabled?: boolean;
readonly emphasized?: boolean;
/** The control asks for a decision; it stays usable. */
readonly tone?: "warning";
readonly icon?: ComponentProps<typeof SymbolView>["name"];
readonly renderIcon?: (size: number) => ReactNode;
readonly label: string;
Expand Down Expand Up @@ -81,7 +83,11 @@ export function ComposerInlineControl(props: {
name={props.icon}
size={iconSize}
tintColorClassName={
props.emphasized || props.selected ? "accent-icon" : "accent-icon-muted"
props.tone === "warning"
? "accent-warning-foreground"
: props.emphasized || props.selected
? "accent-icon"
: "accent-icon-muted"
}
type="monochrome"
/>
Expand All @@ -94,7 +100,11 @@ export function ComposerInlineControl(props: {
<Text
className={cn(
props.size === "large" ? "text-base font-t3-medium" : "text-sm font-t3-medium",
props.emphasized || props.selected ? "text-foreground" : "text-foreground-muted",
props.tone === "warning"
? "text-warning-foreground"
: props.emphasized || props.selected
? "text-foreground"
: "text-foreground-muted",
)}
numberOfLines={1}
ellipsizeMode={props.labelEllipsizeMode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const LISTED_OVERLAY_ROUTES: ReadonlySet<string> = new Set([
"AddProjectNew",
"NewTaskEnvironment",
"NewTaskBranch",
"NewTaskRepositories",
"SettingsLegal",
"SettingsAuth",
"SettingsWaitlist",
Expand Down
75 changes: 72 additions & 3 deletions apps/mobile/src/features/review/ReviewSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AppBar } from "../../components/ui/AppBar";
import type { AppBarMenuItem } from "../../components/ui/AppBar.types";
import type { ReviewSectionItem } from "./reviewModel";
import { useReviewHeaderPresentation } from "./useReviewHeaderPresentation";
import { T, useGT } from "gt-react-native";
import { T, useGT, Var } from "gt-react-native";
import { type Ref, type ReactElement, useImperativeHandle, useRef, useState } from "react";
import { Pressable, ScrollView, type NativeSyntheticEvent, StyleSheet, View } from "react-native";
import { RefreshControl } from "../../components/ui/RefreshControl";
Expand Down Expand Up @@ -66,6 +66,8 @@ function ReviewHeader(
readonly sectionMenu: ReturnType<typeof buildReviewSectionMenu>;
readonly showSectionToolbar: boolean;
readonly showChangedFilesToggle: boolean;
readonly selectedRepositoryKey: string | null;
readonly onSelectRepository: (key: string | null) => void;
readonly fileFilter: ReturnType<typeof usePullRequestFileFilter>;
readonly onSelectSection: (sectionId: string) => void;
readonly onReturnToThread: () => void;
Expand Down Expand Up @@ -156,6 +158,29 @@ function ReviewHeader(
},
]
: []),
...(props.selectedSection?.repositoryGroups
? [
{
id: "repositories",
title: gt("Repository"),
items: [
{
id: "repository:all",
title: gt("All repositories"),
selected: props.selectedRepositoryKey === null,
onPress: () => props.onSelectRepository(null),
},
...props.selectedSection.repositoryGroups.map((group) => ({
id: `repository:${group.key}`,
title: group.name,
subtitle: group.relativePath || undefined,
selected: group.key === props.selectedRepositoryKey,
onPress: () => props.onSelectRepository(group.key),
})),
],
},
]
: []),
...(presentation.refreshAction ? [presentation.refreshAction] : []),
],
},
Expand Down Expand Up @@ -407,13 +432,23 @@ export function ReviewSheet(props: ReviewSheetProps) {
sections: reviewSections,
selectedSectionId: selectedSection?.id ?? null,
});
const [repositorySelection, setRepositorySelection] = useState<{
readonly sectionId: string;
readonly key: string;
} | null>(null);
const repositoryGroups = selectedSection?.repositoryGroups;
const selectedRepository =
repositorySelection !== null && repositorySelection.sectionId === selectedSection?.id
? (repositoryGroups?.find((group) => group.key === repositorySelection.key) ?? null)
: null;
const {
headerDiffSummary,
nativeReviewDiffData,
parsedDiff,
allFiles,
fileFilter,
pendingReviewCommentCount,
sectionFiles,
loadVisibleFile,
isPending: areFilePatchesPending,
} = useReviewDiffData({
Expand All @@ -423,6 +458,13 @@ export function ReviewSheet(props: ReviewSheetProps) {
selectedSection,
draftMessage,
draftContext,
repositoryFilter:
selectedRepository === null || repositoryGroups === undefined
? null
: {
folder: selectedRepository.relativePath,
folders: repositoryGroups.map((group) => group.relativePath).join("\0"),
},
});
// Expo may return null before registration or in older binaries; use the fallback.
const NativeReviewDiffView = resolveNativeReviewDiffView();
Expand Down Expand Up @@ -451,6 +493,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
threadKey: reviewCache.threadKey,
sectionId: selectedSection?.id ?? null,
files: allFiles,
sectionFiles,
cachedExpandedFileIds: selectedSection?.id
? reviewCache.expandedFileIdsBySection[selectedSection.id]
: undefined,
Expand All @@ -465,9 +508,12 @@ export function ReviewSheet(props: ReviewSheetProps) {
selectedSection,
nativeReviewDiffData,
});
const reviewContentKey = selectedSection
? `${selectedSection.id}:${selectedRepository?.key ?? ""}`
: null;
const nativeBridge = useNativeReviewDiffBridge({
threadKey: reviewCache.threadKey,
sectionId: selectedSection?.id ?? null,
sectionId: reviewContentKey,
diff: selectedSection?.diff,
data: nativeReviewDiffData,
collapsedFileIds,
Expand All @@ -492,6 +538,12 @@ export function ReviewSheet(props: ReviewSheetProps) {
reportShowcaseSceneRendered({ scene: "review", themeId: nativeBridge.themeId });
};

const handleSelectRepository = (key: string | null) => {
commentSelection.clearSelection();
setRepositorySelection(
key === null || !selectedSection ? null : { sectionId: selectedSection.id, key },
);
};
const handleSelectFile = async (fileId: string | null) => {
loadVisibleFile(fileId, true);
commentSelection.clearSelection();
Expand Down Expand Up @@ -567,6 +619,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
};
const androidHeaderSubtitle = [
selectedSection?.title,
selectedRepository?.name,
headerDiffSummary.additions,
headerDiffSummary.deletions,
]
Expand Down Expand Up @@ -599,6 +652,19 @@ export function ReviewSheet(props: ReviewSheetProps) {
children.push(<ReviewNotice key="review-notice" notice={parsedDiffNotice} />);
}

if (selectedSection?.unlistedRepositories) {
children.push(
<ContentBand key="review-unlisted-repositories">
<Text className="text-xs leading-normal text-foreground-muted">
<T>
This turn's changes in <Var>{selectedSection.unlistedRepositories.join(", ")}</Var>{" "}
cannot be listed.
</T>
</Text>
</ContentBand>,
);
}

if (allFilesHidden) {
children.push(
<EmptyState
Expand All @@ -620,6 +686,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
return <>{children}</>;
})();
const headerSubtitle = [
selectedRepository?.name,
headerDiffSummary.additions,
headerDiffSummary.deletions,
pendingReviewCommentCount > 0
Expand Down Expand Up @@ -651,6 +718,8 @@ export function ReviewSheet(props: ReviewSheetProps) {
selectedSection={selectedSection}
showSectionToolbar={showSectionToolbar}
showChangedFilesToggle={showChangedFilesToggle}
selectedRepositoryKey={selectedRepository?.key ?? null}
onSelectRepository={handleSelectRepository}
fileFilter={fileFilter}
onRefresh={handlePullToRefresh}
onSelectSection={selectSection}
Expand Down Expand Up @@ -705,7 +774,7 @@ export function ReviewSheet(props: ReviewSheetProps) {
appearanceScheme={selectedTheme}
collapsedFileIdsJson={nativeBridge.collapsedFileIdsJson}
collapsedCommentIdsJson={nativeBridge.collapsedCommentIdsJson}
contentResetKey={`${reviewCache.threadKey}:${selectedSection.id}`}
contentResetKey={`${reviewCache.threadKey}:${reviewContentKey}`}
contentWidth={NATIVE_REVIEW_DIFF_CONTENT_WIDTH}
contentInsetTop={listHeader ? 0 : topContentInset}
contentInsetBottom={bottomContentInset}
Expand Down
48 changes: 44 additions & 4 deletions apps/mobile/src/features/review/reviewFileVisibility.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { expect, it, vi } from "vite-plus/test";
import { buildReviewParsedDiff, type ReviewRenderableFile } from "./reviewModel";
import { useReviewFileVisibility } from "./reviewFileVisibility";

const stored = vi.hoisted(() => ({ expanded: undefined as ReadonlyArray<string> | undefined }));
const stored = vi.hoisted(() => ({
expanded: undefined as ReadonlyArray<string> | undefined,
viewed: undefined as ReadonlyArray<string> | undefined,
}));
vi.mock("./reviewState", () => ({
updateReviewExpandedFileIds: (
_threadKey: string,
Expand All @@ -13,7 +16,13 @@ vi.mock("./reviewState", () => ({
) => {
stored.expanded = update(stored.expanded);
},
updateReviewViewedFileIds: () => {},
updateReviewViewedFileIds: (
_threadKey: string,
_sectionId: string,
update: (current: ReadonlyArray<string> | undefined) => ReadonlyArray<string> | undefined,
) => {
stored.viewed = update(stored.viewed);
},
}));

function patch(path: string, line: string) {
Expand All @@ -26,16 +35,20 @@ function files(diff: string): ReadonlyArray<ReviewRenderableFile> {
return parsed.files;
}

function visibility(current: ReadonlyArray<ReviewRenderableFile>) {
function visibility(
current: ReadonlyArray<ReviewRenderableFile>,
section: ReadonlyArray<ReviewRenderableFile> = current,
) {
let result: ReturnType<typeof useReviewFileVisibility> | undefined;
function Probe({ report }: { report: (value: typeof result) => void }) {
report(
useReviewFileVisibility({
threadKey: "thread",
sectionId: "turn:3",
files: current,
sectionFiles: section,
cachedExpandedFileIds: stored.expanded,
cachedViewedFileIds: undefined,
cachedViewedFileIds: stored.viewed,
}),
);
return null;
Expand Down Expand Up @@ -67,3 +80,30 @@ it("folds only the selected entry when a file becomes a symlink", () => {
visibility(current).toggleExpandedFile(current[0]!.id);
expect(visibility(current).collapsedFileIds).toEqual([current[0]!.id]);
});

it("keeps the marks of files a repository filter hides", () => {
stored.expanded = undefined;
stored.viewed = undefined;
const all = files(
patch("web/a.ts", "one") + patch("api/b.ts", "two") + patch("api/c.ts", "three"),
);
const [webFile, apiFile, otherApiFile] = all;
visibility(all).toggleViewedFile(webFile!.id);

const apiOnly = all.slice(1);
visibility(apiOnly).toggleViewedFile(apiFile!.id);
visibility(apiOnly).toggleExpandedFile(otherApiFile!.id);

expect(visibility(all).viewedFileIds).toEqual([webFile!.id, apiFile!.id]);
expect(visibility(all).collapsedFileIds).toEqual(all.map((file) => file.id));
visibility(apiOnly).toggleViewedFile(apiFile!.id);
expect(visibility(all).viewedFileIds).toEqual([webFile!.id]);

stored.expanded = undefined;
visibility(apiOnly, all).toggleExpandedFile(apiFile!.id);
expect(visibility(all).collapsedFileIds).toEqual([apiFile!.id]);
stored.expanded = undefined;
stored.viewed = undefined;
visibility(apiOnly, all).toggleViewedFile(otherApiFile!.id);
expect(visibility(all).collapsedFileIds).toEqual([otherApiFile!.id]);
});
Loading
Loading