fix(server): link thread PRs without an open client (#10101)

Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Theo BrowneandClaude Fable 5.1 authored and GitHub committed 2026-09-06 04:06:15 -07:00
1 parent 5fa35d2116
commit 223ff4490f
50 files changed
+2308 -1485

No files matched your search

@@ -25,7 +25,10 @@ export interface RepositoryIdentityResolverOptions {
export class RepositoryIdentityResolver extends Context.Service<
RepositoryIdentityResolver,
{
readonly resolve: (cwd: string) => Effect.Effect<RepositoryIdentity | null>;
readonly resolve: (
cwd: string,
options?: { readonly refresh?: boolean },
) => Effect.Effect<RepositoryIdentity | null>;
}
>()("t3/project/RepositoryIdentityResolver") {}
@@ -170,9 +173,11 @@ export const make = Effect.fn("RepositoryIdentityResolver.make")(function* (
const resolve: RepositoryIdentityResolver["Service"]["resolve"] = Effect.fn(
"RepositoryIdentityResolver.resolve",
)(function* (cwd) {
)(function* (cwd, options) {
if (options?.refresh) yield* Cache.invalidate(repositoryRootCache, cwd);
const cacheKey = yield* Cache.get(repositoryRootCache, cwd);
if (cacheKey === null) return null;
if (options?.refresh) yield* Cache.invalidate(repositoryIdentityCache, cacheKey);
return yield* Cache.get(repositoryIdentityCache, cacheKey);
});