# Generated static review dashboards

Use when editing a generated static dashboard such as the Paperclip prototype review page (`/var/www/prototype-review/index.html`) that is produced by a script.

## Workflow

1. Find the generator first (for Paperclip prototype review this was `/root/prototype-manager/generate_review_dashboard.py`). Do not patch only the rendered HTML unless the user explicitly wants a one-off hotfix.
2. Inspect data sources before editing:
   - state JSON for rendered cards/lists;
   - database query columns used by table rows;
   - public URL/auth setup if browser verification might be blocked.
3. Implement UI in the generator:
   - collapsed long card descriptions: use native `<details><summary>`;
   - duplicate action links: remove redundant links when the title already links out;
   - issue drill-through: link row titles to the app route using the stable issue UUID/id;
   - sortable columns: table-header `<button data-sort>` controls;
   - filterable columns: header `<input data-filter>` controls;
   - project/status filters: explicit `<select>` populated from current rows.
4. Escape braces in any JavaScript embedded inside Python f-strings (`{{` / `}}`) or move the script string outside the f-string.
5. Regenerate the output and verify generator syntax:
   ```bash
   python3 -m py_compile /path/to/generator.py
   python3 /path/to/generator.py
   ```
6. Verify behavior:
   - generated-file checks for required/forbidden strings;
   - browser `file://` checks for DOM behavior if public URL is Basic-Auth protected;
   - public/nginx status separately.

## Pitfalls

- `curl` against a client-rendered app or protected public URL can report false negatives for UI content.
- Public browser navigation can fail with `ERR_INVALID_AUTH_CREDENTIALS`; use local file/browser checks for UI and HTTP probes for auth.
- If a generated dashboard is cron-regenerated, changes made only to `/var/www/.../index.html` will be lost.
