# S02: Creator Freshness + Homepage Card Dates

**Goal:** Creators browse page shows "Last updated: Mon D" per creator. Homepage recently-added cards show a subtle date.
**Demo:** After this: Creators browse page shows 'Last updated: Apr 3' per creator. Homepage recently-added cards show a subtle date.

## Tasks
- [x] **T01: Added last_technique_at correlated subquery to creators API endpoint, returning MAX(technique_pages.created_at) per creator** — Add a correlated subquery for MAX(technique_pages.created_at) to the list_creators endpoint, expose it via the CreatorBrowseItem schema, and rebuild+deploy the API container.

## Steps

1. In `backend/schemas.py`, add `last_technique_at: datetime | None = None` to `CreatorBrowseItem` (after `video_count`).
2. In `backend/routers/creators.py`:
   - Add a `last_technique_sq` correlated subquery: `select(func.max(TechniquePage.created_at)).where(TechniquePage.creator_id == Creator.id).correlate(Creator).scalar_subquery()`
   - Add it to the `select()` call with `.label("last_technique_at")`
   - Update the row unpacking to read index [3] as `last_technique_at`
   - Pass `last_technique_at=last_technique_at` to the `CreatorBrowseItem(...)` constructor
3. SSH to ub01, rebuild and restart the API container:
   ```
   ssh ub01 'cd /vmPool/r/repos/xpltdco/chrysopedia && git pull && docker compose build chrysopedia-api && docker compose up -d chrysopedia-api'
   ```
4. Verify the field appears in the API response.

## Must-Haves

- [ ] `last_technique_at` field present on every item in `/api/v1/creators` response
- [ ] Field is a datetime string for creators with techniques, null for creators with 0 techniques
- [ ] Existing sort/filter/pagination behavior unchanged

## Verification

- `ssh ub01 'curl -s http://localhost:8096/api/v1/creators?limit=5' | python3 -m json.tool | grep last_technique_at` shows the field on each item
- At least one item has a non-null datetime value
- At least one item (if any creator has 0 techniques) has null
  - Estimate: 20m
  - Files: backend/schemas.py, backend/routers/creators.py
  - Verify: ssh ub01 'curl -s http://localhost:8096/api/v1/creators?limit=5' | python3 -m json.tool | grep last_technique_at
- [x] **T02: Added "Last updated: Mon D" to creators browse rows and subtle date stamps on homepage recently-added cards** — Add the `last_technique_at` field to the frontend TS interface, render it on the creators browse page, render `created_at` on homepage recently-added cards, and rebuild+deploy the web container.

## Steps

1. In `frontend/src/api/public-client.ts`, add `last_technique_at: string | null;` to the `CreatorBrowseItem` interface.
2. In `frontend/src/pages/CreatorsBrowse.tsx`:
   - After the existing stats (technique count · video count · view count), add a separator and "Last updated: Mon D" when `creator.last_technique_at` is non-null.
   - Format: `new Date(creator.last_technique_at).toLocaleDateString('en-US', { month: 'short', day: 'numeric' })`
   - Skip rendering entirely when null (no "No articles" text — just omit).
3. In `frontend/src/pages/Home.tsx`:
   - Inside each `.recent-card`, after the creator name span, add a small date element showing `created_at`.
   - Use the same short date format (Mon D).
   - Style with a muted color and small font to keep it subtle.
4. In `frontend/src/App.css`:
   - Add `.creator-row__updated` style: muted color (`var(--text-muted)` or similar), small font-size.
   - Add `.recent-card__date` style: muted, small, positioned after creator name.
5. SSH to ub01, rebuild and restart the web container:
   ```
   ssh ub01 'cd /vmPool/r/repos/xpltdco/chrysopedia && git pull && docker compose build chrysopedia-web-8096 && docker compose up -d chrysopedia-web-8096'
   ```
6. Visually verify both pages in the browser.

## Must-Haves

- [ ] Creators browse page shows "Last updated: Mon D" per creator (when non-null)
- [ ] Creators with null `last_technique_at` show no date element
- [ ] Homepage recently-added cards show a subtle date
- [ ] Date styling is muted and consistent with existing secondary text

## Verification

- Browse http://ub01:8096/creators — each creator row with techniques shows a last-updated date
- Browse http://ub01:8096 — each recently-added card shows a small date
- Dates use short format (e.g., "Apr 3" not "April 3, 2026" or "2026-04-03")
  - Estimate: 25m
  - Files: frontend/src/api/public-client.ts, frontend/src/pages/CreatorsBrowse.tsx, frontend/src/pages/Home.tsx, frontend/src/App.css
  - Verify: ssh ub01 'curl -s http://ub01:8096/creators' | grep -o 'Last updated' | head -3
