From 2ad12262df05e2fc88e8b9ca66199bfe876bb718 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Thu, 12 Feb 2026 13:51:37 -0500 Subject: [PATCH] Update CLAUDE.md with Salt deploy notes, CI/CD details, mobile layout docs --- CLAUDE.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0c2703e..1a02254 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,8 +4,14 @@ - Application: `https://my.makepostsell.com` - Version check: `https://my.makepostsell.com/version` -- Prod shell: `tmux-hosts` — look for `my.makepostsell.com` (typically tmux window `0:2`) +- Prod shell: `tmux-hosts` — look for `my.makepostsell.com` (typically tmux window `0:3`) — **READ-ONLY, never deploy/fix from tmux** - Media CDN: `plan-period-files.nyc3.cdn.digitaloceanspaces.com` (DigitalOcean Spaces) +- Deploy pipeline: `git push` → GitLab CI (test → build → deploy) → `salt-call state.highstate` on prod +- Salt states: `~/git/foxhop-states/uwsgi/` — note: MPS uses `caddy_sites.sls`, NOT `sites.sls` +- Salt pillar: `~/git/foxhop-pillar/uwsgi/makepostsell/init.sls` +- DB path on prod: `/opt/make_post_sell/make_post_sell.sqlite` (owned by `uwsgi`, need `sudo` for writes) +- Timestamps in DB are **milliseconds** not seconds (13 digits) +- uWSGI: 2 processes, 8 threads, reload-on-rss 512MB (pillar-configurable), Caddy reverse proxy on :6001 ### Media Architecture @@ -223,7 +229,7 @@ Always use `uuid_str` when you need a string copy of the identifier. Models inhe 2. **`updatePageContent()` in watch.js** updates the same element during SPA navigation 3. **The watch JSON endpoint** (`watch.py`) returns any new data the JS needs -Elements that must stay in sync: CTA edit button, download button, comment form `product_id`, file type/size, description, title, canonical link, related items. If you add a new product-specific element, add it to all three layers. +Elements that must stay in sync: CTA edit button, download button, comment form `product_id`, file type/size, description, title, canonical link, related items, comments link count. If you add a new product-specific element, add it to all three layers. **TESTING INTEGRITY**: NEVER skip, delete, or disable unit tests or integration tests when they break. When tests fail: 1. **FIX THE TESTS** - Update them to work with new functionality @@ -267,6 +273,23 @@ new comment into the DOM without a page reload (preserving media playback). The server returns JSON (HTTP 201) for AJAX requests and falls back to the normal redirect flow on any error. +## CI/CD Notes + +- Build uses `virtualenv-clone` which requires `bin/python` symlink (Python 3.12 `venv` may only create `python3`) +- The CI creates a symlink before cloning: `test -f env/bin/python || ln -sf python3 env/bin/python` +- When updating Salt states (foxhop-states), always run `salt-run fileserver.update` on the salt master before triggering a deploy — gitfs cache can serve stale files +- MPS uses `caddy_sites.sls` (NOT `sites.sls`) — changes to the uwsgi service template context must be added to **both** files + +## Mobile Layout + +On mobile (`max-width: 800px`), the product page reorders to single column: +1. `product-images` (order 1) — sticky in watch mode +2. `product-right` (order 2) — price, download, related content +3. `product-description` (order 3) +4. `product-comments` (order 4) + +Related content on mobile shows only 7 next items (vs 42 on desktop) via `.related-content-overflow` class. A "Comments (N)" anchor link appears on mobile to jump to the comments section below. + ## Style - **Never use "AI" — always say "machine learning."** We grow machine learning, not "AI." This term is forbidden in all permacomputer discourse, marketing, & documentation.