1# The reviews page lists reviews by status under a heading with a count,2# each review two lines: its title (CI and approvals at the right), then3# number, branch, author, commits, diff size and when. A stacked layer4# hangs under the review below it. Long merged and closed groups start5# folded; open and draft never do.6. "$(dirname "$0")/../lib.sh"7user dami8user ana9repo dami/greet10clone dami dami/greet "$T/w/d"11at "$T/w/d" commit "first"12push_as dami "$T/w/d" origin main13at "$T/w/d" git switch -q -c dami/base14printf 'one\ntwo\n' >"$T/w/d/a.txt"15at "$T/w/d" git add a.txt16at "$T/w/d" git commit -q -m "base layer"17push_as dami "$T/w/d" -o title=Base origin dami/base18at "$T/w/d" git switch -q -c dami/top19at "$T/w/d" commit "top layer"20push_as dami "$T/w/d" -o title=Top origin dami/top21# Eleven merged reviews: their group starts folded.22i=023while [ $i -lt 11 ]; do24 i=$((i + 1))25 at "$T/w/d" git switch -q -c "dami/m$i" main26 at "$T/w/d" commit "merged $i"27 push_as dami "$T/w/d" -o "title=Merged $i" origin "dami/m$i"28 at "$T/w/d" git switch -q main29 at "$T/w/d" git merge -q --ff-only "dami/m$i"30 push_as dami "$T/w/d" origin main31done32export FORGE_STRICT=133build dami/greet34p=$FORGE_WWW/dami/greet/reviews/index.html35lacks "$p" '<table'36has "$p" '<details class="panel rv-group open" open><summary class="panel-head"><h2>open</h2><span class="n">2</span></summary>'37has "$p" '<details class="panel rv-group merged"><summary class="panel-head"><h2>merged</h2><span class="n">11</span></summary>'38# The layer on top hangs under the base, one deep.39has "$p" '<li class="rv layer" style="--depth: 1">'40has "$p" '<span class="rv-title"><a href="/dami/greet/reviews/2/">Top</a></span>'41# Base's second line: number, branch, author, commits, diff size.42has "$p" '<span class="rv-meta"><span class="num">#1</span><span class="mono">dami/base → main</span><span>dami</span><span>1 commit</span><span class="num"><span class="add">\+2</span> <span class="del">−0</span></span>'43# The home page's open reviews are the same list.44has "$FORGE_WWW/dami/greet/index.html" '<ul class="rows rv-list nav-list">'