@chisquare-tech/origine-ngx-apps-code 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chisquare-tech-origine-ngx-apps-code.mjs","sources":["../../../projects/code/src/lib/host.ts","../../../projects/code/src/lib/code.api.ts","../../../projects/code/src/lib/look.ts","../../../projects/code/src/lib/repo-base.ts","../../../projects/code/src/lib/diff.view.ts","../../../projects/code/src/lib/repos.page.ts","../../../projects/code/src/lib/repo.page.ts","../../../projects/code/src/lib/file.page.ts","../../../projects/code/src/lib/history.pages.ts","../../../projects/code/src/lib/pulls.page.ts","../../../projects/code/src/lib/pull.page.ts","../../../projects/code/src/lib/settings.page.ts","../../../projects/code/src/public-api.ts","../../../projects/code/src/chisquare-tech-origine-ngx-apps-code.ts"],"sourcesContent":["import { Signal } from '@angular/core';\n\n/** A person in the organization, as the host knows them (identity's members). */\nexport interface CodePerson {\n id: string;\n name: string;\n email?: string;\n}\n\n/** The project the screens are on. */\nexport interface CodeProject {\n id: string;\n key: string;\n name: string;\n /** The caller's capabilities on the project: code.write, protection.manage, resources.manage… */\n capabilities: string[];\n archivedAt?: string;\n}\n\n/**\n * What the Code screens need from the app that mounts them (cloud/web provides it, as it provides\n * DesignHost): where the person is, who is in the organization, and links inside the project.\n */\nexport abstract class CodeHost {\n abstract readonly project: Signal<CodeProject | null>;\n abstract readonly projectLoaded: Signal<boolean>;\n abstract readonly people: Signal<CodePerson[]>;\n abstract meId(): string;\n /** A router link to a path inside the current project ('' is its overview). */\n abstract link(path?: string): string[];\n}\n","import { Injectable, inject } from '@angular/core';\nimport { ApiService } from '@thescaffold/ngx-core';\nimport { Observable, map } from 'rxjs';\n\n// The code app's API (gox-apps/libs/code, mounted at /api/v1/code). Shapes mirror the Go JSON.\n\nexport interface Repo {\n projectId: string;\n projectKey: string;\n name: string;\n slug: string;\n description: string;\n visibility: 'private' | 'internal';\n defaultBranch: string;\n mergeMethods: string[];\n deleteBranchOnMerge: boolean;\n archivedAt?: string;\n createdBy: string;\n pushedAt?: string;\n sizeBytes: number;\n importState?: string;\n importSource?: string;\n importError?: string;\n cloneHttps: string;\n cloneSsh: string;\n empty: boolean;\n capabilities: string[];\n readOnly?: boolean;\n createdAt?: string;\n}\n\nexport interface GitPerson {\n name: string;\n email: string;\n when: string;\n}\n\nexport interface Commit {\n oid: string;\n short: string;\n subject: string;\n body?: string;\n author: GitPerson;\n committer: GitPerson;\n parents: string[];\n keys: string[];\n}\n\nexport interface FileChange {\n status: string;\n path: string;\n oldPath?: string;\n additions: number;\n deletions: number;\n binary: boolean;\n}\n\nexport interface CommitDetail extends Commit {\n files: FileChange[];\n additions: number;\n deletions: number;\n}\n\nexport interface DiffLine {\n kind: 'context' | 'add' | 'delete';\n old?: number;\n new?: number;\n text: string;\n html: string;\n}\n\nexport interface DiffHunk {\n header: string;\n oldStart: number;\n oldLines: number;\n newStart: number;\n newLines: number;\n lines: DiffLine[];\n}\n\nexport interface FileDiff {\n path: string;\n binary: boolean;\n truncated: boolean;\n hunks: DiffHunk[];\n}\n\nexport interface Comparison {\n base: string;\n head: string;\n mergeBase: string;\n ahead: number;\n behind: number;\n commits: Commit[];\n files: FileChange[];\n}\n\nexport interface Entry {\n name: string;\n path: string;\n type: 'tree' | 'blob' | 'commit';\n size?: number;\n lastCommit?: Commit;\n}\n\nexport interface Tree {\n ref: string;\n commit: string;\n path: string;\n entries: Entry[];\n lastCommit?: Commit;\n readme?: { path: string; html: string };\n}\n\nexport interface Blob {\n ref: string;\n commit: string;\n path: string;\n name: string;\n oid: string;\n size: number;\n language?: string;\n binary: boolean;\n image: boolean;\n truncated: boolean;\n lineCount: number;\n lines: string[];\n markdown?: string;\n rawUrl?: string;\n downloadUrl?: string;\n lastCommit?: Commit;\n}\n\nexport interface BlameHunk {\n commit: string;\n author: string;\n when: string;\n summary: string;\n startLine: number;\n lines: number;\n}\n\nexport interface Language {\n name: string;\n bytes: number;\n percent: number;\n}\n\nexport interface Ref {\n name: string;\n kind: 'branch' | 'tag';\n commit?: Commit;\n default?: boolean;\n protected?: boolean;\n rule?: string;\n ahead: number;\n behind: number;\n merged: boolean;\n canDelete: boolean;\n}\n\nexport interface Protection {\n id: string;\n repoId: string;\n pattern: string;\n blockDirectPush: boolean;\n blockForcePush: boolean;\n blockDeletion: boolean;\n requiredApprovals: number;\n dismissStaleApprovals: boolean;\n requireUpToDate: boolean;\n requiredChecks: string[];\n}\n\nexport interface PullBrief {\n number: number;\n title: string;\n state: 'open' | 'closed' | 'merged';\n draft: boolean;\n authorId: string;\n source: string;\n target: string;\n labels: string[];\n review: string;\n checks: string;\n comments: number;\n keys: string[];\n updatedAt?: string;\n createdAt?: string;\n}\n\nexport interface GateRow {\n text: string;\n meta?: string;\n status: string;\n blocking: boolean;\n users?: string[];\n}\n\nexport interface Gate {\n mergeable: boolean;\n title: string;\n reasons: string[];\n rows: GateRow[];\n conflicts?: string[];\n}\n\nexport interface ReviewBrief {\n authorId: string;\n state: string;\n commitSha: string;\n stale: boolean;\n at: string;\n}\n\nexport interface CheckStatus {\n id: string;\n sha: string;\n context: string;\n state: string;\n url?: string;\n description?: string;\n}\n\nexport interface Pull {\n number: number;\n title: string;\n body: string;\n authorId: string;\n source: string;\n target: string;\n headSha: string;\n state: 'open' | 'closed' | 'merged';\n draft: boolean;\n labels: string[];\n reviewers: string[];\n assignees: string[];\n keys: string[];\n mergeBase: string;\n targetSha: string;\n commits: number;\n gate: Gate;\n reviews: ReviewBrief[];\n checks: CheckStatus[];\n mergeMethods: string[];\n deleteBranchOnMerge: boolean;\n canMerge: boolean;\n canReview: boolean;\n canEdit: boolean;\n sourceDeleted: boolean;\n mergedSha?: string;\n mergedBy?: string;\n mergeMethod?: string;\n mergedAt?: string;\n closedAt?: string;\n createdAt: string;\n updatedAt?: string;\n version: number;\n}\n\nexport interface PRComment {\n id: string;\n threadId?: string;\n reviewId?: string;\n authorId: string;\n body: string;\n pending: boolean;\n createdAt: string;\n editedAt?: string;\n}\n\nexport interface Review {\n id: string;\n authorId: string;\n state: string;\n body: string;\n commitSha: string;\n createdAt: string;\n submittedAt?: string;\n}\n\nexport interface Thread {\n id: string;\n path: string;\n side: 'old' | 'new';\n line: number;\n startLine: number;\n commitSha: string;\n outdated: boolean;\n resolved: boolean;\n resolvedBy?: string;\n createdBy: string;\n createdAt: string;\n comments: PRComment[];\n}\n\nexport interface Timeline {\n comments: PRComment[];\n reviews: Review[];\n threads: Thread[];\n}\n\nexport interface NewComment {\n body: string;\n path?: string;\n side?: 'old' | 'new';\n line?: number;\n startLine?: number;\n threadId?: string;\n pending?: boolean;\n}\n\nconst C = 'v1/code';\nconst enc = encodeURIComponent;\nconst data = <T>(r: any): T => r?.data as T;\n\nexport function apiMessage(err: any, fallback = 'Something went wrong. Try again.'): string {\n return err?.error?.message || err?.body?.message || err?.message || fallback;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CodeApi {\n private readonly api = inject(ApiService);\n\n private repoPath(project: string, name: string) {\n return `${C}/project/${enc(project)}/repo/${enc(name)}`;\n }\n\n repos(project: string): Observable<Repo[]> {\n return this.api.get(`${C}/project/${enc(project)}/repo`).pipe(map((r) => data<Repo[]>(r) ?? []));\n }\n\n create(project: string, body: { name: string; description?: string; visibility?: string; defaultBranch?: string; readme?: boolean; gitignore?: string; licence?: string }): Observable<Repo> {\n return this.api.post(`${C}/project/${enc(project)}/repo`, body).pipe(map((r) => data<Repo>(r)));\n }\n\n import(project: string, body: { name: string; url: string; username?: string; token?: string; description?: string; visibility?: string }): Observable<Repo> {\n return this.api.post(`${C}/project/${enc(project)}/repo/import`, body).pipe(map((r) => data<Repo>(r)));\n }\n\n repo(project: string, name: string): Observable<Repo> {\n return this.api.get(this.repoPath(project, name)).pipe(map((r) => data<Repo>(r)));\n }\n\n update(project: string, name: string, body: Partial<{ name: string; description: string; visibility: string; defaultBranch: string; mergeMethods: string[]; deleteBranchOnMerge: boolean }>): Observable<Repo> {\n return this.api.patch(this.repoPath(project, name), body).pipe(map((r) => data<Repo>(r)));\n }\n\n remove(project: string, name: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}?confirm=${enc(name)}`);\n }\n\n setArchived(project: string, name: string, on: boolean): Observable<Repo> {\n return this.api.post(`${this.repoPath(project, name)}/${on ? 'archive' : 'unarchive'}`, {}).pipe(map((r) => data<Repo>(r)));\n }\n\n protections(project: string, name: string): Observable<Protection[]> {\n return this.api.get(`${this.repoPath(project, name)}/protection`).pipe(map((r) => data<Protection[]>(r) ?? []));\n }\n\n addProtection(project: string, name: string, p: Partial<Protection>): Observable<Protection> {\n return this.api.post(`${this.repoPath(project, name)}/protection`, p).pipe(map((r) => data<Protection>(r)));\n }\n\n updateProtection(project: string, name: string, id: string, p: Partial<Protection>): Observable<Protection> {\n return this.api.patch(`${this.repoPath(project, name)}/protection/${enc(id)}`, p).pipe(map((r) => data<Protection>(r)));\n }\n\n removeProtection(project: string, name: string, id: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}/protection/${enc(id)}`);\n }\n\n tree(project: string, name: string, ref: string, path: string): Observable<Tree> {\n return this.api.get(`${this.repoPath(project, name)}/tree`, { ref, path }).pipe(map((r) => data<Tree>(r)));\n }\n\n blob(project: string, name: string, ref: string, path: string): Observable<Blob> {\n return this.api.get(`${this.repoPath(project, name)}/blob`, { ref, path }).pipe(map((r) => data<Blob>(r)));\n }\n\n blame(project: string, name: string, ref: string, path: string): Observable<BlameHunk[]> {\n return this.api.get(`${this.repoPath(project, name)}/blame`, { ref, path }).pipe(map((r) => data<BlameHunk[]>(r) ?? []));\n }\n\n files(project: string, name: string, ref: string): Observable<{ files: string[]; truncated: boolean }> {\n return this.api.get(`${this.repoPath(project, name)}/files`, { ref }).pipe(map((r) => data<{ files: string[]; truncated: boolean }>(r) ?? { files: [], truncated: false }));\n }\n\n languages(project: string, name: string, ref: string): Observable<Language[]> {\n return this.api.get(`${this.repoPath(project, name)}/languages`, { ref }).pipe(map((r) => data<Language[]>(r) ?? []));\n }\n\n archiveUrl(project: string, name: string, ref: string, format: 'zip' | 'tar.gz'): Observable<string> {\n return this.api.get(`${this.repoPath(project, name)}/archive`, { ref, format }).pipe(map((r) => data<{ url: string }>(r)?.url ?? ''));\n }\n\n commits(project: string, name: string, q: { ref?: string; path?: string; limit?: number; skip?: number }): Observable<Commit[]> {\n const p: Record<string, string> = {};\n if (q.ref) p['ref'] = q.ref;\n if (q.path) p['path'] = q.path;\n if (q.limit) p['limit'] = String(q.limit);\n if (q.skip) p['skip'] = String(q.skip);\n return this.api.get(`${this.repoPath(project, name)}/commits`, p).pipe(map((r) => data<Commit[]>(r) ?? []));\n }\n\n commit(project: string, name: string, sha: string): Observable<CommitDetail> {\n return this.api.get(`${this.repoPath(project, name)}/commit/${enc(sha)}`).pipe(map((r) => data<CommitDetail>(r)));\n }\n\n /** One file's hunks from base to head (\"\" base: the head's first parent). */\n diff(project: string, name: string, head: string, path: string, base = ''): Observable<FileDiff> {\n const p: Record<string, string> = { head, path };\n if (base) p['base'] = base;\n return this.api.get(`${this.repoPath(project, name)}/diff`, p).pipe(map((r) => data<FileDiff>(r)));\n }\n\n compare(project: string, name: string, base: string, head: string): Observable<Comparison> {\n return this.api.get(`${this.repoPath(project, name)}/compare`, { base, head }).pipe(map((r) => data<Comparison>(r)));\n }\n\n refs(project: string, name: string, kind: 'branch' | 'tag' = 'branch', q = ''): Observable<Ref[]> {\n const p: Record<string, string> = { kind };\n if (q) p['q'] = q;\n return this.api.get(`${this.repoPath(project, name)}/refs`, p).pipe(map((r) => data<Ref[]>(r) ?? []));\n }\n\n createBranch(project: string, name: string, branch: string, from: string): Observable<unknown> {\n return this.api.post(`${this.repoPath(project, name)}/branches`, { name: branch, from });\n }\n\n deleteBranch(project: string, name: string, branch: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}/branches?branch=${enc(branch)}`);\n }\n\n deleteMerged(project: string, name: string): Observable<{ deleted?: string[] } | unknown> {\n return this.api.post(`${this.repoPath(project, name)}/branches/delete-merged`, {}).pipe(map((r) => data<any>(r)));\n }\n\n pulls(project: string, name: string, q: { state?: string; author?: string; reviewer?: string; needsMyReview?: boolean; label?: string; q?: string } = {}): Observable<PullBrief[]> {\n const p: Record<string, string> = {};\n for (const [k, v] of Object.entries(q)) if (v !== undefined && v !== '' && v !== false) p[k] = String(v);\n return this.api.get(`${this.repoPath(project, name)}/pulls`, p).pipe(map((r) => data<PullBrief[]>(r) ?? []));\n }\n\n template(project: string, name: string, target: string): Observable<string> {\n return this.api.get(`${this.repoPath(project, name)}/pull-template`, { target }).pipe(map((r) => {\n const d = data<any>(r);\n return typeof d === 'string' ? d : d?.body ?? '';\n }));\n }\n\n openPull(project: string, name: string, body: { source: string; target: string; title: string; body?: string; draft?: boolean; reviewers?: string[]; labels?: string[] }): Observable<Pull> {\n return this.api.post(`${this.repoPath(project, name)}/pulls`, body).pipe(map((r) => data<Pull>(r)));\n }\n\n pull(project: string, name: string, n: number): Observable<Pull> {\n return this.api.get(`${this.repoPath(project, name)}/pulls/${n}`).pipe(map((r) => data<Pull>(r)));\n }\n\n updatePull(project: string, name: string, n: number, body: Partial<{ title: string; body: string; draft: boolean; target: string; reviewers: string[]; assignees: string[]; labels: string[] }>): Observable<Pull> {\n return this.api.patch(`${this.repoPath(project, name)}/pulls/${n}`, body).pipe(map((r) => data<Pull>(r)));\n }\n\n closePull(project: string, name: string, n: number, reopen = false): Observable<Pull> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/${reopen ? 'reopen' : 'close'}`, {}).pipe(map((r) => data<Pull>(r)));\n }\n\n merge(project: string, name: string, n: number, body: { method: string; message?: string; deleteBranch?: boolean; expectHead?: string }): Observable<Pull> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/merge`, body).pipe(map((r) => data<Pull>(r)));\n }\n\n conversation(project: string, name: string, n: number): Observable<Timeline> {\n return this.api.get(`${this.repoPath(project, name)}/pulls/${n}/conversation`).pipe(map((r) => data<Timeline>(r) ?? { comments: [], reviews: [], threads: [] }));\n }\n\n comment(project: string, name: string, n: number, c: NewComment): Observable<PRComment> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/comments`, c).pipe(map((r) => data<PRComment>(r)));\n }\n\n review(project: string, name: string, n: number, state: 'commented' | 'approved' | 'changes_requested', body = ''): Observable<Review> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/reviews`, { state, body }).pipe(map((r) => data<Review>(r)));\n }\n\n resolve(project: string, name: string, n: number, thread: string, on: boolean): Observable<unknown> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/threads/${enc(thread)}/${on ? 'resolve' : 'unresolve'}`, {});\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CodePerson } from './host';\n\n// Small helpers the Code screens share.\n\nconst MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\nexport function shortDate(d?: string): string {\n if (!d) return '';\n const t = new Date(d);\n return Number.isNaN(t.getTime()) ? '' : `${MONTHS[t.getMonth()]} ${t.getDate()}`;\n}\n\n/** \"Nov 7, 2026\" for a day heading. */\nexport function dayLabel(d?: string): string {\n if (!d) return '';\n const t = new Date(d);\n return Number.isNaN(t.getTime()) ? '' : `${MONTHS[t.getMonth()]} ${t.getDate()}, ${t.getFullYear()}`;\n}\n\nexport function ago(iso?: string, now = Date.now()): string {\n if (!iso) return '';\n const t = Date.parse(iso);\n if (Number.isNaN(t)) return '';\n const s = Math.max(0, Math.round((now - t) / 1000));\n if (s < 60) return 'just now';\n if (s < 3600) return `${Math.floor(s / 60)} min ago`;\n if (s < 86400) return `${Math.floor(s / 3600)} h ago`;\n if (s < 172800) return 'Yesterday';\n return shortDate(iso);\n}\n\nexport function initials(name: string): string {\n const w = (name || '').split(/[\\s@._-]+/).filter(Boolean);\n return ((w[0]?.[0] ?? '?') + (w[1]?.[0] ?? '')).toUpperCase();\n}\n\nexport function size(bytes?: number): string {\n if (!bytes) return '0 B';\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`;\n}\n\n/** Names and initials by user id, from the host's people. */\nexport class People {\n private readonly byId: Map<string, CodePerson>;\n constructor(people: CodePerson[]) {\n this.byId = new Map(people.map((p) => [p.id, p]));\n }\n name(id?: string | null): string {\n if (!id) return 'Someone';\n return this.byId.get(id)?.name || this.byId.get(id)?.email || 'Someone';\n }\n initials(id?: string | null): string {\n return initials(this.name(id));\n }\n}\n\nconst LANG_COLOURS = ['var(--o-acc)', 'var(--o-ok)', 'var(--o-run)', 'var(--o-vio)', 'var(--o-bad-solid)', 'var(--o-line-mid)'];\nexport function langColour(i: number): string {\n return LANG_COLOURS[Math.min(i, LANG_COLOURS.length - 1)];\n}\n\n/** The state of checks as a dot class: success green, failure red, pending amber, none grey. */\nexport function checkDot(state: string): string {\n return state === 'success' ? 'o-dot o-grn' : state === 'failure' || state === 'error' ? 'o-dot o-red' : state === 'pending' ? 'o-dot o-amb' : 'o-dot o-gry';\n}\n\nexport function copy(text: string): Promise<void> {\n return navigator.clipboard?.writeText(text) ?? Promise.resolve();\n}\n\n/**\n * The repository the person was last in, per project, so the project-level tabs (Files, Commits,\n * Branches, Settings) open it. Browser storage is a convenience: without it the first repository is used.\n */\n@Injectable({ providedIn: 'root' })\nexport class CurrentRepo {\n get(project: string): string {\n try {\n return localStorage.getItem(`origine.code.repo.${project}`) ?? '';\n } catch {\n return '';\n }\n }\n set(project: string, repo: string) {\n try {\n localStorage.setItem(`origine.code.repo.${project}`, repo);\n } catch {\n /* storage blocked: the first repository is used */\n }\n }\n}\n\n/**\n * Highlighted code from the server: spans with Chroma's short token classes behind \"tk-\" (tk-k a\n * keyword, tk-s a string…), coloured with the theme's syntax tokens. Server HTML is not under the\n * component's encapsulation, hence ::ng-deep.\n */\nexport const TOKEN_CSS = `\n :host ::ng-deep [class^=\"tk-k\"]{color:var(--o-tk-k)}\n :host ::ng-deep [class^=\"tk-s\"], :host ::ng-deep [class^=\"tk-l\"]{color:var(--o-tk-s)}\n :host ::ng-deep [class^=\"tk-c\"]{color:var(--o-tk-c);font-style:italic}\n :host ::ng-deep [class^=\"tk-m\"]{color:var(--o-tk-n)}\n :host ::ng-deep .tk-nf, :host ::ng-deep .tk-nx, :host ::ng-deep .tk-fm{color:var(--o-tk-f)}\n :host ::ng-deep .tk-nb, :host ::ng-deep .tk-nt, :host ::ng-deep .tk-bp{color:var(--o-tk-p)}\n :host ::ng-deep .tk-gi{color:var(--o-add)} :host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n`;\n","import { ChangeDetectionStrategy, Component, Directive, ElementRef, HostListener, computed, effect, inject, input, output, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { CodeApi, Ref, Repo, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { CurrentRepo, People } from './look';\n\n/**\n * What every page under /code/:repo shares: the project, the repository named in the URL (loaded\n * once per name), the person's people and permissions, and an error line. Pages extend it and load\n * their own data in onRepo().\n */\n@Directive()\nexport abstract class RepoPage {\n protected readonly host = inject(CodeHost);\n protected readonly api = inject(CodeApi);\n protected readonly route = inject(ActivatedRoute);\n private readonly current = inject(CurrentRepo);\n\n protected readonly name = signal('');\n protected readonly repo = signal<Repo | null>(null);\n protected readonly error = signal('');\n protected readonly note = signal('');\n protected readonly people = computed(() => new People(this.host.people()));\n protected readonly canWrite = computed(() => !this.repo()?.archivedAt && (this.repo()?.capabilities ?? []).includes('code.write'));\n protected readonly canAdmin = computed(() => (this.repo()?.capabilities ?? []).includes('resources.manage'));\n protected readonly canProtect = computed(() => (this.repo()?.capabilities ?? []).includes('protection.manage'));\n\n constructor() {\n this.route.paramMap.subscribe((m) => this.name.set(m.get('repo') ?? ''));\n effect(() => {\n const name = this.name();\n const p = this.host.project();\n if (name && p) untracked(() => this.loadRepo(p.id, name));\n });\n }\n\n /** Called with the repository once it has loaded (and again after it changes). */\n protected abstract onRepo(repo: Repo): void;\n\n protected projectId(): string {\n return this.host.project()?.id ?? '';\n }\n\n protected link(path = ''): string[] {\n return this.host.link(`code/${this.name()}${path ? '/' + path : ''}`);\n }\n\n protected reloadRepo() {\n const p = this.host.project();\n if (p && this.name()) this.loadRepo(p.id, this.name());\n }\n\n private loadRepo(project: string, name: string) {\n this.error.set('');\n this.api.repo(project, name).subscribe({\n next: (r) => {\n this.repo.set(r);\n this.current.set(project, r.name);\n this.onRepo(r);\n },\n error: (e) => this.error.set(e?.status === 404 ? `There is no repository ${name} you can see in this project.` : apiMessage(e, `Could not open ${name}.`)),\n });\n }\n}\n\n// The branch and tag picker (prototype brOpen): a filterable menu of branches, then tags.\n@Component({\n selector: 'o-ref-picker',\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`:host{position:relative;display:inline-block}`],\n template: `\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"toggle()\" [attr.aria-expanded]=\"open()\" aria-haspopup=\"menu\" data-testid=\"ref-picker\">\n <span class=\"o-faint\">{{ kindOf() }}</span><b class=\"o-mono\">{{ current() }}</b><span aria-hidden=\"true\">⌄</span>\n </button>\n @if (open()) {\n <div class=\"o-menu\" role=\"menu\" style=\"left:0;top:34px;width:280px;max-height:360px;overflow:auto\">\n <input class=\"o-in o-sm\" placeholder=\"Find a branch or tag\" aria-label=\"Find a branch or tag\" style=\"margin:4px 0 6px\" [ngModel]=\"q()\" (ngModelChange)=\"q.set($event)\" />\n <div class=\"o-lbl\" style=\"padding:4px 10px\">Branches</div>\n @for (b of shown('branch'); track b.name) {\n <button type=\"button\" role=\"menuitem\" (click)=\"pick(b.name)\"><span class=\"o-mono o-sm o-ell\">{{ b.name }}</span>@if (b.name === current()) {<span class=\"o-k o-grn-t\" aria-label=\"current\">✓</span>}</button>\n } @empty {<span class=\"o-faint o-sm\" style=\"padding:4px 10px\">No branches match.</span>}\n @if (shown('tag').length) {\n <div class=\"o-lbl\" style=\"padding:4px 10px\">Tags</div>\n @for (t of shown('tag'); track t.name) {<button type=\"button\" role=\"menuitem\" (click)=\"pick(t.name)\"><span class=\"o-mono o-sm o-ell\">{{ t.name }}</span></button>}\n }\n </div>\n }\n `,\n})\nexport class RefPicker {\n private readonly api = inject(CodeApi);\n private readonly host = inject(CodeHost);\n private readonly el = inject(ElementRef);\n\n readonly repo = input.required<string>();\n readonly current = input.required<string>();\n readonly picked = output<string>();\n\n protected readonly open = signal(false);\n protected readonly q = signal('');\n private readonly refs = signal<Ref[]>([]);\n protected readonly kindOf = computed(() => (this.refs().some((r) => r.kind === 'tag' && r.name === this.current()) ? 'tag' : 'branch'));\n\n protected shown(kind: 'branch' | 'tag') {\n const q = this.q().toLowerCase();\n return this.refs().filter((r) => r.kind === kind && (!q || r.name.toLowerCase().includes(q))).slice(0, 50);\n }\n\n protected toggle() {\n this.open.set(!this.open());\n const p = this.host.project();\n if (this.open() && p) {\n this.api.refs(p.id, this.repo(), 'branch').subscribe({ next: (b) => this.refs.set([...b, ...this.refs().filter((r) => r.kind === 'tag')]), error: () => undefined });\n this.api.refs(p.id, this.repo(), 'tag').subscribe({ next: (t) => this.refs.set([...this.refs().filter((r) => r.kind === 'branch'), ...t]), error: () => undefined });\n }\n }\n\n protected pick(name: string) {\n this.open.set(false);\n this.picked.emit(name);\n }\n\n @HostListener('document:click', ['$event'])\n protected outside(e: MouseEvent) {\n if (this.open() && !this.el.nativeElement.contains(e.target)) this.open.set(false);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, input, output, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CodeApi, DiffLine, FileChange, FileDiff, Thread, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { People, TOKEN_CSS, ago } from './look';\n\nexport interface LineComment {\n path: string;\n side: 'old' | 'new';\n line: number;\n body: string;\n}\n\nexport interface ThreadReply {\n threadId: string;\n body: string;\n}\n\n// One file of a diff (prototype prDiffs): its header with +/−, the hunks highlighted, and, on a pull\n// request, the review threads on its lines and a comment form on any line number.\n@Component({\n selector: 'o-diff',\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [TOKEN_CSS, `\n .o-ln .o-n{cursor:default;width:44px}\n .o-ln .o-n.cmt{cursor:pointer}\n .o-ln .o-n.cmt:hover{color:var(--o-acc-tx)}\n .hunk{color:var(--o-dim);background:var(--o-well);padding:2px 12px;font-size:11px}\n `],\n template: `\n <div class=\"o-card\" [attr.data-testid]=\"'diff-' + file().path\">\n <div class=\"o-ch\" style=\"background:var(--o-well)\">\n <button type=\"button\" class=\"o-btn o-ghost o-xs\" (click)=\"open.set(!open())\" [attr.aria-expanded]=\"open()\" [attr.aria-label]=\"(open() ? 'Collapse ' : 'Expand ') + file().path\">{{ open() ? '▾' : '▸' }}</button>\n <span class=\"o-mono o-sm o-ell\">{{ file().oldPath && file().oldPath !== file().path ? file().oldPath + ' → ' : '' }}{{ file().path }}</span>\n <span class=\"o-grn-t o-sm\">+{{ file().additions }}</span><span class=\"o-red-t o-sm\">−{{ file().deletions }}</span>\n @if (threadsHere().length) {<span class=\"o-faint o-sm\">💬 {{ threadsHere().length }}</span>}\n <span class=\"o-r\"><ng-content /></span>\n </div>\n @if (open()) {\n @if (file().binary) {\n <div class=\"o-empty o-sm\">A binary file.</div>\n } @else if (error()) {\n <div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>\n } @else if (diff(); as d) {\n @if (d.truncated) {<div class=\"o-note\">This diff is too large to show in full.</div>}\n <div class=\"o-code\" style=\"overflow-x:auto\" role=\"table\" [attr.aria-label]=\"'Changes to ' + file().path\">\n @for (h of d.hunks; track $index) {\n <div class=\"hunk o-mono\" role=\"row\">{{ h.header }}</div>\n @for (l of h.lines; track $index) {\n <div class=\"o-ln\" role=\"row\" [class.o-add]=\"l.kind === 'add'\" [class.o-del]=\"l.kind === 'delete'\">\n <span class=\"o-n\" role=\"rowheader\" [class.cmt]=\"canComment()\" (click)=\"startComment(l)\" [attr.title]=\"canComment() ? 'Comment on this line' : null\">{{ l.kind === 'delete' ? l.old : l.new }}</span>\n <span class=\"o-s\" aria-hidden=\"true\">{{ l.kind === 'add' ? '+' : l.kind === 'delete' ? '−' : ' ' }}</span>\n <span class=\"o-sr-only\">{{ l.kind === 'add' ? 'added' : l.kind === 'delete' ? 'removed' : '' }}</span>\n <span class=\"o-t\" role=\"cell\" [innerHTML]=\"l.html || l.text\"></span>\n </div>\n @for (t of threadsAt(l); track t.id) {\n <div class=\"o-thread\" [attr.data-testid]=\"'thread-' + t.id\">\n <div class=\"o-cb o-col\" style=\"gap:6px;padding:10px 12px\">\n @for (c of t.comments; track c.id) {\n <span class=\"o-sm\"><b>{{ people().name(c.authorId) }}</b><span class=\"o-faint\"> · {{ ago(c.createdAt) }}{{ c.pending ? ' · pending' : '' }}</span></span>\n <span style=\"white-space:pre-wrap\">{{ c.body }}</span>\n }\n </div>\n @if (canComment()) {\n <div class=\"o-cf\">\n <input class=\"o-in o-sm\" placeholder=\"Reply…\" aria-label=\"Reply\" [ngModel]=\"replies()[t.id] ?? ''\" (ngModelChange)=\"setReply(t.id, $event)\" (keydown.enter)=\"sendReply(t.id)\" />\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"sendReply(t.id)\">Reply</button>\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"resolve.emit({ threadId: t.id, resolved: !t.resolved })\">{{ t.resolved ? 'Unresolve' : 'Resolve' }}</button>\n </div>\n }\n </div>\n }\n @if (drafting() === key(l)) {\n <div class=\"o-thread\"><div class=\"o-cb o-col\" style=\"gap:8px;padding:10px 12px\">\n <textarea class=\"o-in\" rows=\"2\" [placeholder]=\"'Leave a comment on line ' + lineOf(l)\" [attr.aria-label]=\"'Comment on line ' + lineOf(l)\" [ngModel]=\"draftBody()\" (ngModelChange)=\"draftBody.set($event)\" data-testid=\"line-comment\"></textarea>\n <div class=\"o-flex\"><span class=\"o-faint o-xs\">Markdown works.</span><button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"drafting.set('')\">Cancel</button><button type=\"button\" class=\"o-btn o-sm o-dark\" [disabled]=\"!draftBody().trim()\" (click)=\"send(l)\" data-testid=\"line-comment-add\">Comment</button></div>\n </div></div>\n }\n }\n } @empty {\n <div class=\"o-empty o-sm\">No changes to show.</div>\n }\n </div>\n } @else {\n <div class=\"o-empty o-sm\">Loading…</div>\n }\n }\n </div>\n `,\n})\nexport class DiffView {\n private readonly api = inject(CodeApi);\n private readonly host = inject(CodeHost);\n\n readonly repo = input.required<string>();\n readonly file = input.required<FileChange>();\n readonly head = input.required<string>();\n readonly base = input('');\n readonly threads = input<Thread[]>([]);\n readonly canComment = input(false);\n readonly comment = output<LineComment>();\n readonly reply = output<ThreadReply>();\n readonly resolve = output<{ threadId: string; resolved: boolean }>();\n\n protected readonly open = signal(true);\n protected readonly diff = signal<FileDiff | null>(null);\n protected readonly error = signal('');\n protected readonly drafting = signal('');\n protected readonly draftBody = signal('');\n protected readonly replies = signal<Record<string, string>>({});\n protected readonly people = computed(() => new People(this.host.people()));\n protected readonly threadsHere = computed(() => this.threads().filter((t) => t.path === this.file().path));\n protected readonly ago = (s?: string) => ago(s);\n\n constructor() {\n effect(() => {\n const head = this.head();\n const base = this.base();\n const f = this.file();\n const p = this.host.project();\n if (p && head && !f.binary) untracked(() => this.api.diff(p.id, this.repo(), head, f.path, base).subscribe({\n next: (d) => this.diff.set(d),\n error: (e) => this.error.set(apiMessage(e, 'Could not load this diff.')),\n }));\n });\n }\n\n protected key(l: DiffLine) {\n return `${l.kind === 'delete' ? 'old' : 'new'}:${this.lineOf(l)}`;\n }\n\n protected lineOf(l: DiffLine) {\n return (l.kind === 'delete' ? l.old : l.new) ?? 0;\n }\n\n protected threadsAt(l: DiffLine): Thread[] {\n const side = l.kind === 'delete' ? 'old' : 'new';\n const n = this.lineOf(l);\n return this.threadsHere().filter((t) => !t.outdated && t.side === side && t.line === n);\n }\n\n protected startComment(l: DiffLine) {\n if (!this.canComment()) return;\n this.drafting.set(this.key(l));\n this.draftBody.set('');\n }\n\n protected send(l: DiffLine) {\n const body = this.draftBody().trim();\n if (!body) return;\n this.comment.emit({ path: this.file().path, side: l.kind === 'delete' ? 'old' : 'new', line: this.lineOf(l), body });\n this.drafting.set('');\n this.draftBody.set('');\n }\n\n protected setReply(id: string, v: string) {\n this.replies.set({ ...this.replies(), [id]: v });\n }\n\n protected sendReply(id: string) {\n const body = (this.replies()[id] ?? '').trim();\n if (!body) return;\n this.reply.emit({ threadId: id, body });\n this.setReply(id, '');\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { CodeApi, Repo, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { CurrentRepo, People, ago, copy } from './look';\n\n// /{org}/{project}/code (prototype \"code_repos\"): the project's repositories.\n@Component({\n selector: 'o-code-repos',\n imports: [RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ host.project()?.key }} · {{ repos().length }} {{ repos().length === 1 ? 'repository' : 'repositories' }}</span><h1 class=\"o-t\">Repositories</h1></div>\n @if (canWrite()) {\n <div class=\"o-acts\">\n <a class=\"o-btn\" [routerLink]=\"host.link('code/new')\" [queryParams]=\"{ import: 1 }\">Import repository</a>\n <a class=\"o-btn o-dark\" [routerLink]=\"host.link('code/new')\" data-testid=\"new-repo\">+ New repository</a>\n </div>\n }\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n <div class=\"o-card\" style=\"overflow-x:auto\">\n <div class=\"o-tbl\" role=\"table\" aria-label=\"Repositories\" style=\"min-width:640px\">\n <div class=\"o-thead\" role=\"rowgroup\"><div class=\"o-tr\" role=\"row\"><div class=\"o-th\" role=\"columnheader\">Name</div><div class=\"o-th\" role=\"columnheader\">Default branch</div><div class=\"o-th\" role=\"columnheader\">Last push</div><div class=\"o-th\" role=\"columnheader\">Size</div><div class=\"o-th\" role=\"columnheader\">Visibility</div></div></div>\n <div class=\"o-tbody\" role=\"rowgroup\">\n @for (r of repos(); track r.name) {\n <a class=\"o-tr o-click\" role=\"row\" [routerLink]=\"host.link('code/' + r.name)\" [attr.data-testid]=\"'repo-' + r.name\">\n <div class=\"o-td\" role=\"cell\"><div class=\"o-col\" style=\"gap:2px\"><b class=\"o-mono o-b5\">{{ r.name }}</b>@if (r.description) {<span class=\"o-faint o-sm\">{{ r.description }}</span>}</div></div>\n <div class=\"o-td o-mono o-sm\" role=\"cell\">{{ r.defaultBranch }}</div>\n <div class=\"o-td o-mut\" role=\"cell\">{{ r.importState === 'running' || r.importState === 'queued' ? 'Importing…' : r.empty ? 'Empty' : ago(r.pushedAt) }}</div>\n <div class=\"o-td o-mut o-sm\" role=\"cell\">{{ sizeOf(r.sizeBytes) }}</div>\n <div class=\"o-td\" role=\"cell\"><span class=\"o-chip\">{{ r.visibility === 'private' ? 'Private' : 'Org-internal' }}</span>@if (r.archivedAt) {<span class=\"o-chip o-amb\" style=\"margin-left:4px\">Archived</span>}</div>\n </a>\n } @empty {\n <div class=\"o-empty\">{{ loaded() ? 'No repositories yet. Create one, or import from GitHub, GitLab, Bitbucket or any Git server.' : 'Loading…' }}</div>\n }\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class ReposPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n protected readonly repos = signal<Repo[]>([]);\n protected readonly loaded = signal(false);\n protected readonly error = signal('');\n protected readonly ago = (s?: string) => ago(s);\n protected readonly canWrite = computed(() => {\n const p = this.host.project();\n return !!p && !p.archivedAt && p.capabilities.includes('code.write');\n });\n\n constructor() {\n effect(() => {\n const p = this.host.project();\n if (p) untracked(() => this.api.repos(p.id).subscribe({\n next: (r) => { this.repos.set(r); this.loaded.set(true); },\n error: (e) => { this.loaded.set(true); this.error.set(apiMessage(e, 'Could not load the repositories.')); },\n }));\n });\n }\n\n protected sizeOf(b: number) {\n return b < 1024 * 1024 ? `${Math.max(1, Math.round(b / 1024))} KB` : `${(b / 1024 / 1024).toFixed(1)} MB`;\n }\n}\n\n// /{org}/{project}/code/new (prototype \"code_new\"): create an empty repository with optional\n// README, .gitignore and licence, or import one from a URL; then the quick-setup commands.\n@Component({\n selector: 'o-code-new',\n imports: [FormsModule, RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page o-narrow\">\n <div class=\"o-ph\"><div class=\"o-col\"><span class=\"o-eyebrow\">{{ host.project()?.key }}</span><h1 class=\"o-t\">Add a repository</h1></div></div>\n <div class=\"o-tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" class=\"o-tab\" [class.o-on]=\"mode() === 'create'\" [attr.aria-selected]=\"mode() === 'create'\" (click)=\"mode.set('create')\">Create</button>\n <button type=\"button\" role=\"tab\" class=\"o-tab\" [class.o-on]=\"mode() === 'import'\" [attr.aria-selected]=\"mode() === 'import'\" (click)=\"mode.set('import')\">Import from URL</button>\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n\n @if (made(); as r) {\n <div class=\"o-card\">\n <div class=\"o-ch\"><b class=\"o-mono\">{{ r.name }}</b><span class=\"o-chip\">{{ r.empty ? 'empty' : r.importState ? 'importing' : 'ready' }}</span><span class=\"o-r\">Quick setup</span></div>\n <div class=\"o-cb o-col\" style=\"gap:14px\">\n <div class=\"o-flex\">\n <div class=\"o-seg\" role=\"group\" aria-label=\"Protocol\"><button type=\"button\" [class.o-on]=\"proto() === 'https'\" (click)=\"proto.set('https')\">HTTPS</button><button type=\"button\" [class.o-on]=\"proto() === 'ssh'\" (click)=\"proto.set('ssh')\">SSH</button></div>\n <div class=\"o-copy\" style=\"flex:1\"><span data-testid=\"clone-url\">{{ url() }}</span><button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyUrl()\">{{ copied() ? 'Copied' : 'Copy' }}</button></div>\n </div>\n @if (r.empty) {\n <b class=\"o-sm\">Create a new repository on the command line</b>\n <div class=\"o-term\"><div>echo \"# {{ r.name }}\" >> README.md</div><div>git init && git add README.md</div><div>git commit -m \"first commit\"</div><div>git branch -M {{ r.defaultBranch }}</div><div>git remote add origin {{ url() }}</div><div>git push -u origin {{ r.defaultBranch }}</div></div>\n <b class=\"o-sm\">…or push an existing repository</b>\n <div class=\"o-term\"><div>git remote add origin {{ url() }}</div><div>git branch -M {{ r.defaultBranch }}</div><div>git push -u origin {{ r.defaultBranch }}</div></div>\n }\n <a class=\"o-btn o-dark\" style=\"align-self:flex-start\" [routerLink]=\"host.link('code/' + r.name)\">Open {{ r.name }}</a>\n </div>\n </div>\n } @else if (mode() === 'create') {\n <form class=\"o-card o-cb o-form\" (ngSubmit)=\"create()\">\n <div class=\"o-fld\"><label for=\"nr-name\">Repository name</label><input id=\"nr-name\" class=\"o-in o-mono\" name=\"name\" [(ngModel)]=\"repoName\" placeholder=\"payments-api\" autocomplete=\"off\" data-testid=\"repo-name\" /><span class=\"o-hint\">Letters, digits, dots, dashes and underscores.</span></div>\n <div class=\"o-fld\"><label for=\"nr-desc\">Description <span class=\"o-faint\">(optional)</span></label><input id=\"nr-desc\" class=\"o-in\" name=\"desc\" [(ngModel)]=\"desc\" placeholder=\"What lives here?\" /></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Visibility</span>\n <div class=\"o-g2\">\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"vis === 'private'\" (click)=\"vis = 'private'\"><span class=\"o-rad\" [class.o-on]=\"vis === 'private'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Private</b><span class=\"o-faint o-sm\">Project members only</span></span></button>\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"vis === 'internal'\" (click)=\"vis = 'internal'\"><span class=\"o-rad\" [class.o-on]=\"vis === 'internal'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Org-internal</b><span class=\"o-faint o-sm\">Everyone in the organization can read</span></span></button>\n </div>\n </div>\n <div class=\"o-g4\">\n <div class=\"o-fld\"><label for=\"nr-br\">Default branch</label><input id=\"nr-br\" class=\"o-in o-mono\" name=\"branch\" [(ngModel)]=\"branch\" /></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\" id=\"nr-readme\">README</span><button type=\"button\" class=\"o-tog\" role=\"switch\" aria-labelledby=\"nr-readme\" [class.o-on]=\"readme\" [attr.aria-checked]=\"readme\" (click)=\"readme = !readme\" data-testid=\"repo-readme\"></button></div>\n <div class=\"o-fld\"><label for=\"nr-gi\">.gitignore</label><select id=\"nr-gi\" class=\"o-in\" name=\"gi\" [(ngModel)]=\"gitignore\"><option value=\"\">None</option><option value=\"node\">Node</option><option value=\"go\">Go</option><option value=\"python\">Python</option></select></div>\n <div class=\"o-fld\"><label for=\"nr-lic\">Licence</label><select id=\"nr-lic\" class=\"o-in\" name=\"lic\" [(ngModel)]=\"licence\"><option value=\"\">None</option><option value=\"MIT\">MIT</option><option value=\"Apache-2.0\">Apache 2.0</option></select></div>\n </div>\n <div class=\"o-flex\"><span class=\"o-faint o-sm\">Push limits: 2 GB per push, 100 MB per file.</span><button type=\"submit\" class=\"o-btn o-dark o-r\" [disabled]=\"busy() || !repoName.trim()\" data-testid=\"repo-create\">Create repository</button></div>\n </form>\n } @else {\n <form class=\"o-card o-cb o-form\" (ngSubmit)=\"importRepo()\">\n <div class=\"o-fld\"><label for=\"ir-url\">Git URL</label><input id=\"ir-url\" class=\"o-in o-mono\" name=\"url\" [(ngModel)]=\"url_\" placeholder=\"https://github.com/acme/payments-api.git\" (blur)=\"nameFromUrl()\" /><span class=\"o-hint\">GitHub, GitLab, Bitbucket or any Git server over HTTPS. All branches and tags are copied.</span></div>\n <div class=\"o-fld\"><label for=\"ir-name\">Repository name</label><input id=\"ir-name\" class=\"o-in o-mono\" name=\"iname\" [(ngModel)]=\"repoName\" /></div>\n <div class=\"o-g2\">\n <div class=\"o-fld\"><label for=\"ir-user\">Username <span class=\"o-faint\">(private repos)</span></label><input id=\"ir-user\" class=\"o-in\" name=\"user\" [(ngModel)]=\"user\" autocomplete=\"off\" /></div>\n <div class=\"o-fld\"><label for=\"ir-tok\">Access token</label><input id=\"ir-tok\" class=\"o-in\" type=\"password\" name=\"token\" [(ngModel)]=\"token\" autocomplete=\"off\" /></div>\n </div>\n <div class=\"o-flex\"><button type=\"button\" class=\"o-tog o-dis\" disabled aria-label=\"Keep as a pull mirror\"></button><span class=\"o-sm\">Keep as a pull mirror</span><b class=\"o-ph-tag o-later\">Later</b></div>\n <div class=\"o-flex\"><span class=\"o-faint o-sm\">Imports run in the background; you'll get an inbox message when done.</span><button type=\"submit\" class=\"o-btn o-dark o-r\" [disabled]=\"busy() || !url_.trim() || !repoName.trim()\">Import</button></div>\n </form>\n }\n </div>\n `,\n})\nexport class NewRepoPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n private readonly route = inject(ActivatedRoute);\n\n protected readonly mode = signal<'create' | 'import'>('create');\n protected readonly made = signal<Repo | null>(null);\n protected readonly proto = signal<'https' | 'ssh'>('https');\n protected readonly busy = signal(false);\n protected readonly error = signal('');\n protected readonly copied = signal(false);\n protected readonly url = computed(() => (this.proto() === 'ssh' ? this.made()?.cloneSsh : this.made()?.cloneHttps) || '');\n protected repoName = '';\n protected desc = '';\n protected vis: 'private' | 'internal' = 'private';\n protected branch = 'main';\n protected readme = true;\n protected gitignore = '';\n protected licence = '';\n protected url_ = '';\n protected user = '';\n protected token = '';\n\n constructor() {\n this.route.queryParamMap.subscribe((q) => this.mode.set(q.get('import') ? 'import' : 'create'));\n }\n\n protected nameFromUrl() {\n if (this.repoName.trim()) return;\n const m = this.url_.trim().match(/([^/:]+?)(\\.git)?\\/?$/);\n if (m) this.repoName = m[1];\n }\n\n protected copyUrl() {\n void copy(this.url()).then(() => { this.copied.set(true); setTimeout(() => this.copied.set(false), 1500); });\n }\n\n protected create() {\n const p = this.host.project();\n if (!p) return;\n this.busy.set(true);\n this.error.set('');\n this.api.create(p.id, { name: this.repoName.trim(), description: this.desc.trim(), visibility: this.vis, defaultBranch: this.branch.trim() || 'main', readme: this.readme, gitignore: this.gitignore, licence: this.licence }).subscribe({\n next: (r) => { this.busy.set(false); this.made.set(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not create the repository.')); },\n });\n }\n\n protected importRepo() {\n const p = this.host.project();\n if (!p) return;\n this.busy.set(true);\n this.error.set('');\n this.api.import(p.id, { name: this.repoName.trim(), url: this.url_.trim(), username: this.user.trim() || undefined, token: this.token || undefined, visibility: this.vis }).subscribe({\n next: (r) => { this.busy.set(false); this.token = ''; this.made.set(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not start the import.')); },\n });\n }\n}\n\n// /{org}/{project}/code/{files,commits,branches,settings}: the project-level tabs open the repository\n// the person was last in (else the first one) at that tab.\n@Component({\n selector: 'o-code-current',\n imports: [RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page o-narrow\">\n @if (none()) {\n <div class=\"o-card o-empty\"><p>No repositories yet.</p><a class=\"o-btn\" style=\"margin-top:14px\" [routerLink]=\"host.link('code/new')\">+ New repository</a></div>\n } @else if (error()) {\n <div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>\n } @else {\n <div class=\"o-card\"><div class=\"o-empty\">Opening the repository…</div></div>\n }\n </div>\n `,\n})\nexport class CurrentRepoPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly current = inject(CurrentRepo);\n protected readonly none = signal(false);\n protected readonly error = signal('');\n\n constructor() {\n effect(() => {\n const p = this.host.project();\n if (!p) return;\n untracked(() => {\n const tab = String(this.route.snapshot.data['codeTab'] ?? '');\n this.api.repos(p.id).subscribe({\n next: (rs) => {\n if (!rs.length) return this.none.set(true);\n const last = this.current.get(p.id);\n const repo = rs.find((r) => r.name === last)?.name ?? rs[0].name;\n void this.router.navigate(this.host.link(`code/${repo}${tab ? '/' + tab : ''}`), { replaceUrl: true });\n },\n error: (e) => this.error.set(apiMessage(e, 'Could not load the repositories.')),\n });\n });\n });\n }\n}\n\n","import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterLink } from '@angular/router';\nimport { Language, Repo, Tree, apiMessage } from './code.api';\nimport { RefPicker, RepoPage } from './repo-base';\nimport { ago, copy, initials, langColour } from './look';\n\n// /{org}/{project}/code/{repo}?ref=&path= (prototype \"code_repo\"): the repository's files at a\n// branch, tag or commit, the last commit of each entry, the README, the clone menu and languages.\n@Component({\n selector: 'o-code-repo',\n imports: [FormsModule, RouterLink, RefPicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`.anchor{position:relative} .ic{width:18px;flex:none;color:var(--o-dim);text-align:center}`],\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-ph\">\n <div class=\"o-col\">\n <span class=\"o-eyebrow\">{{ r.projectKey }}</span>\n <div class=\"o-flex\"><h1 class=\"o-t o-mono\" style=\"font-size:19px\">{{ r.name }}</h1><span class=\"o-chip\">{{ r.visibility === 'private' ? 'Private' : 'Org-internal' }}</span>@if (r.archivedAt) {<span class=\"o-chip o-amb\">Archived</span>}</div>\n @if (r.description) {<span class=\"o-mut\">{{ r.description }}</span>}\n </div>\n @if (!r.empty) {<div class=\"o-acts\"><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive('zip')\">Download ZIP</button></div>}\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n\n @if (r.importState && r.importState !== 'done') {\n <div class=\"o-card o-cb o-col\" style=\"gap:6px\">\n <b>{{ r.importState === 'failed' ? 'The import failed' : 'Importing from ' + r.importSource }}</b>\n <span class=\"o-mut o-sm\">{{ r.importState === 'failed' ? r.importError : 'This runs in the background; the inbox tells you when it is done.' }}</span>\n </div>\n } @else if (r.empty) {\n <div class=\"o-card\">\n <div class=\"o-ch\"><b>This repository is empty</b><span class=\"o-r\">Quick setup</span></div>\n <div class=\"o-cb o-col\" style=\"gap:14px\">\n <div class=\"o-flex\">\n <div class=\"o-seg\" role=\"group\" aria-label=\"Protocol\"><button type=\"button\" [class.o-on]=\"proto() === 'https'\" (click)=\"proto.set('https')\">HTTPS</button><button type=\"button\" [class.o-on]=\"proto() === 'ssh'\" (click)=\"proto.set('ssh')\">SSH</button></div>\n <div class=\"o-copy\" style=\"flex:1\"><span data-testid=\"clone-url\">{{ cloneUrl() }}</span><button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyClone()\">{{ copied() ? 'Copied' : 'Copy' }}</button></div>\n </div>\n <b class=\"o-sm\">Push an existing repository</b>\n <div class=\"o-term\"><div>git remote add origin {{ cloneUrl() }}</div><div>git branch -M {{ r.defaultBranch }}</div><div>git push -u origin {{ r.defaultBranch }}</div></div>\n </div>\n </div>\n } @else {\n <div class=\"o-flex o-wrap\">\n <o-ref-picker [repo]=\"r.name\" [current]=\"ref() || r.defaultBranch\" (picked)=\"go($event, '')\" />\n <nav class=\"o-flex o-sm o-mono\" aria-label=\"Path\">\n <a [routerLink]=\"link()\" [queryParams]=\"qp('')\">{{ r.name }}</a>\n @for (c of crumbs(); track c.path) {<span class=\"o-faint\">/</span><a [routerLink]=\"link()\" [queryParams]=\"qp(c.path)\">{{ c.name }}</a>}\n </nav>\n <span class=\"o-r\"></span>\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"openFinder()\">Go to file <span class=\"o-kbd\">T</span></button>\n <span class=\"anchor\">\n <button type=\"button\" class=\"o-btn o-sm o-pri\" (click)=\"cloneOpen.set(!cloneOpen())\" [attr.aria-expanded]=\"cloneOpen()\" aria-haspopup=\"dialog\" data-testid=\"clone-menu\">Code ⌄</button>\n @if (cloneOpen()) {\n <div class=\"o-menu\" role=\"dialog\" aria-label=\"Clone\" style=\"right:0;top:34px;width:380px;padding:12px;display:flex;flex-direction:column;gap:10px\">\n <b>Clone</b>\n <div class=\"o-seg\" role=\"group\" aria-label=\"Protocol\" style=\"align-self:flex-start\"><button type=\"button\" [class.o-on]=\"proto() === 'https'\" (click)=\"proto.set('https')\">HTTPS</button><button type=\"button\" [class.o-on]=\"proto() === 'ssh'\" (click)=\"proto.set('ssh')\">SSH</button></div>\n <div class=\"o-copy\"><span data-testid=\"clone-url\">{{ cloneUrl() }}</span><button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyClone()\">{{ copied() ? 'Copied' : 'Copy' }}</button></div>\n <span class=\"o-hint\">{{ proto() === 'https' ? 'Use a personal access token as the password.' : 'Add your SSH key under Account › SSH and signing keys.' }}</span>\n <hr style=\"border:none;border-top:1px solid var(--o-line-soft);margin:0;width:100%\">\n <div class=\"o-flex\"><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive('zip')\">Download ZIP</button><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive('tar.gz')\">Download tar.gz</button></div>\n </div>\n }\n </span>\n </div>\n <div class=\"o-split\">\n <div class=\"o-col\" style=\"gap:14px;min-width:0\">\n <div class=\"o-card\">\n @if (tree()?.lastCommit; as lc) {\n <div class=\"o-ch\" style=\"background:var(--o-well)\">\n <span class=\"o-av\" aria-hidden=\"true\">{{ initials(lc.author.name) }}</span><b class=\"o-b5\">{{ lc.author.name }}</b>\n <a class=\"o-ell o-mut\" style=\"min-width:0\" [routerLink]=\"link('commit/' + lc.oid)\">{{ lc.subject }}</a>\n <span class=\"o-r o-flex o-sm\"><a class=\"o-mono\" [routerLink]=\"link('commit/' + lc.oid)\">{{ lc.short }}</a><span class=\"o-faint\">{{ ago(lc.committer.when) }}</span><a [routerLink]=\"link('commits')\" [queryParams]=\"{ ref: ref() }\">History</a></span>\n </div>\n }\n @if (path()) {<a class=\"o-row o-click\" [routerLink]=\"link()\" [queryParams]=\"qp(parent())\"><span class=\"o-faint o-mono ic\">..</span></a>}\n @for (e of tree()?.entries ?? []; track e.path) {\n <a class=\"o-row o-click\" [routerLink]=\"e.type === 'tree' ? link() : link('blob')\" [queryParams]=\"qp(e.path)\" [attr.data-testid]=\"'entry-' + e.name\">\n <span class=\"ic\" aria-hidden=\"true\">{{ e.type === 'tree' ? '▸' : '·' }}</span>\n <span class=\"o-mono o-sm\" style=\"width:200px;flex:none\" [class.o-b5]=\"e.type === 'tree'\">{{ e.name }}</span>\n <span class=\"o-ell o-faint o-sm\" style=\"flex:1\">{{ e.lastCommit?.subject }}</span>\n <span class=\"o-faint o-sm\">{{ ago(e.lastCommit?.committer?.when) }}</span>\n </a>\n } @empty {\n @if (!tree()) {<div class=\"o-empty\">Loading…</div>}\n }\n </div>\n @if (tree()?.readme; as rd) {\n <div class=\"o-card\">\n <div class=\"o-ch\"><b class=\"o-mono o-sm\">{{ rd.path }}</b></div>\n <div class=\"o-cb o-md readme\" style=\"font-size:14px;padding:18px 22px\" [innerHTML]=\"rd.html\"></div>\n </div>\n }\n </div>\n <div class=\"o-col\" style=\"gap:14px\">\n <div class=\"o-card o-cb o-col\"><b>About</b><span class=\"o-mut o-lh\">{{ r.description || 'No description.' }}</span><span class=\"o-faint o-sm\">Default branch <span class=\"o-mono\">{{ r.defaultBranch }}</span></span></div>\n <div class=\"o-card o-cb o-col\"><div class=\"o-flex\"><b>Releases</b><b class=\"o-ph-tag o-ga o-r\">GA</b></div><span class=\"o-faint o-sm\">Tags and release notes arrive at general availability.</span></div>\n <div class=\"o-card o-cb o-col\"><b>Deployments</b><span class=\"o-faint o-sm\">Environments show here once Deploy is set up.</span></div>\n @if (langs().length) {\n <div class=\"o-card o-cb o-col\">\n <b>Languages</b>\n <div style=\"display:flex;height:8px;border-radius:4px;overflow:hidden\" role=\"img\" [attr.aria-label]=\"langLabel()\">@for (l of langs(); track l.name; let i = $index) {<i [style.width.%]=\"l.percent\" [style.background]=\"colour(i)\"></i>}</div>\n <div class=\"o-legend\">@for (l of langs(); track l.name; let i = $index) {<span><span class=\"o-dot\" [style.background]=\"colour(i)\"></span>{{ l.name }} {{ l.percent.toFixed(0) }}%</span>}</div>\n </div>\n }\n </div>\n </div>\n }\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p><a class=\"o-btn\" style=\"margin-top:14px\" [routerLink]=\"host.link('code')\">All repositories</a></div>\n } @else {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n </div>\n\n @if (finding()) {\n <div class=\"o-overlay\" (click)=\"finding.set(false)\">\n <div class=\"o-dlg o-wide\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Go to file\" (click)=\"$event.stopPropagation()\" (keydown.escape)=\"finding.set(false)\">\n <div class=\"o-dlg-b\">\n <input class=\"o-in o-mono\" placeholder=\"Find a file\" aria-label=\"Find a file\" [ngModel]=\"fq()\" (ngModelChange)=\"fq.set($event)\" (keydown.enter)=\"openFirst()\" />\n <div class=\"o-col\" style=\"gap:0;max-height:50vh;overflow:auto\">\n @for (f of found(); track f) {<a class=\"o-row o-click o-mono o-sm\" [routerLink]=\"link('blob')\" [queryParams]=\"qp(f)\" (click)=\"finding.set(false)\">{{ f }}</a>}\n @if (!found().length) {<span class=\"o-faint o-sm\" style=\"padding:8px\">{{ files().length ? 'No files match.' : 'Loading files…' }}</span>}\n </div>\n </div>\n </div>\n </div>\n }\n `,\n})\nexport class RepoHomePage extends RepoPage {\n private readonly router = inject(Router);\n private readonly el = inject(ElementRef);\n\n protected readonly tree = signal<Tree | null>(null);\n protected readonly langs = signal<Language[]>([]);\n protected readonly ref = signal('');\n protected readonly path = signal('');\n protected readonly proto = signal<'https' | 'ssh'>('https');\n protected readonly cloneOpen = signal(false);\n protected readonly copied = signal(false);\n protected readonly finding = signal(false);\n protected readonly fq = signal('');\n protected readonly files = signal<string[]>([]);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly colour = langColour;\n protected readonly cloneUrl = computed(() => (this.proto() === 'ssh' ? this.repo()?.cloneSsh : this.repo()?.cloneHttps) || '');\n protected readonly crumbs = computed(() => {\n const parts = this.path().split('/').filter(Boolean);\n return parts.map((name, i) => ({ name, path: parts.slice(0, i + 1).join('/') }));\n });\n protected readonly parent = computed(() => this.path().split('/').slice(0, -1).join('/'));\n protected readonly found = computed(() => {\n const q = this.fq().toLowerCase();\n return this.files().filter((f) => !q || f.toLowerCase().includes(q)).slice(0, 50);\n });\n protected readonly langLabel = computed(() => this.langs().map((l) => `${l.name} ${l.percent.toFixed(0)}%`).join(', '));\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => {\n this.ref.set(q.get('ref') ?? '');\n this.path.set(q.get('path') ?? '');\n const r = this.repo();\n if (r && r.name === this.name()) this.load(r);\n });\n }\n\n protected onRepo(r: Repo) {\n this.load(r);\n if (!r.empty) this.api.languages(this.projectId(), r.name, this.ref() || r.defaultBranch).subscribe({ next: (l) => this.langs.set(l), error: () => undefined });\n }\n\n protected qp(path: string) {\n return { ref: this.ref() || null, path: path || null };\n }\n\n protected go(ref: string, path: string) {\n void this.router.navigate(this.link(), { queryParams: { ref, path: path || null } });\n }\n\n protected copyClone() {\n void copy(this.cloneUrl()).then(() => { this.copied.set(true); setTimeout(() => this.copied.set(false), 1500); });\n }\n\n protected archive(format: 'zip' | 'tar.gz') {\n const r = this.repo();\n if (!r) return;\n this.api.archiveUrl(this.projectId(), r.name, this.ref() || r.defaultBranch, format).subscribe({\n next: (u) => { if (u) location.assign(u); },\n error: (e) => this.error.set(apiMessage(e, 'Could not prepare the download.')),\n });\n }\n\n protected openFirst() {\n const f = this.found()[0];\n if (f) { this.finding.set(false); void this.router.navigate(this.link('blob'), { queryParams: this.qp(f) }); }\n }\n\n /** T opens Go to file (prototype). */\n @HostListener('document:keydown', ['$event'])\n protected key(e: KeyboardEvent) {\n const t = e.target as HTMLElement | null;\n if (e.key !== 't' || e.metaKey || e.ctrlKey || e.altKey || t?.closest('input,textarea,select,[contenteditable]')) return;\n if (this.repo() && !this.repo()!.empty && !this.finding()) { e.preventDefault(); this.openFinder(); }\n }\n\n private load(r: Repo) {\n if (r.empty || (r.importState && r.importState !== 'done')) return;\n const ref = this.ref() || r.defaultBranch;\n this.tree.set(null);\n this.api.tree(this.projectId(), r.name, ref, this.path()).subscribe({\n next: (t) => this.tree.set(t),\n error: (e) => this.error.set(apiMessage(e, 'Could not read the files.')),\n });\n this.files.set([]);\n }\n\n protected openFinder() {\n const r = this.repo();\n if (!r || r.empty) return;\n this.finding.set(true);\n this.fq.set('');\n if (!this.files().length) this.api.files(this.projectId(), r.name, this.ref() || r.defaultBranch).subscribe({ next: (f) => this.files.set(f.files), error: () => undefined });\n setTimeout(() => (this.el.nativeElement as HTMLElement).querySelector<HTMLInputElement>('input[aria-label=\"Find a file\"]')?.focus());\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';\nimport { Router, RouterLink } from '@angular/router';\nimport { BlameHunk, Blob, Repo, apiMessage } from './code.api';\nimport { RefPicker, RepoPage } from './repo-base';\nimport { TOKEN_CSS, ago, copy, initials, size } from './look';\n\n// /{org}/{project}/code/{repo}/blob?ref=&path= (prototype \"code_file\"): one file, highlighted, with\n// Markdown preview, blame, raw, copy and download; a line number links to that line (#L12).\n@Component({\n selector: 'o-code-file',\n imports: [RouterLink, RefPicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [TOKEN_CSS, `.o-ln .o-n{text-decoration:none} .o-btn.o-on{background:var(--o-tx);border-color:var(--o-tx);color:var(--o-acc-fg)}`],\n template: `\n <div class=\"o-page o-wide\">\n @if (repo(); as r) {\n <div class=\"o-flex o-wrap\">\n <o-ref-picker [repo]=\"r.name\" [current]=\"ref() || r.defaultBranch\" (picked)=\"pickRef($event)\" />\n <nav class=\"o-flex o-sm o-mono\" aria-label=\"Path\">\n <a [routerLink]=\"link()\" [queryParams]=\"{ ref: ref() || null }\">{{ r.name }}</a>\n @for (c of crumbs(); track c.path; let last = $last) {\n <span class=\"o-faint\">/</span>\n @if (last) {<b aria-current=\"page\">{{ c.name }}</b>} @else {<a [routerLink]=\"link()\" [queryParams]=\"{ ref: ref() || null, path: c.path }\">{{ c.name }}</a>}\n }\n </nav>\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (blob(); as b) {\n <div class=\"o-card\">\n @if (b.lastCommit; as lc) {\n <div class=\"o-ch\" style=\"background:var(--o-well)\">\n <span class=\"o-av\" aria-hidden=\"true\">{{ initials(lc.author.name) }}</span><b class=\"o-b5\">{{ lc.author.name }}</b>\n <span class=\"o-ell o-mut\" style=\"min-width:0\">{{ lc.subject }}</span>\n <span class=\"o-r o-sm\"><a class=\"o-mono\" [routerLink]=\"link('commit/' + lc.oid)\">{{ lc.short }}</a> · {{ ago(lc.committer.when) }} · <a [routerLink]=\"link('commits')\" [queryParams]=\"{ ref: ref() || null, path: b.path }\">History</a></span>\n </div>\n }\n <div class=\"o-ch\">\n <span class=\"o-faint o-sm\">{{ meta() }}</span>\n <span class=\"o-r o-flex\" style=\"gap:6px\">\n @if (b.markdown) {\n <div class=\"o-seg\" role=\"group\" aria-label=\"View\"><button type=\"button\" [class.o-on]=\"view() === 'preview'\" (click)=\"view.set('preview')\">Preview</button><button type=\"button\" [class.o-on]=\"view() === 'code'\" (click)=\"view.set('code')\">Code</button></div>\n }\n @if (!b.binary && !b.truncated) {<button type=\"button\" class=\"o-btn o-xs\" [class.o-on]=\"blaming()\" [attr.aria-pressed]=\"blaming()\" (click)=\"toggleBlame()\">Blame</button>}\n @if (b.rawUrl) {<a class=\"o-btn o-xs\" [href]=\"b.rawUrl\" target=\"_blank\" rel=\"noopener\">Raw</a>}\n @if (!b.binary) {<button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyText()\">{{ copied() ? 'Copied' : 'Copy' }}</button>}\n @if (b.downloadUrl) {<a class=\"o-btn o-xs\" [href]=\"b.downloadUrl\">Download</a>}\n </span>\n </div>\n @if (b.image && b.rawUrl) {\n <div class=\"o-cb\" style=\"text-align:center\"><img [src]=\"b.rawUrl\" [alt]=\"b.name\" style=\"max-width:100%\" /></div>\n } @else if (b.binary || b.truncated) {\n <div class=\"o-empty\">{{ b.binary ? 'A binary file.' : 'Too large to show here.' }} @if (b.rawUrl) {<a [href]=\"b.rawUrl\" target=\"_blank\" rel=\"noopener\">View raw</a>}</div>\n } @else if (b.markdown && view() === 'preview') {\n <div class=\"o-cb o-md\" style=\"font-size:14px;padding:18px 22px\" [innerHTML]=\"b.markdown\"></div>\n } @else {\n <div class=\"o-code\" style=\"padding:8px 0;overflow-x:auto\" role=\"table\" [attr.aria-label]=\"b.path\">\n @for (l of b.lines; track $index; let i = $index) {\n <div class=\"o-ln\" [class.o-hl]=\"line() === i + 1\" role=\"row\" [attr.id]=\"'L' + (i + 1)\">\n @if (blaming()) {<span class=\"o-bl\" role=\"cell\" [attr.title]=\"blameAt(i + 1)?.summary\">{{ blameLabel(i + 1) }}</span>}\n <a class=\"o-n\" role=\"rowheader\" [routerLink]=\"[]\" [queryParamsHandling]=\"'preserve'\" [fragment]=\"'L' + (i + 1)\" (click)=\"pickLine(i + 1)\" [attr.aria-label]=\"'Line ' + (i + 1)\">{{ i + 1 }}</a>\n <span class=\"o-t\" role=\"cell\" [innerHTML]=\"l\"></span>\n </div>\n }\n </div>\n }\n </div>\n <span class=\"o-faint o-sm\">Click a line number to link to that line.</span>\n } @else if (!error()) {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class FilePage extends RepoPage {\n private readonly router = inject(Router);\n protected readonly blob = signal<Blob | null>(null);\n protected readonly blame = signal<BlameHunk[]>([]);\n protected readonly blaming = signal(false);\n protected readonly ref = signal('');\n protected readonly path = signal('');\n protected readonly line = signal(0);\n protected readonly view = signal<'preview' | 'code'>('preview');\n protected readonly copied = signal(false);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly crumbs = computed(() => {\n const parts = this.path().split('/').filter(Boolean);\n return parts.map((name, i) => ({ name, path: parts.slice(0, i + 1).join('/') }));\n });\n protected readonly meta = computed(() => {\n const b = this.blob();\n if (!b) return '';\n return [b.binary ? '' : `${b.lineCount} lines`, size(b.size), b.language ?? ''].filter(Boolean).join(' · ');\n });\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => {\n this.ref.set(q.get('ref') ?? '');\n this.path.set(q.get('path') ?? '');\n const r = this.repo();\n if (r && r.name === this.name()) this.load(r);\n });\n this.route.fragment.subscribe((f) => this.line.set(f?.startsWith('L') ? Number(f.slice(1)) || 0 : 0));\n }\n\n protected onRepo(r: Repo) {\n this.load(r);\n }\n\n protected pickRef(ref: string) {\n void this.router.navigate(this.link('blob'), { queryParams: { ref, path: this.path() } });\n }\n\n protected pickLine(n: number) {\n this.line.set(n);\n }\n\n protected copyText() {\n const b = this.blob();\n if (!b) return;\n const div = document.createElement('div');\n const text = b.lines.map((l) => { div.innerHTML = l; return div.textContent ?? ''; }).join('\\n');\n void copy(text).then(() => { this.copied.set(true); setTimeout(() => this.copied.set(false), 1500); });\n }\n\n protected toggleBlame() {\n this.blaming.set(!this.blaming());\n const r = this.repo();\n if (this.blaming() && r && !this.blame().length) {\n this.api.blame(this.projectId(), r.name, this.ref() || r.defaultBranch, this.path()).subscribe({ next: (b) => this.blame.set(b), error: (e) => this.error.set(apiMessage(e, 'Could not load the blame.')) });\n }\n }\n\n protected blameAt(n: number): BlameHunk | undefined {\n return this.blame().find((h) => n >= h.startLine && n < h.startLine + h.lines);\n }\n\n /** The hunk's commit and author on its first line only. */\n protected blameLabel(n: number): string {\n const h = this.blameAt(n);\n return h && h.startLine === n ? `${h.commit.slice(0, 7)} ${h.author} · ${ago(h.when)}` : '';\n }\n\n private load(r: Repo) {\n if (!this.path()) return;\n this.blob.set(null);\n this.blame.set([]);\n this.blaming.set(false);\n this.api.blob(this.projectId(), r.name, this.ref() || r.defaultBranch, this.path()).subscribe({\n next: (b) => { this.blob.set(b); this.view.set(b.markdown ? 'preview' : 'code'); if (this.line()) setTimeout(() => document.getElementById('L' + this.line())?.scrollIntoView({ block: 'center' })); },\n error: (e) => this.error.set(apiMessage(e, `Could not open ${this.path()}.`)),\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterLink } from '@angular/router';\nimport { Commit, CommitDetail, Ref, Repo, apiMessage } from './code.api';\nimport { DiffView } from './diff.view';\nimport { RefPicker, RepoPage } from './repo-base';\nimport { ago, dayLabel, initials } from './look';\n\nconst PAGE = 30;\n\n// /{org}/{project}/code/{repo}/commits?ref=&path= (prototype \"code_commits\"): history grouped by\n// day, with the issue keys each message names.\n@Component({\n selector: 'o-code-commits',\n imports: [RouterLink, RefPicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ r.name }}{{ path() ? ' · ' + path() : '' }}</span><h1 class=\"o-t\">Commits</h1></div>\n <div class=\"o-acts\"><o-ref-picker [repo]=\"r.name\" [current]=\"ref() || r.defaultBranch\" (picked)=\"pickRef($event)\" /></div>\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @for (g of groups(); track g.day) {\n <span class=\"o-lbl\" style=\"margin-top:4px\">Commits on {{ g.day }}</span>\n <div class=\"o-card\">\n @for (c of g.items; track c.oid) {\n <div class=\"o-row\" [attr.data-testid]=\"'commit-' + c.short\">\n <div class=\"o-col\" style=\"gap:4px;flex:1;min-width:0\">\n <a class=\"o-b5 o-ell\" style=\"color:var(--o-tx)\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.subject }}</a>\n <span class=\"o-flex o-faint o-sm o-wrap\"><span class=\"o-av\" aria-hidden=\"true\">{{ initials(c.author.name) }}</span>{{ c.author.name }} committed {{ ago(c.committer.when) }}\n @for (k of c.keys; track k) {<a class=\"o-chip o-blu\" [routerLink]=\"host.link('issues/' + k)\">{{ k }}</a>}\n </span>\n </div>\n <a class=\"o-btn o-sm o-mono\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.short }}</a>\n <a class=\"o-btn o-sm\" [routerLink]=\"link()\" [queryParams]=\"{ ref: c.oid }\" title=\"Browse files at this commit\" [attr.aria-label]=\"'Browse files at ' + c.short\">‹›</a>\n </div>\n }\n </div>\n } @empty {\n <div class=\"o-card\"><div class=\"o-empty\">{{ loading() ? 'Loading…' : r.empty ? 'No commits yet: push to ' + r.defaultBranch + '.' : 'No commits.' }}</div></div>\n }\n @if (more()) {<button type=\"button\" class=\"o-btn o-sm\" style=\"align-self:center\" (click)=\"next()\" [disabled]=\"loading()\">Older commits</button>}\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class CommitsPage extends RepoPage {\n private readonly router = inject(Router);\n protected readonly commits = signal<Commit[]>([]);\n protected readonly ref = signal('');\n protected readonly path = signal('');\n protected readonly loading = signal(false);\n protected readonly more = signal(false);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly groups = computed(() => {\n const out: { day: string; items: Commit[] }[] = [];\n for (const c of this.commits()) {\n const d = dayLabel(c.committer.when);\n const last = out[out.length - 1];\n if (last?.day === d) last.items.push(c);\n else out.push({ day: d, items: [c] });\n }\n return out;\n });\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => {\n this.ref.set(q.get('ref') ?? '');\n this.path.set(q.get('path') ?? '');\n const r = this.repo();\n if (r && r.name === this.name()) this.load(r, 0);\n });\n }\n\n protected onRepo(r: Repo) {\n this.load(r, 0);\n }\n\n protected pickRef(ref: string) {\n void this.router.navigate(this.link('commits'), { queryParams: { ref, path: this.path() || null } });\n }\n\n protected next() {\n const r = this.repo();\n if (r) this.load(r, this.commits().length);\n }\n\n private load(r: Repo, skip: number) {\n if (r.empty) return;\n this.loading.set(true);\n this.api.commits(this.projectId(), r.name, { ref: this.ref() || r.defaultBranch, path: this.path() || undefined, limit: PAGE, skip }).subscribe({\n next: (cs) => { this.loading.set(false); this.commits.set(skip ? [...this.commits(), ...cs] : cs); this.more.set(cs.length === PAGE); },\n error: (e) => { this.loading.set(false); this.error.set(apiMessage(e, 'Could not load the history.')); },\n });\n }\n}\n\n// /{org}/{project}/code/{repo}/commit/{sha} (prototype \"code_commit\"): the message, author, keys,\n// parents and every changed file's diff.\n@Component({\n selector: 'o-code-commit',\n imports: [RouterLink, DiffView],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (commit(); as c) {\n <div class=\"o-card\">\n <div class=\"o-cb o-col\" style=\"gap:10px\">\n <h1 class=\"o-t\">{{ c.subject }}</h1>\n @if (c.body) {<span class=\"o-mut o-lh\" style=\"white-space:pre-wrap\">{{ c.body }}</span>}\n <div class=\"o-flex o-wrap o-sm\">\n <span class=\"o-av\" aria-hidden=\"true\">{{ initials(c.author.name) }}</span><b class=\"o-b5\">{{ c.author.name }}</b><span class=\"o-faint\">committed {{ ago(c.committer.when) }}</span>\n @for (k of c.keys; track k) {<a class=\"o-chip o-blu\" [routerLink]=\"host.link('issues/' + k)\">{{ k }}</a>}\n <span class=\"o-r o-mono o-faint\">commit {{ c.oid.slice(0, 10) }}@for (p of c.parents; track p) { · parent <a [routerLink]=\"link('commit/' + p)\">{{ p.slice(0, 7) }}</a>}</span>\n </div>\n </div>\n <div class=\"o-cf\"><a [routerLink]=\"link()\" [queryParams]=\"{ ref: c.oid }\">Browse files</a><span class=\"o-r\">{{ c.files.length }} {{ c.files.length === 1 ? 'file' : 'files' }} changed · <span class=\"o-grn-t\">+{{ c.additions }}</span> <span class=\"o-red-t\">−{{ c.deletions }}</span></span></div>\n </div>\n @for (f of c.files; track f.path) {\n <o-diff [repo]=\"name()\" [file]=\"f\" [head]=\"c.oid\" />\n }\n } @else if (!error()) {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n </div>\n `,\n})\nexport class CommitPage extends RepoPage {\n protected readonly commit = signal<CommitDetail | null>(null);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n private sha = '';\n\n constructor() {\n super();\n this.route.paramMap.subscribe((m) => {\n this.sha = m.get('sha') ?? '';\n const r = this.repo();\n if (r && r.name === this.name()) this.onRepo(r);\n });\n }\n\n protected onRepo(r: Repo) {\n if (!this.sha) return;\n this.commit.set(null);\n this.api.commit(this.projectId(), r.name, this.sha).subscribe({ next: (c) => this.commit.set(c), error: (e) => this.error.set(apiMessage(e, `Could not open commit ${this.sha.slice(0, 7)}.`)) });\n }\n}\n\n// /{org}/{project}/code/{repo}/branches (prototype \"code_branches\"): each branch with its last\n// commit, how far behind and ahead of the default branch it is, protection, its pull request, and\n// create, delete and delete-merged.\n@Component({\n selector: 'o-code-branches',\n imports: [FormsModule, RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`.ab{display:flex;align-items:center;gap:0;width:200px} .ab i{display:block;height:6px} .ab .l{flex:1;display:flex;justify-content:flex-end;border-right:1px solid var(--o-line-mid)} .ab .rr{flex:1}`],\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ r.name }}</span><h1 class=\"o-t\">Branches</h1></div>\n @if (canWrite()) {\n <div class=\"o-acts\">\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"deleteMerged()\" [disabled]=\"busy()\">Delete merged</button>\n <button type=\"button\" class=\"o-btn o-sm o-dark\" (click)=\"adding.set(!adding())\" data-testid=\"new-branch\">+ New branch</button>\n </div>\n }\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (note()) {<div class=\"o-note\" role=\"status\">{{ note() }}</div>}\n @if (adding()) {\n <form class=\"o-card o-cb o-flex o-wrap\" (ngSubmit)=\"create()\">\n <div class=\"o-fld\" style=\"flex:1\"><label for=\"nb-name\">Branch name</label><input id=\"nb-name\" class=\"o-in o-mono\" name=\"name\" [(ngModel)]=\"newName\" data-testid=\"branch-name\" /></div>\n <div class=\"o-fld\"><label for=\"nb-from\">From</label><select id=\"nb-from\" class=\"o-in\" name=\"from\" [(ngModel)]=\"from\">@for (b of refs(); track b.name) {<option [value]=\"b.name\">{{ b.name }}</option>}</select></div>\n <button type=\"submit\" class=\"o-btn o-dark\" style=\"align-self:flex-end\" [disabled]=\"!newName.trim() || busy()\" data-testid=\"branch-create\">Create branch</button>\n </form>\n }\n <div class=\"o-card\" style=\"overflow-x:auto\">\n <div class=\"o-tbl\" role=\"table\" aria-label=\"Branches\" style=\"min-width:720px\">\n <div class=\"o-thead\" role=\"rowgroup\"><div class=\"o-tr\" role=\"row\"><div class=\"o-th\" role=\"columnheader\">Branch</div><div class=\"o-th\" role=\"columnheader\">Updated</div><div class=\"o-th\" role=\"columnheader\" style=\"width:220px\">Behind | Ahead of {{ r.defaultBranch }}</div><div class=\"o-th\" role=\"columnheader\">Pull request</div><div class=\"o-th\" role=\"columnheader\"></div></div></div>\n <div class=\"o-tbody\" role=\"rowgroup\">\n @for (b of refs(); track b.name) {\n <div class=\"o-tr\" role=\"row\" [attr.data-testid]=\"'branch-' + b.name\">\n <div class=\"o-td\" role=\"cell\"><span class=\"o-flex\"><a class=\"o-mono o-b5 o-sm\" [routerLink]=\"link()\" [queryParams]=\"{ ref: b.name }\">{{ b.name }}</a>@if (b.default) {<span class=\"o-chip\">default</span>}@if (b.protected) {<span class=\"o-chip o-amb\" [attr.title]=\"'Rule ' + b.rule\">protected</span>}@if (b.merged && !b.default) {<span class=\"o-chip o-vio\">merged</span>}</span></div>\n <div class=\"o-td o-mut o-sm\" role=\"cell\">@if (b.commit) {<span class=\"o-flex\"><span class=\"o-av\" aria-hidden=\"true\">{{ initials(b.commit.author.name) }}</span>{{ ago(b.commit.committer.when) }}</span>}</div>\n <div class=\"o-td\" role=\"cell\">\n @if (!b.default) {\n <div class=\"ab\" [attr.aria-label]=\"b.behind + ' behind, ' + b.ahead + ' ahead'\">\n <span class=\"o-mono o-xs o-faint\" style=\"width:26px;text-align:right;padding-right:4px\">{{ b.behind }}</span>\n <div class=\"l\"><i [style.width.%]=\"bar(b.behind)\" style=\"border-radius:3px 0 0 3px;background:var(--o-line-mid)\"></i></div>\n <div class=\"rr\"><i [style.width.%]=\"bar(b.ahead)\" style=\"border-radius:0 3px 3px 0;background:var(--o-acc)\"></i></div>\n <span class=\"o-mono o-xs o-faint\" style=\"width:26px;padding-left:4px\">{{ b.ahead }}</span>\n </div>\n }\n </div>\n <div class=\"o-td\" role=\"cell\">\n @if (pullFor(b.name); as pr) {<a [class]=\"pr.state === 'merged' ? 'o-chip o-vio' : pr.state === 'closed' ? 'o-chip' : 'o-chip o-blu'\" [routerLink]=\"link('pull/' + pr.number)\">#{{ pr.number }} {{ pr.state }}</a>}\n @else if (!b.default && b.ahead > 0 && canWrite()) {<a class=\"o-btn o-xs\" [routerLink]=\"link('pulls')\" [queryParams]=\"{ new: 1, source: b.name }\">New PR</a>}\n </div>\n <div class=\"o-td o-num\" role=\"cell\">@if (b.canDelete && canWrite()) {<button type=\"button\" class=\"o-btn o-xs o-ghost\" (click)=\"remove(b)\" [attr.aria-label]=\"'Delete ' + b.name\">Delete</button>}</div>\n </div>\n } @empty {\n <div class=\"o-empty\">{{ r.empty ? 'No branches yet: push to create ' + r.defaultBranch + '.' : 'Loading…' }}</div>\n }\n </div>\n </div>\n </div>\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class BranchesPage extends RepoPage {\n protected readonly refs = signal<Ref[]>([]);\n protected readonly pulls = signal<{ number: number; state: string; source: string }[]>([]);\n protected readonly adding = signal(false);\n protected readonly busy = signal(false);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected newName = '';\n protected from = '';\n private readonly maxAB = computed(() => Math.max(1, ...this.refs().map((r) => Math.max(r.ahead, r.behind))));\n\n protected onRepo(r: Repo) {\n this.from = r.defaultBranch;\n this.load(r);\n }\n\n protected bar(n: number) {\n return n ? Math.max(4, (100 * n) / this.maxAB()) : 0;\n }\n\n protected pullFor(branch: string) {\n return this.pulls().find((p) => p.source === branch && p.state === 'open') ?? this.pulls().find((p) => p.source === branch);\n }\n\n protected create() {\n const r = this.repo();\n const n = this.newName.trim();\n if (!r || !n) return;\n this.busy.set(true);\n this.api.createBranch(this.projectId(), r.name, n, this.from || r.defaultBranch).subscribe({\n next: () => { this.busy.set(false); this.adding.set(false); this.newName = ''; this.note.set(`Branch ${n} created.`); this.load(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not create the branch.')); },\n });\n }\n\n protected remove(b: Ref) {\n const r = this.repo();\n if (!r) return;\n this.api.deleteBranch(this.projectId(), r.name, b.name).subscribe({\n next: () => { this.note.set(`Branch ${b.name} deleted.`); this.load(r); },\n error: (e) => this.error.set(apiMessage(e, `Could not delete ${b.name}.`)),\n });\n }\n\n protected deleteMerged() {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n this.api.deleteMerged(this.projectId(), r.name).subscribe({\n next: (res: any) => { this.busy.set(false); const n = (res?.deleted ?? res ?? []).length ?? 0; this.note.set(n ? `${n} merged ${n === 1 ? 'branch' : 'branches'} deleted.` : 'No merged branches to delete.'); this.load(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not delete merged branches.')); },\n });\n }\n\n private load(r: Repo) {\n if (r.empty) return;\n this.api.refs(this.projectId(), r.name, 'branch').subscribe({ next: (b) => this.refs.set(b), error: (e) => this.error.set(apiMessage(e, 'Could not load the branches.')) });\n this.api.pulls(this.projectId(), r.name, { state: 'all' }).subscribe({ next: (p) => this.pulls.set(p), error: () => undefined });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { forkJoin, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\nimport { CodeApi, Comparison, PullBrief, Ref, Repo, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { People, ago, checkDot } from './look';\n\ninterface Row extends PullBrief {\n repo: string;\n}\n\nconst REVIEW: Record<string, string> = { approved: 'Approved', changes_requested: 'Changes requested', review_required: 'Review required', commented: 'Commented', '': '' };\n\n// /{org}/{project}/code/pulls (every repository) and /code/{repo}/pulls (prototype \"code_pulls\"):\n// open, merged and closed pull requests with their checks, review state and comments; filters; and\n// the form that opens one (?new=1&source=).\n@Component({\n selector: 'o-code-pulls',\n imports: [FormsModule, RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`.st{border:none;background:none;padding:0;font-size:12px;font-weight:500;cursor:pointer;color:var(--o-mut)} .st.o-on{color:var(--o-tx)} .o-btn.o-on{background:var(--o-tx);border-color:var(--o-tx);color:var(--o-acc-fg)}`],\n template: `\n <div class=\"o-page\">\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ repoName() || host.project()?.key + ' · every repository' }}</span><h1 class=\"o-t\">Pull requests</h1></div>\n @if (canWrite() && repos().length) {<div class=\"o-acts\"><button type=\"button\" class=\"o-btn o-dark\" (click)=\"startNew('')\" data-testid=\"new-pull\">New pull request</button></div>}\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n\n @if (opening()) {\n <form class=\"o-card\" (ngSubmit)=\"open()\" aria-label=\"New pull request\">\n <div class=\"o-ch\"><b>New pull request</b></div>\n <div class=\"o-cb o-col\" style=\"gap:12px\">\n <div class=\"o-flex o-wrap\">\n @if (!repoName()) {\n <select class=\"o-in o-sm\" style=\"width:auto\" name=\"repo\" aria-label=\"Repository\" [ngModel]=\"newRepo()\" (ngModelChange)=\"pickRepo($event)\">@for (r of repos(); track r.name) {<option [value]=\"r.name\">{{ r.name }}</option>}</select>\n }\n <span class=\"o-faint o-sm\">into</span>\n <select class=\"o-in o-sm o-mono\" style=\"width:auto\" name=\"target\" aria-label=\"Target branch\" [ngModel]=\"target()\" (ngModelChange)=\"target.set($event); compare()\">@for (b of branches(); track b.name) {<option [value]=\"b.name\">{{ b.name }}</option>}</select>\n <span class=\"o-faint o-sm\">from</span>\n <select class=\"o-in o-sm o-mono\" style=\"width:auto\" name=\"source\" aria-label=\"Source branch\" [ngModel]=\"source()\" (ngModelChange)=\"source.set($event); compare()\" data-testid=\"pull-source\">\n <option value=\"\">Choose a branch</option>\n @for (b of branches(); track b.name) {@if (b.name !== target()) {<option [value]=\"b.name\">{{ b.name }}</option>}}\n </select>\n @if (cmp(); as c) {<span class=\"o-faint o-sm\">{{ c.ahead }} {{ c.ahead === 1 ? 'commit' : 'commits' }} · {{ c.files.length }} {{ c.files.length === 1 ? 'file' : 'files' }}</span>}\n </div>\n <div class=\"o-fld\"><label for=\"np-title\">Title</label><input id=\"np-title\" class=\"o-in\" name=\"title\" [(ngModel)]=\"title\" data-testid=\"pull-title\" /><span class=\"o-hint\">Put an issue key in the title or description to link it; “Closes PAY-142” closes it on merge.</span></div>\n <div class=\"o-fld\"><label for=\"np-body\">Description</label><textarea id=\"np-body\" class=\"o-in\" rows=\"5\" name=\"body\" [(ngModel)]=\"body\" style=\"height:auto;padding:8px 10px\"></textarea></div>\n <div class=\"o-fld\"><label for=\"np-rev\">Reviewers</label>\n <select id=\"np-rev\" class=\"o-in\" name=\"reviewer\" [(ngModel)]=\"reviewer\"><option value=\"\">Nobody yet</option>@for (p of host.people(); track p.id) {@if (p.id !== host.meId()) {<option [value]=\"p.id\">{{ p.name || p.email }}</option>}}</select>\n </div>\n </div>\n <div class=\"o-cf\"><label class=\"o-flex o-sm\"><input type=\"checkbox\" name=\"draft\" [(ngModel)]=\"draft\" />Open as a draft</label><button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"opening.set(false)\">Cancel</button><button type=\"submit\" class=\"o-btn o-sm o-dark\" [disabled]=\"busy() || !source() || !title.trim()\" data-testid=\"pull-open\">Open pull request</button></div>\n </form>\n }\n\n <div class=\"o-flex o-wrap\">\n <input class=\"o-in o-sm\" style=\"flex:1;min-width:240px\" placeholder=\"Search titles\" aria-label=\"Search titles\" [(ngModel)]=\"q\" (keydown.enter)=\"load()\" (blur)=\"load()\" />\n <button type=\"button\" class=\"o-btn o-sm\" [class.o-on]=\"mine()\" [attr.aria-pressed]=\"mine()\" (click)=\"mine.set(!mine()); load()\">Needs my review</button>\n <select class=\"o-in o-sm\" style=\"width:auto\" aria-label=\"Author\" [(ngModel)]=\"author\" (ngModelChange)=\"load()\"><option value=\"\">Author</option>@for (p of host.people(); track p.id) {<option [value]=\"p.id\">{{ p.name || p.email }}</option>}</select>\n </div>\n <div class=\"o-card\">\n <div class=\"o-ch\"><div class=\"o-flex\" style=\"gap:14px\" role=\"group\" aria-label=\"State\">\n @for (s of states; track s.id) {<button type=\"button\" class=\"st\" [class.o-on]=\"state() === s.id\" [attr.aria-pressed]=\"state() === s.id\" (click)=\"state.set(s.id); load()\">{{ s.icon }} {{ s.label }}</button>}\n </div></div>\n @for (p of rows(); track p.repo + p.number) {\n <a class=\"o-row o-click\" style=\"align-items:flex-start\" [routerLink]=\"host.link('code/' + p.repo + '/pull/' + p.number)\" [attr.data-testid]=\"'pull-' + p.number\">\n <span [style.color]=\"p.state === 'merged' ? 'var(--o-vio)' : p.state === 'closed' ? 'var(--o-bad-solid)' : 'var(--o-ok)'\" style=\"margin-top:1px\" aria-hidden=\"true\">{{ p.state === 'merged' ? '⇄' : p.state === 'closed' ? '✕' : '●' }}</span>\n <div class=\"o-col\" style=\"gap:4px;flex:1;min-width:0\">\n <span class=\"o-flex o-wrap\"><b class=\"o-b5\" style=\"color:var(--o-tx)\">{{ p.title }}</b>@for (l of p.labels; track l) {<span class=\"o-chip o-out\">{{ l }}</span>}@if (p.draft) {<span class=\"o-chip\">Draft</span>}</span>\n <span class=\"o-faint o-sm\">#{{ p.number }} · {{ people().name(p.authorId) }} · @if (!repoName()) {{{ p.repo }} · }<span class=\"o-mono\">{{ p.source }}</span> → <span class=\"o-mono\">{{ p.target }}</span> · updated {{ ago(p.updatedAt) }}</span>\n </div>\n <span class=\"o-flex o-sm\"><span [class]=\"dot(p.checks)\" [attr.title]=\"'Checks: ' + (p.checks || 'none')\"></span><span class=\"o-mut\">{{ review(p.review) }}</span><span class=\"o-faint\" [attr.aria-label]=\"p.comments + ' comments'\">💬 {{ p.comments }}</span></span>\n </a>\n } @empty {\n <div class=\"o-empty\">{{ loading() ? 'Loading…' : repos().length ? 'No pull requests match.' : 'No repositories yet.' }}</div>\n }\n </div>\n </div>\n `,\n})\nexport class PullsPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n protected readonly states = [{ id: 'open', label: 'Open', icon: '●' }, { id: 'merged', label: 'Merged', icon: '✓' }, { id: 'closed', label: 'Closed', icon: '✕' }];\n protected readonly repoName = signal('');\n protected readonly repos = signal<Repo[]>([]);\n protected readonly rows = signal<Row[]>([]);\n protected readonly state = signal('open');\n protected readonly mine = signal(false);\n protected readonly loading = signal(false);\n protected readonly error = signal('');\n protected readonly busy = signal(false);\n protected readonly opening = signal(false);\n protected readonly newRepo = signal('');\n protected readonly branches = signal<Ref[]>([]);\n protected readonly source = signal('');\n protected readonly target = signal('');\n protected readonly cmp = signal<Comparison | null>(null);\n protected q = '';\n protected author = '';\n protected title = '';\n protected body = '';\n protected reviewer = '';\n protected draft = false;\n private wantNew: { source: string } | null = null;\n\n protected readonly people = computed(() => new People(this.host.people()));\n protected readonly ago = (s?: string) => ago(s);\n protected readonly dot = checkDot;\n protected readonly review = (r: string) => REVIEW[r] ?? r.replace(/_/g, ' ');\n protected readonly canWrite = computed(() => {\n const p = this.host.project();\n return !!p && !p.archivedAt && p.capabilities.includes('code.write');\n });\n\n constructor() {\n this.route.paramMap.subscribe((m) => this.repoName.set(m.get('repo') ?? ''));\n this.route.queryParamMap.subscribe((q) => { if (q.get('new')) this.wantNew = { source: q.get('source') ?? '' }; });\n effect(() => {\n const p = this.host.project();\n this.repoName();\n if (p) untracked(() => this.api.repos(p.id).subscribe({\n next: (rs) => {\n const only = this.repoName();\n this.repos.set(only ? rs.filter((r) => r.name === only) : rs.filter((r) => !r.empty));\n this.load();\n if (this.wantNew) { this.startNew(this.wantNew.source); this.wantNew = null; }\n },\n error: (e) => this.error.set(apiMessage(e, 'Could not load the repositories.')),\n }));\n });\n }\n\n protected load() {\n const p = this.host.project();\n if (!p) return;\n const q = { state: this.state(), q: this.q.trim(), author: this.author, needsMyReview: this.mine() };\n const repos = this.repos();\n if (!repos.length) { this.rows.set([]); return; }\n this.loading.set(true);\n forkJoin(repos.map((r) => this.api.pulls(p.id, r.name, q).pipe(map((ps) => ps.map((x) => ({ ...x, repo: r.name }))), catchError(() => of([] as Row[]))))).subscribe({\n next: (lists) => {\n this.loading.set(false);\n this.rows.set(lists.flat().sort((a, b) => (b.updatedAt ?? '').localeCompare(a.updatedAt ?? '')));\n },\n error: (e) => { this.loading.set(false); this.error.set(apiMessage(e, 'Could not load the pull requests.')); },\n });\n }\n\n protected startNew(source: string) {\n const repo = this.repoName() || this.repos()[0]?.name || '';\n if (!repo) return;\n this.opening.set(true);\n this.title = '';\n this.body = '';\n this.pickRepo(repo, source);\n }\n\n protected pickRepo(name: string, source = '') {\n const p = this.host.project();\n const r = this.repos().find((x) => x.name === name);\n if (!p || !r) return;\n this.newRepo.set(name);\n this.target.set(r.defaultBranch);\n this.source.set(source);\n this.cmp.set(null);\n this.api.refs(p.id, name, 'branch').subscribe({ next: (b) => { this.branches.set(b); this.compare(); }, error: () => undefined });\n this.api.template(p.id, name, r.defaultBranch).subscribe({ next: (t) => { if (!this.body) this.body = t; }, error: () => undefined });\n }\n\n protected compare() {\n const p = this.host.project();\n if (!p || !this.source() || !this.target()) { this.cmp.set(null); return; }\n if (!this.title.trim()) this.title = this.source().replace(/^[^/]+\\//, '').replace(/[-_]/g, ' ');\n this.api.compare(p.id, this.newRepo(), this.target(), this.source()).subscribe({ next: (c) => this.cmp.set(c), error: () => this.cmp.set(null) });\n }\n\n protected open() {\n const p = this.host.project();\n if (!p) return;\n this.busy.set(true);\n this.error.set('');\n this.api.openPull(p.id, this.newRepo(), { source: this.source(), target: this.target(), title: this.title.trim(), body: this.body, draft: this.draft, reviewers: this.reviewer ? [this.reviewer] : [] }).subscribe({\n next: (pr) => { this.busy.set(false); void this.router.navigate(this.host.link(`code/${this.newRepo()}/pull/${pr.number}`)); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not open the pull request.')); },\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { marked } from 'marked';\nimport { Comparison, Pull, Repo, Thread, Timeline, apiMessage } from './code.api';\nimport { DiffView, LineComment, ThreadReply } from './diff.view';\nimport { RepoPage } from './repo-base';\nimport { ago, checkDot, initials } from './look';\n\ntype Tab = 'conversation' | 'commits' | 'files' | 'checks';\n\ninterface Event {\n at: string;\n kind: 'comment' | 'review' | 'thread';\n who: string;\n body?: string;\n state?: string;\n thread?: Thread;\n id: string;\n}\n\nconst METHOD: Record<string, { label: string; hint: string; done: string }> = {\n merge: { label: 'Create a merge commit', hint: 'All commits plus a merge commit', done: 'merged' },\n squash: { label: 'Squash and merge', hint: 'One commit on the target', done: 'squashed and merged' },\n rebase: { label: 'Rebase and merge', hint: 'The commits, linear history', done: 'rebased and merged' },\n};\n\n// /{org}/{project}/code/{repo}/pull/{n} (prototype \"code\"): the pull request's conversation, commits,\n// files changed with line threads, and checks; the merge box with the gate's rows, the merge method\n// and branch deletion; a review (comment, approve, request changes).\n@Component({\n selector: 'o-code-pull',\n imports: [FormsModule, RouterLink, DiffView],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`\n .badge{padding:3px 10px;border-radius:12px;font-size:12px;font-weight:500;color:var(--o-acc-fg)}\n .anchor{position:relative;align-self:center}\n .merge{display:flex;align-items:center;position:relative}\n .merge .go{height:32px;padding:0 14px;border-radius:7px 0 0 7px;border:none;font-size:13px;font-weight:500;color:var(--o-acc-fg);background:var(--o-ok);cursor:pointer}\n .merge .mn{height:32px;padding:0 10px;border:none;border-radius:0 7px 7px 0;font-size:12px;color:var(--o-acc-fg);background:var(--o-ok);border-left:1px solid rgba(255,255,255,.25);cursor:pointer}\n .merge button:disabled{background:var(--o-line-mid);cursor:not-allowed}\n .tl{display:flex;flex-direction:column;gap:10px;padding-left:14px;border-left:2px solid var(--o-line);margin-left:14px}\n `],\n template: `\n <div style=\"max-width:1180px;margin:0 auto;padding:22px 24px 40px;display:flex;flex-direction:column;gap:16px\">\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (note()) {<div class=\"o-note\" role=\"status\">{{ note() }}</div>}\n @if (pr(); as p) {\n <div class=\"o-col\">\n <span class=\"o-eyebrow\">{{ name() }} · pull/{{ p.number }}</span>\n <h1 class=\"o-t\">{{ p.title }} <span class=\"o-faint\" style=\"font-weight:400\">#{{ p.number }}</span></h1>\n <div class=\"o-flex o-wrap o-mut\">\n <span class=\"badge\" [style.background]=\"badgeBg()\" data-testid=\"pull-state\">{{ badge() }}</span>\n <span>{{ people().name(p.authorId) }} {{ p.state === 'merged' ? 'merged' : 'wants to merge' }} {{ p.commits }} {{ p.commits === 1 ? 'commit' : 'commits' }} into</span>\n <span class=\"o-chip o-mono\">{{ p.target }}</span><span>from</span><span class=\"o-chip o-mono\">{{ p.source }}</span>\n </div>\n </div>\n <div class=\"o-tabs\" role=\"tablist\">\n @for (t of tabs(); track t.id) {<button type=\"button\" role=\"tab\" class=\"o-tab\" [class.o-on]=\"tab() === t.id\" [attr.aria-selected]=\"tab() === t.id\" (click)=\"pick(t.id)\">{{ t.label }}@if (t.n !== undefined) {<span class=\"o-n\">{{ t.n }}</span>}</button>}\n <span class=\"o-r\"></span>\n @if (p.state === 'open' && p.canReview) {\n <div class=\"anchor\">\n <button type=\"button\" class=\"o-btn o-sm o-pri\" (click)=\"reviewOpen.set(!reviewOpen())\" [attr.aria-expanded]=\"reviewOpen()\" aria-haspopup=\"dialog\" data-testid=\"review-open\">Review changes ⌄</button>\n @if (reviewOpen()) {\n <div class=\"o-menu\" role=\"dialog\" aria-label=\"Finish your review\" style=\"right:0;top:36px;width:380px;padding:14px;display:flex;flex-direction:column;gap:10px\">\n <b>Finish your review</b>\n <textarea class=\"o-in\" rows=\"3\" placeholder=\"Leave a comment\" aria-label=\"Review comment\" style=\"height:auto;padding:8px 10px\" [ngModel]=\"revBody()\" (ngModelChange)=\"revBody.set($event)\"></textarea>\n @for (k of reviewKinds(); track k.id) {\n <button type=\"button\" class=\"o-opt\" style=\"padding:8px 10px\" [class.o-on]=\"revKind() === k.id\" (click)=\"revKind.set(k.id)\"><span class=\"o-rad\" [class.o-on]=\"revKind() === k.id\"></span><span class=\"o-col\" style=\"gap:1px\"><b class=\"o-b5\">{{ k.label }}</b><span class=\"o-faint o-sm\">{{ k.hint }}</span></span></button>\n }\n <div class=\"o-flex\"><button type=\"button\" class=\"o-btn o-sm o-pri o-r\" (click)=\"submitReview()\" [disabled]=\"busy() || (revKind() !== 'approved' && !revBody().trim())\" data-testid=\"review-submit\">Submit review</button></div>\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"o-split\" style=\"grid-template-columns:minmax(0,1fr) 260px;gap:24px\">\n <div class=\"o-col\" style=\"gap:14px;min-width:0\">\n @switch (tab()) {\n @case ('conversation') {\n <div class=\"o-card\">\n <div style=\"padding:9px 14px;background:var(--o-well);border-bottom:1px solid var(--o-line-soft);color:var(--o-mut);font-size:12px\"><b style=\"color:var(--o-tx);font-weight:600\">{{ people().name(p.authorId) }}</b> opened this {{ ago(p.createdAt) }}</div>\n <div class=\"o-cb o-md\" style=\"font-size:13px\" [innerHTML]=\"p.body ? md(p.body) : '<p class="o-faint">No description.</p>'\"></div>\n </div>\n <div class=\"tl\">\n @for (e of events(); track e.id) {\n @switch (e.kind) {\n @case ('comment') {\n <div class=\"o-card o-cb o-col\" style=\"gap:6px\"><span class=\"o-sm o-mut\"><b style=\"color:var(--o-tx);font-weight:600\">{{ people().name(e.who) }}</b> commented {{ ago(e.at) }}</span><div class=\"o-md\" style=\"font-size:13px\" [innerHTML]=\"md(e.body ?? '')\"></div></div>\n }\n @case ('review') {\n <span [style.color]=\"e.state === 'approved' ? 'var(--o-ok-tx)' : e.state === 'changes_requested' ? 'var(--o-bad-tx)' : 'var(--o-mut)'\">{{ people().name(e.who) }} {{ reviewVerb(e.state) }} · {{ ago(e.at) }}@if (e.body) {: “{{ e.body }}”}</span>\n }\n @case ('thread') {\n <div class=\"o-card o-cb o-col\" style=\"gap:6px\">\n <span class=\"o-sm o-mut\"><b style=\"color:var(--o-tx);font-weight:600\">{{ people().name(e.who) }}</b> commented on <button type=\"button\" class=\"o-lnk o-mono\" (click)=\"pick('files')\">{{ e.thread!.path }}</button> line {{ e.thread!.line }}@if (e.thread!.outdated) { · <span class=\"o-chip\">Outdated</span>}</span>\n @for (c of e.thread!.comments; track c.id) {<span class=\"o-sm\"><b class=\"o-b5\">{{ people().name(c.authorId) }}</b> {{ c.body }}</span>}\n <div class=\"o-flex\"><span class=\"o-faint o-sm\">{{ e.thread!.resolved ? 'Resolved' + (e.thread!.resolvedBy ? ' by ' + people().name(e.thread!.resolvedBy) : '') : 'Unresolved' }}</span>@if (p.state === 'open') {<button type=\"button\" class=\"o-lnk o-r\" (click)=\"resolve({ threadId: e.thread!.id, resolved: !e.thread!.resolved })\">{{ e.thread!.resolved ? 'Unresolve' : 'Resolve conversation' }}</button>}</div>\n </div>\n }\n }\n }\n @if (p.state === 'merged') {<span style=\"color:var(--o-vio-tx)\" data-testid=\"merged-line\">{{ people().name(p.mergedBy) }} {{ methodDone(p.mergeMethod) }} into {{ p.target }} · {{ ago(p.mergedAt) }}</span>}\n @if (p.state === 'closed') {<span class=\"o-red-t\">Closed {{ ago(p.closedAt) }}</span>}\n </div>\n\n <div class=\"o-card\" [style.border-color]=\"p.state === 'open' ? (p.gate.mergeable ? 'var(--o-ok)' : 'var(--o-line-mid)') : null\" data-testid=\"merge-box\">\n <div class=\"o-cb o-col\" style=\"gap:10px;border-bottom:1px solid var(--o-line-soft)\">\n <span style=\"font-weight:600;font-size:14px\" [style.color]=\"p.state === 'merged' ? 'var(--o-vio-tx)' : p.gate.mergeable ? 'var(--o-ok-tx)' : 'var(--o-tx)'\">{{ p.state === 'merged' ? 'Merged' : p.state === 'closed' ? 'Closed without merging' : p.gate.title }}</span>\n @if (p.state === 'open') {\n @for (r of p.gate.rows; track $index) {\n <div class=\"o-flex\"><span [class]=\"rowDot(r.status)\" aria-hidden=\"true\"></span><span>{{ r.text }}</span><span class=\"o-r o-faint o-sm\">{{ r.meta }}</span></div>\n }\n }\n </div>\n @if (p.state === 'open') {\n <div class=\"o-flex o-wrap\" style=\"padding:12px 14px;background:var(--o-well)\">\n @if (p.canReview && !approvedByMe()) {<button type=\"button\" class=\"o-btn\" (click)=\"approve()\" [disabled]=\"busy()\" data-testid=\"approve\">Approve</button>}\n @if (p.canEdit) {<button type=\"button\" class=\"o-btn o-ghost\" (click)=\"close(false)\" [disabled]=\"busy()\">Close</button>}\n @if (p.canMerge) {\n <span class=\"o-faint o-sm\">Delete branch after merge</span><button type=\"button\" class=\"o-tog\" role=\"switch\" aria-label=\"Delete branch after merge\" [class.o-on]=\"delBranch()\" [attr.aria-checked]=\"delBranch()\" (click)=\"delBranch.set(!delBranch())\"></button>\n <div class=\"merge o-r\">\n <button type=\"button\" class=\"go\" (click)=\"merge()\" [disabled]=\"!p.gate.mergeable || busy()\" data-testid=\"merge\">{{ methodLabel(method()) }}</button>\n <button type=\"button\" class=\"mn\" (click)=\"mergeMenu.set(!mergeMenu())\" [attr.aria-expanded]=\"mergeMenu()\" aria-label=\"Choose the merge method\" [disabled]=\"busy()\">⌄</button>\n @if (mergeMenu()) {\n <div class=\"o-menu\" role=\"menu\" style=\"right:0;bottom:40px;width:300px\">\n @for (m of p.mergeMethods; track m) {<button type=\"button\" role=\"menuitemradio\" [attr.aria-checked]=\"method() === m\" (click)=\"method.set(m); mergeMenu.set(false)\"><span class=\"o-col\" style=\"gap:1px\"><b class=\"o-b5\">{{ methodLabel(m) }}</b><span class=\"o-faint o-xs\">{{ methodHint(m) }}</span></span></button>}\n </div>\n }\n </div>\n }\n </div>\n } @else if (p.state === 'closed' && p.canEdit) {\n <div class=\"o-flex\" style=\"padding:12px 14px;background:var(--o-well)\"><button type=\"button\" class=\"o-btn o-r\" (click)=\"close(true)\" [disabled]=\"busy()\">Reopen</button></div>\n } @else if (p.state === 'merged') {\n <div class=\"o-flex\" style=\"padding:12px 14px;background:var(--o-well)\"><span class=\"o-mut\">{{ p.sourceDeleted ? 'Branch ' + p.source + ' deleted.' : 'Branch ' + p.source + ' can be deleted.' }}</span>@if (p.mergedSha) {<a class=\"o-btn o-r\" [routerLink]=\"link('commit/' + p.mergedSha)\">View {{ p.mergedSha.slice(0, 7) }}</a>}</div>\n }\n </div>\n\n <div class=\"o-card\">\n <label class=\"o-sr-only\" for=\"pr-cmt\">Add a comment</label>\n <textarea id=\"pr-cmt\" class=\"o-in\" style=\"border:none;box-shadow:none;min-height:70px;height:auto;padding:10px 12px\" placeholder=\"Add a comment. Markdown works.\" [ngModel]=\"draft()\" (ngModelChange)=\"draft.set($event)\" data-testid=\"pull-comment\"></textarea>\n <div class=\"o-cf\"><span>Markdown</span><button type=\"button\" class=\"o-btn o-sm o-dark o-r\" (click)=\"addComment()\" [disabled]=\"!draft().trim() || busy()\" data-testid=\"pull-comment-add\">Comment</button></div>\n </div>\n }\n @case ('commits') {\n <div class=\"o-card\">\n @for (c of cmp()?.commits ?? []; track c.oid) {\n <div class=\"o-row\"><span class=\"o-av\" aria-hidden=\"true\">{{ initials(c.author.name) }}</span><a class=\"o-ell\" style=\"flex:1;color:var(--o-tx)\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.subject }}</a><a class=\"o-mono o-sm o-faint\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.short }}</a></div>\n } @empty {<div class=\"o-empty\">{{ cmp() ? 'No commits.' : 'Loading…' }}</div>}\n </div>\n }\n @case ('files') {\n <div class=\"o-flex o-wrap\"><span class=\"o-faint o-sm\">{{ cmp()?.files?.length ?? 0 }} {{ cmp()?.files?.length === 1 ? 'file' : 'files' }} · click a line number to comment</span><span class=\"o-r o-faint o-sm\">{{ openThreads() }} unresolved {{ openThreads() === 1 ? 'conversation' : 'conversations' }}</span></div>\n @for (f of cmp()?.files ?? []; track f.path) {\n <o-diff [repo]=\"name()\" [file]=\"f\" [head]=\"p.headSha\" [base]=\"p.mergeBase\" [threads]=\"threads()\" [canComment]=\"p.state === 'open'\" (comment)=\"lineComment($event)\" (reply)=\"reply($event)\" (resolve)=\"resolve($event)\" />\n } @empty {<div class=\"o-card\"><div class=\"o-empty\">{{ cmp() ? 'No changes.' : 'Loading…' }}</div></div>}\n }\n @case ('checks') {\n <div class=\"o-card\">\n @for (c of p.checks; track c.id) {\n <div class=\"o-row\"><span [class]=\"dot(c.state)\" aria-hidden=\"true\"></span><span class=\"o-mono o-sm\">{{ c.context }}</span><span class=\"o-faint\">{{ c.description }}</span>@if (c.url) {<a class=\"o-r o-sm\" [href]=\"c.url\" target=\"_blank\" rel=\"noopener\">Details</a>}</div>\n } @empty {<div class=\"o-empty\">No checks reported on {{ p.headSha.slice(0, 7) }}. Pipelines report here once Deploy is set up.</div>}\n </div>\n }\n }\n </div>\n\n <div class=\"o-col\" style=\"gap:18px;font-size:13px\">\n <div class=\"o-col\">\n <span class=\"o-lbl\">Reviewers</span>\n @for (r of reviewers(); track r.id) {<div class=\"o-flex\"><span class=\"o-av\" aria-hidden=\"true\">{{ people().initials(r.id) }}</span><span>{{ people().name(r.id) }}</span><span class=\"o-r o-sm\" [style.color]=\"r.colour\">{{ r.label }}</span></div>}\n @if (!reviewers().length) {<span class=\"o-faint o-sm\">No reviewers yet.</span>}\n <span class=\"o-faint o-xs\">CODEOWNERS requests owners of changed paths at GA.</span>\n </div>\n <div class=\"o-col\"><span class=\"o-lbl\">Labels</span><div class=\"o-flex o-wrap\">@for (l of p.labels; track l) {<span class=\"o-chip o-out\">{{ l }}</span>}@if (!p.labels.length) {<span class=\"o-faint o-sm\">None</span>}</div></div>\n <div class=\"o-col\">\n <span class=\"o-lbl\">Linked issues</span>\n @for (k of p.keys; track k) {<a class=\"o-card o-cb o-click o-col\" style=\"gap:4px;padding:10px 12px;color:var(--o-tx)\" [routerLink]=\"host.link('issues/' + k)\"><span class=\"o-mono o-xs o-mut\">{{ k }}</span></a>}\n @if (!p.keys.length) {<span class=\"o-faint o-sm\">Name an issue key in the title or description to link it.</span>}\n </div>\n <div class=\"o-col\"><span class=\"o-lbl\">Deployments</span><span class=\"o-faint o-sm\">Releases that contain this pull request appear here after merge.</span></div>\n @if (canProtect()) {<div class=\"o-col\"><span class=\"o-lbl\">Branch protection · {{ p.target }}</span><a class=\"o-sm\" [routerLink]=\"link('settings')\" [queryParams]=\"{ section: 'protect' }\">Edit rules</a></div>}\n </div>\n </div>\n } @else if (!error()) {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n </div>\n `,\n})\nexport class PullPage extends RepoPage {\n private readonly el = inject(ElementRef);\n protected readonly pr = signal<Pull | null>(null);\n protected readonly timeline = signal<Timeline>({ comments: [], reviews: [], threads: [] });\n protected readonly cmp = signal<Comparison | null>(null);\n protected readonly tab = signal<Tab>('conversation');\n protected readonly busy = signal(false);\n protected readonly draft = signal('');\n protected readonly reviewOpen = signal(false);\n protected readonly revBody = signal('');\n protected readonly revKind = signal<'commented' | 'approved' | 'changes_requested'>('commented');\n protected readonly mergeMenu = signal(false);\n protected readonly method = signal('merge');\n protected readonly delBranch = signal(false);\n private number = 0;\n\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly dot = checkDot;\n protected readonly threads = computed(() => this.timeline().threads);\n protected readonly openThreads = computed(() => this.threads().filter((t) => !t.resolved && !t.outdated).length);\n protected readonly tabs = computed(() => {\n const p = this.pr();\n return [\n { id: 'conversation' as Tab, label: 'Conversation', n: undefined },\n { id: 'commits' as Tab, label: 'Commits', n: p?.commits },\n { id: 'files' as Tab, label: 'Files changed', n: this.cmp()?.files.length },\n { id: 'checks' as Tab, label: 'Checks', n: p?.checks.length },\n ];\n });\n protected readonly badge = computed(() => {\n const p = this.pr();\n return !p ? '' : p.state === 'merged' ? 'Merged' : p.state === 'closed' ? 'Closed' : p.draft ? 'Draft' : 'Open';\n });\n protected readonly badgeBg = computed(() => ({ Merged: 'var(--o-vio)', Closed: 'var(--o-bad-solid)', Draft: 'var(--o-dim)', Open: 'var(--o-ok)' } as Record<string, string>)[this.badge()] ?? 'var(--o-dim)');\n protected readonly approvedByMe = computed(() => (this.pr()?.reviews ?? []).some((r) => r.authorId === this.host.meId() && r.state === 'approved' && !r.stale));\n protected readonly reviewKinds = computed(() => {\n const need = this.pr()?.gate.rows.find((r) => /required by branch protection|requires/.test(r.text + (r.meta ?? '')));\n return [\n { id: 'commented' as const, label: 'Comment', hint: 'General feedback without approving.' },\n { id: 'approved' as const, label: 'Approve', hint: need ? `Counts toward the approvals ${this.pr()?.target} requires.` : 'Approve these changes.' },\n { id: 'changes_requested' as const, label: 'Request changes', hint: 'Blocks merge until you approve.' },\n ];\n });\n protected readonly reviewers = computed(() => {\n const p = this.pr();\n if (!p) return [];\n const ids = [...new Set([...p.reviewers, ...p.reviews.map((r) => r.authorId)])];\n return ids.map((id) => {\n const r = p.reviews.find((x) => x.authorId === id);\n const state = r ? (r.stale ? 'stale' : r.state) : 'requested';\n const label = { approved: 'Approved', changes_requested: 'Changes requested', commented: 'Commented', dismissed: 'Dismissed', stale: 'Approved an older commit', requested: 'Requested' }[state] ?? state;\n const colour = state === 'approved' ? 'var(--o-ok-tx)' : state === 'changes_requested' ? 'var(--o-bad-tx)' : 'var(--o-dim)';\n return { id, label, colour };\n });\n });\n protected readonly events = computed<Event[]>(() => {\n const t = this.timeline();\n const out: Event[] = [];\n for (const c of t.comments) if (!c.threadId) out.push({ id: 'c' + c.id, at: c.createdAt, kind: 'comment', who: c.authorId, body: c.body + (c.pending ? ' (pending)' : '') });\n for (const r of t.reviews) if (r.state !== 'pending') out.push({ id: 'r' + r.id, at: r.submittedAt ?? r.createdAt, kind: 'review', who: r.authorId, state: r.state, body: r.body });\n for (const th of t.threads) out.push({ id: 't' + th.id, at: th.createdAt, kind: 'thread', who: th.createdBy, thread: th });\n return out.sort((a, b) => a.at.localeCompare(b.at));\n });\n\n constructor() {\n super();\n this.route.paramMap.subscribe((m) => {\n this.number = Number(m.get('number') ?? 0);\n const r = this.repo();\n if (r && r.name === this.name()) this.onRepo(r);\n });\n }\n\n protected onRepo(_: Repo) {\n if (this.number) this.load(true);\n }\n\n protected md(s: string): string {\n return marked.parse(s || '', { async: false, gfm: true, breaks: true }) as string;\n }\n\n protected pick(t: Tab) {\n this.tab.set(t);\n }\n\n protected methodLabel(m: string) {\n return METHOD[m]?.label.replace('Create a merge commit', 'Merge pull request') ?? m;\n }\n\n protected methodHint(m: string) {\n return METHOD[m]?.hint ?? '';\n }\n\n protected methodDone(m?: string) {\n return METHOD[m ?? 'merge']?.done ?? 'merged';\n }\n\n protected reviewVerb(state?: string) {\n return state === 'approved' ? 'approved these changes' : state === 'changes_requested' ? 'requested changes' : state === 'dismissed' ? 'had a review dismissed' : 'reviewed';\n }\n\n protected rowDot(status: string) {\n return status === 'ok' ? 'o-dot o-grn' : status === 'failed' ? 'o-dot o-red' : 'o-dot o-amb';\n }\n\n protected approve() {\n this.sendReview('approved', '');\n }\n\n protected submitReview() {\n this.sendReview(this.revKind(), this.revBody().trim());\n }\n\n protected addComment() {\n const body = this.draft().trim();\n if (!body) return;\n this.run(this.api.comment(this.projectId(), this.name(), this.number, { body }), 'Could not add the comment.', () => this.draft.set(''));\n }\n\n protected lineComment(c: LineComment) {\n this.run(this.api.comment(this.projectId(), this.name(), this.number, { body: c.body, path: c.path, side: c.side, line: c.line }), 'Could not add the comment.');\n }\n\n protected reply(r: ThreadReply) {\n this.run(this.api.comment(this.projectId(), this.name(), this.number, { body: r.body, threadId: r.threadId }), 'Could not reply.');\n }\n\n protected resolve(e: { threadId: string; resolved: boolean }) {\n this.run(this.api.resolve(this.projectId(), this.name(), this.number, e.threadId, e.resolved), 'Could not change the conversation.');\n }\n\n protected merge() {\n const p = this.pr();\n if (!p) return;\n this.run(this.api.merge(this.projectId(), this.name(), this.number, { method: this.method(), deleteBranch: this.delBranch(), expectHead: p.headSha }), 'Could not merge.', () => this.note.set(`Merged into ${p.target}.`));\n }\n\n protected close(reopen: boolean) {\n this.run(this.api.closePull(this.projectId(), this.name(), this.number, reopen), reopen ? 'Could not reopen.' : 'Could not close.');\n }\n\n @HostListener('document:click', ['$event'])\n protected outside(e: MouseEvent) {\n const t = e.target as HTMLElement;\n if (this.reviewOpen() && !t.closest('.anchor')) this.reviewOpen.set(false);\n if (this.mergeMenu() && !t.closest('.merge')) this.mergeMenu.set(false);\n }\n\n private sendReview(state: 'commented' | 'approved' | 'changes_requested', body: string) {\n this.run(this.api.review(this.projectId(), this.name(), this.number, state, body), 'Could not submit the review.', () => { this.reviewOpen.set(false); this.revBody.set(''); });\n }\n\n private run(o: import('rxjs').Observable<unknown>, fallback: string, after?: () => void) {\n this.busy.set(true);\n this.error.set('');\n o.subscribe({\n next: () => { this.busy.set(false); after?.(); this.load(false); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, fallback)); this.load(false); },\n });\n }\n\n private load(first: boolean) {\n const project = this.projectId();\n this.api.pull(project, this.name(), this.number).subscribe({\n next: (p) => {\n this.pr.set(p);\n if (first) {\n this.method.set(p.mergeMethods[0] ?? 'merge');\n this.delBranch.set(p.deleteBranchOnMerge);\n }\n if (first || !this.cmp() || this.cmp()!.head !== p.headSha) {\n this.api.compare(project, this.name(), p.mergeBase || p.targetSha, p.headSha).subscribe({ next: (c) => this.cmp.set(c), error: () => this.cmp.set({ base: '', head: p.headSha, mergeBase: '', ahead: 0, behind: 0, commits: [], files: [] }) });\n }\n },\n error: (e) => this.error.set(e?.status === 404 ? `There is no pull request #${this.number} in ${this.name()}.` : apiMessage(e, 'Could not open the pull request.')),\n });\n this.api.conversation(project, this.name(), this.number).subscribe({ next: (t) => this.timeline.set(t), error: () => undefined });\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { Protection, Ref, Repo, apiMessage } from './code.api';\nimport { RepoPage } from './repo-base';\n\ntype Section = 'general' | 'protect' | 'collab' | 'danger';\n\ninterface RuleForm {\n id: string;\n pattern: string;\n blockDirectPush: boolean;\n blockForcePush: boolean;\n blockDeletion: boolean;\n requiredApprovals: number;\n dismissStaleApprovals: boolean;\n requireUpToDate: boolean;\n requiredChecks: string[];\n}\n\nconst BLANK: RuleForm = { id: '', pattern: '', blockDirectPush: true, blockForcePush: true, blockDeletion: true, requiredApprovals: 1, dismissStaleApprovals: true, requireUpToDate: false, requiredChecks: [] };\n\n// /{org}/{project}/code/{repo}/settings?section= (prototype \"code_settings\"): general settings and\n// merge methods, branch protection rules, and the danger zone (archive, delete).\n@Component({\n selector: 'o-code-settings',\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-split o-lft\">\n <nav class=\"o-setnav\" aria-label=\"Repository settings\">\n <span class=\"o-lbl\" style=\"padding-top:0\">{{ r.name }}</span>\n <button type=\"button\" [class.o-on]=\"section() === 'general'\" (click)=\"go('general')\">General</button>\n <button type=\"button\" [class.o-on]=\"section() === 'protect'\" (click)=\"go('protect')\">Branch protection</button>\n <button type=\"button\" [class.o-on]=\"section() === 'collab'\" (click)=\"go('collab')\">Collaborators<b class=\"o-ph-tag o-ga o-r\">GA</b></button>\n <button type=\"button\" [class.o-on]=\"section() === 'danger'\" (click)=\"go('danger')\">Danger zone</button>\n </nav>\n <div class=\"o-col\" style=\"gap:16px;min-width:0\">\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (note()) {<div class=\"o-note\" role=\"status\">{{ note() }}</div>}\n @switch (section()) {\n @case ('general') {\n <h1 class=\"o-t\">General</h1>\n <form class=\"o-card o-cb o-form\" (ngSubmit)=\"saveGeneral()\">\n <div class=\"o-g2\">\n <div class=\"o-fld\"><label for=\"rs-name\">Repository name</label><input id=\"rs-name\" class=\"o-in o-mono\" name=\"name\" [(ngModel)]=\"g.name\" [disabled]=\"!canAdmin()\" /><span class=\"o-hint\">Renaming keeps the old clone URL working as a redirect.</span></div>\n <div class=\"o-fld\"><label for=\"rs-def\">Default branch</label><select id=\"rs-def\" class=\"o-in\" name=\"def\" [(ngModel)]=\"g.defaultBranch\" [disabled]=\"!canAdmin()\">@for (b of branches(); track b.name) {<option [value]=\"b.name\">{{ b.name }}</option>}@if (!branches().length) {<option [value]=\"r.defaultBranch\">{{ r.defaultBranch }}</option>}</select></div>\n </div>\n <div class=\"o-fld\"><label for=\"rs-desc\">Description</label><input id=\"rs-desc\" class=\"o-in\" name=\"desc\" [(ngModel)]=\"g.description\" [disabled]=\"!canAdmin()\" /></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Visibility</span>\n <div class=\"o-g2\">\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"g.visibility === 'private'\" (click)=\"g.visibility = 'private'\" [disabled]=\"!canAdmin()\"><span class=\"o-rad\" [class.o-on]=\"g.visibility === 'private'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Private</b><span class=\"o-faint o-sm\">Project members only</span></span></button>\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"g.visibility === 'internal'\" (click)=\"g.visibility = 'internal'\" [disabled]=\"!canAdmin()\"><span class=\"o-rad\" [class.o-on]=\"g.visibility === 'internal'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Org-internal</b><span class=\"o-faint o-sm\">Everyone in the organization can read</span></span></button>\n </div>\n </div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Allowed merge methods</span>\n @for (m of methods; track m.id) {<label class=\"o-flex\"><input type=\"checkbox\" [checked]=\"g.mergeMethods.includes(m.id)\" (change)=\"flipMethod(m.id)\" [disabled]=\"!canAdmin()\" />{{ m.label }}</label>}\n </div>\n <div class=\"o-flex\"><button type=\"button\" class=\"o-tog\" role=\"switch\" aria-labelledby=\"rs-del\" [class.o-on]=\"g.deleteBranchOnMerge\" [attr.aria-checked]=\"g.deleteBranchOnMerge\" (click)=\"g.deleteBranchOnMerge = !g.deleteBranchOnMerge\" [disabled]=\"!canAdmin()\"></button><span id=\"rs-del\">Delete head branches after merge</span></div>\n <div class=\"o-flex\"><button type=\"button\" class=\"o-tog o-dis\" disabled aria-label=\"Allow auto-merge\"></button>Allow auto-merge when all requirements pass<b class=\"o-ph-tag o-ga\">GA</b></div>\n @if (canAdmin()) {<div class=\"o-flex\"><button type=\"submit\" class=\"o-btn o-dark o-r\" [disabled]=\"busy() || !g.mergeMethods.length\">Save</button></div>}\n </form>\n }\n @case ('protect') {\n <div class=\"o-flex\"><h1 class=\"o-t\">Branch protection</h1>@if (canProtect()) {<button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"edit(null)\" data-testid=\"add-rule\">+ Add rule</button>}</div>\n <div class=\"o-card\">\n @for (p of rules(); track p.id) {\n <button type=\"button\" class=\"o-row o-click\" style=\"width:100%;border:none;background:none;text-align:left\" [class.o-sel]=\"form()?.id === p.id\" (click)=\"edit(p)\"><b class=\"o-mono\">{{ p.pattern }}</b><span class=\"o-faint o-sm\">{{ summary(p) }}</span>@if (form()?.id === p.id) {<span class=\"o-r o-chip\">Editing</span>}</button>\n } @empty {<div class=\"o-empty\">No rules. Without one, anyone who can push may push to any branch.</div>}\n </div>\n @if (form(); as f) {\n <form class=\"o-card\" (ngSubmit)=\"saveRule()\" aria-label=\"Protection rule\">\n <div class=\"o-ch\"><b>Rule for</b><input class=\"o-in o-mono o-sm\" style=\"width:200px\" name=\"pattern\" aria-label=\"Branch name or pattern\" [(ngModel)]=\"f.pattern\" placeholder=\"main or release/*\" data-testid=\"rule-pattern\" /></div>\n <div class=\"o-cb o-form\">\n @for (t of toggles; track t.key) {\n <div class=\"o-flex\" style=\"align-items:flex-start\"><button type=\"button\" class=\"o-tog\" role=\"switch\" [attr.aria-label]=\"t.label\" [class.o-on]=\"f[t.key]\" [attr.aria-checked]=\"f[t.key]\" (click)=\"flip(f, t.key)\" style=\"margin-top:2px\"></button><div class=\"o-col\" style=\"gap:2px;flex:1\"><span class=\"o-b5\">{{ t.label }}</span><span class=\"o-hint\">{{ t.hint }}</span></div></div>\n }\n <div class=\"o-flex\"><span class=\"o-b5\" style=\"flex:1\">Required approvals</span><button type=\"button\" class=\"o-btn o-sm\" (click)=\"f.requiredApprovals = max0(f.requiredApprovals - 1)\" aria-label=\"One fewer\">−</button><b class=\"o-mono\" style=\"width:24px;text-align:center\" aria-live=\"polite\">{{ f.requiredApprovals }}</b><button type=\"button\" class=\"o-btn o-sm\" (click)=\"f.requiredApprovals = f.requiredApprovals + 1\" aria-label=\"One more\">+</button></div>\n <div class=\"o-fld\"><label for=\"rule-check\">Required status checks</label>\n <div class=\"o-flex o-wrap\">\n @for (c of f.requiredChecks; track c) {<span class=\"o-chip o-mono\">{{ c }} <button type=\"button\" class=\"o-lnk\" style=\"font-size:11px\" (click)=\"removeCheck(f, c)\" [attr.aria-label]=\"'Remove ' + c\">✕</button></span>}\n <input id=\"rule-check\" class=\"o-in o-sm o-mono\" style=\"width:160px\" placeholder=\"+ check name, Enter\" [ngModel]=\"check()\" (ngModelChange)=\"check.set($event)\" name=\"check\" (keydown.enter)=\"$event.preventDefault(); addCheck(f)\" />\n </div>\n </div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Allowed to bypass <b class=\"o-ph-tag o-ga\">GA</b></span><div class=\"o-flex\"><span class=\"o-chip\">Owners</span><span class=\"o-hint\">Every bypass is written to the audit log.</span></div></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">What a blocked push sees</span><div class=\"o-term\" style=\"font-size:11.5px\"><div>$ git push origin {{ f.pattern || 'main' }}</div><div>remote: ✕ {{ f.pattern || 'main' }} is protected by rule “{{ f.pattern || 'main' }}”: direct pushes are blocked.</div><div>remote: Open a pull request instead.</div></div></div>\n <div class=\"o-flex\">\n @if (f.id) {<button type=\"button\" class=\"o-btn o-sm o-ghost\" style=\"color:var(--o-bad-tx)\" (click)=\"removeRule(f)\">Delete rule</button>}\n <button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"form.set(null)\">Cancel</button>\n <button type=\"submit\" class=\"o-btn o-dark\" [disabled]=\"busy() || !f.pattern.trim()\" data-testid=\"rule-save\">Save rule</button>\n </div>\n </div>\n </form>\n }\n }\n @case ('collab') {\n <h1 class=\"o-t\">Collaborators</h1>\n <div class=\"o-card\"><div class=\"o-empty\">Access beyond the project role, for one repository, arrives at general availability. Until then, project roles decide who reads and pushes.</div></div>\n }\n @case ('danger') {\n <h1 class=\"o-t\">Danger zone</h1>\n <div class=\"o-card\" style=\"border-color:var(--o-bad-line)\">\n <div class=\"o-row\" style=\"padding:14px\"><div class=\"o-col\" style=\"gap:2px;flex:1\"><b>{{ r.archivedAt ? 'Unarchive' : 'Archive' }}</b><span class=\"o-hint\">{{ r.archivedAt ? 'Pushes are accepted again.' : 'Read-only. Pushes are rejected; pipelines stop triggering.' }}</span></div><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive(!r.archivedAt)\" [disabled]=\"!canAdmin() || busy()\">{{ r.archivedAt ? 'Unarchive' : 'Archive' }}</button></div>\n <div class=\"o-row\" style=\"padding:14px;flex-wrap:wrap\"><div class=\"o-col\" style=\"gap:2px;flex:1;min-width:240px\"><b>Delete this repository</b><span class=\"o-hint\">Recoverable for 7 days, then gone for good. Type <b class=\"o-mono\">{{ r.name }}</b> to confirm.</span></div>\n <input class=\"o-in o-sm o-mono\" style=\"width:180px\" aria-label=\"Type the repository name to confirm\" [ngModel]=\"confirm()\" (ngModelChange)=\"confirm.set($event)\" [disabled]=\"!canAdmin()\" />\n <button type=\"button\" class=\"o-btn o-sm o-red\" (click)=\"remove()\" [disabled]=\"!canAdmin() || confirm() !== r.name || busy()\">Delete</button>\n </div>\n </div>\n }\n }\n </div>\n </div>\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class RepoSettingsPage extends RepoPage {\n private readonly router = inject(Router);\n protected readonly section = signal<Section>('general');\n protected readonly branches = signal<Ref[]>([]);\n protected readonly rules = signal<Protection[]>([]);\n protected readonly form = signal<RuleForm | null>(null);\n protected readonly check = signal('');\n protected readonly confirm = signal('');\n protected readonly busy = signal(false);\n protected g = { name: '', description: '', visibility: 'private', defaultBranch: '', mergeMethods: [] as string[], deleteBranchOnMerge: false };\n\n protected readonly methods = [{ id: 'merge', label: 'Merge commit' }, { id: 'squash', label: 'Squash' }, { id: 'rebase', label: 'Rebase' }];\n protected readonly toggles: { key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate'; label: string; hint: string }[] = [\n { key: 'blockDirectPush', label: 'Require a pull request before merging', hint: 'Direct pushes are blocked; changes arrive through pull requests.' },\n { key: 'blockForcePush', label: 'Block force pushes', hint: 'History on matching branches cannot be rewritten.' },\n { key: 'blockDeletion', label: 'Block deletion', hint: 'Matching branches cannot be deleted.' },\n { key: 'dismissStaleApprovals', label: 'Dismiss stale approvals', hint: 'A new commit dismisses approvals given on an older one.' },\n { key: 'requireUpToDate', label: 'Require branches to be up to date', hint: 'The branch must contain the target’s latest commit before it merges.' },\n ];\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => this.section.set((q.get('section') as Section) || 'general'));\n }\n\n protected onRepo(r: Repo) {\n this.g = { name: r.name, description: r.description, visibility: r.visibility, defaultBranch: r.defaultBranch, mergeMethods: [...(r.mergeMethods ?? [])], deleteBranchOnMerge: r.deleteBranchOnMerge };\n if (!r.empty) this.api.refs(this.projectId(), r.name, 'branch').subscribe({ next: (b) => this.branches.set(b), error: () => undefined });\n this.api.protections(this.projectId(), r.name).subscribe({ next: (p) => this.rules.set(p), error: () => undefined });\n }\n\n protected go(s: Section) {\n void this.router.navigate([], { relativeTo: this.route, queryParams: { section: s === 'general' ? null : s }, replaceUrl: true });\n }\n\n protected max0(n: number) {\n return Math.max(0, n);\n }\n\n protected flipMethod(id: string) {\n this.g.mergeMethods = this.g.mergeMethods.includes(id) ? this.g.mergeMethods.filter((m) => m !== id) : [...this.g.mergeMethods, id];\n }\n\n protected summary(p: Protection) {\n const parts: string[] = [];\n if (p.requiredApprovals) parts.push(`${p.requiredApprovals} ${p.requiredApprovals === 1 ? 'approval' : 'approvals'}`);\n if (p.requiredChecks?.length) parts.push(`checks ${p.requiredChecks.join(', ')}`);\n if (p.blockDirectPush) parts.push('no direct push');\n if (p.requireUpToDate) parts.push('up to date');\n if (p.blockDeletion) parts.push('no deletion');\n return parts.join(' · ') || 'no restrictions';\n }\n\n protected edit(p: Protection | null) {\n this.form.set(p ? { ...BLANK, ...p, requiredChecks: [...(p.requiredChecks ?? [])] } : { ...BLANK, pattern: this.rules().length ? '' : this.repo()?.defaultBranch ?? 'main', requiredChecks: [] });\n }\n\n protected flip(f: RuleForm, k: (typeof this.toggles)[number]['key']) {\n f[k] = !f[k];\n this.form.set({ ...f });\n }\n\n protected addCheck(f: RuleForm) {\n const c = this.check().trim();\n if (c && !f.requiredChecks.includes(c)) f.requiredChecks = [...f.requiredChecks, c];\n this.check.set('');\n this.form.set({ ...f });\n }\n\n protected removeCheck(f: RuleForm, c: string) {\n f.requiredChecks = f.requiredChecks.filter((x) => x !== c);\n this.form.set({ ...f });\n }\n\n protected saveGeneral() {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n const renamed = this.g.name.trim() !== r.name;\n this.api.update(this.projectId(), r.name, { name: this.g.name.trim(), description: this.g.description, visibility: this.g.visibility, defaultBranch: this.g.defaultBranch, mergeMethods: this.g.mergeMethods, deleteBranchOnMerge: this.g.deleteBranchOnMerge }).subscribe({\n next: (n) => {\n this.busy.set(false);\n this.note.set('Saved.');\n if (renamed) void this.router.navigate(this.host.link(`code/${n.name}/settings`));\n else { this.repo.set(n); this.onRepo(n); }\n },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not save.')); },\n });\n }\n\n protected saveRule() {\n const r = this.repo();\n const f = this.form();\n if (!r || !f) return;\n const { id, ...body } = f;\n this.busy.set(true);\n const req = id ? this.api.updateProtection(this.projectId(), r.name, id, body) : this.api.addProtection(this.projectId(), r.name, body);\n req.subscribe({\n next: () => { this.busy.set(false); this.form.set(null); this.note.set(`Rule “${f.pattern}” saved.`); this.onRepo(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not save the rule.')); },\n });\n }\n\n protected removeRule(f: RuleForm) {\n const r = this.repo();\n if (!r || !f.id) return;\n this.api.removeProtection(this.projectId(), r.name, f.id).subscribe({\n next: () => { this.form.set(null); this.note.set(`Rule “${f.pattern}” deleted.`); this.onRepo(r); },\n error: (e) => this.error.set(apiMessage(e, 'Could not delete the rule.')),\n });\n }\n\n protected archive(on: boolean) {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n this.api.setArchived(this.projectId(), r.name, on).subscribe({\n next: (n) => { this.busy.set(false); this.repo.set(n); this.note.set(on ? 'Archived: the repository is read-only.' : 'Unarchived.'); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not change the archive state.')); },\n });\n }\n\n protected remove() {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n this.api.remove(this.projectId(), r.name).subscribe({\n next: () => { this.busy.set(false); void this.router.navigate(this.host.link('code')); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not delete the repository.')); },\n });\n }\n}\n","/*\n * @chisquare-tech/origine-ngx-apps-code: the Code module's screens (TRD §6.10). The host app provides\n * CodeHost and mounts the pages at /{org}/{project}/code, /code/new, /code/pulls and\n * /code/{repo}[/blob|/commits|/commit/:sha|/branches|/pulls|/pull/:number|/settings].\n */\nexport * from './lib/host';\nexport * from './lib/code.api';\nexport * from './lib/look';\nexport * from './lib/repo-base';\nexport * from './lib/diff.view';\nexport * from './lib/repos.page';\nexport * from './lib/repo.page';\nexport * from './lib/file.page';\nexport * from './lib/history.pages';\nexport * from './lib/pulls.page';\nexport * from './lib/pull.page';\nexport * from './lib/settings.page';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map"],"mappings":";;;;;;;;;;AAmBA;;;AAGG;MACmB,QAAQ,CAAA;AAO7B;;AC0RD,MAAM,CAAC,GAAG,SAAS;AACnB,MAAM,GAAG,GAAG,kBAAkB;AAC9B,MAAM,IAAI,GAAG,CAAI,CAAM,KAAQ,CAAC,EAAE,IAAS;SAE3B,UAAU,CAAC,GAAQ,EAAE,QAAQ,GAAG,kCAAkC,EAAA;AAChF,IAAA,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,IAAI,GAAG,EAAE,IAAI,EAAE,OAAO,IAAI,GAAG,EAAE,OAAO,IAAI,QAAQ;AAC9E;MAGa,OAAO,CAAA;AADpB,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AAoK1C,IAAA;IAlKS,QAAQ,CAAC,OAAe,EAAE,IAAY,EA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kBAhG5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,CAAC,WAAW,CAAC;oBACtB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FT,EAAA,CAAA;AACF,iBAAA;;;ACvHD;;;;AAIG;;ACJH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"chisquare-tech-origine-ngx-apps-code.mjs","sources":["../../../projects/code/src/lib/host.ts","../../../projects/code/src/lib/code.api.ts","../../../projects/code/src/lib/look.ts","../../../projects/code/src/lib/repo-base.ts","../../../projects/code/src/lib/diff.view.ts","../../../projects/code/src/lib/repos.page.ts","../../../projects/code/src/lib/repo.page.ts","../../../projects/code/src/lib/file.page.ts","../../../projects/code/src/lib/history.pages.ts","../../../projects/code/src/lib/pulls.page.ts","../../../projects/code/src/lib/pull.page.ts","../../../projects/code/src/lib/settings.page.ts","../../../projects/code/src/public-api.ts","../../../projects/code/src/chisquare-tech-origine-ngx-apps-code.ts"],"sourcesContent":["import { Signal } from '@angular/core';\n\n/** A person in the organization, as the host knows them (identity's members). */\nexport interface CodePerson {\n id: string;\n name: string;\n email?: string;\n}\n\n/** The project the screens are on. */\nexport interface CodeProject {\n id: string;\n key: string;\n name: string;\n /** The caller's capabilities on the project: code.write, protection.manage, resources.manage… */\n capabilities: string[];\n archivedAt?: string;\n}\n\n/**\n * What the Code screens need from the app that mounts them (cloud/web provides it, as it provides\n * DesignHost): where the person is, who is in the organization, and links inside the project.\n */\nexport abstract class CodeHost {\n abstract readonly project: Signal<CodeProject | null>;\n abstract readonly projectLoaded: Signal<boolean>;\n abstract readonly people: Signal<CodePerson[]>;\n abstract meId(): string;\n /** A router link to a path inside the current project ('' is its overview). */\n abstract link(path?: string): string[];\n}\n","import { Injectable, inject } from '@angular/core';\nimport { ApiService } from '@thescaffold/ngx-core';\nimport { Observable, map } from 'rxjs';\n\n// The code app's API (gox-apps/libs/code, mounted at /api/v1/code). Shapes mirror the Go JSON.\n\nexport interface Repo {\n projectId: string;\n projectKey: string;\n name: string;\n slug: string;\n description: string;\n visibility: 'private' | 'internal';\n defaultBranch: string;\n mergeMethods: string[];\n deleteBranchOnMerge: boolean;\n archivedAt?: string;\n createdBy: string;\n pushedAt?: string;\n sizeBytes: number;\n importState?: string;\n importSource?: string;\n importError?: string;\n cloneHttps: string;\n cloneSsh: string;\n empty: boolean;\n capabilities: string[];\n readOnly?: boolean;\n createdAt?: string;\n}\n\nexport interface GitPerson {\n name: string;\n email: string;\n when: string;\n}\n\nexport interface Commit {\n oid: string;\n short: string;\n subject: string;\n body?: string;\n author: GitPerson;\n committer: GitPerson;\n parents: string[];\n keys: string[];\n}\n\nexport interface FileChange {\n status: string;\n path: string;\n oldPath?: string;\n additions: number;\n deletions: number;\n binary: boolean;\n}\n\nexport interface CommitDetail extends Commit {\n files: FileChange[];\n additions: number;\n deletions: number;\n}\n\nexport interface DiffLine {\n kind: 'context' | 'add' | 'delete';\n old?: number;\n new?: number;\n text: string;\n html: string;\n}\n\nexport interface DiffHunk {\n header: string;\n oldStart: number;\n oldLines: number;\n newStart: number;\n newLines: number;\n lines: DiffLine[];\n}\n\nexport interface FileDiff {\n path: string;\n binary: boolean;\n truncated: boolean;\n hunks: DiffHunk[];\n}\n\nexport interface Comparison {\n base: string;\n head: string;\n mergeBase: string;\n ahead: number;\n behind: number;\n commits: Commit[];\n files: FileChange[];\n}\n\nexport interface Entry {\n name: string;\n path: string;\n type: 'tree' | 'blob' | 'commit';\n size?: number;\n lastCommit?: Commit;\n}\n\nexport interface Tree {\n ref: string;\n commit: string;\n path: string;\n entries: Entry[];\n lastCommit?: Commit;\n readme?: { path: string; html: string };\n}\n\nexport interface Blob {\n ref: string;\n commit: string;\n path: string;\n name: string;\n oid: string;\n size: number;\n language?: string;\n binary: boolean;\n image: boolean;\n truncated: boolean;\n lineCount: number;\n lines: string[];\n markdown?: string;\n rawUrl?: string;\n downloadUrl?: string;\n lastCommit?: Commit;\n}\n\nexport interface BlameHunk {\n commit: string;\n author: string;\n when: string;\n summary: string;\n startLine: number;\n lines: number;\n}\n\nexport interface Language {\n name: string;\n bytes: number;\n percent: number;\n}\n\nexport interface Ref {\n name: string;\n kind: 'branch' | 'tag';\n commit?: Commit;\n default?: boolean;\n protected?: boolean;\n rule?: string;\n ahead: number;\n behind: number;\n merged: boolean;\n canDelete: boolean;\n}\n\nexport interface Protection {\n id: string;\n repoId: string;\n pattern: string;\n blockDirectPush: boolean;\n blockForcePush: boolean;\n blockDeletion: boolean;\n requiredApprovals: number;\n dismissStaleApprovals: boolean;\n requireUpToDate: boolean;\n requiredChecks: string[];\n}\n\nexport interface PullBrief {\n number: number;\n title: string;\n state: 'open' | 'closed' | 'merged';\n draft: boolean;\n authorId: string;\n source: string;\n target: string;\n labels: string[];\n review: string;\n checks: string;\n comments: number;\n keys: string[];\n updatedAt?: string;\n createdAt?: string;\n}\n\nexport interface GateRow {\n text: string;\n meta?: string;\n status: string;\n blocking: boolean;\n users?: string[];\n}\n\nexport interface Gate {\n mergeable: boolean;\n title: string;\n reasons: string[];\n rows: GateRow[];\n conflicts?: string[];\n}\n\nexport interface ReviewBrief {\n authorId: string;\n state: string;\n commitSha: string;\n stale: boolean;\n at: string;\n}\n\nexport interface CheckStatus {\n id: string;\n sha: string;\n context: string;\n state: string;\n url?: string;\n description?: string;\n}\n\nexport interface Pull {\n number: number;\n title: string;\n body: string;\n authorId: string;\n source: string;\n target: string;\n headSha: string;\n state: 'open' | 'closed' | 'merged';\n draft: boolean;\n labels: string[];\n reviewers: string[];\n assignees: string[];\n keys: string[];\n mergeBase: string;\n targetSha: string;\n commits: number;\n gate: Gate;\n reviews: ReviewBrief[];\n checks: CheckStatus[];\n mergeMethods: string[];\n deleteBranchOnMerge: boolean;\n canMerge: boolean;\n canReview: boolean;\n canEdit: boolean;\n sourceDeleted: boolean;\n mergedSha?: string;\n mergedBy?: string;\n mergeMethod?: string;\n mergedAt?: string;\n closedAt?: string;\n createdAt: string;\n updatedAt?: string;\n version: number;\n}\n\nexport interface PRComment {\n id: string;\n threadId?: string;\n reviewId?: string;\n authorId: string;\n body: string;\n pending: boolean;\n createdAt: string;\n editedAt?: string;\n}\n\nexport interface Review {\n id: string;\n authorId: string;\n state: string;\n body: string;\n commitSha: string;\n createdAt: string;\n submittedAt?: string;\n}\n\nexport interface Thread {\n id: string;\n path: string;\n side: 'old' | 'new';\n line: number;\n startLine: number;\n commitSha: string;\n outdated: boolean;\n resolved: boolean;\n resolvedBy?: string;\n createdBy: string;\n createdAt: string;\n comments: PRComment[];\n}\n\nexport interface Timeline {\n comments: PRComment[];\n reviews: Review[];\n threads: Thread[];\n}\n\nexport interface NewComment {\n body: string;\n path?: string;\n side?: 'old' | 'new';\n line?: number;\n startLine?: number;\n threadId?: string;\n pending?: boolean;\n}\n\nconst C = 'v1/code';\nconst enc = encodeURIComponent;\nconst data = <T>(r: any): T => r?.data as T;\n\nexport function apiMessage(err: any, fallback = 'Something went wrong. Try again.'): string {\n return err?.error?.message || err?.body?.message || err?.message || fallback;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CodeApi {\n private readonly api = inject(ApiService);\n\n private repoPath(project: string, name: string) {\n return `${C}/project/${enc(project)}/repo/${enc(name)}`;\n }\n\n repos(project: string): Observable<Repo[]> {\n return this.api.get(`${C}/project/${enc(project)}/repo`).pipe(map((r) => data<Repo[]>(r) ?? []));\n }\n\n create(project: string, body: { name: string; description?: string; visibility?: string; defaultBranch?: string; readme?: boolean; gitignore?: string; licence?: string }): Observable<Repo> {\n return this.api.post(`${C}/project/${enc(project)}/repo`, body).pipe(map((r) => data<Repo>(r)));\n }\n\n import(project: string, body: { name: string; url: string; username?: string; token?: string; description?: string; visibility?: string }): Observable<Repo> {\n return this.api.post(`${C}/project/${enc(project)}/repo/import`, body).pipe(map((r) => data<Repo>(r)));\n }\n\n repo(project: string, name: string): Observable<Repo> {\n return this.api.get(this.repoPath(project, name)).pipe(map((r) => data<Repo>(r)));\n }\n\n update(project: string, name: string, body: Partial<{ name: string; description: string; visibility: string; defaultBranch: string; mergeMethods: string[]; deleteBranchOnMerge: boolean }>): Observable<Repo> {\n return this.api.patch(this.repoPath(project, name), body).pipe(map((r) => data<Repo>(r)));\n }\n\n remove(project: string, name: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}?confirm=${enc(name)}`);\n }\n\n setArchived(project: string, name: string, on: boolean): Observable<Repo> {\n return this.api.post(`${this.repoPath(project, name)}/${on ? 'archive' : 'unarchive'}`, {}).pipe(map((r) => data<Repo>(r)));\n }\n\n protections(project: string, name: string): Observable<Protection[]> {\n return this.api.get(`${this.repoPath(project, name)}/protection`).pipe(map((r) => data<Protection[]>(r) ?? []));\n }\n\n addProtection(project: string, name: string, p: Partial<Protection>): Observable<Protection> {\n return this.api.post(`${this.repoPath(project, name)}/protection`, p).pipe(map((r) => data<Protection>(r)));\n }\n\n updateProtection(project: string, name: string, id: string, p: Partial<Protection>): Observable<Protection> {\n return this.api.patch(`${this.repoPath(project, name)}/protection/${enc(id)}`, p).pipe(map((r) => data<Protection>(r)));\n }\n\n removeProtection(project: string, name: string, id: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}/protection/${enc(id)}`);\n }\n\n tree(project: string, name: string, ref: string, path: string): Observable<Tree> {\n return this.api.get(`${this.repoPath(project, name)}/tree`, { ref, path }).pipe(map((r) => data<Tree>(r)));\n }\n\n blob(project: string, name: string, ref: string, path: string): Observable<Blob> {\n return this.api.get(`${this.repoPath(project, name)}/blob`, { ref, path }).pipe(map((r) => data<Blob>(r)));\n }\n\n blame(project: string, name: string, ref: string, path: string): Observable<BlameHunk[]> {\n return this.api.get(`${this.repoPath(project, name)}/blame`, { ref, path }).pipe(map((r) => data<BlameHunk[]>(r) ?? []));\n }\n\n files(project: string, name: string, ref: string): Observable<{ files: string[]; truncated: boolean }> {\n return this.api.get(`${this.repoPath(project, name)}/files`, { ref }).pipe(map((r) => data<{ files: string[]; truncated: boolean }>(r) ?? { files: [], truncated: false }));\n }\n\n languages(project: string, name: string, ref: string): Observable<Language[]> {\n return this.api.get(`${this.repoPath(project, name)}/languages`, { ref }).pipe(map((r) => data<Language[]>(r) ?? []));\n }\n\n archiveUrl(project: string, name: string, ref: string, format: 'zip' | 'tar.gz'): Observable<string> {\n return this.api.get(`${this.repoPath(project, name)}/archive`, { ref, format }).pipe(map((r) => data<{ url: string }>(r)?.url ?? ''));\n }\n\n commits(project: string, name: string, q: { ref?: string; path?: string; limit?: number; skip?: number }): Observable<Commit[]> {\n const p: Record<string, string> = {};\n if (q.ref) p['ref'] = q.ref;\n if (q.path) p['path'] = q.path;\n if (q.limit) p['limit'] = String(q.limit);\n if (q.skip) p['skip'] = String(q.skip);\n return this.api.get(`${this.repoPath(project, name)}/commits`, p).pipe(map((r) => data<Commit[]>(r) ?? []));\n }\n\n commit(project: string, name: string, sha: string): Observable<CommitDetail> {\n return this.api.get(`${this.repoPath(project, name)}/commit/${enc(sha)}`).pipe(map((r) => data<CommitDetail>(r)));\n }\n\n /** One file's hunks from base to head (\"\" base: the head's first parent). */\n diff(project: string, name: string, head: string, path: string, base = '', opts: { context?: number; ignoreSpace?: boolean } = {}): Observable<FileDiff> {\n const p: Record<string, string> = { head, path };\n if (base) p['base'] = base;\n if (opts.context) p['context'] = String(opts.context);\n if (opts.ignoreSpace) p['w'] = 'ignore';\n return this.api.get(`${this.repoPath(project, name)}/diff`, p).pipe(map((r) => data<FileDiff>(r)));\n }\n\n compare(project: string, name: string, base: string, head: string): Observable<Comparison> {\n return this.api.get(`${this.repoPath(project, name)}/compare`, { base, head }).pipe(map((r) => data<Comparison>(r)));\n }\n\n refs(project: string, name: string, kind: 'branch' | 'tag' = 'branch', q = ''): Observable<Ref[]> {\n const p: Record<string, string> = { kind };\n if (q) p['q'] = q;\n return this.api.get(`${this.repoPath(project, name)}/refs`, p).pipe(map((r) => data<Ref[]>(r) ?? []));\n }\n\n createBranch(project: string, name: string, branch: string, from: string): Observable<unknown> {\n return this.api.post(`${this.repoPath(project, name)}/branches`, { name: branch, from });\n }\n\n deleteBranch(project: string, name: string, branch: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}/branches?branch=${enc(branch)}`);\n }\n\n deleteMerged(project: string, name: string): Observable<{ deleted?: string[] } | unknown> {\n return this.api.post(`${this.repoPath(project, name)}/branches/delete-merged`, {}).pipe(map((r) => data<any>(r)));\n }\n\n pulls(project: string, name: string, q: { state?: string; author?: string; reviewer?: string; needsMyReview?: boolean; label?: string; q?: string } = {}): Observable<PullBrief[]> {\n const p: Record<string, string> = {};\n for (const [k, v] of Object.entries(q)) if (v !== undefined && v !== '' && v !== false) p[k] = String(v);\n return this.api.get(`${this.repoPath(project, name)}/pulls`, p).pipe(map((r) => data<PullBrief[]>(r) ?? []));\n }\n\n template(project: string, name: string, target: string): Observable<string> {\n return this.api.get(`${this.repoPath(project, name)}/pull-template`, { target }).pipe(map((r) => {\n const d = data<any>(r);\n return typeof d === 'string' ? d : d?.body ?? '';\n }));\n }\n\n openPull(project: string, name: string, body: { source: string; target: string; title: string; body?: string; draft?: boolean; reviewers?: string[]; labels?: string[] }): Observable<Pull> {\n return this.api.post(`${this.repoPath(project, name)}/pulls`, body).pipe(map((r) => data<Pull>(r)));\n }\n\n pull(project: string, name: string, n: number): Observable<Pull> {\n return this.api.get(`${this.repoPath(project, name)}/pulls/${n}`).pipe(map((r) => data<Pull>(r)));\n }\n\n updatePull(project: string, name: string, n: number, body: Partial<{ title: string; body: string; draft: boolean; target: string; reviewers: string[]; assignees: string[]; labels: string[] }>): Observable<Pull> {\n return this.api.patch(`${this.repoPath(project, name)}/pulls/${n}`, body).pipe(map((r) => data<Pull>(r)));\n }\n\n closePull(project: string, name: string, n: number, reopen = false): Observable<Pull> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/${reopen ? 'reopen' : 'close'}`, {}).pipe(map((r) => data<Pull>(r)));\n }\n\n merge(project: string, name: string, n: number, body: { method: string; message?: string; deleteBranch?: boolean; expectHead?: string }): Observable<Pull> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/merge`, body).pipe(map((r) => data<Pull>(r)));\n }\n\n conversation(project: string, name: string, n: number): Observable<Timeline> {\n return this.api.get(`${this.repoPath(project, name)}/pulls/${n}/conversation`).pipe(map((r) => data<Timeline>(r) ?? { comments: [], reviews: [], threads: [] }));\n }\n\n comment(project: string, name: string, n: number, c: NewComment): Observable<PRComment> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/comments`, c).pipe(map((r) => data<PRComment>(r)));\n }\n\n /** Discards one of the caller's pending review comments. */\n discardComment(project: string, name: string, n: number, id: string): Observable<unknown> {\n return this.api.delete(`${this.repoPath(project, name)}/pulls/${n}/comments/${enc(id)}`);\n }\n\n review(project: string, name: string, n: number, state: 'commented' | 'approved' | 'changes_requested', body = ''): Observable<Review> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/reviews`, { state, body }).pipe(map((r) => data<Review>(r)));\n }\n\n resolve(project: string, name: string, n: number, thread: string, on: boolean): Observable<unknown> {\n return this.api.post(`${this.repoPath(project, name)}/pulls/${n}/threads/${enc(thread)}/${on ? 'resolve' : 'unresolve'}`, {});\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CodePerson } from './host';\n\n// Small helpers the Code screens share.\n\nconst MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\nexport function shortDate(d?: string): string {\n if (!d) return '';\n const t = new Date(d);\n return Number.isNaN(t.getTime()) ? '' : `${MONTHS[t.getMonth()]} ${t.getDate()}`;\n}\n\n/** \"Nov 7, 2026\" for a day heading. */\nexport function dayLabel(d?: string): string {\n if (!d) return '';\n const t = new Date(d);\n return Number.isNaN(t.getTime()) ? '' : `${MONTHS[t.getMonth()]} ${t.getDate()}, ${t.getFullYear()}`;\n}\n\nexport function ago(iso?: string, now = Date.now()): string {\n if (!iso) return '';\n const t = Date.parse(iso);\n if (Number.isNaN(t)) return '';\n const s = Math.max(0, Math.round((now - t) / 1000));\n if (s < 60) return 'just now';\n if (s < 3600) return `${Math.floor(s / 60)} min ago`;\n if (s < 86400) return `${Math.floor(s / 3600)} h ago`;\n if (s < 172800) return 'Yesterday';\n return shortDate(iso);\n}\n\nexport function initials(name: string): string {\n const w = (name || '').split(/[\\s@._-]+/).filter(Boolean);\n return ((w[0]?.[0] ?? '?') + (w[1]?.[0] ?? '')).toUpperCase();\n}\n\nexport function size(bytes?: number): string {\n if (!bytes) return '0 B';\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`;\n}\n\n/** Names and initials by user id, from the host's people. */\nexport class People {\n private readonly byId: Map<string, CodePerson>;\n constructor(people: CodePerson[]) {\n this.byId = new Map(people.map((p) => [p.id, p]));\n }\n name(id?: string | null): string {\n if (!id) return 'Someone';\n return this.byId.get(id)?.name || this.byId.get(id)?.email || 'Someone';\n }\n initials(id?: string | null): string {\n return initials(this.name(id));\n }\n}\n\nconst LANG_COLOURS = ['var(--o-acc)', 'var(--o-ok)', 'var(--o-run)', 'var(--o-vio)', 'var(--o-bad-solid)', 'var(--o-line-mid)'];\nexport function langColour(i: number): string {\n return LANG_COLOURS[Math.min(i, LANG_COLOURS.length - 1)];\n}\n\n/** The state of checks as a dot class: success green, failure red, pending amber, none grey. */\nexport function checkDot(state: string): string {\n return state === 'success' ? 'o-dot o-grn' : state === 'failure' || state === 'error' ? 'o-dot o-red' : state === 'pending' ? 'o-dot o-amb' : 'o-dot o-gry';\n}\n\nexport function copy(text: string): Promise<void> {\n return navigator.clipboard?.writeText(text) ?? Promise.resolve();\n}\n\n/**\n * The repository the person was last in, per project, so the project-level tabs (Files, Commits,\n * Branches, Settings) open it. Browser storage is a convenience: without it the first repository is used.\n */\n@Injectable({ providedIn: 'root' })\nexport class CurrentRepo {\n get(project: string): string {\n try {\n return localStorage.getItem(`origine.code.repo.${project}`) ?? '';\n } catch {\n return '';\n }\n }\n set(project: string, repo: string) {\n try {\n localStorage.setItem(`origine.code.repo.${project}`, repo);\n } catch {\n /* storage blocked: the first repository is used */\n }\n }\n}\n\n/**\n * Highlighted code from the server: spans with Chroma's short token classes behind \"tk-\" (tk-k a\n * keyword, tk-s a string…), coloured with the theme's syntax tokens. Server HTML is not under the\n * component's encapsulation, hence ::ng-deep.\n */\nexport const TOKEN_CSS = `\n :host ::ng-deep [class^=\"tk-k\"]{color:var(--o-tk-k)}\n :host ::ng-deep [class^=\"tk-s\"], :host ::ng-deep [class^=\"tk-l\"]{color:var(--o-tk-s)}\n :host ::ng-deep [class^=\"tk-c\"]{color:var(--o-tk-c);font-style:italic}\n :host ::ng-deep [class^=\"tk-m\"]{color:var(--o-tk-n)}\n :host ::ng-deep .tk-nf, :host ::ng-deep .tk-nx, :host ::ng-deep .tk-fm{color:var(--o-tk-f)}\n :host ::ng-deep .tk-nb, :host ::ng-deep .tk-nt, :host ::ng-deep .tk-bp{color:var(--o-tk-p)}\n :host ::ng-deep .tk-gi{color:var(--o-add)} :host ::ng-deep .tk-gd{color:var(--o-bad-tx)}\n`;\n","import { ChangeDetectionStrategy, Component, Directive, ElementRef, HostListener, computed, effect, inject, input, output, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { CodeApi, Ref, Repo, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { CurrentRepo, People } from './look';\n\n/**\n * What every page under /code/:repo shares: the project, the repository named in the URL (loaded\n * once per name), the person's people and permissions, and an error line. Pages extend it and load\n * their own data in onRepo().\n */\n@Directive()\nexport abstract class RepoPage {\n protected readonly host = inject(CodeHost);\n protected readonly api = inject(CodeApi);\n protected readonly route = inject(ActivatedRoute);\n private readonly current = inject(CurrentRepo);\n\n protected readonly name = signal('');\n protected readonly repo = signal<Repo | null>(null);\n protected readonly error = signal('');\n protected readonly note = signal('');\n protected readonly people = computed(() => new People(this.host.people()));\n protected readonly canWrite = computed(() => !this.repo()?.archivedAt && (this.repo()?.capabilities ?? []).includes('code.write'));\n protected readonly canAdmin = computed(() => (this.repo()?.capabilities ?? []).includes('resources.manage'));\n protected readonly canProtect = computed(() => (this.repo()?.capabilities ?? []).includes('protection.manage'));\n\n constructor() {\n this.route.paramMap.subscribe((m) => this.name.set(m.get('repo') ?? ''));\n effect(() => {\n const name = this.name();\n const p = this.host.project();\n if (name && p) untracked(() => this.loadRepo(p.id, name));\n });\n }\n\n /** Called with the repository once it has loaded (and again after it changes). */\n protected abstract onRepo(repo: Repo): void;\n\n protected projectId(): string {\n return this.host.project()?.id ?? '';\n }\n\n protected link(path = ''): string[] {\n return this.host.link(`code/${this.name()}${path ? '/' + path : ''}`);\n }\n\n protected reloadRepo() {\n const p = this.host.project();\n if (p && this.name()) this.loadRepo(p.id, this.name());\n }\n\n private loadRepo(project: string, name: string) {\n this.error.set('');\n this.api.repo(project, name).subscribe({\n next: (r) => {\n this.repo.set(r);\n this.current.set(project, r.name);\n this.onRepo(r);\n },\n error: (e) => this.error.set(e?.status === 404 ? `There is no repository ${name} you can see in this project.` : apiMessage(e, `Could not open ${name}.`)),\n });\n }\n}\n\n// The branch and tag picker (prototype brOpen): a filterable menu of branches, then tags.\n@Component({\n selector: 'o-ref-picker',\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`:host{position:relative;display:inline-block}`],\n template: `\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"toggle()\" [attr.aria-expanded]=\"open()\" aria-haspopup=\"menu\" data-testid=\"ref-picker\">\n <span class=\"o-faint\">{{ kindOf() }}</span><b class=\"o-mono\">{{ current() }}</b><span aria-hidden=\"true\">⌄</span>\n </button>\n @if (open()) {\n <div class=\"o-menu\" role=\"menu\" style=\"left:0;top:34px;width:280px;max-height:360px;overflow:auto\">\n <input class=\"o-in o-sm\" placeholder=\"Find a branch or tag\" aria-label=\"Find a branch or tag\" style=\"margin:4px 0 6px\" [ngModel]=\"q()\" (ngModelChange)=\"q.set($event)\" />\n <div class=\"o-lbl\" style=\"padding:4px 10px\">Branches</div>\n @for (b of shown('branch'); track b.name) {\n <button type=\"button\" role=\"menuitem\" (click)=\"pick(b.name)\"><span class=\"o-mono o-sm o-ell\">{{ b.name }}</span>@if (b.name === current()) {<span class=\"o-k o-grn-t\" aria-label=\"current\">✓</span>}</button>\n } @empty {<span class=\"o-faint o-sm\" style=\"padding:4px 10px\">No branches match.</span>}\n @if (shown('tag').length) {\n <div class=\"o-lbl\" style=\"padding:4px 10px\">Tags</div>\n @for (t of shown('tag'); track t.name) {<button type=\"button\" role=\"menuitem\" (click)=\"pick(t.name)\"><span class=\"o-mono o-sm o-ell\">{{ t.name }}</span></button>}\n }\n </div>\n }\n `,\n})\nexport class RefPicker {\n private readonly api = inject(CodeApi);\n private readonly host = inject(CodeHost);\n private readonly el = inject(ElementRef);\n\n readonly repo = input.required<string>();\n readonly current = input.required<string>();\n readonly picked = output<string>();\n\n protected readonly open = signal(false);\n protected readonly q = signal('');\n private readonly refs = signal<Ref[]>([]);\n protected readonly kindOf = computed(() => (this.refs().some((r) => r.kind === 'tag' && r.name === this.current()) ? 'tag' : 'branch'));\n\n protected shown(kind: 'branch' | 'tag') {\n const q = this.q().toLowerCase();\n return this.refs().filter((r) => r.kind === kind && (!q || r.name.toLowerCase().includes(q))).slice(0, 50);\n }\n\n protected toggle() {\n this.open.set(!this.open());\n const p = this.host.project();\n if (this.open() && p) {\n this.api.refs(p.id, this.repo(), 'branch').subscribe({ next: (b) => this.refs.set([...b, ...this.refs().filter((r) => r.kind === 'tag')]), error: () => undefined });\n this.api.refs(p.id, this.repo(), 'tag').subscribe({ next: (t) => this.refs.set([...this.refs().filter((r) => r.kind === 'branch'), ...t]), error: () => undefined });\n }\n }\n\n protected pick(name: string) {\n this.open.set(false);\n this.picked.emit(name);\n }\n\n @HostListener('document:click', ['$event'])\n protected outside(e: MouseEvent) {\n if (this.open() && !this.el.nativeElement.contains(e.target)) this.open.set(false);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, computed, effect, inject, input, output, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CodeApi, DiffLine, FileChange, FileDiff, Thread, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { People, TOKEN_CSS, ago } from './look';\n\nexport interface LineComment {\n path: string;\n side: 'old' | 'new';\n line: number;\n body: string;\n /** Part of the caller's review, posted when it is submitted. */\n pending: boolean;\n}\n\nexport interface ThreadReply {\n threadId: string;\n body: string;\n}\n\n/** One row of the split view: the old side and the new side. */\nexport interface SplitRow {\n left?: DiffLine;\n right?: DiffLine;\n}\n\n/** Past this many changed lines a file waits for \"Load diff\" (DEV-19 large diffs). */\nconst LARGE = 600;\n/** Context steps for \"Show more context\". */\nconst CONTEXT = [3, 25, 100];\n\n// One file of a diff (prototype prDiffs): its header with +/− and Viewed, the hunks highlighted,\n// unified or split, and, on a pull request, the review threads on its lines and a comment form on\n// any line number (\"Add single comment\" or part of a review). The diff loads when the file scrolls\n// near the screen; a very large one waits to be asked for.\n@Component({\n selector: 'o-diff',\n imports: [FormsModule, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [TOKEN_CSS, `\n .o-ln .o-n{cursor:default;width:44px}\n .o-ln .o-n.cmt{cursor:pointer}\n .o-ln .o-n.cmt:hover{color:var(--o-acc-tx)}\n .hunk{color:var(--o-dim);background:var(--o-well);padding:2px 12px;font-size:11px}\n .split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}\n .split .side-l{border-right:1px solid var(--o-line-soft)}\n .split .full{grid-column:1 / -1}\n .split .o-ln .o-t{white-space:pre-wrap;word-break:break-all}\n .empty-side{background:var(--o-well)}\n .viewed{display:inline-flex;align-items:center;gap:6px}\n `],\n template: `\n <div class=\"o-card\" [attr.id]=\"'file-' + file().path\" [attr.data-testid]=\"'diff-' + file().path\">\n <div class=\"o-ch\" style=\"background:var(--o-well)\">\n <button type=\"button\" class=\"o-btn o-ghost o-xs\" (click)=\"toggleOpen()\" [attr.aria-expanded]=\"open()\" [attr.aria-label]=\"(open() ? 'Collapse ' : 'Expand ') + file().path\">{{ open() ? '▾' : '▸' }}</button>\n <span class=\"o-mono o-sm o-ell\">{{ file().oldPath && file().oldPath !== file().path ? file().oldPath + ' → ' : '' }}{{ file().path }}</span>\n <span class=\"o-grn-t o-sm\">+{{ file().additions }}</span><span class=\"o-red-t o-sm\">−{{ file().deletions }}</span>\n @if (threadsHere().length) {<span class=\"o-faint o-sm\">💬 {{ threadsHere().length }}</span>}\n <span class=\"o-r o-flex\" style=\"gap:6px\">\n @if (open() && diff() && context() < 100 && !file().binary) {<button type=\"button\" class=\"o-btn o-xs\" (click)=\"moreContext()\" [attr.aria-label]=\"'Show more context in ' + file().path\">More context</button>}\n <ng-content />\n @if (viewable()) {\n <button type=\"button\" class=\"o-btn o-xs viewed\" role=\"checkbox\" [attr.aria-checked]=\"viewed()\" [attr.aria-label]=\"'Viewed ' + file().path\" (click)=\"viewedChange.emit(!viewed())\"><span class=\"o-cbx\" [class.o-on]=\"viewed()\" style=\"width:12px;height:12px\"></span>Viewed</button>\n }\n </span>\n </div>\n @if (open()) {\n @if (file().binary) {\n <div class=\"o-empty o-sm\">A binary file.</div>\n } @else if (waiting()) {\n <div class=\"o-empty o-sm o-col\" style=\"gap:8px;align-items:center\">\n <span>{{ file().additions + file().deletions }} changed lines.</span>\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"waiting.set(false); load()\">Load diff</button>\n </div>\n } @else if (error()) {\n <div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>\n } @else if (diff(); as d) {\n @if (d.truncated) {<div class=\"o-note\">This diff is too large to show in full.</div>}\n @if (mode() === 'split') {\n <div class=\"o-code split\" style=\"overflow-x:auto\" role=\"table\" [attr.aria-label]=\"'Changes to ' + file().path + ', side by side'\">\n @for (h of d.hunks; track $index; let hi = $index) {\n <div class=\"hunk o-mono full\" role=\"row\">{{ h.header }}</div>\n @for (r of splitRows()[hi]; track $index) {\n @if (r.left; as l) {\n <div class=\"o-ln side-l\" role=\"row\" [class.o-del]=\"l.kind === 'delete'\" [attr.data-testid]=\"'split-old-' + l.old\">\n <span class=\"o-n\" role=\"rowheader\" [class.cmt]=\"canComment()\" (click)=\"startComment(l)\" [attr.title]=\"canComment() ? 'Comment on this line' : null\">{{ l.old }}</span>\n <span class=\"o-sr-only\">{{ l.kind === 'delete' ? 'removed' : '' }}</span>\n <span class=\"o-t\" role=\"cell\" [innerHTML]=\"l.html || l.text\"></span>\n </div>\n } @else {<div class=\"o-ln side-l empty-side\" aria-hidden=\"true\"><span class=\"o-n\"></span><span class=\"o-t\"></span></div>}\n @if (r.right; as l) {\n <div class=\"o-ln\" role=\"row\" [class.o-add]=\"l.kind === 'add'\" [attr.data-testid]=\"'split-new-' + l.new\">\n <span class=\"o-n\" role=\"rowheader\" [class.cmt]=\"canComment()\" (click)=\"startComment(l)\" [attr.title]=\"canComment() ? 'Comment on this line' : null\">{{ l.new }}</span>\n <span class=\"o-sr-only\">{{ l.kind === 'add' ? 'added' : '' }}</span>\n <span class=\"o-t\" role=\"cell\" [innerHTML]=\"l.html || l.text\"></span>\n </div>\n } @else {<div class=\"o-ln empty-side\" aria-hidden=\"true\"><span class=\"o-n\"></span><span class=\"o-t\"></span></div>}\n @for (l of rowLines(r); track $index) {\n @for (t of threadsAt(l); track t.id) {<div class=\"full\"><ng-container *ngTemplateOutlet=\"threadTpl; context: { $implicit: t }\" /></div>}\n @if (drafting() === key(l)) {<div class=\"full\"><ng-container *ngTemplateOutlet=\"draftTpl; context: { $implicit: l }\" /></div>}\n }\n }\n } @empty {<div class=\"o-empty o-sm full\">{{ ignoreSpace() ? 'Only whitespace changed.' : 'No changes to show.' }}</div>}\n </div>\n } @else {\n <div class=\"o-code\" style=\"overflow-x:auto\" role=\"table\" [attr.aria-label]=\"'Changes to ' + file().path\">\n @for (h of d.hunks; track $index) {\n <div class=\"hunk o-mono\" role=\"row\">{{ h.header }}</div>\n @for (l of h.lines; track $index) {\n <div class=\"o-ln\" role=\"row\" [class.o-add]=\"l.kind === 'add'\" [class.o-del]=\"l.kind === 'delete'\">\n <span class=\"o-n\" role=\"rowheader\" [class.cmt]=\"canComment()\" (click)=\"startComment(l)\" [attr.title]=\"canComment() ? 'Comment on this line' : null\">{{ l.kind === 'delete' ? l.old : l.new }}</span>\n <span class=\"o-s\" aria-hidden=\"true\">{{ l.kind === 'add' ? '+' : l.kind === 'delete' ? '−' : ' ' }}</span>\n <span class=\"o-sr-only\">{{ l.kind === 'add' ? 'added' : l.kind === 'delete' ? 'removed' : '' }}</span>\n <span class=\"o-t\" role=\"cell\" [innerHTML]=\"l.html || l.text\"></span>\n </div>\n @for (t of threadsAt(l); track t.id) {<ng-container *ngTemplateOutlet=\"threadTpl; context: { $implicit: t }\" />}\n @if (drafting() === key(l)) {<ng-container *ngTemplateOutlet=\"draftTpl; context: { $implicit: l }\" />}\n }\n } @empty {\n <div class=\"o-empty o-sm\">{{ ignoreSpace() ? 'Only whitespace changed.' : 'No changes to show.' }}</div>\n }\n </div>\n }\n } @else {\n <div class=\"o-empty o-sm\">Loading…</div>\n }\n }\n </div>\n\n <ng-template #threadTpl let-t>\n <div class=\"o-thread\" [attr.data-testid]=\"'thread-' + t.id\">\n <div class=\"o-cb o-col\" style=\"gap:6px;padding:10px 12px\">\n @for (c of t.comments; track c.id) {\n <span class=\"o-sm\"><b>{{ people().name(c.authorId) }}</b><span class=\"o-faint\"> · {{ ago(c.createdAt) }}</span>\n @if (c.pending) {<span class=\"o-chip o-amb\" style=\"margin-left:6px\">Pending</span>\n @if (c.authorId === me()) {<button type=\"button\" class=\"o-lnk\" style=\"margin-left:6px;color:var(--o-mut)\" (click)=\"discard.emit(c.id)\" [attr.aria-label]=\"'Discard pending comment: ' + c.body\">Discard</button>}\n }\n </span>\n <span style=\"white-space:pre-wrap\">{{ c.body }}</span>\n }\n </div>\n @if (canComment()) {\n <div class=\"o-cf\">\n <input class=\"o-in o-sm\" placeholder=\"Reply…\" aria-label=\"Reply\" [ngModel]=\"replies()[t.id] ?? ''\" (ngModelChange)=\"setReply(t.id, $event)\" (keydown.enter)=\"sendReply(t.id)\" />\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"sendReply(t.id)\">Reply</button>\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"resolve.emit({ threadId: t.id, resolved: !t.resolved })\">{{ t.resolved ? 'Unresolve' : 'Resolve' }}</button>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #draftTpl let-l>\n <div class=\"o-thread\"><div class=\"o-cb o-col\" style=\"gap:8px;padding:10px 12px\">\n <textarea class=\"o-in\" rows=\"2\" [placeholder]=\"'Leave a comment on line ' + lineOf(l)\" [attr.aria-label]=\"'Comment on line ' + lineOf(l)\" [ngModel]=\"draftBody()\" (ngModelChange)=\"draftBody.set($event)\" data-testid=\"line-comment\"></textarea>\n <div class=\"o-flex o-wrap\"><span class=\"o-faint o-xs\">Markdown works.</span>\n <button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"drafting.set('')\">Cancel</button>\n <button type=\"button\" class=\"o-btn o-sm\" [disabled]=\"!draftBody().trim()\" (click)=\"send(l, false)\" data-testid=\"line-comment-add\">Add single comment</button>\n <button type=\"button\" class=\"o-btn o-sm o-pri\" [disabled]=\"!draftBody().trim()\" (click)=\"send(l, true)\" data-testid=\"line-comment-review\">{{ reviewing() ? 'Add review comment' : 'Start a review' }}</button>\n </div>\n </div></div>\n </ng-template>\n `,\n})\nexport class DiffView implements AfterViewInit {\n private readonly api = inject(CodeApi);\n private readonly host = inject(CodeHost);\n private readonly el = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly repo = input.required<string>();\n readonly file = input.required<FileChange>();\n readonly head = input.required<string>();\n readonly base = input('');\n readonly threads = input<Thread[]>([]);\n readonly canComment = input(false);\n readonly mode = input<'unified' | 'split'>('unified');\n readonly ignoreSpace = input(false);\n /** The file is marked viewed (pull requests); null hides the Viewed button. */\n readonly viewed = input<boolean | null>(null);\n /** The caller has a pending review on this pull request. */\n readonly reviewing = input(false);\n readonly comment = output<LineComment>();\n readonly reply = output<ThreadReply>();\n readonly resolve = output<{ threadId: string; resolved: boolean }>();\n readonly discard = output<string>();\n readonly viewedChange = output<boolean>();\n\n protected readonly open = signal(true);\n protected readonly visible = signal(false);\n protected readonly waiting = signal(false);\n protected readonly context = signal(CONTEXT[0]);\n protected readonly diff = signal<FileDiff | null>(null);\n protected readonly error = signal('');\n protected readonly drafting = signal('');\n protected readonly draftBody = signal('');\n protected readonly replies = signal<Record<string, string>>({});\n protected readonly people = computed(() => new People(this.host.people()));\n protected readonly threadsHere = computed(() => this.threads().filter((t) => t.path === this.file().path));\n protected readonly viewable = computed(() => this.viewed() !== null);\n protected readonly me = computed(() => this.host.meId());\n protected readonly splitRows = computed(() => (this.diff()?.hunks ?? []).map((h) => pair(h.lines)));\n protected readonly ago = (s?: string) => ago(s);\n private asked = false;\n\n constructor() {\n effect(() => {\n // viewed files fold away (and unfold when unmarked)\n const v = this.viewed();\n if (v !== null) untracked(() => this.open.set(!v));\n });\n effect(() => {\n // what the diff depends on; it loads once the file is near the screen and open\n this.head();\n this.base();\n this.ignoreSpace();\n this.context();\n const f = this.file();\n if (!this.visible() || !this.open() || f.binary) return;\n untracked(() => {\n if (!this.asked && f.additions + f.deletions > LARGE) {\n this.waiting.set(true);\n return;\n }\n this.load();\n });\n });\n }\n\n ngAfterViewInit() {\n if (typeof IntersectionObserver === 'undefined') {\n this.visible.set(true);\n return;\n }\n const io = new IntersectionObserver((entries) => {\n if (entries.some((e) => e.isIntersecting)) {\n this.visible.set(true);\n io.disconnect();\n }\n }, { rootMargin: '600px 0px' });\n io.observe(this.el.nativeElement);\n this.destroyRef.onDestroy(() => io.disconnect());\n }\n\n protected load() {\n const p = this.host.project();\n const f = this.file();\n if (!p || !this.head() || f.binary) return;\n this.asked = true;\n this.waiting.set(false);\n this.error.set('');\n this.api.diff(p.id, this.repo(), this.head(), f.path, this.base(), { context: this.context(), ignoreSpace: this.ignoreSpace() }).subscribe({\n next: (d) => this.diff.set(d),\n error: (e) => this.error.set(apiMessage(e, 'Could not load this diff.')),\n });\n }\n\n protected toggleOpen() {\n this.open.set(!this.open());\n }\n\n protected moreContext() {\n const next = CONTEXT.find((c) => c > this.context());\n if (next) this.context.set(next);\n }\n\n protected key(l: DiffLine) {\n return `${l.kind === 'delete' ? 'old' : 'new'}:${this.lineOf(l)}`;\n }\n\n protected lineOf(l: DiffLine) {\n return (l.kind === 'delete' ? l.old : l.new) ?? 0;\n }\n\n /** The lines of a split row that threads and drafts hang from (a context line once). */\n protected rowLines(r: SplitRow): DiffLine[] {\n if (r.left && r.right && r.left === r.right) return [r.left];\n return [r.left, r.right].filter((l): l is DiffLine => !!l);\n }\n\n protected threadsAt(l: DiffLine): Thread[] {\n const side = l.kind === 'delete' ? 'old' : 'new';\n const n = this.lineOf(l);\n return this.threadsHere().filter((t) => !t.outdated && t.side === side && t.line === n);\n }\n\n protected startComment(l: DiffLine) {\n if (!this.canComment()) return;\n this.drafting.set(this.key(l));\n this.draftBody.set('');\n }\n\n protected send(l: DiffLine, pending: boolean) {\n const body = this.draftBody().trim();\n if (!body) return;\n this.comment.emit({ path: this.file().path, side: l.kind === 'delete' ? 'old' : 'new', line: this.lineOf(l), body, pending });\n this.drafting.set('');\n this.draftBody.set('');\n }\n\n protected setReply(id: string, v: string) {\n this.replies.set({ ...this.replies(), [id]: v });\n }\n\n protected sendReply(id: string) {\n const body = (this.replies()[id] ?? '').trim();\n if (!body) return;\n this.reply.emit({ threadId: id, body });\n this.setReply(id, '');\n }\n}\n\n/** Pairs a hunk's lines side by side: context on both sides, a run of removals beside the run of additions that follows it. */\nexport function pair(lines: DiffLine[]): SplitRow[] {\n const rows: SplitRow[] = [];\n let i = 0;\n while (i < lines.length) {\n const l = lines[i];\n if (l.kind === 'context') {\n rows.push({ left: l, right: l });\n i++;\n continue;\n }\n const dels: DiffLine[] = [];\n const adds: DiffLine[] = [];\n while (i < lines.length && lines[i].kind === 'delete') dels.push(lines[i++]);\n while (i < lines.length && lines[i].kind === 'add') adds.push(lines[i++]);\n for (let k = 0; k < Math.max(dels.length, adds.length); k++) rows.push({ left: dels[k], right: adds[k] });\n }\n return rows;\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { CodeApi, Repo, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { CurrentRepo, People, ago, copy } from './look';\n\n// /{org}/{project}/code (prototype \"code_repos\"): the project's repositories.\n@Component({\n selector: 'o-code-repos',\n imports: [RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ host.project()?.key }} · {{ repos().length }} {{ repos().length === 1 ? 'repository' : 'repositories' }}</span><h1 class=\"o-t\">Repositories</h1></div>\n @if (canWrite()) {\n <div class=\"o-acts\">\n <a class=\"o-btn\" [routerLink]=\"host.link('code/new')\" [queryParams]=\"{ import: 1 }\">Import repository</a>\n <a class=\"o-btn o-dark\" [routerLink]=\"host.link('code/new')\" data-testid=\"new-repo\">+ New repository</a>\n </div>\n }\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n <div class=\"o-card\" style=\"overflow-x:auto\">\n <div class=\"o-tbl\" role=\"table\" aria-label=\"Repositories\" style=\"min-width:640px\">\n <div class=\"o-thead\" role=\"rowgroup\"><div class=\"o-tr\" role=\"row\"><div class=\"o-th\" role=\"columnheader\">Name</div><div class=\"o-th\" role=\"columnheader\">Default branch</div><div class=\"o-th\" role=\"columnheader\">Last push</div><div class=\"o-th\" role=\"columnheader\">Size</div><div class=\"o-th\" role=\"columnheader\">Visibility</div></div></div>\n <div class=\"o-tbody\" role=\"rowgroup\">\n @for (r of repos(); track r.name) {\n <a class=\"o-tr o-click\" role=\"row\" [routerLink]=\"host.link('code/' + r.name)\" [attr.data-testid]=\"'repo-' + r.name\">\n <div class=\"o-td\" role=\"cell\"><div class=\"o-col\" style=\"gap:2px\"><b class=\"o-mono o-b5\">{{ r.name }}</b>@if (r.description) {<span class=\"o-faint o-sm\">{{ r.description }}</span>}</div></div>\n <div class=\"o-td o-mono o-sm\" role=\"cell\">{{ r.defaultBranch }}</div>\n <div class=\"o-td o-mut\" role=\"cell\">{{ r.importState === 'running' || r.importState === 'queued' ? 'Importing…' : r.empty ? 'Empty' : ago(r.pushedAt) }}</div>\n <div class=\"o-td o-mut o-sm\" role=\"cell\">{{ sizeOf(r.sizeBytes) }}</div>\n <div class=\"o-td\" role=\"cell\"><span class=\"o-chip\">{{ r.visibility === 'private' ? 'Private' : 'Org-internal' }}</span>@if (r.archivedAt) {<span class=\"o-chip o-amb\" style=\"margin-left:4px\">Archived</span>}</div>\n </a>\n } @empty {\n <div class=\"o-empty\">{{ loaded() ? 'No repositories yet. Create one, or import from GitHub, GitLab, Bitbucket or any Git server.' : 'Loading…' }}</div>\n }\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class ReposPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n protected readonly repos = signal<Repo[]>([]);\n protected readonly loaded = signal(false);\n protected readonly error = signal('');\n protected readonly ago = (s?: string) => ago(s);\n protected readonly canWrite = computed(() => {\n const p = this.host.project();\n return !!p && !p.archivedAt && p.capabilities.includes('code.write');\n });\n\n constructor() {\n effect(() => {\n const p = this.host.project();\n if (p) untracked(() => this.api.repos(p.id).subscribe({\n next: (r) => { this.repos.set(r); this.loaded.set(true); },\n error: (e) => { this.loaded.set(true); this.error.set(apiMessage(e, 'Could not load the repositories.')); },\n }));\n });\n }\n\n protected sizeOf(b: number) {\n return b < 1024 * 1024 ? `${Math.max(1, Math.round(b / 1024))} KB` : `${(b / 1024 / 1024).toFixed(1)} MB`;\n }\n}\n\n// /{org}/{project}/code/new (prototype \"code_new\"): create an empty repository with optional\n// README, .gitignore and licence, or import one from a URL; then the quick-setup commands.\n@Component({\n selector: 'o-code-new',\n imports: [FormsModule, RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page o-narrow\">\n <div class=\"o-ph\"><div class=\"o-col\"><span class=\"o-eyebrow\">{{ host.project()?.key }}</span><h1 class=\"o-t\">Add a repository</h1></div></div>\n <div class=\"o-tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" class=\"o-tab\" [class.o-on]=\"mode() === 'create'\" [attr.aria-selected]=\"mode() === 'create'\" (click)=\"mode.set('create')\">Create</button>\n <button type=\"button\" role=\"tab\" class=\"o-tab\" [class.o-on]=\"mode() === 'import'\" [attr.aria-selected]=\"mode() === 'import'\" (click)=\"mode.set('import')\">Import from URL</button>\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n\n @if (made(); as r) {\n <div class=\"o-card\">\n <div class=\"o-ch\"><b class=\"o-mono\">{{ r.name }}</b><span class=\"o-chip\">{{ r.empty ? 'empty' : r.importState ? 'importing' : 'ready' }}</span><span class=\"o-r\">Quick setup</span></div>\n <div class=\"o-cb o-col\" style=\"gap:14px\">\n <div class=\"o-flex\">\n <div class=\"o-seg\" role=\"group\" aria-label=\"Protocol\"><button type=\"button\" [class.o-on]=\"proto() === 'https'\" (click)=\"proto.set('https')\">HTTPS</button><button type=\"button\" [class.o-on]=\"proto() === 'ssh'\" (click)=\"proto.set('ssh')\">SSH</button></div>\n <div class=\"o-copy\" style=\"flex:1\"><span data-testid=\"clone-url\">{{ url() }}</span><button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyUrl()\">{{ copied() ? 'Copied' : 'Copy' }}</button></div>\n </div>\n @if (r.empty) {\n <b class=\"o-sm\">Create a new repository on the command line</b>\n <div class=\"o-term\"><div>echo \"# {{ r.name }}\" >> README.md</div><div>git init && git add README.md</div><div>git commit -m \"first commit\"</div><div>git branch -M {{ r.defaultBranch }}</div><div>git remote add origin {{ url() }}</div><div>git push -u origin {{ r.defaultBranch }}</div></div>\n <b class=\"o-sm\">…or push an existing repository</b>\n <div class=\"o-term\"><div>git remote add origin {{ url() }}</div><div>git branch -M {{ r.defaultBranch }}</div><div>git push -u origin {{ r.defaultBranch }}</div></div>\n }\n <a class=\"o-btn o-dark\" style=\"align-self:flex-start\" [routerLink]=\"host.link('code/' + r.name)\">Open {{ r.name }}</a>\n </div>\n </div>\n } @else if (mode() === 'create') {\n <form class=\"o-card o-cb o-form\" (ngSubmit)=\"create()\">\n <div class=\"o-fld\"><label for=\"nr-name\">Repository name</label><input id=\"nr-name\" class=\"o-in o-mono\" name=\"name\" [(ngModel)]=\"repoName\" placeholder=\"payments-api\" autocomplete=\"off\" data-testid=\"repo-name\" /><span class=\"o-hint\">Letters, digits, dots, dashes and underscores.</span></div>\n <div class=\"o-fld\"><label for=\"nr-desc\">Description <span class=\"o-faint\">(optional)</span></label><input id=\"nr-desc\" class=\"o-in\" name=\"desc\" [(ngModel)]=\"desc\" placeholder=\"What lives here?\" /></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Visibility</span>\n <div class=\"o-g2\">\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"vis === 'private'\" (click)=\"vis = 'private'\"><span class=\"o-rad\" [class.o-on]=\"vis === 'private'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Private</b><span class=\"o-faint o-sm\">Project members only</span></span></button>\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"vis === 'internal'\" (click)=\"vis = 'internal'\"><span class=\"o-rad\" [class.o-on]=\"vis === 'internal'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Org-internal</b><span class=\"o-faint o-sm\">Everyone in the organization can read</span></span></button>\n </div>\n </div>\n <div class=\"o-g4\">\n <div class=\"o-fld\"><label for=\"nr-br\">Default branch</label><input id=\"nr-br\" class=\"o-in o-mono\" name=\"branch\" [(ngModel)]=\"branch\" /></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\" id=\"nr-readme\">README</span><button type=\"button\" class=\"o-tog\" role=\"switch\" aria-labelledby=\"nr-readme\" [class.o-on]=\"readme\" [attr.aria-checked]=\"readme\" (click)=\"readme = !readme\" data-testid=\"repo-readme\"></button></div>\n <div class=\"o-fld\"><label for=\"nr-gi\">.gitignore</label><select id=\"nr-gi\" class=\"o-in\" name=\"gi\" [(ngModel)]=\"gitignore\"><option value=\"\">None</option><option value=\"node\">Node</option><option value=\"go\">Go</option><option value=\"python\">Python</option></select></div>\n <div class=\"o-fld\"><label for=\"nr-lic\">Licence</label><select id=\"nr-lic\" class=\"o-in\" name=\"lic\" [(ngModel)]=\"licence\"><option value=\"\">None</option><option value=\"MIT\">MIT</option><option value=\"Apache-2.0\">Apache 2.0</option></select></div>\n </div>\n <div class=\"o-flex\"><span class=\"o-faint o-sm\">Push limits: 2 GB per push, 100 MB per file.</span><button type=\"submit\" class=\"o-btn o-dark o-r\" [disabled]=\"busy() || !repoName.trim()\" data-testid=\"repo-create\">Create repository</button></div>\n </form>\n } @else {\n <form class=\"o-card o-cb o-form\" (ngSubmit)=\"importRepo()\">\n <div class=\"o-fld\"><label for=\"ir-url\">Git URL</label><input id=\"ir-url\" class=\"o-in o-mono\" name=\"url\" [(ngModel)]=\"url_\" placeholder=\"https://github.com/acme/payments-api.git\" (blur)=\"nameFromUrl()\" /><span class=\"o-hint\">GitHub, GitLab, Bitbucket or any Git server over HTTPS. All branches and tags are copied.</span></div>\n <div class=\"o-fld\"><label for=\"ir-name\">Repository name</label><input id=\"ir-name\" class=\"o-in o-mono\" name=\"iname\" [(ngModel)]=\"repoName\" /></div>\n <div class=\"o-g2\">\n <div class=\"o-fld\"><label for=\"ir-user\">Username <span class=\"o-faint\">(private repos)</span></label><input id=\"ir-user\" class=\"o-in\" name=\"user\" [(ngModel)]=\"user\" autocomplete=\"off\" /></div>\n <div class=\"o-fld\"><label for=\"ir-tok\">Access token</label><input id=\"ir-tok\" class=\"o-in\" type=\"password\" name=\"token\" [(ngModel)]=\"token\" autocomplete=\"off\" /></div>\n </div>\n <div class=\"o-flex\"><button type=\"button\" class=\"o-tog o-dis\" disabled aria-label=\"Keep as a pull mirror\"></button><span class=\"o-sm\">Keep as a pull mirror</span><b class=\"o-ph-tag o-later\">Later</b></div>\n <div class=\"o-flex\"><span class=\"o-faint o-sm\">Imports run in the background; you'll get an inbox message when done.</span><button type=\"submit\" class=\"o-btn o-dark o-r\" [disabled]=\"busy() || !url_.trim() || !repoName.trim()\">Import</button></div>\n </form>\n }\n </div>\n `,\n})\nexport class NewRepoPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n private readonly route = inject(ActivatedRoute);\n\n protected readonly mode = signal<'create' | 'import'>('create');\n protected readonly made = signal<Repo | null>(null);\n protected readonly proto = signal<'https' | 'ssh'>('https');\n protected readonly busy = signal(false);\n protected readonly error = signal('');\n protected readonly copied = signal(false);\n protected readonly url = computed(() => (this.proto() === 'ssh' ? this.made()?.cloneSsh : this.made()?.cloneHttps) || '');\n protected repoName = '';\n protected desc = '';\n protected vis: 'private' | 'internal' = 'private';\n protected branch = 'main';\n protected readme = true;\n protected gitignore = '';\n protected licence = '';\n protected url_ = '';\n protected user = '';\n protected token = '';\n\n constructor() {\n this.route.queryParamMap.subscribe((q) => this.mode.set(q.get('import') ? 'import' : 'create'));\n }\n\n protected nameFromUrl() {\n if (this.repoName.trim()) return;\n const m = this.url_.trim().match(/([^/:]+?)(\\.git)?\\/?$/);\n if (m) this.repoName = m[1];\n }\n\n protected copyUrl() {\n void copy(this.url()).then(() => { this.copied.set(true); setTimeout(() => this.copied.set(false), 1500); });\n }\n\n protected create() {\n const p = this.host.project();\n if (!p) return;\n this.busy.set(true);\n this.error.set('');\n this.api.create(p.id, { name: this.repoName.trim(), description: this.desc.trim(), visibility: this.vis, defaultBranch: this.branch.trim() || 'main', readme: this.readme, gitignore: this.gitignore, licence: this.licence }).subscribe({\n next: (r) => { this.busy.set(false); this.made.set(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not create the repository.')); },\n });\n }\n\n protected importRepo() {\n const p = this.host.project();\n if (!p) return;\n this.busy.set(true);\n this.error.set('');\n this.api.import(p.id, { name: this.repoName.trim(), url: this.url_.trim(), username: this.user.trim() || undefined, token: this.token || undefined, visibility: this.vis }).subscribe({\n next: (r) => { this.busy.set(false); this.token = ''; this.made.set(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not start the import.')); },\n });\n }\n}\n\n// /{org}/{project}/code/{files,commits,branches,settings}: the project-level tabs open the repository\n// the person was last in (else the first one) at that tab.\n@Component({\n selector: 'o-code-current',\n imports: [RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page o-narrow\">\n @if (none()) {\n <div class=\"o-card o-empty\"><p>No repositories yet.</p><a class=\"o-btn\" style=\"margin-top:14px\" [routerLink]=\"host.link('code/new')\">+ New repository</a></div>\n } @else if (error()) {\n <div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>\n } @else {\n <div class=\"o-card\"><div class=\"o-empty\">Opening the repository…</div></div>\n }\n </div>\n `,\n})\nexport class CurrentRepoPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly current = inject(CurrentRepo);\n protected readonly none = signal(false);\n protected readonly error = signal('');\n\n constructor() {\n effect(() => {\n const p = this.host.project();\n if (!p) return;\n untracked(() => {\n const tab = String(this.route.snapshot.data['codeTab'] ?? '');\n this.api.repos(p.id).subscribe({\n next: (rs) => {\n if (!rs.length) return this.none.set(true);\n const last = this.current.get(p.id);\n const repo = rs.find((r) => r.name === last)?.name ?? rs[0].name;\n void this.router.navigate(this.host.link(`code/${repo}${tab ? '/' + tab : ''}`), { replaceUrl: true });\n },\n error: (e) => this.error.set(apiMessage(e, 'Could not load the repositories.')),\n });\n });\n });\n }\n}\n\n","import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterLink } from '@angular/router';\nimport { Language, Repo, Tree, apiMessage } from './code.api';\nimport { RefPicker, RepoPage } from './repo-base';\nimport { ago, copy, initials, langColour } from './look';\n\n// /{org}/{project}/code/{repo}?ref=&path= (prototype \"code_repo\"): the repository's files at a\n// branch, tag or commit, the last commit of each entry, the README, the clone menu and languages.\n@Component({\n selector: 'o-code-repo',\n imports: [FormsModule, RouterLink, RefPicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`.anchor{position:relative} .ic{width:18px;flex:none;color:var(--o-dim);text-align:center}`],\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-ph\">\n <div class=\"o-col\">\n <span class=\"o-eyebrow\">{{ r.projectKey }}</span>\n <div class=\"o-flex\"><h1 class=\"o-t o-mono\" style=\"font-size:19px\">{{ r.name }}</h1><span class=\"o-chip\">{{ r.visibility === 'private' ? 'Private' : 'Org-internal' }}</span>@if (r.archivedAt) {<span class=\"o-chip o-amb\">Archived</span>}</div>\n @if (r.description) {<span class=\"o-mut\">{{ r.description }}</span>}\n </div>\n @if (!r.empty) {<div class=\"o-acts\"><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive('zip')\">Download ZIP</button></div>}\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n\n @if (r.importState && r.importState !== 'done') {\n <div class=\"o-card o-cb o-col\" style=\"gap:6px\">\n <b>{{ r.importState === 'failed' ? 'The import failed' : 'Importing from ' + r.importSource }}</b>\n <span class=\"o-mut o-sm\">{{ r.importState === 'failed' ? r.importError : 'This runs in the background; the inbox tells you when it is done.' }}</span>\n </div>\n } @else if (r.empty) {\n <div class=\"o-card\">\n <div class=\"o-ch\"><b>This repository is empty</b><span class=\"o-r\">Quick setup</span></div>\n <div class=\"o-cb o-col\" style=\"gap:14px\">\n <div class=\"o-flex\">\n <div class=\"o-seg\" role=\"group\" aria-label=\"Protocol\"><button type=\"button\" [class.o-on]=\"proto() === 'https'\" (click)=\"proto.set('https')\">HTTPS</button><button type=\"button\" [class.o-on]=\"proto() === 'ssh'\" (click)=\"proto.set('ssh')\">SSH</button></div>\n <div class=\"o-copy\" style=\"flex:1\"><span data-testid=\"clone-url\">{{ cloneUrl() }}</span><button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyClone()\">{{ copied() ? 'Copied' : 'Copy' }}</button></div>\n </div>\n <b class=\"o-sm\">Push an existing repository</b>\n <div class=\"o-term\"><div>git remote add origin {{ cloneUrl() }}</div><div>git branch -M {{ r.defaultBranch }}</div><div>git push -u origin {{ r.defaultBranch }}</div></div>\n </div>\n </div>\n } @else {\n <div class=\"o-flex o-wrap\">\n <o-ref-picker [repo]=\"r.name\" [current]=\"ref() || r.defaultBranch\" (picked)=\"go($event, '')\" />\n <nav class=\"o-flex o-sm o-mono\" aria-label=\"Path\">\n <a [routerLink]=\"link()\" [queryParams]=\"qp('')\">{{ r.name }}</a>\n @for (c of crumbs(); track c.path) {<span class=\"o-faint\">/</span><a [routerLink]=\"link()\" [queryParams]=\"qp(c.path)\">{{ c.name }}</a>}\n </nav>\n <span class=\"o-r\"></span>\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"openFinder()\">Go to file <span class=\"o-kbd\">T</span></button>\n <span class=\"anchor\">\n <button type=\"button\" class=\"o-btn o-sm o-pri\" (click)=\"cloneOpen.set(!cloneOpen())\" [attr.aria-expanded]=\"cloneOpen()\" aria-haspopup=\"dialog\" data-testid=\"clone-menu\">Code ⌄</button>\n @if (cloneOpen()) {\n <div class=\"o-menu\" role=\"dialog\" aria-label=\"Clone\" style=\"right:0;top:34px;width:380px;padding:12px;display:flex;flex-direction:column;gap:10px\">\n <b>Clone</b>\n <div class=\"o-seg\" role=\"group\" aria-label=\"Protocol\" style=\"align-self:flex-start\"><button type=\"button\" [class.o-on]=\"proto() === 'https'\" (click)=\"proto.set('https')\">HTTPS</button><button type=\"button\" [class.o-on]=\"proto() === 'ssh'\" (click)=\"proto.set('ssh')\">SSH</button></div>\n <div class=\"o-copy\"><span data-testid=\"clone-url\">{{ cloneUrl() }}</span><button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyClone()\">{{ copied() ? 'Copied' : 'Copy' }}</button></div>\n <span class=\"o-hint\">{{ proto() === 'https' ? 'Use a personal access token as the password.' : 'Add your SSH key under Account › SSH and signing keys.' }}</span>\n <hr style=\"border:none;border-top:1px solid var(--o-line-soft);margin:0;width:100%\">\n <div class=\"o-flex\"><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive('zip')\">Download ZIP</button><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive('tar.gz')\">Download tar.gz</button></div>\n </div>\n }\n </span>\n </div>\n <div class=\"o-split\">\n <div class=\"o-col\" style=\"gap:14px;min-width:0\">\n <div class=\"o-card\">\n @if (tree()?.lastCommit; as lc) {\n <div class=\"o-ch\" style=\"background:var(--o-well)\">\n <span class=\"o-av\" aria-hidden=\"true\">{{ initials(lc.author.name) }}</span><b class=\"o-b5\">{{ lc.author.name }}</b>\n <a class=\"o-ell o-mut\" style=\"min-width:0\" [routerLink]=\"link('commit/' + lc.oid)\">{{ lc.subject }}</a>\n <span class=\"o-r o-flex o-sm\"><a class=\"o-mono\" [routerLink]=\"link('commit/' + lc.oid)\">{{ lc.short }}</a><span class=\"o-faint\">{{ ago(lc.committer.when) }}</span><a [routerLink]=\"link('commits')\" [queryParams]=\"{ ref: ref() }\">History</a></span>\n </div>\n }\n @if (path()) {<a class=\"o-row o-click\" [routerLink]=\"link()\" [queryParams]=\"qp(parent())\"><span class=\"o-faint o-mono ic\">..</span></a>}\n @for (e of tree()?.entries ?? []; track e.path) {\n <a class=\"o-row o-click\" [routerLink]=\"e.type === 'tree' ? link() : link('blob')\" [queryParams]=\"qp(e.path)\" [attr.data-testid]=\"'entry-' + e.name\">\n <span class=\"ic\" aria-hidden=\"true\">{{ e.type === 'tree' ? '▸' : '·' }}</span>\n <span class=\"o-mono o-sm\" style=\"width:200px;flex:none\" [class.o-b5]=\"e.type === 'tree'\">{{ e.name }}</span>\n <span class=\"o-ell o-faint o-sm\" style=\"flex:1\">{{ e.lastCommit?.subject }}</span>\n <span class=\"o-faint o-sm\">{{ ago(e.lastCommit?.committer?.when) }}</span>\n </a>\n } @empty {\n @if (!tree()) {<div class=\"o-empty\">Loading…</div>}\n }\n </div>\n @if (tree()?.readme; as rd) {\n <div class=\"o-card\">\n <div class=\"o-ch\"><b class=\"o-mono o-sm\">{{ rd.path }}</b></div>\n <div class=\"o-cb o-md readme\" style=\"font-size:14px;padding:18px 22px\" [innerHTML]=\"rd.html\"></div>\n </div>\n }\n </div>\n <div class=\"o-col\" style=\"gap:14px\">\n <div class=\"o-card o-cb o-col\"><b>About</b><span class=\"o-mut o-lh\">{{ r.description || 'No description.' }}</span><span class=\"o-faint o-sm\">Default branch <span class=\"o-mono\">{{ r.defaultBranch }}</span></span></div>\n <div class=\"o-card o-cb o-col\"><div class=\"o-flex\"><b>Releases</b><b class=\"o-ph-tag o-ga o-r\">GA</b></div><span class=\"o-faint o-sm\">Tags and release notes arrive at general availability.</span></div>\n <div class=\"o-card o-cb o-col\"><b>Deployments</b><span class=\"o-faint o-sm\">Environments show here once Deploy is set up.</span></div>\n @if (langs().length) {\n <div class=\"o-card o-cb o-col\">\n <b>Languages</b>\n <div style=\"display:flex;height:8px;border-radius:4px;overflow:hidden\" role=\"img\" [attr.aria-label]=\"langLabel()\">@for (l of langs(); track l.name; let i = $index) {<i [style.width.%]=\"l.percent\" [style.background]=\"colour(i)\"></i>}</div>\n <div class=\"o-legend\">@for (l of langs(); track l.name; let i = $index) {<span><span class=\"o-dot\" [style.background]=\"colour(i)\"></span>{{ l.name }} {{ l.percent.toFixed(0) }}%</span>}</div>\n </div>\n }\n </div>\n </div>\n }\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p><a class=\"o-btn\" style=\"margin-top:14px\" [routerLink]=\"host.link('code')\">All repositories</a></div>\n } @else {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n </div>\n\n @if (finding()) {\n <div class=\"o-overlay\" (click)=\"finding.set(false)\">\n <div class=\"o-dlg o-wide\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Go to file\" (click)=\"$event.stopPropagation()\" (keydown.escape)=\"finding.set(false)\">\n <div class=\"o-dlg-b\">\n <input class=\"o-in o-mono\" placeholder=\"Find a file\" aria-label=\"Find a file\" [ngModel]=\"fq()\" (ngModelChange)=\"fq.set($event)\" (keydown.enter)=\"openFirst()\" />\n <div class=\"o-col\" style=\"gap:0;max-height:50vh;overflow:auto\">\n @for (f of found(); track f) {<a class=\"o-row o-click o-mono o-sm\" [routerLink]=\"link('blob')\" [queryParams]=\"qp(f)\" (click)=\"finding.set(false)\">{{ f }}</a>}\n @if (!found().length) {<span class=\"o-faint o-sm\" style=\"padding:8px\">{{ files().length ? 'No files match.' : 'Loading files…' }}</span>}\n </div>\n </div>\n </div>\n </div>\n }\n `,\n})\nexport class RepoHomePage extends RepoPage {\n private readonly router = inject(Router);\n private readonly el = inject(ElementRef);\n\n protected readonly tree = signal<Tree | null>(null);\n protected readonly langs = signal<Language[]>([]);\n protected readonly ref = signal('');\n protected readonly path = signal('');\n protected readonly proto = signal<'https' | 'ssh'>('https');\n protected readonly cloneOpen = signal(false);\n protected readonly copied = signal(false);\n protected readonly finding = signal(false);\n protected readonly fq = signal('');\n protected readonly files = signal<string[]>([]);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly colour = langColour;\n protected readonly cloneUrl = computed(() => (this.proto() === 'ssh' ? this.repo()?.cloneSsh : this.repo()?.cloneHttps) || '');\n protected readonly crumbs = computed(() => {\n const parts = this.path().split('/').filter(Boolean);\n return parts.map((name, i) => ({ name, path: parts.slice(0, i + 1).join('/') }));\n });\n protected readonly parent = computed(() => this.path().split('/').slice(0, -1).join('/'));\n protected readonly found = computed(() => {\n const q = this.fq().toLowerCase();\n return this.files().filter((f) => !q || f.toLowerCase().includes(q)).slice(0, 50);\n });\n protected readonly langLabel = computed(() => this.langs().map((l) => `${l.name} ${l.percent.toFixed(0)}%`).join(', '));\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => {\n this.ref.set(q.get('ref') ?? '');\n this.path.set(q.get('path') ?? '');\n const r = this.repo();\n if (r && r.name === this.name()) this.load(r);\n });\n }\n\n protected onRepo(r: Repo) {\n this.load(r);\n if (!r.empty) this.api.languages(this.projectId(), r.name, this.ref() || r.defaultBranch).subscribe({ next: (l) => this.langs.set(l), error: () => undefined });\n }\n\n protected qp(path: string) {\n return { ref: this.ref() || null, path: path || null };\n }\n\n protected go(ref: string, path: string) {\n void this.router.navigate(this.link(), { queryParams: { ref, path: path || null } });\n }\n\n protected copyClone() {\n void copy(this.cloneUrl()).then(() => { this.copied.set(true); setTimeout(() => this.copied.set(false), 1500); });\n }\n\n protected archive(format: 'zip' | 'tar.gz') {\n const r = this.repo();\n if (!r) return;\n this.api.archiveUrl(this.projectId(), r.name, this.ref() || r.defaultBranch, format).subscribe({\n next: (u) => { if (u) location.assign(u); },\n error: (e) => this.error.set(apiMessage(e, 'Could not prepare the download.')),\n });\n }\n\n protected openFirst() {\n const f = this.found()[0];\n if (f) { this.finding.set(false); void this.router.navigate(this.link('blob'), { queryParams: this.qp(f) }); }\n }\n\n /** T opens Go to file (prototype). */\n @HostListener('document:keydown', ['$event'])\n protected key(e: KeyboardEvent) {\n const t = e.target as HTMLElement | null;\n if (e.key !== 't' || e.metaKey || e.ctrlKey || e.altKey || t?.closest('input,textarea,select,[contenteditable]')) return;\n if (this.repo() && !this.repo()!.empty && !this.finding()) { e.preventDefault(); this.openFinder(); }\n }\n\n private load(r: Repo) {\n if (r.empty || (r.importState && r.importState !== 'done')) return;\n const ref = this.ref() || r.defaultBranch;\n this.tree.set(null);\n this.api.tree(this.projectId(), r.name, ref, this.path()).subscribe({\n next: (t) => this.tree.set(t),\n error: (e) => this.error.set(apiMessage(e, 'Could not read the files.')),\n });\n this.files.set([]);\n }\n\n protected openFinder() {\n const r = this.repo();\n if (!r || r.empty) return;\n this.finding.set(true);\n this.fq.set('');\n if (!this.files().length) this.api.files(this.projectId(), r.name, this.ref() || r.defaultBranch).subscribe({ next: (f) => this.files.set(f.files), error: () => undefined });\n setTimeout(() => (this.el.nativeElement as HTMLElement).querySelector<HTMLInputElement>('input[aria-label=\"Find a file\"]')?.focus());\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';\nimport { Router, RouterLink } from '@angular/router';\nimport { BlameHunk, Blob, Repo, apiMessage } from './code.api';\nimport { RefPicker, RepoPage } from './repo-base';\nimport { TOKEN_CSS, ago, copy, initials, size } from './look';\n\n// /{org}/{project}/code/{repo}/blob?ref=&path= (prototype \"code_file\"): one file, highlighted, with\n// Markdown preview, blame, raw, copy and download; a line number links to that line (#L12).\n@Component({\n selector: 'o-code-file',\n imports: [RouterLink, RefPicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [TOKEN_CSS, `.o-ln .o-n{text-decoration:none} .o-btn.o-on{background:var(--o-tx);border-color:var(--o-tx);color:var(--o-acc-fg)}`],\n template: `\n <div class=\"o-page o-wide\">\n @if (repo(); as r) {\n <div class=\"o-flex o-wrap\">\n <o-ref-picker [repo]=\"r.name\" [current]=\"ref() || r.defaultBranch\" (picked)=\"pickRef($event)\" />\n <nav class=\"o-flex o-sm o-mono\" aria-label=\"Path\">\n <a [routerLink]=\"link()\" [queryParams]=\"{ ref: ref() || null }\">{{ r.name }}</a>\n @for (c of crumbs(); track c.path; let last = $last) {\n <span class=\"o-faint\">/</span>\n @if (last) {<b aria-current=\"page\">{{ c.name }}</b>} @else {<a [routerLink]=\"link()\" [queryParams]=\"{ ref: ref() || null, path: c.path }\">{{ c.name }}</a>}\n }\n </nav>\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (blob(); as b) {\n <div class=\"o-card\">\n @if (b.lastCommit; as lc) {\n <div class=\"o-ch\" style=\"background:var(--o-well)\">\n <span class=\"o-av\" aria-hidden=\"true\">{{ initials(lc.author.name) }}</span><b class=\"o-b5\">{{ lc.author.name }}</b>\n <span class=\"o-ell o-mut\" style=\"min-width:0\">{{ lc.subject }}</span>\n <span class=\"o-r o-sm\"><a class=\"o-mono\" [routerLink]=\"link('commit/' + lc.oid)\">{{ lc.short }}</a> · {{ ago(lc.committer.when) }} · <a [routerLink]=\"link('commits')\" [queryParams]=\"{ ref: ref() || null, path: b.path }\">History</a></span>\n </div>\n }\n <div class=\"o-ch\">\n <span class=\"o-faint o-sm\">{{ meta() }}</span>\n <span class=\"o-r o-flex\" style=\"gap:6px\">\n @if (b.markdown) {\n <div class=\"o-seg\" role=\"group\" aria-label=\"View\"><button type=\"button\" [class.o-on]=\"view() === 'preview'\" (click)=\"view.set('preview')\">Preview</button><button type=\"button\" [class.o-on]=\"view() === 'code'\" (click)=\"view.set('code')\">Code</button></div>\n }\n @if (!b.binary && !b.truncated) {<button type=\"button\" class=\"o-btn o-xs\" [class.o-on]=\"blaming()\" [attr.aria-pressed]=\"blaming()\" (click)=\"toggleBlame()\">Blame</button>}\n @if (b.rawUrl) {<a class=\"o-btn o-xs\" [href]=\"b.rawUrl\" target=\"_blank\" rel=\"noopener\">Raw</a>}\n @if (!b.binary) {<button type=\"button\" class=\"o-btn o-xs\" (click)=\"copyText()\">{{ copied() ? 'Copied' : 'Copy' }}</button>}\n @if (b.downloadUrl) {<a class=\"o-btn o-xs\" [href]=\"b.downloadUrl\">Download</a>}\n </span>\n </div>\n @if (b.image && b.rawUrl) {\n <div class=\"o-cb\" style=\"text-align:center\"><img [src]=\"b.rawUrl\" [alt]=\"b.name\" style=\"max-width:100%\" /></div>\n } @else if (b.binary || b.truncated) {\n <div class=\"o-empty\">{{ b.binary ? 'A binary file.' : 'Too large to show here.' }} @if (b.rawUrl) {<a [href]=\"b.rawUrl\" target=\"_blank\" rel=\"noopener\">View raw</a>}</div>\n } @else if (b.markdown && view() === 'preview') {\n <div class=\"o-cb o-md\" style=\"font-size:14px;padding:18px 22px\" [innerHTML]=\"b.markdown\"></div>\n } @else {\n <div class=\"o-code\" style=\"padding:8px 0;overflow-x:auto\" role=\"table\" [attr.aria-label]=\"b.path\">\n @for (l of b.lines; track $index; let i = $index) {\n <div class=\"o-ln\" [class.o-hl]=\"line() === i + 1\" role=\"row\" [attr.id]=\"'L' + (i + 1)\">\n @if (blaming()) {<span class=\"o-bl\" role=\"cell\" [attr.title]=\"blameAt(i + 1)?.summary\">{{ blameLabel(i + 1) }}</span>}\n <a class=\"o-n\" role=\"rowheader\" [routerLink]=\"[]\" [queryParamsHandling]=\"'preserve'\" [fragment]=\"'L' + (i + 1)\" (click)=\"pickLine(i + 1)\" [attr.aria-label]=\"'Line ' + (i + 1)\">{{ i + 1 }}</a>\n <span class=\"o-t\" role=\"cell\" [innerHTML]=\"l\"></span>\n </div>\n }\n </div>\n }\n </div>\n <span class=\"o-faint o-sm\">Click a line number to link to that line.</span>\n } @else if (!error()) {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class FilePage extends RepoPage {\n private readonly router = inject(Router);\n protected readonly blob = signal<Blob | null>(null);\n protected readonly blame = signal<BlameHunk[]>([]);\n protected readonly blaming = signal(false);\n protected readonly ref = signal('');\n protected readonly path = signal('');\n protected readonly line = signal(0);\n protected readonly view = signal<'preview' | 'code'>('preview');\n protected readonly copied = signal(false);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly crumbs = computed(() => {\n const parts = this.path().split('/').filter(Boolean);\n return parts.map((name, i) => ({ name, path: parts.slice(0, i + 1).join('/') }));\n });\n protected readonly meta = computed(() => {\n const b = this.blob();\n if (!b) return '';\n return [b.binary ? '' : `${b.lineCount} lines`, size(b.size), b.language ?? ''].filter(Boolean).join(' · ');\n });\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => {\n this.ref.set(q.get('ref') ?? '');\n this.path.set(q.get('path') ?? '');\n const r = this.repo();\n if (r && r.name === this.name()) this.load(r);\n });\n this.route.fragment.subscribe((f) => this.line.set(f?.startsWith('L') ? Number(f.slice(1)) || 0 : 0));\n }\n\n protected onRepo(r: Repo) {\n this.load(r);\n }\n\n protected pickRef(ref: string) {\n void this.router.navigate(this.link('blob'), { queryParams: { ref, path: this.path() } });\n }\n\n protected pickLine(n: number) {\n this.line.set(n);\n }\n\n protected copyText() {\n const b = this.blob();\n if (!b) return;\n const div = document.createElement('div');\n const text = b.lines.map((l) => { div.innerHTML = l; return div.textContent ?? ''; }).join('\\n');\n void copy(text).then(() => { this.copied.set(true); setTimeout(() => this.copied.set(false), 1500); });\n }\n\n protected toggleBlame() {\n this.blaming.set(!this.blaming());\n const r = this.repo();\n if (this.blaming() && r && !this.blame().length) {\n this.api.blame(this.projectId(), r.name, this.ref() || r.defaultBranch, this.path()).subscribe({ next: (b) => this.blame.set(b), error: (e) => this.error.set(apiMessage(e, 'Could not load the blame.')) });\n }\n }\n\n protected blameAt(n: number): BlameHunk | undefined {\n return this.blame().find((h) => n >= h.startLine && n < h.startLine + h.lines);\n }\n\n /** The hunk's commit and author on its first line only. */\n protected blameLabel(n: number): string {\n const h = this.blameAt(n);\n return h && h.startLine === n ? `${h.commit.slice(0, 7)} ${h.author} · ${ago(h.when)}` : '';\n }\n\n private load(r: Repo) {\n if (!this.path()) return;\n this.blob.set(null);\n this.blame.set([]);\n this.blaming.set(false);\n this.api.blob(this.projectId(), r.name, this.ref() || r.defaultBranch, this.path()).subscribe({\n next: (b) => { this.blob.set(b); this.view.set(b.markdown ? 'preview' : 'code'); if (this.line()) setTimeout(() => document.getElementById('L' + this.line())?.scrollIntoView({ block: 'center' })); },\n error: (e) => this.error.set(apiMessage(e, `Could not open ${this.path()}.`)),\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router, RouterLink } from '@angular/router';\nimport { Commit, CommitDetail, Ref, Repo, apiMessage } from './code.api';\nimport { DiffView } from './diff.view';\nimport { RefPicker, RepoPage } from './repo-base';\nimport { ago, dayLabel, initials } from './look';\n\nconst PAGE = 30;\n\n// /{org}/{project}/code/{repo}/commits?ref=&path= (prototype \"code_commits\"): history grouped by\n// day, with the issue keys each message names.\n@Component({\n selector: 'o-code-commits',\n imports: [RouterLink, RefPicker],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ r.name }}{{ path() ? ' · ' + path() : '' }}</span><h1 class=\"o-t\">Commits</h1></div>\n <div class=\"o-acts\"><o-ref-picker [repo]=\"r.name\" [current]=\"ref() || r.defaultBranch\" (picked)=\"pickRef($event)\" /></div>\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @for (g of groups(); track g.day) {\n <span class=\"o-lbl\" style=\"margin-top:4px\">Commits on {{ g.day }}</span>\n <div class=\"o-card\">\n @for (c of g.items; track c.oid) {\n <div class=\"o-row\" [attr.data-testid]=\"'commit-' + c.short\">\n <div class=\"o-col\" style=\"gap:4px;flex:1;min-width:0\">\n <a class=\"o-b5 o-ell\" style=\"color:var(--o-tx)\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.subject }}</a>\n <span class=\"o-flex o-faint o-sm o-wrap\"><span class=\"o-av\" aria-hidden=\"true\">{{ initials(c.author.name) }}</span>{{ c.author.name }} committed {{ ago(c.committer.when) }}\n @for (k of c.keys; track k) {<a class=\"o-chip o-blu\" [routerLink]=\"host.link('issues/' + k)\">{{ k }}</a>}\n </span>\n </div>\n <a class=\"o-btn o-sm o-mono\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.short }}</a>\n <a class=\"o-btn o-sm\" [routerLink]=\"link()\" [queryParams]=\"{ ref: c.oid }\" title=\"Browse files at this commit\" [attr.aria-label]=\"'Browse files at ' + c.short\">‹›</a>\n </div>\n }\n </div>\n } @empty {\n <div class=\"o-card\"><div class=\"o-empty\">{{ loading() ? 'Loading…' : r.empty ? 'No commits yet: push to ' + r.defaultBranch + '.' : 'No commits.' }}</div></div>\n }\n @if (more()) {<button type=\"button\" class=\"o-btn o-sm\" style=\"align-self:center\" (click)=\"next()\" [disabled]=\"loading()\">Older commits</button>}\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class CommitsPage extends RepoPage {\n private readonly router = inject(Router);\n protected readonly commits = signal<Commit[]>([]);\n protected readonly ref = signal('');\n protected readonly path = signal('');\n protected readonly loading = signal(false);\n protected readonly more = signal(false);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly groups = computed(() => {\n const out: { day: string; items: Commit[] }[] = [];\n for (const c of this.commits()) {\n const d = dayLabel(c.committer.when);\n const last = out[out.length - 1];\n if (last?.day === d) last.items.push(c);\n else out.push({ day: d, items: [c] });\n }\n return out;\n });\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => {\n this.ref.set(q.get('ref') ?? '');\n this.path.set(q.get('path') ?? '');\n const r = this.repo();\n if (r && r.name === this.name()) this.load(r, 0);\n });\n }\n\n protected onRepo(r: Repo) {\n this.load(r, 0);\n }\n\n protected pickRef(ref: string) {\n void this.router.navigate(this.link('commits'), { queryParams: { ref, path: this.path() || null } });\n }\n\n protected next() {\n const r = this.repo();\n if (r) this.load(r, this.commits().length);\n }\n\n private load(r: Repo, skip: number) {\n if (r.empty) return;\n this.loading.set(true);\n this.api.commits(this.projectId(), r.name, { ref: this.ref() || r.defaultBranch, path: this.path() || undefined, limit: PAGE, skip }).subscribe({\n next: (cs) => { this.loading.set(false); this.commits.set(skip ? [...this.commits(), ...cs] : cs); this.more.set(cs.length === PAGE); },\n error: (e) => { this.loading.set(false); this.error.set(apiMessage(e, 'Could not load the history.')); },\n });\n }\n}\n\n// /{org}/{project}/code/{repo}/commit/{sha} (prototype \"code_commit\"): the message, author, keys,\n// parents and every changed file's diff.\n@Component({\n selector: 'o-code-commit',\n imports: [RouterLink, DiffView],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (commit(); as c) {\n <div class=\"o-card\">\n <div class=\"o-cb o-col\" style=\"gap:10px\">\n <h1 class=\"o-t\">{{ c.subject }}</h1>\n @if (c.body) {<span class=\"o-mut o-lh\" style=\"white-space:pre-wrap\">{{ c.body }}</span>}\n <div class=\"o-flex o-wrap o-sm\">\n <span class=\"o-av\" aria-hidden=\"true\">{{ initials(c.author.name) }}</span><b class=\"o-b5\">{{ c.author.name }}</b><span class=\"o-faint\">committed {{ ago(c.committer.when) }}</span>\n @for (k of c.keys; track k) {<a class=\"o-chip o-blu\" [routerLink]=\"host.link('issues/' + k)\">{{ k }}</a>}\n <span class=\"o-r o-mono o-faint\">commit {{ c.oid.slice(0, 10) }}@for (p of c.parents; track p) { · parent <a [routerLink]=\"link('commit/' + p)\">{{ p.slice(0, 7) }}</a>}</span>\n </div>\n </div>\n <div class=\"o-cf\"><a [routerLink]=\"link()\" [queryParams]=\"{ ref: c.oid }\">Browse files</a><span class=\"o-r\">{{ c.files.length }} {{ c.files.length === 1 ? 'file' : 'files' }} changed · <span class=\"o-grn-t\">+{{ c.additions }}</span> <span class=\"o-red-t\">−{{ c.deletions }}</span></span></div>\n </div>\n @for (f of c.files; track f.path) {\n <o-diff [repo]=\"name()\" [file]=\"f\" [head]=\"c.oid\" />\n }\n } @else if (!error()) {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n </div>\n `,\n})\nexport class CommitPage extends RepoPage {\n protected readonly commit = signal<CommitDetail | null>(null);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n private sha = '';\n\n constructor() {\n super();\n this.route.paramMap.subscribe((m) => {\n this.sha = m.get('sha') ?? '';\n const r = this.repo();\n if (r && r.name === this.name()) this.onRepo(r);\n });\n }\n\n protected onRepo(r: Repo) {\n if (!this.sha) return;\n this.commit.set(null);\n this.api.commit(this.projectId(), r.name, this.sha).subscribe({ next: (c) => this.commit.set(c), error: (e) => this.error.set(apiMessage(e, `Could not open commit ${this.sha.slice(0, 7)}.`)) });\n }\n}\n\n// /{org}/{project}/code/{repo}/branches (prototype \"code_branches\"): each branch with its last\n// commit, how far behind and ahead of the default branch it is, protection, its pull request, and\n// create, delete and delete-merged.\n@Component({\n selector: 'o-code-branches',\n imports: [FormsModule, RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`.ab{display:flex;align-items:center;gap:0;width:200px} .ab i{display:block;height:6px} .ab .l{flex:1;display:flex;justify-content:flex-end;border-right:1px solid var(--o-line-mid)} .ab .rr{flex:1}`],\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ r.name }}</span><h1 class=\"o-t\">Branches</h1></div>\n @if (canWrite()) {\n <div class=\"o-acts\">\n <button type=\"button\" class=\"o-btn o-sm\" (click)=\"deleteMerged()\" [disabled]=\"busy()\">Delete merged</button>\n <button type=\"button\" class=\"o-btn o-sm o-dark\" (click)=\"adding.set(!adding())\" data-testid=\"new-branch\">+ New branch</button>\n </div>\n }\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (note()) {<div class=\"o-note\" role=\"status\">{{ note() }}</div>}\n @if (adding()) {\n <form class=\"o-card o-cb o-flex o-wrap\" (ngSubmit)=\"create()\">\n <div class=\"o-fld\" style=\"flex:1\"><label for=\"nb-name\">Branch name</label><input id=\"nb-name\" class=\"o-in o-mono\" name=\"name\" [(ngModel)]=\"newName\" data-testid=\"branch-name\" /></div>\n <div class=\"o-fld\"><label for=\"nb-from\">From</label><select id=\"nb-from\" class=\"o-in\" name=\"from\" [(ngModel)]=\"from\">@for (b of refs(); track b.name) {<option [value]=\"b.name\">{{ b.name }}</option>}</select></div>\n <button type=\"submit\" class=\"o-btn o-dark\" style=\"align-self:flex-end\" [disabled]=\"!newName.trim() || busy()\" data-testid=\"branch-create\">Create branch</button>\n </form>\n }\n <div class=\"o-card\" style=\"overflow-x:auto\">\n <div class=\"o-tbl\" role=\"table\" aria-label=\"Branches\" style=\"min-width:720px\">\n <div class=\"o-thead\" role=\"rowgroup\"><div class=\"o-tr\" role=\"row\"><div class=\"o-th\" role=\"columnheader\">Branch</div><div class=\"o-th\" role=\"columnheader\">Updated</div><div class=\"o-th\" role=\"columnheader\" style=\"width:220px\">Behind | Ahead of {{ r.defaultBranch }}</div><div class=\"o-th\" role=\"columnheader\">Pull request</div><div class=\"o-th\" role=\"columnheader\"></div></div></div>\n <div class=\"o-tbody\" role=\"rowgroup\">\n @for (b of refs(); track b.name) {\n <div class=\"o-tr\" role=\"row\" [attr.data-testid]=\"'branch-' + b.name\">\n <div class=\"o-td\" role=\"cell\"><span class=\"o-flex\"><a class=\"o-mono o-b5 o-sm\" [routerLink]=\"link()\" [queryParams]=\"{ ref: b.name }\">{{ b.name }}</a>@if (b.default) {<span class=\"o-chip\">default</span>}@if (b.protected) {<span class=\"o-chip o-amb\" [attr.title]=\"'Rule ' + b.rule\">protected</span>}@if (b.merged && !b.default) {<span class=\"o-chip o-vio\">merged</span>}</span></div>\n <div class=\"o-td o-mut o-sm\" role=\"cell\">@if (b.commit) {<span class=\"o-flex\"><span class=\"o-av\" aria-hidden=\"true\">{{ initials(b.commit.author.name) }}</span>{{ ago(b.commit.committer.when) }}</span>}</div>\n <div class=\"o-td\" role=\"cell\">\n @if (!b.default) {\n <div class=\"ab\" [attr.aria-label]=\"b.behind + ' behind, ' + b.ahead + ' ahead'\">\n <span class=\"o-mono o-xs o-faint\" style=\"width:26px;text-align:right;padding-right:4px\">{{ b.behind }}</span>\n <div class=\"l\"><i [style.width.%]=\"bar(b.behind)\" style=\"border-radius:3px 0 0 3px;background:var(--o-line-mid)\"></i></div>\n <div class=\"rr\"><i [style.width.%]=\"bar(b.ahead)\" style=\"border-radius:0 3px 3px 0;background:var(--o-acc)\"></i></div>\n <span class=\"o-mono o-xs o-faint\" style=\"width:26px;padding-left:4px\">{{ b.ahead }}</span>\n </div>\n }\n </div>\n <div class=\"o-td\" role=\"cell\">\n @if (pullFor(b.name); as pr) {<a [class]=\"pr.state === 'merged' ? 'o-chip o-vio' : pr.state === 'closed' ? 'o-chip' : 'o-chip o-blu'\" [routerLink]=\"link('pull/' + pr.number)\">#{{ pr.number }} {{ pr.state }}</a>}\n @else if (!b.default && b.ahead > 0 && canWrite()) {<a class=\"o-btn o-xs\" [routerLink]=\"link('pulls')\" [queryParams]=\"{ new: 1, source: b.name }\">New PR</a>}\n </div>\n <div class=\"o-td o-num\" role=\"cell\">@if (b.canDelete && canWrite()) {<button type=\"button\" class=\"o-btn o-xs o-ghost\" (click)=\"remove(b)\" [attr.aria-label]=\"'Delete ' + b.name\">Delete</button>}</div>\n </div>\n } @empty {\n <div class=\"o-empty\">{{ r.empty ? 'No branches yet: push to create ' + r.defaultBranch + '.' : 'Loading…' }}</div>\n }\n </div>\n </div>\n </div>\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class BranchesPage extends RepoPage {\n protected readonly refs = signal<Ref[]>([]);\n protected readonly pulls = signal<{ number: number; state: string; source: string }[]>([]);\n protected readonly adding = signal(false);\n protected readonly busy = signal(false);\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected newName = '';\n protected from = '';\n private readonly maxAB = computed(() => Math.max(1, ...this.refs().map((r) => Math.max(r.ahead, r.behind))));\n\n protected onRepo(r: Repo) {\n this.from = r.defaultBranch;\n this.load(r);\n }\n\n protected bar(n: number) {\n return n ? Math.max(4, (100 * n) / this.maxAB()) : 0;\n }\n\n protected pullFor(branch: string) {\n return this.pulls().find((p) => p.source === branch && p.state === 'open') ?? this.pulls().find((p) => p.source === branch);\n }\n\n protected create() {\n const r = this.repo();\n const n = this.newName.trim();\n if (!r || !n) return;\n this.busy.set(true);\n this.api.createBranch(this.projectId(), r.name, n, this.from || r.defaultBranch).subscribe({\n next: () => { this.busy.set(false); this.adding.set(false); this.newName = ''; this.note.set(`Branch ${n} created.`); this.load(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not create the branch.')); },\n });\n }\n\n protected remove(b: Ref) {\n const r = this.repo();\n if (!r) return;\n this.api.deleteBranch(this.projectId(), r.name, b.name).subscribe({\n next: () => { this.note.set(`Branch ${b.name} deleted.`); this.load(r); },\n error: (e) => this.error.set(apiMessage(e, `Could not delete ${b.name}.`)),\n });\n }\n\n protected deleteMerged() {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n this.api.deleteMerged(this.projectId(), r.name).subscribe({\n next: (res: any) => { this.busy.set(false); const n = (res?.deleted ?? res ?? []).length ?? 0; this.note.set(n ? `${n} merged ${n === 1 ? 'branch' : 'branches'} deleted.` : 'No merged branches to delete.'); this.load(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not delete merged branches.')); },\n });\n }\n\n private load(r: Repo) {\n if (r.empty) return;\n this.api.refs(this.projectId(), r.name, 'branch').subscribe({ next: (b) => this.refs.set(b), error: (e) => this.error.set(apiMessage(e, 'Could not load the branches.')) });\n this.api.pulls(this.projectId(), r.name, { state: 'all' }).subscribe({ next: (p) => this.pulls.set(p), error: () => undefined });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { forkJoin, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\nimport { CodeApi, Comparison, PullBrief, Ref, Repo, apiMessage } from './code.api';\nimport { CodeHost } from './host';\nimport { People, ago, checkDot } from './look';\n\ninterface Row extends PullBrief {\n repo: string;\n}\n\nconst REVIEW: Record<string, string> = { approved: 'Approved', changes_requested: 'Changes requested', review_required: 'Review required', commented: 'Commented', '': '' };\n\n// /{org}/{project}/code/pulls (every repository) and /code/{repo}/pulls (prototype \"code_pulls\"):\n// open, merged and closed pull requests with their checks, review state and comments; filters; and\n// the form that opens one (?new=1&source=).\n@Component({\n selector: 'o-code-pulls',\n imports: [FormsModule, RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`.st{border:none;background:none;padding:0;font-size:12px;font-weight:500;cursor:pointer;color:var(--o-mut)} .st.o-on{color:var(--o-tx)} .o-btn.o-on{background:var(--o-tx);border-color:var(--o-tx);color:var(--o-acc-fg)}`],\n template: `\n <div class=\"o-page\">\n <div class=\"o-ph\">\n <div class=\"o-col\"><span class=\"o-eyebrow\">{{ repoName() || host.project()?.key + ' · every repository' }}</span><h1 class=\"o-t\">Pull requests</h1></div>\n @if (canWrite() && repos().length) {<div class=\"o-acts\"><button type=\"button\" class=\"o-btn o-dark\" (click)=\"startNew('')\" data-testid=\"new-pull\">New pull request</button></div>}\n </div>\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n\n @if (opening()) {\n <form class=\"o-card\" (ngSubmit)=\"open()\" aria-label=\"New pull request\">\n <div class=\"o-ch\"><b>New pull request</b></div>\n <div class=\"o-cb o-col\" style=\"gap:12px\">\n <div class=\"o-flex o-wrap\">\n @if (!repoName()) {\n <select class=\"o-in o-sm\" style=\"width:auto\" name=\"repo\" aria-label=\"Repository\" [ngModel]=\"newRepo()\" (ngModelChange)=\"pickRepo($event)\">@for (r of repos(); track r.name) {<option [value]=\"r.name\">{{ r.name }}</option>}</select>\n }\n <span class=\"o-faint o-sm\">into</span>\n <select class=\"o-in o-sm o-mono\" style=\"width:auto\" name=\"target\" aria-label=\"Target branch\" [ngModel]=\"target()\" (ngModelChange)=\"target.set($event); compare()\">@for (b of branches(); track b.name) {<option [value]=\"b.name\">{{ b.name }}</option>}</select>\n <span class=\"o-faint o-sm\">from</span>\n <select class=\"o-in o-sm o-mono\" style=\"width:auto\" name=\"source\" aria-label=\"Source branch\" [ngModel]=\"source()\" (ngModelChange)=\"source.set($event); compare()\" data-testid=\"pull-source\">\n <option value=\"\">Choose a branch</option>\n @for (b of branches(); track b.name) {@if (b.name !== target()) {<option [value]=\"b.name\">{{ b.name }}</option>}}\n </select>\n @if (cmp(); as c) {<span class=\"o-faint o-sm\">{{ c.ahead }} {{ c.ahead === 1 ? 'commit' : 'commits' }} · {{ c.files.length }} {{ c.files.length === 1 ? 'file' : 'files' }}</span>}\n </div>\n <div class=\"o-fld\"><label for=\"np-title\">Title</label><input id=\"np-title\" class=\"o-in\" name=\"title\" [(ngModel)]=\"title\" data-testid=\"pull-title\" /><span class=\"o-hint\">Put an issue key in the title or description to link it; “Closes PAY-142” closes it on merge.</span></div>\n <div class=\"o-fld\"><label for=\"np-body\">Description</label><textarea id=\"np-body\" class=\"o-in\" rows=\"5\" name=\"body\" [(ngModel)]=\"body\" style=\"height:auto;padding:8px 10px\"></textarea></div>\n <div class=\"o-fld\"><label for=\"np-rev\">Reviewers</label>\n <select id=\"np-rev\" class=\"o-in\" name=\"reviewer\" [(ngModel)]=\"reviewer\"><option value=\"\">Nobody yet</option>@for (p of host.people(); track p.id) {@if (p.id !== host.meId()) {<option [value]=\"p.id\">{{ p.name || p.email }}</option>}}</select>\n </div>\n </div>\n <div class=\"o-cf\"><label class=\"o-flex o-sm\"><input type=\"checkbox\" name=\"draft\" [(ngModel)]=\"draft\" />Open as a draft</label><button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"opening.set(false)\">Cancel</button><button type=\"submit\" class=\"o-btn o-sm o-dark\" [disabled]=\"busy() || !source() || !title.trim()\" data-testid=\"pull-open\">Open pull request</button></div>\n </form>\n }\n\n <div class=\"o-flex o-wrap\">\n <input class=\"o-in o-sm\" style=\"flex:1;min-width:240px\" placeholder=\"Search titles\" aria-label=\"Search titles\" [(ngModel)]=\"q\" (keydown.enter)=\"load()\" (blur)=\"load()\" />\n <button type=\"button\" class=\"o-btn o-sm\" [class.o-on]=\"mine()\" [attr.aria-pressed]=\"mine()\" (click)=\"mine.set(!mine()); load()\">Needs my review</button>\n <select class=\"o-in o-sm\" style=\"width:auto\" aria-label=\"Author\" [(ngModel)]=\"author\" (ngModelChange)=\"load()\"><option value=\"\">Author</option>@for (p of host.people(); track p.id) {<option [value]=\"p.id\">{{ p.name || p.email }}</option>}</select>\n </div>\n <div class=\"o-card\">\n <div class=\"o-ch\"><div class=\"o-flex\" style=\"gap:14px\" role=\"group\" aria-label=\"State\">\n @for (s of states; track s.id) {<button type=\"button\" class=\"st\" [class.o-on]=\"state() === s.id\" [attr.aria-pressed]=\"state() === s.id\" (click)=\"state.set(s.id); load()\">{{ s.icon }} {{ s.label }}</button>}\n </div></div>\n @for (p of rows(); track p.repo + p.number) {\n <a class=\"o-row o-click\" style=\"align-items:flex-start\" [routerLink]=\"host.link('code/' + p.repo + '/pull/' + p.number)\" [attr.data-testid]=\"'pull-' + p.number\">\n <span [style.color]=\"p.state === 'merged' ? 'var(--o-vio)' : p.state === 'closed' ? 'var(--o-bad-solid)' : 'var(--o-ok)'\" style=\"margin-top:1px\" aria-hidden=\"true\">{{ p.state === 'merged' ? '⇄' : p.state === 'closed' ? '✕' : '●' }}</span>\n <div class=\"o-col\" style=\"gap:4px;flex:1;min-width:0\">\n <span class=\"o-flex o-wrap\"><b class=\"o-b5\" style=\"color:var(--o-tx)\">{{ p.title }}</b>@for (l of p.labels; track l) {<span class=\"o-chip o-out\">{{ l }}</span>}@if (p.draft) {<span class=\"o-chip\">Draft</span>}</span>\n <span class=\"o-faint o-sm\">#{{ p.number }} · {{ people().name(p.authorId) }} · @if (!repoName()) {{{ p.repo }} · }<span class=\"o-mono\">{{ p.source }}</span> → <span class=\"o-mono\">{{ p.target }}</span> · updated {{ ago(p.updatedAt) }}</span>\n </div>\n <span class=\"o-flex o-sm\"><span [class]=\"dot(p.checks)\" [attr.title]=\"'Checks: ' + (p.checks || 'none')\"></span><span class=\"o-mut\">{{ review(p.review) }}</span><span class=\"o-faint\" [attr.aria-label]=\"p.comments + ' comments'\">💬 {{ p.comments }}</span></span>\n </a>\n } @empty {\n <div class=\"o-empty\">{{ loading() ? 'Loading…' : repos().length ? 'No pull requests match.' : 'No repositories yet.' }}</div>\n }\n </div>\n </div>\n `,\n})\nexport class PullsPage {\n protected readonly host = inject(CodeHost);\n private readonly api = inject(CodeApi);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n protected readonly states = [{ id: 'open', label: 'Open', icon: '●' }, { id: 'merged', label: 'Merged', icon: '✓' }, { id: 'closed', label: 'Closed', icon: '✕' }];\n protected readonly repoName = signal('');\n protected readonly repos = signal<Repo[]>([]);\n protected readonly rows = signal<Row[]>([]);\n protected readonly state = signal('open');\n protected readonly mine = signal(false);\n protected readonly loading = signal(false);\n protected readonly error = signal('');\n protected readonly busy = signal(false);\n protected readonly opening = signal(false);\n protected readonly newRepo = signal('');\n protected readonly branches = signal<Ref[]>([]);\n protected readonly source = signal('');\n protected readonly target = signal('');\n protected readonly cmp = signal<Comparison | null>(null);\n protected q = '';\n protected author = '';\n protected title = '';\n protected body = '';\n protected reviewer = '';\n protected draft = false;\n private wantNew: { source: string } | null = null;\n\n protected readonly people = computed(() => new People(this.host.people()));\n protected readonly ago = (s?: string) => ago(s);\n protected readonly dot = checkDot;\n protected readonly review = (r: string) => REVIEW[r] ?? r.replace(/_/g, ' ');\n protected readonly canWrite = computed(() => {\n const p = this.host.project();\n return !!p && !p.archivedAt && p.capabilities.includes('code.write');\n });\n\n constructor() {\n this.route.paramMap.subscribe((m) => this.repoName.set(m.get('repo') ?? ''));\n this.route.queryParamMap.subscribe((q) => { if (q.get('new')) this.wantNew = { source: q.get('source') ?? '' }; });\n effect(() => {\n const p = this.host.project();\n this.repoName();\n if (p) untracked(() => this.api.repos(p.id).subscribe({\n next: (rs) => {\n const only = this.repoName();\n this.repos.set(only ? rs.filter((r) => r.name === only) : rs.filter((r) => !r.empty));\n this.load();\n if (this.wantNew) { this.startNew(this.wantNew.source); this.wantNew = null; }\n },\n error: (e) => this.error.set(apiMessage(e, 'Could not load the repositories.')),\n }));\n });\n }\n\n protected load() {\n const p = this.host.project();\n if (!p) return;\n const q = { state: this.state(), q: this.q.trim(), author: this.author, needsMyReview: this.mine() };\n const repos = this.repos();\n if (!repos.length) { this.rows.set([]); return; }\n this.loading.set(true);\n forkJoin(repos.map((r) => this.api.pulls(p.id, r.name, q).pipe(map((ps) => ps.map((x) => ({ ...x, repo: r.name }))), catchError(() => of([] as Row[]))))).subscribe({\n next: (lists) => {\n this.loading.set(false);\n this.rows.set(lists.flat().sort((a, b) => (b.updatedAt ?? '').localeCompare(a.updatedAt ?? '')));\n },\n error: (e) => { this.loading.set(false); this.error.set(apiMessage(e, 'Could not load the pull requests.')); },\n });\n }\n\n protected startNew(source: string) {\n const repo = this.repoName() || this.repos()[0]?.name || '';\n if (!repo) return;\n this.opening.set(true);\n this.title = '';\n this.body = '';\n this.pickRepo(repo, source);\n }\n\n protected pickRepo(name: string, source = '') {\n const p = this.host.project();\n const r = this.repos().find((x) => x.name === name);\n if (!p || !r) return;\n this.newRepo.set(name);\n this.target.set(r.defaultBranch);\n this.source.set(source);\n this.cmp.set(null);\n this.api.refs(p.id, name, 'branch').subscribe({ next: (b) => { this.branches.set(b); this.compare(); }, error: () => undefined });\n this.api.template(p.id, name, r.defaultBranch).subscribe({ next: (t) => { if (!this.body) this.body = t; }, error: () => undefined });\n }\n\n protected compare() {\n const p = this.host.project();\n if (!p || !this.source() || !this.target()) { this.cmp.set(null); return; }\n if (!this.title.trim()) this.title = this.source().replace(/^[^/]+\\//, '').replace(/[-_]/g, ' ');\n this.api.compare(p.id, this.newRepo(), this.target(), this.source()).subscribe({ next: (c) => this.cmp.set(c), error: () => this.cmp.set(null) });\n }\n\n protected open() {\n const p = this.host.project();\n if (!p) return;\n this.busy.set(true);\n this.error.set('');\n this.api.openPull(p.id, this.newRepo(), { source: this.source(), target: this.target(), title: this.title.trim(), body: this.body, draft: this.draft, reviewers: this.reviewer ? [this.reviewer] : [] }).subscribe({\n next: (pr) => { this.busy.set(false); void this.router.navigate(this.host.link(`code/${this.newRepo()}/pull/${pr.number}`)); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not open the pull request.')); },\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { marked } from 'marked';\nimport { Comparison, Pull, Repo, Thread, Timeline, apiMessage } from './code.api';\nimport { DiffView, LineComment, ThreadReply } from './diff.view';\nimport { RepoPage } from './repo-base';\nimport { ago, checkDot, initials } from './look';\n\ntype Tab = 'conversation' | 'commits' | 'files' | 'checks';\n\ninterface Event {\n at: string;\n kind: 'comment' | 'review' | 'thread';\n who: string;\n body?: string;\n state?: string;\n thread?: Thread;\n id: string;\n}\n\nconst METHOD: Record<string, { label: string; hint: string; done: string }> = {\n merge: { label: 'Create a merge commit', hint: 'All commits plus a merge commit', done: 'merged' },\n squash: { label: 'Squash and merge', hint: 'One commit on the target', done: 'squashed and merged' },\n rebase: { label: 'Rebase and merge', hint: 'The commits, linear history', done: 'rebased and merged' },\n};\n\n// /{org}/{project}/code/{repo}/pull/{n} (prototype \"code\"): the pull request's conversation, commits,\n// files changed with line threads, and checks; the merge box with the gate's rows, the merge method\n// and branch deletion; a review (comment, approve, request changes).\n@Component({\n selector: 'o-code-pull',\n imports: [FormsModule, RouterLink, DiffView],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [`\n .badge{padding:3px 10px;border-radius:12px;font-size:12px;font-weight:500;color:var(--o-acc-fg)}\n .anchor{position:relative;align-self:center}\n .merge{display:flex;align-items:center;position:relative}\n .merge .go{height:32px;padding:0 14px;border-radius:7px 0 0 7px;border:none;font-size:13px;font-weight:500;color:var(--o-acc-fg);background:var(--o-ok);cursor:pointer}\n .merge .mn{height:32px;padding:0 10px;border:none;border-radius:0 7px 7px 0;font-size:12px;color:var(--o-acc-fg);background:var(--o-ok);border-left:1px solid rgba(255,255,255,.25);cursor:pointer}\n .merge button:disabled{background:var(--o-line-mid);cursor:not-allowed}\n .tl{display:flex;flex-direction:column;gap:10px;padding-left:14px;border-left:2px solid var(--o-line);margin-left:14px}\n .files-split{display:grid;grid-template-columns:210px minmax(0,1fr);gap:14px;align-items:start}\n .files-split:has(> :only-child){grid-template-columns:minmax(0,1fr)}\n .files-tree{position:sticky;top:8px;max-height:calc(100vh - 120px);overflow:auto}\n @media (max-width:900px){ .files-split{grid-template-columns:minmax(0,1fr)} .files-tree{display:none} }\n `],\n template: `\n <div style=\"max-width:1180px;margin:0 auto;padding:22px 24px 40px;display:flex;flex-direction:column;gap:16px\">\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (note()) {<div class=\"o-note\" role=\"status\">{{ note() }}</div>}\n @if (pr(); as p) {\n <div class=\"o-col\">\n <span class=\"o-eyebrow\">{{ name() }} · pull/{{ p.number }}</span>\n <h1 class=\"o-t\">{{ p.title }} <span class=\"o-faint\" style=\"font-weight:400\">#{{ p.number }}</span></h1>\n <div class=\"o-flex o-wrap o-mut\">\n <span class=\"badge\" [style.background]=\"badgeBg()\" data-testid=\"pull-state\">{{ badge() }}</span>\n <span>{{ people().name(p.authorId) }} {{ p.state === 'merged' ? 'merged' : 'wants to merge' }} {{ p.commits }} {{ p.commits === 1 ? 'commit' : 'commits' }} into</span>\n <span class=\"o-chip o-mono\">{{ p.target }}</span><span>from</span><span class=\"o-chip o-mono\">{{ p.source }}</span>\n </div>\n </div>\n <div class=\"o-tabs\" role=\"tablist\">\n @for (t of tabs(); track t.id) {<button type=\"button\" role=\"tab\" class=\"o-tab\" [class.o-on]=\"tab() === t.id\" [attr.aria-selected]=\"tab() === t.id\" (click)=\"pick(t.id)\">{{ t.label }}@if (t.n !== undefined) {<span class=\"o-n\">{{ t.n }}</span>}</button>}\n <span class=\"o-r\"></span>\n @if (p.state === 'open' && (p.canReview || myPending().length)) {\n <div class=\"anchor\">\n <button type=\"button\" class=\"o-btn o-sm o-pri\" (click)=\"reviewOpen.set(!reviewOpen())\" [attr.aria-expanded]=\"reviewOpen()\" aria-haspopup=\"dialog\" data-testid=\"review-open\">Review changes ⌄</button>\n @if (reviewOpen()) {\n <div class=\"o-menu\" role=\"dialog\" aria-label=\"Finish your review\" style=\"right:0;top:36px;width:380px;padding:14px;display:flex;flex-direction:column;gap:10px\">\n <b>Finish your review</b>\n <span class=\"o-faint o-sm\" data-testid=\"review-pending-note\">{{ myPending().length ? myPending().length + ' pending ' + (myPending().length === 1 ? 'comment' : 'comments') + ' included' : 'No pending comments' }}</span>\n <textarea class=\"o-in\" rows=\"3\" placeholder=\"Leave a comment\" aria-label=\"Review comment\" style=\"height:auto;padding:8px 10px\" [ngModel]=\"revBody()\" (ngModelChange)=\"revBody.set($event)\"></textarea>\n @for (k of reviewKinds(); track k.id) {\n <button type=\"button\" class=\"o-opt\" style=\"padding:8px 10px\" [class.o-on]=\"revKind() === k.id\" (click)=\"revKind.set(k.id)\"><span class=\"o-rad\" [class.o-on]=\"revKind() === k.id\"></span><span class=\"o-col\" style=\"gap:1px\"><b class=\"o-b5\">{{ k.label }}</b><span class=\"o-faint o-sm\">{{ k.hint }}</span></span></button>\n }\n <div class=\"o-flex\"><button type=\"button\" class=\"o-btn o-sm o-pri o-r\" (click)=\"submitReview()\" [disabled]=\"busy() || (revKind() !== 'approved' && !revBody().trim() && !(revKind() === 'commented' && myPending().length))\" data-testid=\"review-submit\">Submit review</button></div>\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"o-split\" style=\"grid-template-columns:minmax(0,1fr) 260px;gap:24px\">\n <div class=\"o-col\" style=\"gap:14px;min-width:0\">\n @switch (tab()) {\n @case ('conversation') {\n <div class=\"o-card\">\n <div style=\"padding:9px 14px;background:var(--o-well);border-bottom:1px solid var(--o-line-soft);color:var(--o-mut);font-size:12px\"><b style=\"color:var(--o-tx);font-weight:600\">{{ people().name(p.authorId) }}</b> opened this {{ ago(p.createdAt) }}</div>\n <div class=\"o-cb o-md\" style=\"font-size:13px\" [innerHTML]=\"p.body ? md(p.body) : '<p class="o-faint">No description.</p>'\"></div>\n </div>\n <div class=\"tl\">\n @for (e of events(); track e.id) {\n @switch (e.kind) {\n @case ('comment') {\n <div class=\"o-card o-cb o-col\" style=\"gap:6px\"><span class=\"o-sm o-mut\"><b style=\"color:var(--o-tx);font-weight:600\">{{ people().name(e.who) }}</b> commented {{ ago(e.at) }}</span><div class=\"o-md\" style=\"font-size:13px\" [innerHTML]=\"md(e.body ?? '')\"></div></div>\n }\n @case ('review') {\n <span [style.color]=\"e.state === 'approved' ? 'var(--o-ok-tx)' : e.state === 'changes_requested' ? 'var(--o-bad-tx)' : 'var(--o-mut)'\">{{ people().name(e.who) }} {{ reviewVerb(e.state) }} · {{ ago(e.at) }}@if (e.body) {: “{{ e.body }}”}</span>\n }\n @case ('thread') {\n <div class=\"o-card o-cb o-col\" style=\"gap:6px\">\n <span class=\"o-sm o-mut\"><b style=\"color:var(--o-tx);font-weight:600\">{{ people().name(e.who) }}</b> commented on <button type=\"button\" class=\"o-lnk o-mono\" (click)=\"pick('files')\">{{ e.thread!.path }}</button> line {{ e.thread!.line }}@if (e.thread!.outdated) { · <span class=\"o-chip\">Outdated</span>}</span>\n @for (c of e.thread!.comments; track c.id) {<span class=\"o-sm\"><b class=\"o-b5\">{{ people().name(c.authorId) }}</b> {{ c.body }}</span>}\n <div class=\"o-flex\"><span class=\"o-faint o-sm\">{{ e.thread!.resolved ? 'Resolved' + (e.thread!.resolvedBy ? ' by ' + people().name(e.thread!.resolvedBy) : '') : 'Unresolved' }}</span>@if (p.state === 'open') {<button type=\"button\" class=\"o-lnk o-r\" (click)=\"resolve({ threadId: e.thread!.id, resolved: !e.thread!.resolved })\">{{ e.thread!.resolved ? 'Unresolve' : 'Resolve conversation' }}</button>}</div>\n </div>\n }\n }\n }\n @if (p.state === 'merged') {<span style=\"color:var(--o-vio-tx)\" data-testid=\"merged-line\">{{ people().name(p.mergedBy) }} {{ methodDone(p.mergeMethod) }} into {{ p.target }} · {{ ago(p.mergedAt) }}</span>}\n @if (p.state === 'closed') {<span class=\"o-red-t\">Closed {{ ago(p.closedAt) }}</span>}\n </div>\n\n <div class=\"o-card\" [style.border-color]=\"p.state === 'open' ? (p.gate.mergeable ? 'var(--o-ok)' : 'var(--o-line-mid)') : null\" data-testid=\"merge-box\">\n <div class=\"o-cb o-col\" style=\"gap:10px;border-bottom:1px solid var(--o-line-soft)\">\n <span style=\"font-weight:600;font-size:14px\" [style.color]=\"p.state === 'merged' ? 'var(--o-vio-tx)' : p.gate.mergeable ? 'var(--o-ok-tx)' : 'var(--o-tx)'\">{{ p.state === 'merged' ? 'Merged' : p.state === 'closed' ? 'Closed without merging' : p.gate.title }}</span>\n @if (p.state === 'open') {\n @for (r of p.gate.rows; track $index) {\n <div class=\"o-flex\"><span [class]=\"rowDot(r.status)\" aria-hidden=\"true\"></span><span>{{ r.text }}</span><span class=\"o-r o-faint o-sm\">{{ r.meta }}</span></div>\n }\n }\n </div>\n @if (p.state === 'open') {\n <div class=\"o-flex o-wrap\" style=\"padding:12px 14px;background:var(--o-well)\">\n @if (p.canReview && !approvedByMe()) {<button type=\"button\" class=\"o-btn\" (click)=\"approve()\" [disabled]=\"busy()\" data-testid=\"approve\">Approve</button>}\n @if (p.canEdit) {<button type=\"button\" class=\"o-btn o-ghost\" (click)=\"close(false)\" [disabled]=\"busy()\">Close</button>}\n @if (p.canMerge) {\n <span class=\"o-faint o-sm\">Delete branch after merge</span><button type=\"button\" class=\"o-tog\" role=\"switch\" aria-label=\"Delete branch after merge\" [class.o-on]=\"delBranch()\" [attr.aria-checked]=\"delBranch()\" (click)=\"delBranch.set(!delBranch())\"></button>\n <div class=\"merge o-r\">\n <button type=\"button\" class=\"go\" (click)=\"merge()\" [disabled]=\"!p.gate.mergeable || busy()\" data-testid=\"merge\">{{ methodLabel(method()) }}</button>\n <button type=\"button\" class=\"mn\" (click)=\"mergeMenu.set(!mergeMenu())\" [attr.aria-expanded]=\"mergeMenu()\" aria-label=\"Choose the merge method\" [disabled]=\"busy()\">⌄</button>\n @if (mergeMenu()) {\n <div class=\"o-menu\" role=\"menu\" style=\"right:0;bottom:40px;width:300px\">\n @for (m of p.mergeMethods; track m) {<button type=\"button\" role=\"menuitemradio\" [attr.aria-checked]=\"method() === m\" (click)=\"method.set(m); mergeMenu.set(false)\"><span class=\"o-col\" style=\"gap:1px\"><b class=\"o-b5\">{{ methodLabel(m) }}</b><span class=\"o-faint o-xs\">{{ methodHint(m) }}</span></span></button>}\n </div>\n }\n </div>\n }\n </div>\n } @else if (p.state === 'closed' && p.canEdit) {\n <div class=\"o-flex\" style=\"padding:12px 14px;background:var(--o-well)\"><button type=\"button\" class=\"o-btn o-r\" (click)=\"close(true)\" [disabled]=\"busy()\">Reopen</button></div>\n } @else if (p.state === 'merged') {\n <div class=\"o-flex\" style=\"padding:12px 14px;background:var(--o-well)\"><span class=\"o-mut\">{{ p.sourceDeleted ? 'Branch ' + p.source + ' deleted.' : 'Branch ' + p.source + ' can be deleted.' }}</span>@if (p.mergedSha) {<a class=\"o-btn o-r\" [routerLink]=\"link('commit/' + p.mergedSha)\">View {{ p.mergedSha.slice(0, 7) }}</a>}</div>\n }\n </div>\n\n <div class=\"o-card\">\n <label class=\"o-sr-only\" for=\"pr-cmt\">Add a comment</label>\n <textarea id=\"pr-cmt\" class=\"o-in\" style=\"border:none;box-shadow:none;min-height:70px;height:auto;padding:10px 12px\" placeholder=\"Add a comment. Markdown works.\" [ngModel]=\"draft()\" (ngModelChange)=\"draft.set($event)\" data-testid=\"pull-comment\"></textarea>\n <div class=\"o-cf\"><span>Markdown</span><button type=\"button\" class=\"o-btn o-sm o-dark o-r\" (click)=\"addComment()\" [disabled]=\"!draft().trim() || busy()\" data-testid=\"pull-comment-add\">Comment</button></div>\n </div>\n }\n @case ('commits') {\n <div class=\"o-card\">\n @for (c of cmp()?.commits ?? []; track c.oid) {\n <div class=\"o-row\"><span class=\"o-av\" aria-hidden=\"true\">{{ initials(c.author.name) }}</span><a class=\"o-ell\" style=\"flex:1;color:var(--o-tx)\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.subject }}</a><a class=\"o-mono o-sm o-faint\" [routerLink]=\"link('commit/' + c.oid)\">{{ c.short }}</a></div>\n } @empty {<div class=\"o-empty\">{{ cmp() ? 'No commits.' : 'Loading…' }}</div>}\n </div>\n }\n @case ('files') {\n <div class=\"o-flex o-wrap\">\n <div class=\"o-seg\" role=\"group\" aria-label=\"Diff view\"><button type=\"button\" [class.o-on]=\"mode() === 'unified'\" [attr.aria-pressed]=\"mode() === 'unified'\" (click)=\"setMode('unified')\">Unified</button><button type=\"button\" [class.o-on]=\"mode() === 'split'\" [attr.aria-pressed]=\"mode() === 'split'\" (click)=\"setMode('split')\" data-testid=\"diff-split\">Split</button></div>\n <button type=\"button\" class=\"o-btn o-sm\" [class.o-on]=\"hideWs()\" [attr.aria-pressed]=\"hideWs()\" (click)=\"hideWs.set(!hideWs())\" data-testid=\"hide-ws\">Hide whitespace</button>\n @if (myPending().length) {<span class=\"o-chip o-amb\" data-testid=\"pending-count\">{{ myPending().length }} pending {{ myPending().length === 1 ? 'comment' : 'comments' }}</span>}\n <span class=\"o-r o-faint o-sm\" data-testid=\"viewed-note\">{{ viewedCount() }} of {{ cmp()?.files?.length ?? 0 }} files viewed · {{ openThreads() }} unresolved {{ openThreads() === 1 ? 'conversation' : 'conversations' }}</span>\n </div>\n <div class=\"files-split\">\n @if ((cmp()?.files?.length ?? 0) > 1) {\n <div class=\"o-card files-tree\" role=\"navigation\" aria-label=\"Files\">\n @for (f of cmp()?.files ?? []; track f.path) {\n <button type=\"button\" class=\"o-row o-click o-sm\" style=\"width:100%;border:none;background:none;text-align:left\" (click)=\"jump(f.path)\"><span class=\"o-cbx\" [class.o-on]=\"isViewed(f.path)\" aria-hidden=\"true\"></span><span class=\"o-mono o-ell\" style=\"flex:1\">{{ f.path }}</span><span class=\"o-grn-t o-xs\">+{{ f.additions }}</span></button>\n }\n </div>\n }\n <div class=\"o-col\" style=\"gap:14px;min-width:0\">\n @for (f of cmp()?.files ?? []; track f.path) {\n <o-diff [repo]=\"name()\" [file]=\"f\" [head]=\"p.headSha\" [base]=\"p.mergeBase\" [threads]=\"threads()\" [canComment]=\"p.state === 'open'\" [mode]=\"mode()\" [ignoreSpace]=\"hideWs()\"\n [viewed]=\"isViewed(f.path)\" [reviewing]=\"myPending().length > 0\" (viewedChange)=\"setViewed(f.path, $event)\"\n (comment)=\"lineComment($event)\" (reply)=\"reply($event)\" (resolve)=\"resolve($event)\" (discard)=\"discard($event)\" />\n } @empty {<div class=\"o-card\"><div class=\"o-empty\">{{ cmp() ? 'No changes.' : 'Loading…' }}</div></div>}\n </div>\n </div>\n }\n @case ('checks') {\n <div class=\"o-card\">\n @for (c of p.checks; track c.id) {\n <div class=\"o-row\"><span [class]=\"dot(c.state)\" aria-hidden=\"true\"></span><span class=\"o-mono o-sm\">{{ c.context }}</span><span class=\"o-faint\">{{ c.description }}</span>@if (c.url) {<a class=\"o-r o-sm\" [href]=\"c.url\" target=\"_blank\" rel=\"noopener\">Details</a>}</div>\n } @empty {<div class=\"o-empty\">No checks reported on {{ p.headSha.slice(0, 7) }}. Pipelines report here once Deploy is set up.</div>}\n </div>\n }\n }\n </div>\n\n <div class=\"o-col\" style=\"gap:18px;font-size:13px\">\n <div class=\"o-col\">\n <span class=\"o-lbl\">Reviewers</span>\n @for (r of reviewers(); track r.id) {<div class=\"o-flex\"><span class=\"o-av\" aria-hidden=\"true\">{{ people().initials(r.id) }}</span><span>{{ people().name(r.id) }}</span><span class=\"o-r o-sm\" [style.color]=\"r.colour\">{{ r.label }}</span></div>}\n @if (!reviewers().length) {<span class=\"o-faint o-sm\">No reviewers yet.</span>}\n <span class=\"o-faint o-xs\">CODEOWNERS requests owners of changed paths at GA.</span>\n </div>\n <div class=\"o-col\"><span class=\"o-lbl\">Labels</span><div class=\"o-flex o-wrap\">@for (l of p.labels; track l) {<span class=\"o-chip o-out\">{{ l }}</span>}@if (!p.labels.length) {<span class=\"o-faint o-sm\">None</span>}</div></div>\n <div class=\"o-col\">\n <span class=\"o-lbl\">Linked issues</span>\n @for (k of p.keys; track k) {<a class=\"o-card o-cb o-click o-col\" style=\"gap:4px;padding:10px 12px;color:var(--o-tx)\" [routerLink]=\"host.link('issues/' + k)\"><span class=\"o-mono o-xs o-mut\">{{ k }}</span></a>}\n @if (!p.keys.length) {<span class=\"o-faint o-sm\">Name an issue key in the title or description to link it.</span>}\n </div>\n <div class=\"o-col\"><span class=\"o-lbl\">Deployments</span><span class=\"o-faint o-sm\">Releases that contain this pull request appear here after merge.</span></div>\n @if (canProtect()) {<div class=\"o-col\"><span class=\"o-lbl\">Branch protection · {{ p.target }}</span><a class=\"o-sm\" [routerLink]=\"link('settings')\" [queryParams]=\"{ section: 'protect' }\">Edit rules</a></div>}\n </div>\n </div>\n } @else if (!error()) {\n <div class=\"o-card\"><div class=\"o-empty\">Loading…</div></div>\n }\n </div>\n `,\n})\nexport class PullPage extends RepoPage {\n private readonly el = inject(ElementRef);\n protected readonly pr = signal<Pull | null>(null);\n protected readonly timeline = signal<Timeline>({ comments: [], reviews: [], threads: [] });\n protected readonly cmp = signal<Comparison | null>(null);\n protected readonly tab = signal<Tab>('conversation');\n protected readonly busy = signal(false);\n protected readonly draft = signal('');\n protected readonly reviewOpen = signal(false);\n protected readonly revBody = signal('');\n protected readonly revKind = signal<'commented' | 'approved' | 'changes_requested'>('commented');\n protected readonly mergeMenu = signal(false);\n protected readonly method = signal('merge');\n protected readonly delBranch = signal(false);\n private number = 0;\n\n protected readonly ago = (s?: string) => ago(s);\n protected readonly initials = initials;\n protected readonly dot = checkDot;\n protected readonly threads = computed(() => this.timeline().threads);\n protected readonly mode = signal<'unified' | 'split'>(readPref('origine.diff.mode') === 'split' ? 'split' : 'unified');\n protected readonly hideWs = signal(false);\n /** Files marked viewed, kept per pull request head in this browser (a new push resets them). */\n protected readonly viewed = signal<Record<string, boolean>>({});\n protected readonly viewedCount = computed(() => (this.cmp()?.files ?? []).filter((f) => this.viewed()[f.path]).length);\n /** The caller's pending review comments (shown only to them until the review is submitted). */\n protected readonly myPending = computed(() => {\n const me = this.host.meId();\n const t = this.timeline();\n return [...t.comments, ...t.threads.flatMap((th) => th.comments)].filter((c, i, all) => c.pending && c.authorId === me && all.findIndex((x) => x.id === c.id) === i);\n });\n protected readonly openThreads = computed(() => this.threads().filter((t) => !t.resolved && !t.outdated).length);\n protected readonly tabs = computed(() => {\n const p = this.pr();\n return [\n { id: 'conversation' as Tab, label: 'Conversation', n: undefined },\n { id: 'commits' as Tab, label: 'Commits', n: p?.commits },\n { id: 'files' as Tab, label: 'Files changed', n: this.cmp()?.files.length },\n { id: 'checks' as Tab, label: 'Checks', n: p?.checks.length },\n ];\n });\n protected readonly badge = computed(() => {\n const p = this.pr();\n return !p ? '' : p.state === 'merged' ? 'Merged' : p.state === 'closed' ? 'Closed' : p.draft ? 'Draft' : 'Open';\n });\n protected readonly badgeBg = computed(() => ({ Merged: 'var(--o-vio)', Closed: 'var(--o-bad-solid)', Draft: 'var(--o-dim)', Open: 'var(--o-ok)' } as Record<string, string>)[this.badge()] ?? 'var(--o-dim)');\n protected readonly approvedByMe = computed(() => (this.pr()?.reviews ?? []).some((r) => r.authorId === this.host.meId() && r.state === 'approved' && !r.stale));\n protected readonly reviewKinds = computed(() => {\n const need = this.pr()?.gate.rows.find((r) => /required by branch protection|requires/.test(r.text + (r.meta ?? '')));\n const comment = { id: 'commented' as const, label: 'Comment', hint: 'General feedback without approving.' };\n // the author (or a role that cannot push) still posts their pending comments as a review\n if (!this.pr()?.canReview) return [{ ...comment, hint: 'Post your pending comments.' }];\n return [\n comment,\n { id: 'approved' as const, label: 'Approve', hint: need ? `Counts toward the approvals ${this.pr()?.target} requires.` : 'Approve these changes.' },\n { id: 'changes_requested' as const, label: 'Request changes', hint: 'Blocks merge until you approve.' },\n ];\n });\n protected readonly reviewers = computed(() => {\n const p = this.pr();\n if (!p) return [];\n const ids = [...new Set([...p.reviewers, ...p.reviews.map((r) => r.authorId)])];\n return ids.map((id) => {\n const r = p.reviews.find((x) => x.authorId === id);\n const state = r ? (r.stale ? 'stale' : r.state) : 'requested';\n const label = { approved: 'Approved', changes_requested: 'Changes requested', commented: 'Commented', dismissed: 'Dismissed', stale: 'Approved an older commit', requested: 'Requested' }[state] ?? state;\n const colour = state === 'approved' ? 'var(--o-ok-tx)' : state === 'changes_requested' ? 'var(--o-bad-tx)' : 'var(--o-dim)';\n return { id, label, colour };\n });\n });\n protected readonly events = computed<Event[]>(() => {\n const t = this.timeline();\n const out: Event[] = [];\n for (const c of t.comments) if (!c.threadId) out.push({ id: 'c' + c.id, at: c.createdAt, kind: 'comment', who: c.authorId, body: c.body + (c.pending ? ' (pending)' : '') });\n for (const r of t.reviews) if (r.state !== 'pending') out.push({ id: 'r' + r.id, at: r.submittedAt ?? r.createdAt, kind: 'review', who: r.authorId, state: r.state, body: r.body });\n for (const th of t.threads) out.push({ id: 't' + th.id, at: th.createdAt, kind: 'thread', who: th.createdBy, thread: th });\n return out.sort((a, b) => a.at.localeCompare(b.at));\n });\n\n constructor() {\n super();\n this.route.paramMap.subscribe((m) => {\n this.number = Number(m.get('number') ?? 0);\n const r = this.repo();\n if (r && r.name === this.name()) this.onRepo(r);\n });\n }\n\n protected onRepo(_: Repo) {\n if (this.number) this.load(true);\n }\n\n protected md(s: string): string {\n return marked.parse(s || '', { async: false, gfm: true, breaks: true }) as string;\n }\n\n protected pick(t: Tab) {\n this.tab.set(t);\n }\n\n protected methodLabel(m: string) {\n return METHOD[m]?.label.replace('Create a merge commit', 'Merge pull request') ?? m;\n }\n\n protected methodHint(m: string) {\n return METHOD[m]?.hint ?? '';\n }\n\n protected methodDone(m?: string) {\n return METHOD[m ?? 'merge']?.done ?? 'merged';\n }\n\n protected reviewVerb(state?: string) {\n return state === 'approved' ? 'approved these changes' : state === 'changes_requested' ? 'requested changes' : state === 'dismissed' ? 'had a review dismissed' : 'reviewed';\n }\n\n protected rowDot(status: string) {\n return status === 'ok' ? 'o-dot o-grn' : status === 'failed' ? 'o-dot o-red' : 'o-dot o-amb';\n }\n\n protected approve() {\n this.sendReview('approved', '');\n }\n\n protected submitReview() {\n this.sendReview(this.revKind(), this.revBody().trim());\n }\n\n protected addComment() {\n const body = this.draft().trim();\n if (!body) return;\n this.run(this.api.comment(this.projectId(), this.name(), this.number, { body }), 'Could not add the comment.', () => this.draft.set(''));\n }\n\n protected lineComment(c: LineComment) {\n this.run(this.api.comment(this.projectId(), this.name(), this.number, { body: c.body, path: c.path, side: c.side, line: c.line, pending: c.pending }), 'Could not add the comment.',\n () => { if (c.pending) this.note.set('Added to your review. Submit it from Review changes to post your comments.'); });\n }\n\n protected discard(id: string) {\n this.run(this.api.discardComment(this.projectId(), this.name(), this.number, id), 'Could not discard the comment.');\n }\n\n protected setMode(m: 'unified' | 'split') {\n this.mode.set(m);\n writePref('origine.diff.mode', m);\n }\n\n private viewedKey() {\n return `origine.viewed.${this.projectId()}.${this.name()}.${this.number}.${this.pr()?.headSha ?? ''}`;\n }\n\n protected isViewed(path: string) {\n return !!this.viewed()[path];\n }\n\n protected setViewed(path: string, on: boolean) {\n const v = { ...this.viewed(), [path]: on };\n if (!on) delete v[path];\n this.viewed.set(v);\n writePref(this.viewedKey(), JSON.stringify(v));\n }\n\n protected jump(path: string) {\n const el = (this.el.nativeElement as HTMLElement).querySelector(`[id=\"file-${CSS.escape(path)}\"]`);\n el?.scrollIntoView({ behavior: 'smooth', block: 'start' });\n }\n\n protected reply(r: ThreadReply) {\n this.run(this.api.comment(this.projectId(), this.name(), this.number, { body: r.body, threadId: r.threadId }), 'Could not reply.');\n }\n\n protected resolve(e: { threadId: string; resolved: boolean }) {\n this.run(this.api.resolve(this.projectId(), this.name(), this.number, e.threadId, e.resolved), 'Could not change the conversation.');\n }\n\n protected merge() {\n const p = this.pr();\n if (!p) return;\n this.run(this.api.merge(this.projectId(), this.name(), this.number, { method: this.method(), deleteBranch: this.delBranch(), expectHead: p.headSha }), 'Could not merge.', () => this.note.set(`Merged into ${p.target}.`));\n }\n\n protected close(reopen: boolean) {\n this.run(this.api.closePull(this.projectId(), this.name(), this.number, reopen), reopen ? 'Could not reopen.' : 'Could not close.');\n }\n\n @HostListener('document:click', ['$event'])\n protected outside(e: MouseEvent) {\n const t = e.target as HTMLElement;\n if (this.reviewOpen() && !t.closest('.anchor')) this.reviewOpen.set(false);\n if (this.mergeMenu() && !t.closest('.merge')) this.mergeMenu.set(false);\n }\n\n private sendReview(state: 'commented' | 'approved' | 'changes_requested', body: string) {\n this.run(this.api.review(this.projectId(), this.name(), this.number, state, body), 'Could not submit the review.', () => { this.reviewOpen.set(false); this.revBody.set(''); });\n }\n\n private run(o: import('rxjs').Observable<unknown>, fallback: string, after?: () => void) {\n this.busy.set(true);\n this.error.set('');\n o.subscribe({\n next: () => { this.busy.set(false); after?.(); this.load(false); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, fallback)); this.load(false); },\n });\n }\n\n private load(first: boolean) {\n const project = this.projectId();\n this.api.pull(project, this.name(), this.number).subscribe({\n next: (p) => {\n const headChanged = this.pr()?.headSha !== p.headSha;\n this.pr.set(p);\n if (headChanged) {\n try { this.viewed.set(JSON.parse(readPref(this.viewedKey()) || '{}')); } catch { this.viewed.set({}); }\n }\n if (first) {\n this.method.set(p.mergeMethods[0] ?? 'merge');\n this.delBranch.set(p.deleteBranchOnMerge);\n }\n if (first || !this.cmp() || this.cmp()!.head !== p.headSha) {\n this.api.compare(project, this.name(), p.mergeBase || p.targetSha, p.headSha).subscribe({ next: (c) => this.cmp.set(c), error: () => this.cmp.set({ base: '', head: p.headSha, mergeBase: '', ahead: 0, behind: 0, commits: [], files: [] }) });\n }\n },\n error: (e) => this.error.set(e?.status === 404 ? `There is no pull request #${this.number} in ${this.name()}.` : apiMessage(e, 'Could not open the pull request.')),\n });\n this.api.conversation(project, this.name(), this.number).subscribe({ next: (t) => this.timeline.set(t), error: () => undefined });\n }\n}\n\n// Per-viewer conveniences (the diff view, files viewed); storage can be missing or blocked.\nfunction readPref(key: string): string {\n try {\n return localStorage.getItem(key) ?? '';\n } catch {\n return '';\n }\n}\n\nfunction writePref(key: string, value: string) {\n try {\n localStorage.setItem(key, value);\n } catch {\n /* private window or blocked storage: the setting lasts for this page only */\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { Protection, Ref, Repo, apiMessage } from './code.api';\nimport { RepoPage } from './repo-base';\n\ntype Section = 'general' | 'protect' | 'collab' | 'danger';\n\ninterface RuleForm {\n id: string;\n pattern: string;\n blockDirectPush: boolean;\n blockForcePush: boolean;\n blockDeletion: boolean;\n requiredApprovals: number;\n dismissStaleApprovals: boolean;\n requireUpToDate: boolean;\n requiredChecks: string[];\n}\n\nconst BLANK: RuleForm = { id: '', pattern: '', blockDirectPush: true, blockForcePush: true, blockDeletion: true, requiredApprovals: 1, dismissStaleApprovals: true, requireUpToDate: false, requiredChecks: [] };\n\n// /{org}/{project}/code/{repo}/settings?section= (prototype \"code_settings\"): general settings and\n// merge methods, branch protection rules, and the danger zone (archive, delete).\n@Component({\n selector: 'o-code-settings',\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"o-page\">\n @if (repo(); as r) {\n <div class=\"o-split o-lft\">\n <nav class=\"o-setnav\" aria-label=\"Repository settings\">\n <span class=\"o-lbl\" style=\"padding-top:0\">{{ r.name }}</span>\n <button type=\"button\" [class.o-on]=\"section() === 'general'\" (click)=\"go('general')\">General</button>\n <button type=\"button\" [class.o-on]=\"section() === 'protect'\" (click)=\"go('protect')\">Branch protection</button>\n <button type=\"button\" [class.o-on]=\"section() === 'collab'\" (click)=\"go('collab')\">Collaborators<b class=\"o-ph-tag o-ga o-r\">GA</b></button>\n <button type=\"button\" [class.o-on]=\"section() === 'danger'\" (click)=\"go('danger')\">Danger zone</button>\n </nav>\n <div class=\"o-col\" style=\"gap:16px;min-width:0\">\n @if (error()) {<div class=\"o-note o-red\" role=\"alert\">{{ error() }}</div>}\n @if (note()) {<div class=\"o-note\" role=\"status\">{{ note() }}</div>}\n @switch (section()) {\n @case ('general') {\n <h1 class=\"o-t\">General</h1>\n <form class=\"o-card o-cb o-form\" (ngSubmit)=\"saveGeneral()\">\n <div class=\"o-g2\">\n <div class=\"o-fld\"><label for=\"rs-name\">Repository name</label><input id=\"rs-name\" class=\"o-in o-mono\" name=\"name\" [(ngModel)]=\"g.name\" [disabled]=\"!canAdmin()\" /><span class=\"o-hint\">Renaming keeps the old clone URL working as a redirect.</span></div>\n <div class=\"o-fld\"><label for=\"rs-def\">Default branch</label><select id=\"rs-def\" class=\"o-in\" name=\"def\" [(ngModel)]=\"g.defaultBranch\" [disabled]=\"!canAdmin()\">@for (b of branches(); track b.name) {<option [value]=\"b.name\">{{ b.name }}</option>}@if (!branches().length) {<option [value]=\"r.defaultBranch\">{{ r.defaultBranch }}</option>}</select></div>\n </div>\n <div class=\"o-fld\"><label for=\"rs-desc\">Description</label><input id=\"rs-desc\" class=\"o-in\" name=\"desc\" [(ngModel)]=\"g.description\" [disabled]=\"!canAdmin()\" /></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Visibility</span>\n <div class=\"o-g2\">\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"g.visibility === 'private'\" (click)=\"g.visibility = 'private'\" [disabled]=\"!canAdmin()\"><span class=\"o-rad\" [class.o-on]=\"g.visibility === 'private'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Private</b><span class=\"o-faint o-sm\">Project members only</span></span></button>\n <button type=\"button\" class=\"o-opt\" [class.o-on]=\"g.visibility === 'internal'\" (click)=\"g.visibility = 'internal'\" [disabled]=\"!canAdmin()\"><span class=\"o-rad\" [class.o-on]=\"g.visibility === 'internal'\"></span><span class=\"o-col\" style=\"gap:2px\"><b>Org-internal</b><span class=\"o-faint o-sm\">Everyone in the organization can read</span></span></button>\n </div>\n </div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Allowed merge methods</span>\n @for (m of methods; track m.id) {<label class=\"o-flex\"><input type=\"checkbox\" [checked]=\"g.mergeMethods.includes(m.id)\" (change)=\"flipMethod(m.id)\" [disabled]=\"!canAdmin()\" />{{ m.label }}</label>}\n </div>\n <div class=\"o-flex\"><button type=\"button\" class=\"o-tog\" role=\"switch\" aria-labelledby=\"rs-del\" [class.o-on]=\"g.deleteBranchOnMerge\" [attr.aria-checked]=\"g.deleteBranchOnMerge\" (click)=\"g.deleteBranchOnMerge = !g.deleteBranchOnMerge\" [disabled]=\"!canAdmin()\"></button><span id=\"rs-del\">Delete head branches after merge</span></div>\n <div class=\"o-flex\"><button type=\"button\" class=\"o-tog o-dis\" disabled aria-label=\"Allow auto-merge\"></button>Allow auto-merge when all requirements pass<b class=\"o-ph-tag o-ga\">GA</b></div>\n @if (canAdmin()) {<div class=\"o-flex\"><button type=\"submit\" class=\"o-btn o-dark o-r\" [disabled]=\"busy() || !g.mergeMethods.length\">Save</button></div>}\n </form>\n }\n @case ('protect') {\n <div class=\"o-flex\"><h1 class=\"o-t\">Branch protection</h1>@if (canProtect()) {<button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"edit(null)\" data-testid=\"add-rule\">+ Add rule</button>}</div>\n <div class=\"o-card\">\n @for (p of rules(); track p.id) {\n <button type=\"button\" class=\"o-row o-click\" style=\"width:100%;border:none;background:none;text-align:left\" [class.o-sel]=\"form()?.id === p.id\" (click)=\"edit(p)\"><b class=\"o-mono\">{{ p.pattern }}</b><span class=\"o-faint o-sm\">{{ summary(p) }}</span>@if (form()?.id === p.id) {<span class=\"o-r o-chip\">Editing</span>}</button>\n } @empty {<div class=\"o-empty\">No rules. Without one, anyone who can push may push to any branch.</div>}\n </div>\n @if (form(); as f) {\n <form class=\"o-card\" (ngSubmit)=\"saveRule()\" aria-label=\"Protection rule\">\n <div class=\"o-ch\"><b>Rule for</b><input class=\"o-in o-mono o-sm\" style=\"width:200px\" name=\"pattern\" aria-label=\"Branch name or pattern\" [(ngModel)]=\"f.pattern\" placeholder=\"main or release/*\" data-testid=\"rule-pattern\" /></div>\n <div class=\"o-cb o-form\">\n @for (t of toggles; track t.key) {\n <div class=\"o-flex\" style=\"align-items:flex-start\"><button type=\"button\" class=\"o-tog\" role=\"switch\" [attr.aria-label]=\"t.label\" [class.o-on]=\"f[t.key]\" [attr.aria-checked]=\"f[t.key]\" (click)=\"flip(f, t.key)\" style=\"margin-top:2px\"></button><div class=\"o-col\" style=\"gap:2px;flex:1\"><span class=\"o-b5\">{{ t.label }}</span><span class=\"o-hint\">{{ t.hint }}</span></div></div>\n }\n <div class=\"o-flex\"><span class=\"o-b5\" style=\"flex:1\">Required approvals</span><button type=\"button\" class=\"o-btn o-sm\" (click)=\"f.requiredApprovals = max0(f.requiredApprovals - 1)\" aria-label=\"One fewer\">−</button><b class=\"o-mono\" style=\"width:24px;text-align:center\" aria-live=\"polite\">{{ f.requiredApprovals }}</b><button type=\"button\" class=\"o-btn o-sm\" (click)=\"f.requiredApprovals = f.requiredApprovals + 1\" aria-label=\"One more\">+</button></div>\n <div class=\"o-fld\"><label for=\"rule-check\">Required status checks</label>\n <div class=\"o-flex o-wrap\">\n @for (c of f.requiredChecks; track c) {<span class=\"o-chip o-mono\">{{ c }} <button type=\"button\" class=\"o-lnk\" style=\"font-size:11px\" (click)=\"removeCheck(f, c)\" [attr.aria-label]=\"'Remove ' + c\">✕</button></span>}\n <input id=\"rule-check\" class=\"o-in o-sm o-mono\" style=\"width:160px\" placeholder=\"+ check name, Enter\" [ngModel]=\"check()\" (ngModelChange)=\"check.set($event)\" name=\"check\" (keydown.enter)=\"$event.preventDefault(); addCheck(f)\" />\n </div>\n </div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">Allowed to bypass <b class=\"o-ph-tag o-ga\">GA</b></span><div class=\"o-flex\"><span class=\"o-chip\">Owners</span><span class=\"o-hint\">Every bypass is written to the audit log.</span></div></div>\n <div class=\"o-fld\"><span class=\"o-lbl\" style=\"padding:0\">What a blocked push sees</span><div class=\"o-term\" style=\"font-size:11.5px\"><div>$ git push origin {{ f.pattern || 'main' }}</div><div>remote: ✕ {{ f.pattern || 'main' }} is protected by rule “{{ f.pattern || 'main' }}”: direct pushes are blocked.</div><div>remote: Open a pull request instead.</div></div></div>\n <div class=\"o-flex\">\n @if (f.id) {<button type=\"button\" class=\"o-btn o-sm o-ghost\" style=\"color:var(--o-bad-tx)\" (click)=\"removeRule(f)\">Delete rule</button>}\n <button type=\"button\" class=\"o-btn o-sm o-r\" (click)=\"form.set(null)\">Cancel</button>\n <button type=\"submit\" class=\"o-btn o-dark\" [disabled]=\"busy() || !f.pattern.trim()\" data-testid=\"rule-save\">Save rule</button>\n </div>\n </div>\n </form>\n }\n }\n @case ('collab') {\n <h1 class=\"o-t\">Collaborators</h1>\n <div class=\"o-card\"><div class=\"o-empty\">Access beyond the project role, for one repository, arrives at general availability. Until then, project roles decide who reads and pushes.</div></div>\n }\n @case ('danger') {\n <h1 class=\"o-t\">Danger zone</h1>\n <div class=\"o-card\" style=\"border-color:var(--o-bad-line)\">\n <div class=\"o-row\" style=\"padding:14px\"><div class=\"o-col\" style=\"gap:2px;flex:1\"><b>{{ r.archivedAt ? 'Unarchive' : 'Archive' }}</b><span class=\"o-hint\">{{ r.archivedAt ? 'Pushes are accepted again.' : 'Read-only. Pushes are rejected; pipelines stop triggering.' }}</span></div><button type=\"button\" class=\"o-btn o-sm\" (click)=\"archive(!r.archivedAt)\" [disabled]=\"!canAdmin() || busy()\">{{ r.archivedAt ? 'Unarchive' : 'Archive' }}</button></div>\n <div class=\"o-row\" style=\"padding:14px;flex-wrap:wrap\"><div class=\"o-col\" style=\"gap:2px;flex:1;min-width:240px\"><b>Delete this repository</b><span class=\"o-hint\">Recoverable for 7 days, then gone for good. Type <b class=\"o-mono\">{{ r.name }}</b> to confirm.</span></div>\n <input class=\"o-in o-sm o-mono\" style=\"width:180px\" aria-label=\"Type the repository name to confirm\" [ngModel]=\"confirm()\" (ngModelChange)=\"confirm.set($event)\" [disabled]=\"!canAdmin()\" />\n <button type=\"button\" class=\"o-btn o-sm o-red\" (click)=\"remove()\" [disabled]=\"!canAdmin() || confirm() !== r.name || busy()\">Delete</button>\n </div>\n </div>\n }\n }\n </div>\n </div>\n } @else if (error()) {\n <div class=\"o-card o-empty\"><p>{{ error() }}</p></div>\n }\n </div>\n `,\n})\nexport class RepoSettingsPage extends RepoPage {\n private readonly router = inject(Router);\n protected readonly section = signal<Section>('general');\n protected readonly branches = signal<Ref[]>([]);\n protected readonly rules = signal<Protection[]>([]);\n protected readonly form = signal<RuleForm | null>(null);\n protected readonly check = signal('');\n protected readonly confirm = signal('');\n protected readonly busy = signal(false);\n protected g = { name: '', description: '', visibility: 'private', defaultBranch: '', mergeMethods: [] as string[], deleteBranchOnMerge: false };\n\n protected readonly methods = [{ id: 'merge', label: 'Merge commit' }, { id: 'squash', label: 'Squash' }, { id: 'rebase', label: 'Rebase' }];\n protected readonly toggles: { key: 'blockDirectPush' | 'blockForcePush' | 'blockDeletion' | 'dismissStaleApprovals' | 'requireUpToDate'; label: string; hint: string }[] = [\n { key: 'blockDirectPush', label: 'Require a pull request before merging', hint: 'Direct pushes are blocked; changes arrive through pull requests.' },\n { key: 'blockForcePush', label: 'Block force pushes', hint: 'History on matching branches cannot be rewritten.' },\n { key: 'blockDeletion', label: 'Block deletion', hint: 'Matching branches cannot be deleted.' },\n { key: 'dismissStaleApprovals', label: 'Dismiss stale approvals', hint: 'A new commit dismisses approvals given on an older one.' },\n { key: 'requireUpToDate', label: 'Require branches to be up to date', hint: 'The branch must contain the target’s latest commit before it merges.' },\n ];\n\n constructor() {\n super();\n this.route.queryParamMap.subscribe((q) => this.section.set((q.get('section') as Section) || 'general'));\n }\n\n protected onRepo(r: Repo) {\n this.g = { name: r.name, description: r.description, visibility: r.visibility, defaultBranch: r.defaultBranch, mergeMethods: [...(r.mergeMethods ?? [])], deleteBranchOnMerge: r.deleteBranchOnMerge };\n if (!r.empty) this.api.refs(this.projectId(), r.name, 'branch').subscribe({ next: (b) => this.branches.set(b), error: () => undefined });\n this.api.protections(this.projectId(), r.name).subscribe({ next: (p) => this.rules.set(p), error: () => undefined });\n }\n\n protected go(s: Section) {\n void this.router.navigate([], { relativeTo: this.route, queryParams: { section: s === 'general' ? null : s }, replaceUrl: true });\n }\n\n protected max0(n: number) {\n return Math.max(0, n);\n }\n\n protected flipMethod(id: string) {\n this.g.mergeMethods = this.g.mergeMethods.includes(id) ? this.g.mergeMethods.filter((m) => m !== id) : [...this.g.mergeMethods, id];\n }\n\n protected summary(p: Protection) {\n const parts: string[] = [];\n if (p.requiredApprovals) parts.push(`${p.requiredApprovals} ${p.requiredApprovals === 1 ? 'approval' : 'approvals'}`);\n if (p.requiredChecks?.length) parts.push(`checks ${p.requiredChecks.join(', ')}`);\n if (p.blockDirectPush) parts.push('no direct push');\n if (p.requireUpToDate) parts.push('up to date');\n if (p.blockDeletion) parts.push('no deletion');\n return parts.join(' · ') || 'no restrictions';\n }\n\n protected edit(p: Protection | null) {\n this.form.set(p ? { ...BLANK, ...p, requiredChecks: [...(p.requiredChecks ?? [])] } : { ...BLANK, pattern: this.rules().length ? '' : this.repo()?.defaultBranch ?? 'main', requiredChecks: [] });\n }\n\n protected flip(f: RuleForm, k: (typeof this.toggles)[number]['key']) {\n f[k] = !f[k];\n this.form.set({ ...f });\n }\n\n protected addCheck(f: RuleForm) {\n const c = this.check().trim();\n if (c && !f.requiredChecks.includes(c)) f.requiredChecks = [...f.requiredChecks, c];\n this.check.set('');\n this.form.set({ ...f });\n }\n\n protected removeCheck(f: RuleForm, c: string) {\n f.requiredChecks = f.requiredChecks.filter((x) => x !== c);\n this.form.set({ ...f });\n }\n\n protected saveGeneral() {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n const renamed = this.g.name.trim() !== r.name;\n this.api.update(this.projectId(), r.name, { name: this.g.name.trim(), description: this.g.description, visibility: this.g.visibility, defaultBranch: this.g.defaultBranch, mergeMethods: this.g.mergeMethods, deleteBranchOnMerge: this.g.deleteBranchOnMerge }).subscribe({\n next: (n) => {\n this.busy.set(false);\n this.note.set('Saved.');\n if (renamed) void this.router.navigate(this.host.link(`code/${n.name}/settings`));\n else { this.repo.set(n); this.onRepo(n); }\n },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not save.')); },\n });\n }\n\n protected saveRule() {\n const r = this.repo();\n const f = this.form();\n if (!r || !f) return;\n const { id, ...body } = f;\n this.busy.set(true);\n const req = id ? this.api.updateProtection(this.projectId(), r.name, id, body) : this.api.addProtection(this.projectId(), r.name, body);\n req.subscribe({\n next: () => { this.busy.set(false); this.form.set(null); this.note.set(`Rule “${f.pattern}” saved.`); this.onRepo(r); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not save the rule.')); },\n });\n }\n\n protected removeRule(f: RuleForm) {\n const r = this.repo();\n if (!r || !f.id) return;\n this.api.removeProtection(this.projectId(), r.name, f.id).subscribe({\n next: () => { this.form.set(null); this.note.set(`Rule “${f.pattern}” deleted.`); this.onRepo(r); },\n error: (e) => this.error.set(apiMessage(e, 'Could not delete the rule.')),\n });\n }\n\n protected archive(on: boolean) {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n this.api.setArchived(this.projectId(), r.name, on).subscribe({\n next: (n) => { this.busy.set(false); this.repo.set(n); this.note.set(on ? 'Archived: the repository is read-only.' : 'Unarchived.'); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not change the archive state.')); },\n });\n }\n\n protected remove() {\n const r = this.repo();\n if (!r) return;\n this.busy.set(true);\n this.api.remove(this.projectId(), r.name).subscribe({\n next: () => { this.busy.set(false); void this.router.navigate(this.host.link('code')); },\n error: (e) => { this.busy.set(false); this.error.set(apiMessage(e, 'Could not delete the repository.')); },\n });\n }\n}\n","/*\n * @chisquare-tech/origine-ngx-apps-code: the Code module's screens (TRD §6.10). The host app provides\n * CodeHost and mounts the pages at /{org}/{project}/code, /code/new, /code/pulls and\n * /code/{repo}[/blob|/commits|/commit/:sha|/branches|/pulls|/pull/:number|/settings].\n */\nexport * from './lib/host';\nexport * from './lib/code.api';\nexport * from './lib/look';\nexport * from './lib/repo-base';\nexport * from './lib/diff.view';\nexport * from './lib/repos.page';\nexport * from './lib/repo.page';\nexport * from './lib/file.page';\nexport * from './lib/history.pages';\nexport * from './lib/pulls.page';\nexport * from './lib/pull.page';\nexport * from './lib/settings.page';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map"],"mappings":";;;;;;;;;;;AAmBA;;;AAGG;MACmB,QAAQ,CAAA;AAO7B;;AC0RD,MAAM,CAAC,GAAG,SAAS;AACnB,MAAM,GAAG,GAAG,kBAAkB;AAC9B,MAAM,IAAI,GAAG,CAAI,CAAM,KAAQ,CAAC,EAAE,IAAS;SAE3B,UAAU,CAAC,GAAQ,EAAE,QAAQ,GAAG,kCAAkC,EAAA;AAChF,IAAA,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,IA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