feat: make repository reads alias-aware
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a049a4-ee9f-78e1-9d66-2cb0f9bea3e3
This commit is contained in:
parent
639b9aed08
commit
2e2ae1e5d0
19 changed files with 982 additions and 94 deletions
|
|
@ -268,7 +268,7 @@ if (domainBlocks.length === 0) {
|
|||
</tr></thead>
|
||||
<tbody>
|
||||
${rows.map(r => html`<tr class="${r._integrating ? 'row-integrating' : r._hasSbom ? '' : 'row-gap'}">
|
||||
<td class="repo-cell"><code>${r.repo}</code></td>
|
||||
<td class="repo-cell"><a href=${`/repos/${encodeURIComponent(r.repo)}`}><code>${r.repo}</code></a></td>
|
||||
<td>${r.category}</td>
|
||||
<td class="path-cell" title=${r.capTags}>${r.capTags}</td>
|
||||
<td>${_doiBadge(r._doiTier)}</td>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,17 @@ if (raw.error) {
|
|||
const name = raw.name || raw.slug || repoSlug;
|
||||
display(html`<h1 style="font-size:1.1rem;margin-bottom:0.25rem">Repo · <em>${name}</em></h1>`);
|
||||
display(html`<p style="margin-top:0"><a href="/repos">← Repos</a> | <a href="/token-cost">← Token Cost</a></p>`);
|
||||
if (raw.slug_status === "alias") {
|
||||
display(html`<div style="border:1px solid #f59e0b;background:#fffbeb;padding:0.75rem 1rem;margin:0.75rem 0;max-width:640px">
|
||||
<strong>Repository alias:</strong> <code>${raw.requested_slug}</code> now resolves to
|
||||
<a href=${`/repos/${encodeURIComponent(raw.canonical_slug)}`}><code>${raw.canonical_slug}</code></a>.
|
||||
Historical records keep the former value.
|
||||
</div>`);
|
||||
}
|
||||
|
||||
const FIELD_ORDER = [
|
||||
"id","slug","name","domain_slug","status","description",
|
||||
"id","slug","requested_slug","canonical_slug","slug_status","aliases",
|
||||
"name","domain_slug","status","description",
|
||||
"local_path","remote_url","git_fingerprint",
|
||||
"sbom_source","last_sbom_at","last_state_synced_at",
|
||||
"created_at","updated_at",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue