|
| 1 | +# Persistent Memory |
| 2 | + |
| 3 | +This file stores durable project context so future conversations can resume work with less re-discovery. |
| 4 | + |
| 5 | +## Project Summary |
| 6 | + |
| 7 | +- Repository: `FirefoxCSS-Store.github.io` |
| 8 | +- Purpose: static site that catalogs Firefox `userChrome.css` themes |
| 9 | +- Main data source: `themes.json` |
| 10 | +- Site source: `dev/` |
| 11 | +- Generated site output: `docs/` |
| 12 | + |
| 13 | +## Tooling And Validation |
| 14 | + |
| 15 | +- Package manager: `npm` |
| 16 | +- Build command: `npm run build` |
| 17 | +- Test command: `npm test` |
| 18 | +- Build system: `gulp` |
| 19 | +- Theme validation script: `tests/themes.check.js` |
| 20 | +- Theme metadata refresh script: `scripts/sort_themes.nu` |
| 21 | +- Dev container config: `.devcontainer/devcontainer.json` |
| 22 | +- Devcontainer bootstrap script: `.devcontainer/post-create.sh` |
| 23 | +- Devcontainer automation now runs `.devcontainer/post-create.sh` from `postCreateCommand` to ensure `jq`, `nu`, and project dependencies are installed after container creation/rebuild |
| 24 | + |
| 25 | +## Automation Context |
| 26 | + |
| 27 | +- Active working branch created for automation improvements: `improve-automation` |
| 28 | +- Existing GitHub Actions: |
| 29 | +- `.github/workflows/build.yml` |
| 30 | +- `.github/workflows/check-themes.yml` |
| 31 | +- Current workflows use older action versions and Node 14, which is a likely area for automation modernization |
| 32 | +- Build workflow is manual (`workflow_dispatch`) and commits generated `docs/` output back to the branch |
| 33 | +- PR validation currently runs only when `themes.json` changes |
| 34 | + |
| 35 | +## Repo Notes |
| 36 | + |
| 37 | +- Local `.codex` file is ignored in `.gitignore` |
| 38 | +- Build workflow currently commits generated files back to the branch after `npm run build` |
| 39 | +- Pull requests touching `themes.json` trigger validation via `npm test` |
| 40 | +- Site pages are generated from Pug in `dev/pug/` |
| 41 | +- Client behavior is implemented in `dev/js/main.js` |
| 42 | +- Styles are authored in SCSS under `dev/scss/` |
| 43 | +- Published site assets live in committed `docs/` |
| 44 | +- Local containerized development is configured to install Node, npm, `jq`, and Nushell |
| 45 | +- The devcontainer also runs `npm ci` automatically, so rebuilds recreate `node_modules` without manual setup |
| 46 | + |
| 47 | +## Architecture Snapshot |
| 48 | + |
| 49 | +- `themes.json` is the single catalog source used by the client and copied to `docs/themes.json` during build |
| 50 | +- The frontend is a mostly static site with a small client-side app that fetches `themes.json`, sorts, filters, and renders cards in the browser |
| 51 | +- Gulp handles Pug compilation, SCSS compilation, Babel transpilation, JS minification, image conversion/copy, and config file copying |
| 52 | +- Images from `images/` are emitted to `docs/assets/img/`; many local screenshots are converted to WebP |
| 53 | +- `scripts/sort_themes.nu` enriches theme entries with `pushed_at`, `stargazers_count`, and `avatar` using GitHub/GitLab/Codeberg APIs or git cloning fallback |
| 54 | + |
| 55 | +## Known Technical Risks |
| 56 | + |
| 57 | +- `dev/js/main.js` has a broken explicit lightbox close path: `removeLightbox` uses `getElementsById`, and the close button does not call the function correctly |
| 58 | +- Theme rendering is intentionally throttled with `444ms` per card, which scales poorly for a catalog of 100+ entries |
| 59 | +- Search/filter logic depends on client-side fetch and has no visible loading or error handling |
| 60 | +- Test coverage is narrow: `tests/themes.check.js` validates only basic key order/types and not richer schema or link/image integrity |
| 61 | +- `dev/config/robots.txt` currently disallows all crawlers, which matters if discoverability or SEO becomes a goal |
| 62 | + |
| 63 | +## Working Agreement For Future Sessions |
| 64 | + |
| 65 | +- Read this file before making assumptions about project state |
| 66 | +- Update this file manually when there are relevant decisions, branch changes, automation updates, or persistent blockers |
| 67 | +- Keep entries concise and durable; avoid transient noise |
| 68 | +- Future agents should create a commit and push after implementing relevant changes or new functionality so work stays traceable and reversible |
| 69 | +- Future agents must not merge without explicit user authorization |
| 70 | +- Future agents must not take actions that could affect the production main branch without explicit user authorization |
0 commit comments