fabrica

hanna/fabrica

feat(web): show last-updated instead of duplicate visibility in repo rows

44642d0 · hanna committed on 2026-07-25

The visibility badge next to the name already conveys it, so the row subtitle
now shows the default branch and a relative "Updated …" time (pushed_at,
falling back to updated_at) like other forges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
1 files changed · +8 −2UnifiedSplit
crates/web/src/repo.rs +8 −2
@@ -1498,6 +1498,9 @@ pub(crate) struct RepoEntry {
1498 pub(crate) visibility: model::Visibility,1498 pub(crate) visibility: model::Visibility,
1499 /// The default branch, shown in the subtitle.1499 /// The default branch, shown in the subtitle.
1500 pub(crate) default_branch: String,1500 pub(crate) default_branch: String,
1501 /// When the repo was last pushed to (falling back to its last metadata
1502 /// change), for the "Updated …" subtitle.
1503 pub(crate) updated: i64,
1501 /// Optional one-line description, shown under the name when present.1504 /// Optional one-line description, shown under the name when present.
1502 pub(crate) description: Option<String>,1505 pub(crate) description: Option<String>,
1503}1506}
@@ -1510,6 +1513,7 @@ impl RepoEntry {
1510 label: repo.path.clone(),1513 label: repo.path.clone(),
1511 visibility: repo.visibility,1514 visibility: repo.visibility,
1512 default_branch: repo.default_branch.clone(),1515 default_branch: repo.default_branch.clone(),
1516 updated: repo.pushed_at.unwrap_or(repo.updated_at),
1513 description: repo.description.clone(),1517 description: repo.description.clone(),
1514 }1518 }
1515 }1519 }
@@ -1522,6 +1526,7 @@ impl RepoEntry {
1522 label: format!("{owner}/{}", repo.path),1526 label: format!("{owner}/{}", repo.path),
1523 visibility: repo.visibility,1527 visibility: repo.visibility,
1524 default_branch: repo.default_branch.clone(),1528 default_branch: repo.default_branch.clone(),
1529 updated: repo.pushed_at.unwrap_or(repo.updated_at),
1525 description: repo.description.clone(),1530 description: repo.description.clone(),
1526 }1531 }
1527 }1532 }
@@ -1540,6 +1545,7 @@ fn visibility_badge(visibility: model::Visibility) -> Markup {
1540/// card headed by `title`, one bordered row per repo with a bold name and a1545/// card headed by `title`, one bordered row per repo with a bold name and a
1541/// muted `visibility · default: branch` subtitle.1546/// muted `visibility · default: branch` subtitle.
1542pub(crate) fn repo_card(title: &str, empty: &str, entries: &[RepoEntry]) -> Markup {1547pub(crate) fn repo_card(title: &str, empty: &str, entries: &[RepoEntry]) -> Markup {
1548 let now = crate::now_ms();
1543 html! {1549 html! {
1544 section class="listing" {1550 section class="listing" {
1545 @if !title.is_empty() { h2 { (title) } }1551 @if !title.is_empty() { h2 { (title) } }
@@ -1558,8 +1564,8 @@ pub(crate) fn repo_card(title: &str, empty: &str, entries: &[RepoEntry]) -> Mark
1558 span class="repo-row-desc muted" { (desc) }1564 span class="repo-row-desc muted" { (desc) }
1559 }1565 }
1560 span class="repo-row-meta muted" {1566 span class="repo-row-meta muted" {
1561 (e.visibility.as_str())1567 (icon(Icon::GitBranch)) " " (e.default_branch)
1562 " · " (icon(Icon::GitBranch)) " " (e.default_branch)1568 " · Updated " (crate::activity::fmt_relative(e.updated, now))
1563 }1569 }
1564 }1570 }
1565 }1571 }