Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f5e0f3c
fix(source-control): opt in to repository-scoped GitHub credentials
Chinoman10 Oct 18, 2026
dda54a0
fix(github): preserve repository viewers and LFS credential scope
Chinoman10 Oct 18, 2026
c6a818e
fix(github): isolate credential cache selectors and recognize Git misses
Chinoman10 Oct 18, 2026
df30bbd
fix(github): respect credential pauses during PR listing
Chinoman10 Oct 18, 2026
ac1ea4f
fix(github): reconcile repository credentials with upstream changes
Chinoman10 Oct 20, 2026
3971fbf
Merge pinned upstream while preserving scoped GitHub identity fallback
Chinoman10 Oct 20, 2026
98fb227
fix(github): pin credentials across paginated file statistics
Chinoman10 Oct 21, 2026
268faa8
fix(server): preserve mixed-case change breakdown selectors
Chinoman10 Oct 21, 2026
df8a82e
fix(source-control): refresh repository credentials against upstream
Chinoman10 Oct 23, 2026
3592ede
fix(source-control): preserve scoped credential routing boundaries
Chinoman10 Oct 23, 2026
981d9d0
fix(source-control): pin repository creation credentials
Chinoman10 Oct 23, 2026
f08fddd
fix(server): align scoped PR listings with their read principal
Chinoman10 Oct 23, 2026
8b0f335
merge: refresh GitHub credential scoping onto pinned upstream
Chinoman10 Oct 23, 2026
1b6db6e
fix(github): preserve token diagnostics in repository discovery
Chinoman10 Oct 23, 2026
a522c70
fix(github): reconcile repository credentials with upstream filters
Chinoman10 Oct 24, 2026
5e060c4
fix(github): reconcile repository credentials with upstream cleanup
Chinoman10 Oct 25, 2026
3b84581
Merge branch 'main' into codex/github-owner-credentials-upstream
Chinoman10 Oct 25, 2026
770d1df
Merge branch 'main' into codex/github-owner-credentials-upstream
Chinoman10 Oct 25, 2026
17898cf
merge: update repository credential routing with main
Chinoman10 Oct 27, 2026
00e6f20
merge: retain repository credentials with GitHub app sign-in
Chinoman10 Oct 29, 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
123 changes: 123 additions & 0 deletions apps/mobile/src/features/pull-requests/pullRequestList.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,103 @@ describe("all-environment PR list", () => {
[1, mbp],
]);
});

it("keeps repository viewers through head pages and filters each environment before deduplication", () => {
const rows = [
entry(1, {
repository: "OwnerA/Repo",
author: { login: "Alice", name: null, avatarUrl: null },
}),
entry(2, {
repository: "OwnerB/Repo",
author: { login: "Bob", name: null, avatarUrl: null },
}),
];
const merged = mergeEnvironmentPullRequestPages([
{
environmentId: cups,
pages: pullRequestListHead(null, {
...page(rows),
viewers: {
"github.com": "Alice",
"github.com ownera/repo": "Other",
"github.com ownerb/repo": "Other",
},
}),
},
{
environmentId: mbp,
pages: pullRequestListHead(null, {
...page(rows),
viewers: {
"github.com": "Other",
"github.com ownera/repo": "Alice",
"github.com ownerb/repo": "Bob",
},
}),
},
]);
expect(merged.viewers[`${mbp} github.com ownerb/repo`]).toBe("Bob");
for (const [controls, query] of [
[{ ...DEFAULT_PR_LIST_CONTROLS, involvement: "authored" as const }, ""],
[{ ...DEFAULT_PR_LIST_CONTROLS, filters: { author: "me" } }, ""],
[DEFAULT_PR_LIST_CONTROLS, "author:@me"],
] as const) {
expect(
filterPullRequestList(
merged.entries,
controls,
merged.viewers,
query,
merged.localSearchHosts,
).map((row) => [row.environmentId, row.number]),
).toEqual([
[mbp, 2],
[mbp, 1],
]);
}
});

it("keeps local full-text searches keyed by host with repository viewers", () => {
const rows = [
entry(1, { title: "Needle", repository: "OwnerA/Repo" }),
entry(2, { title: "Other", repository: "OwnerB/Repo" }),
];
const merged = mergeEnvironmentPullRequestPages([
{
environmentId: cups,
pages: pullRequestListHead(null, {
...page(rows),
viewers: {
"github.com": "Other",
"github.com ownera/repo": "octocat",
"github.com ownerb/repo": "octocat",
},
providers: [
{
host: "github.com",
kind: SourceControlProviderKind.make("github"),
searchesOnHost: false,
projectCount: 2,
configured: true,
detail: null,
},
],
}),
},
]);
expect([...merged.localSearchHosts]).toEqual([`${cups} github.com`]);
expect(
filterPullRequestList(
merged.entries,
{ ...DEFAULT_PR_LIST_CONTROLS, involvement: "authored" },
merged.viewers,
"needle",
merged.localSearchHosts,
).map((row) => row.number),
).toEqual([1]);
});

it("scopes a project to its owning environment even if another has the same project id", () => {
const merged = mergeEnvironmentPullRequestPages([
{ environmentId: cups, pages: pullRequestListHead(null, page([entry(1)])) },
Expand Down Expand Up @@ -299,6 +396,32 @@ describe("mobile PR scan and filters", () => {
),
).toEqual([1]);
});

it("prefers repository viewers for unscoped entries and retains the host fallback", () => {
const rows = [
entry(1, { repository: "OwnerA/Repo" }),
entry(2, {
repository: "OwnerB/Repo",
author: { login: "Bob", name: null, avatarUrl: null },
}),
entry(3, { repository: "legacy/repo" }),
];
const viewers = {
"github.com": "octocat",
"github.com ownera/repo": "octocat",
"github.com ownerb/repo": "Bob",
};
expect(
filterPullRequestList(
rows,
{ ...DEFAULT_PR_LIST_CONTROLS, involvement: "authored" },
viewers,
"",
new Set(),
).map((row) => row.number),
).toEqual([3, 2, 1]);
});

it("combines label groups, exclusions, draft and review filters", () => {
const rows = [
entry(1, {
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/pull-requests/pullRequestList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export function filterPullRequestList<
if (controls.projectEnvironmentId && entry.environmentId !== controls.projectEnvironmentId)
return false;
const viewerKey = entry.environmentId ? `${entry.environmentId} ${entry.host}` : entry.host;
const viewer = viewers[viewerKey];
const viewer = viewers[`${viewerKey} ${entry.repository.toLowerCase()}`] ?? viewers[viewerKey];
if (controls.involvement === "reviewing" && !entry.viewerReviewRequested) return false;
if (
controls.involvement === "authored" &&
Expand Down
Loading
Loading