ZDDC/landing/js
ZDDC 70c6946e56 feat(landing): "+ New project" on the picker for authorized users
The server already exposes everything: GET /.profile/access reports
can_create_project (the exact gate POST /.profile/projects enforces), and the
POST creates the folder + seeds its .zddc (creator as admin, title, role
memberships). This wires the landing picker to it:

- On load the picker fetches /.profile/access; if can_create_project, it reveals
  a "+ New project" button next to the Projects heading (hidden otherwise, so we
  never dangle an affordance the server would 404).
- The button opens a dialog mirroring the profile page's create form — name,
  title, and member lists for admins / document controllers / project team /
  guests, plus an advanced ACL-permissions list. It POSTs to /.profile/projects
  and, on success, closes and refreshes the project list so the new project
  appears. Field errors (bad name, 409 duplicate) surface inline.

Server-only by nature (needs the endpoints + auth); offline the access fetch
fails and the button stays hidden.

Also fix a stale landing test: working/staging/reviewing stage links carry a
trailing slash since ec9c9c7 (virtual aggregators 302 on <dir>/); the
assertion still expected the slashless form.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:42:24 -05:00
..
landing.js feat(landing): "+ New project" on the picker for authorized users 2026-06-10 14:42:24 -05:00