Fix #34: empty-state callouts + dynamic open-PR page #46
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!46
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-34"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #34, two parts:
1. Empty states. The bare
No …fallback lines on Pulls, Checks, Releases (and Issues, same pattern — scope noted) become a shared centered callout:web/src/components/Empty.jsx(icon/title/hint/action composition, generous padding, dashed panel via new.empty-*classes in ui.css). Actions are router links (keyboard-focusable, global :focus-visible ring); the region isrole=status.2. Open-PR flow. The cramped 'Open a pull request' sidebar box on the pulls list is deleted — opening happens only on the full
/pulls/newpage (the list's 'New pull request' button links there, carrying?base=/ ?head=filters as composer prefill). The composer is now dynamic: 300ms after the last picker keystroke it fetches both histories (commits?ref=, n=100, parallel, one AbortController per debounced run with stale-run drop) and intersects them via headless-testableweb/src/lib/compare.js(merge-base approximated by history intersection; ahead/behind exact inside the window,+lower bounds only past amorewindow). Title prefills from the head-tip subject, body from the head-only subjects (both until the user edits); swap-base/head button included. Deliberately no server compare endpoint (decision appended to docs/go/12_web_ui.md).Verification (real browser, headless Chromium over CDP against this branch's binary): pulls empty (dark+light) with sidebar gone and CTA href; pulls non-empty; composer prefilled via
?head=showing exact '2 ahead · 0 behind' → '2 ahead · 1 behind' after main moved, swap symmetry ('1 ahead · 2 behind'), and a real submit landing on /pull/2; checks/releases/issues empties; zero console errors everywhere.node --test web/test/unit/*.test.js: 201/201 green (11 new compare tests).make web+go buildclean.Notes: releases page logs one 404 for
api/releases/latestwith zero releases — pre-existing control flow (caught → null), untouched. Issues empty state included as same-pattern scope; say so if you want it split out.