feat(client): convert Projects to display-first view + Edit toggle (#273) #276

Merged
james merged 1 commit from 273-projects-display-first into main 2026-06-24 12:53:51 +00:00
Owner

Summary

  • Convert the Projects tab from inline-edit-on-every-row to a display-first layout matching Profile and Experience.
  • View mode = read-only list of projects (name, description, link); top-right Edit button toggles the page into edit mode where the create form, per-row Edit/Delete controls, and inline row-edit form become available.
  • Empty state now reads "No projects yet." with a hint and a one-tap entry point into Edit mode.
  • Adds projects.edit.{edit,cancel,done,editAria,cancelAria,doneAria} + projects.emptyHint, projects.noDescription, projects.noLink to the i18n catalog; no other strings change.
  • No API or schema changes; the create + update + delete mutations stay wired through @carol/api-client exactly as before.

The edit-model mirrors the Profile screen's Contacts card (atomic per-row CRUD inside a page-level edit toggle) — Done / Cancel simply collapse any open create/row-edit form and return to view mode; create + row edits + deletes write through their own mutations as the user submits each one.

Test plan

  • pnpm install --frozen-lockfile
  • pnpm -F @carol/client typecheck
  • pnpm -F @carol/client lint
  • pnpm -F @carol/client test — 106 tests pass
  • pnpm -F @carol/client export:web — bundles cleanly
  • Manual: navigate to /projects, confirm read-only view is clean; tap Edit, confirm the create form + per-row Edit/Delete appear; create a project, edit a row, save, confirm cache patches and view mode returns; cancel an in-progress edit and confirm the draft is discarded.

Closes #273.

## Summary - Convert the Projects tab from inline-edit-on-every-row to a *display-first* layout matching Profile and Experience. - View mode = read-only list of projects (name, description, link); top-right `Edit` button toggles the page into edit mode where the create form, per-row Edit/Delete controls, and inline row-edit form become available. - Empty state now reads "No projects yet." with a hint and a one-tap entry point into Edit mode. - Adds `projects.edit.{edit,cancel,done,editAria,cancelAria,doneAria}` + `projects.emptyHint`, `projects.noDescription`, `projects.noLink` to the i18n catalog; no other strings change. - No API or schema changes; the create + update + delete mutations stay wired through `@carol/api-client` exactly as before. The edit-model mirrors the Profile screen's Contacts card (atomic per-row CRUD inside a page-level edit toggle) — `Done` / `Cancel` simply collapse any open create/row-edit form and return to view mode; create + row edits + deletes write through their own mutations as the user submits each one. ## Test plan - [x] `pnpm install --frozen-lockfile` - [x] `pnpm -F @carol/client typecheck` - [x] `pnpm -F @carol/client lint` - [x] `pnpm -F @carol/client test` — 106 tests pass - [x] `pnpm -F @carol/client export:web` — bundles cleanly - [ ] Manual: navigate to `/projects`, confirm read-only view is clean; tap Edit, confirm the create form + per-row Edit/Delete appear; create a project, edit a row, save, confirm cache patches and view mode returns; cancel an in-progress edit and confirm the draft is discarded. Closes #273.
feat(client): convert Projects to display-first view with Edit toggle (#273)
All checks were successful
Commits / Conventional Commits (pull_request) Successful in 10s
PR / Lint (pull_request) Successful in 2m37s
PR / OpenAPI (pull_request) Successful in 2m35s
PR / Typecheck (pull_request) Successful in 2m40s
PR / Client (web export smoke) (pull_request) Successful in 1m59s
PR / Static analysis (pull_request) Successful in 2m45s
PR / Build (pull_request) Successful in 3m8s
PR / Package age policy (soft) (pull_request) Successful in 53s
Secrets / gitleaks (pull_request) Successful in 44s
PR / OSV-Scanner (pull_request) Successful in 1m4s
PR / pnpm audit (pull_request) Successful in 1m33s
PR / Test (postgres) (pull_request) Successful in 2m26s
PR / Test (sqlite) (pull_request) Successful in 2m21s
PR / Coverage (soft) (pull_request) Successful in 1m48s
PR / Trivy (image) (pull_request) Successful in 2m10s
58c81b4ab6
Brings the Projects screen in line with Profile and Experience: a clean
read-only list by default, with a top-right Edit button that flips the
whole page into edit mode. The create form and per-row edit controls
only render once the user enters edit mode; view mode shows just the
name, description, and link for each project, plus a friendly empty
state that prompts the user to enter Edit mode if no projects exist yet.

The edit-model mirrors the Profile screen's Contacts card (atomic
per-row CRUD, page-level edit toggle as the container) rather than
batching changes for a single Save — create + row edits + deletes
still write through their own mutations as the user submits each one.
Done and Cancel both collapse any open inline create/row-edit form and
return the page to view mode.

Closes #273.

📊 Test coverage

Patch coverage: no testable lines changed.

Overall (app/, lib/, db/, excluding UI per ADR-0019):

Metric Value Soft target
Lines 81.6% ≥ 50%
Branches 72.8% ⚠️ ≥ 75%
Functions 91.1% informational

Soft thresholds per ADR-0019. Coverage is informational and does not block merge.

<!-- coverage-comment --> ## 📊 Test coverage **Patch coverage:** no testable lines changed. **Overall** (`app/`, `lib/`, `db/`, excluding UI per ADR-0019): | Metric | Value | Soft target | |---|---|---| | Lines | 81.6% ✅ | ≥ 50% | | Branches | 72.8% ⚠️ | ≥ 75% | | Functions | 91.1% | informational | Soft thresholds per [ADR-0019](docs/adr/0019-coverage-soft-targets.md). Coverage is informational and does not block merge.
james merged commit dcea37d298 into main 2026-06-24 12:53:51 +00:00
james deleted branch 273-projects-display-first 2026-06-24 12:53:51 +00:00
Sign in to join this conversation.
No description provided.