Fix four web UI defects a browser found and the tests could not #76

Merged
a73x merged 1 commit from worktree-agent-ad571ed9ef9b721f2 into main 2026-08-12 17:27:58 +00:00
a73x commented 2026-08-12 17:24:52 +00:00 (Migrated from git.a73x.sh)

Fixes four defects found by an actual browser pass over the web UI. None was
visible to the suite: the HTML was well-formed, every content assertion
passed, and three of the four are only wrong once a page is laid out at a
width or read as a sentence.

8e716471 — tables force the whole page to scroll sideways.
Diffs already got this right (pre carries overflow-x: auto); tables had
no equivalent, so a seven-column list at 500px pushed the body out and took
Base and Updated off-screen. Every table now sits in a .table-scroll
container with the same rule. Two neighbours fell out of the same
measurement: the overview's 1fr 1fr grid was narrower than its content on
a phone, and a release's 64-character sha256 is unbreakable text wider than
the viewport.

The test measures the real property in a real headless browser —
documentElement.scrollWidth vs window.innerWidth at 500px, driven off a
live server. The browser is an external oracle; it does not know what the
test expects. It reproduced the defect at 531 vs 500 before the fix. Where
no browser is installed the measurement skips loudly
(GIT_COLLAB_REQUIRE_BROWSER=1 makes the skip a failure) and a weaker
structural test still guards the invariant.

b2a57996 — timestamps rendered as raw RFC3339 with nanoseconds.
Now 2026-08-11 16:08 in UTC with the exact stored value in title=, so
nothing is lost. Minutes because that is the coarsest rendering that still
orders a review and the comment answering it; absolute rather than relative
because a relative rendering makes the same URL say different things at
different times. The sibling: Merged in rendered a 40-character oid beside
a Revisions table rendering 8. Both now go through one shared helper at
abbrev::MIN_WIDTH; the link still resolves the full oid.

c43c459d — an empty filtered list claimed the repository was empty.
Now No open patches. (15 total — show all), linking to ?filter=all. A
genuinely empty repository still says No patches yet. and does not offer
to show zero more. Same for issues. The total is only looked up when the
list is empty, so a list with rows does not pay for the archived listing.

850f3b8e — the Branch column showed dead ephemeral names.
Replaced with the base ref rather than dropped: a list reader does have
a question there — "is this targeting main?" — and the base ref answers it,
names a branch that still exists, and is short enough to help the overflow
rather than cause it. Provenance is not lost; the detail page and
patch show still carry the originating branch. The CLI's patch list
gets the same target, printed as → main, so the surfaces do not disagree
about what a patch list says — the argument 10bb2d84 made about ids.

--json is untouched and asserted so: full 40-character ids, full-precision
timestamps, and branch still present for scripts. Rendering is still a
read: a test walks every page and asserts refs are byte-identical before and
after.

Full suite green (198 unit + all integration), cargo clippy --all-targets
silent. 12 new tests.


Migrated from git-collab patche 34cf3f3723014c3bb7ba6a8a825a734a6405ff86.

Original author: a73x dev@a73x.sh.

Fixes #69

Revision 1: 5cd235205ddb0704ba4376e9551bbaef70708876; base 18181599bcad7189f68712568637795d0e5a6436

Revision 2: 602505d27ec0faa5d3ca540facd54d6e5eeab4ef; base d53c2e87fdf3f3a8720f8589073a844498acd673

Rebased onto main@d53c2e8; full suite and clippy re-verified green there.

Fixes four defects found by an actual browser pass over the web UI. None was visible to the suite: the HTML was well-formed, every content assertion passed, and three of the four are only wrong once a page is laid out at a width or read as a sentence. **8e716471 — tables force the whole page to scroll sideways.** Diffs already got this right (`pre` carries `overflow-x: auto`); tables had no equivalent, so a seven-column list at 500px pushed the body out and took Base and Updated off-screen. Every table now sits in a `.table-scroll` container with the same rule. Two neighbours fell out of the same measurement: the overview's `1fr 1fr` grid was narrower than its content on a phone, and a release's 64-character sha256 is unbreakable text wider than the viewport. The test measures the real property in a real headless browser — `documentElement.scrollWidth` vs `window.innerWidth` at 500px, driven off a live server. The browser is an external oracle; it does not know what the test expects. It reproduced the defect at 531 vs 500 before the fix. Where no browser is installed the measurement skips loudly (`GIT_COLLAB_REQUIRE_BROWSER=1` makes the skip a failure) and a weaker structural test still guards the invariant. **b2a57996 — timestamps rendered as raw RFC3339 with nanoseconds.** Now `2026-08-11 16:08` in UTC with the exact stored value in `title=`, so nothing is lost. Minutes because that is the coarsest rendering that still orders a review and the comment answering it; absolute rather than relative because a relative rendering makes the same URL say different things at different times. The sibling: `Merged in` rendered a 40-character oid beside a Revisions table rendering 8. Both now go through one shared helper at `abbrev::MIN_WIDTH`; the link still resolves the full oid. **c43c459d — an empty filtered list claimed the repository was empty.** Now `No open patches. (15 total — show all)`, linking to `?filter=all`. A genuinely empty repository still says `No patches yet.` and does not offer to show zero more. Same for issues. The total is only looked up when the list is empty, so a list with rows does not pay for the archived listing. **850f3b8e — the Branch column showed dead ephemeral names.** Replaced with the **base ref** rather than dropped: a list reader does have a question there — "is this targeting main?" — and the base ref answers it, names a branch that still exists, and is short enough to help the overflow rather than cause it. Provenance is not lost; the detail page and `patch show` still carry the originating branch. The CLI's `patch list` gets the same target, printed as `→ main`, so the surfaces do not disagree about what a patch list says — the argument 10bb2d84 made about ids. `--json` is untouched and asserted so: full 40-character ids, full-precision timestamps, and `branch` still present for scripts. Rendering is still a read: a test walks every page and asserts refs are byte-identical before and after. Full suite green (198 unit + all integration), `cargo clippy --all-targets` silent. 12 new tests. --- Migrated from git-collab patche `34cf3f3723014c3bb7ba6a8a825a734a6405ff86`. Original author: a73x <dev@a73x.sh>. Fixes #69 Revision 1: `5cd235205ddb0704ba4376e9551bbaef70708876`; base `18181599bcad7189f68712568637795d0e5a6436` Revision 2: `602505d27ec0faa5d3ca540facd54d6e5eeab4ef`; base `d53c2e87fdf3f3a8720f8589073a844498acd673` Rebased onto main@d53c2e8; full suite and clippy re-verified green there.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
a73x/git-collab!76
No description provided.