git-ents.gitmain
⌘K
foforge
commit cfd7165
web: fix workbench leftovers — stale id-chip assertion, assignee indexing

The redesign kept the id-chip’s enrolled-username rendering (roots.web-signing) but wrapped it in an avatar span, which the serve test’s exact-markup match predated; assert the semantics instead. Also replace assignees[0] with an if-let first(), clearing the indexing-slicing lint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Joseph D. Carpinelli · 29 days ago

Reviews

No reviews of this commit yet — record a verdict below.

Start a review

verdict

crates/cli/git-ents/tests/serve.rs @@ -93,7 +93,7 @@ ) .expect("utf8 html"); assert!( - body.contains(r#"class="id-chip" href="/account">jdc</a>"#), + body.contains(r#"class="id-chip" href="/account""#) && body.contains("<span>jdc</span>"), "the id-chip must show the enrolled member's own username: {body}" ); }
crates/cli/ents-web/src/pages/issues.rs @@ -98,13 +98,13 @@ span.locator { (issue.state) " \u{b7} " - @if issue.assignees.is_empty() { - "unassigned" - } @else { - "@" (issue.assignees[0].as_str()) + @if let Some(first) = issue.assignees.first() { + "@" (first.as_str()) @if issue.assignees.len() > 1 { " +" (issue.assignees.len() - 1) } + } @else { + "unassigned" } " \u{b7} " @if issue.labels.is_empty() { "no labels" } @else { (issue.labels.join(", ")) }