Commit Graph

56 Commits

Author SHA1 Message Date
codex_a
1c7b96f723 feat: implement Tailwind CSS styling based on wireframe design
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m24s
CI / pr-e2e (pull_request) Failing after 3m21s
- Add brand colours, fonts (Space Grotesk/Inter/Fira Code), box shadows to tailwind.config.js
- Add bg-grid-pattern, text-gradient, scrollbar, selection styles to input.css
- Add Google Fonts link and dark-mode body classes to base.html
- Style nav, footer, cookie banner, newsletter form components
- Style homepage: featured article, 12-col editorial grid, sidebar widgets
- Style article list: header, tag filters, horizontal article cards, pagination
- Style article page: hero header, prose body, share sidebar, related cards, comments
- Style code blocks and callout blocks
- CSS output grows from 4.8KB to 24KB with all brand utilities compiled

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-01 10:02:23 +00:00
codex_a
349f1db721 fix: auto-set Wagtail site hostname from ALLOWED_HOSTS on startup
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m15s
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 21:54:27 +00:00
de56b564c5 Merge pull request 'feat: production deploy pipeline' (#15) from feat/deploy-pipeline into main
Some checks failed
CI / ci (push) Has been skipped
CI / pr-e2e (push) Has been skipped
CI / nightly-e2e (push) Has been skipped
CI / deploy (push) Failing after 1s
2026-02-28 21:50:04 +00:00
codex_a
833ff378ea fix: use entrypoint script for prod container startup
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m15s
YAML folded block scalar (>) was preserving newlines for more-indented
continuation lines, so gunicorn received no arguments and defaulted to
binding on 127.0.0.1:8000. Replace with an explicit entrypoint script
so all args are passed correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 21:47:02 +00:00
codex_a
754b0ca5f6 fix: set build context to app/ in prod compose
The compose file lives in /srv/sum/nohype/ while the code is in
/srv/sum/nohype/app/ so the Dockerfile is at app/Dockerfile.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 21:42:06 +00:00
03fcbdb5ad Merge pull request 'feat: production deploy pipeline' (#14) from feat/deploy-pipeline into main
Some checks failed
CI / ci (push) Has been skipped
CI / pr-e2e (push) Has been skipped
CI / nightly-e2e (push) Has been skipped
CI / deploy (push) Failing after 5s
Reviewed-on: #14
2026-02-28 21:40:03 +00:00
codex_a
0cbac68ec1 feat: add production deploy pipeline and fix dev CSS
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m23s
Dev:
- Add tailwind install + build to docker-compose startup so CSS is built
  inside the container — not dependent on local filesystem

Production (docker-compose.prod.yml):
- Gunicorn on 127.0.0.1:8001, bind-mounted static/media to host paths
  so Caddy can serve them directly
- Runs migrate, tailwind build, collectstatic on startup

Settings (production.py):
- Disable SECURE_SSL_REDIRECT (Caddy handles redirects; Django would loop)
- Add CSRF_TRUSTED_ORIGINS for nohypeai.net

CI (.gitea/workflows/ci.yml):
- Add push-to-main trigger
- Add deploy job: SSHes to lintel-prod-01 as deploy, runs deploy/deploy.sh

Server config (deploy/):
- deploy/caddy/nohype.caddy — Caddy site config for nohypeai.net
- deploy/sum-nohype.service — systemd unit for the compose stack
- deploy/deploy.sh — deploy script (pull, build, restart)

One-time manual steps required on lintel-prod-01 (need root):
  sudo cp deploy/sum-nohype.service /etc/systemd/system/
  sudo cp deploy/caddy/nohype.caddy /etc/caddy/sites-enabled/
  sudo systemctl daemon-reload && sudo systemctl enable sum-nohype
  sudo systemctl reload caddy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 21:34:13 +00:00
4c27cfe1dd Merge pull request 'fix: make docker compose up work out of the box' (#13) from fix/dev-setup into main
Reviewed-on: #13
2026-02-28 21:00:10 +00:00
codex_a
a598727888 fix: fix all dev static/media serving issues
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m22s
- Remove WhiteNoise from MIDDLEWARE in development: it intercepts /static/
  requests and serves from STATIC_ROOT, which is empty without collectstatic.
  Django's runserver serves static files natively with DEBUG=True.
- Switch to StaticFilesStorage in dev: no manifest required.
- Add media URL pattern in DEBUG mode: runserver does not serve MEDIA_ROOT
  automatically, so uploaded images were 404ing in local dev.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:57:54 +00:00
36eb0f1dd2 Merge pull request 'fix: use plain StaticFilesStorage in dev settings' (#10) from fix/seed-default-site into main
Reviewed-on: #10
2026-02-28 20:48:44 +00:00
codex_a
f950e3cd5e fix: use plain StaticFilesStorage in dev settings
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m24s
CompressedManifestStaticFilesStorage requires collectstatic to generate a
manifest before it can serve anything. Dev containers never run collectstatic
so every static asset 404s. Override to StaticFilesStorage in dev so Django
serves files directly from STATICFILES_DIRS and app static directories.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:46:23 +00:00
311ad80320 Merge pull request 'fix: update ALL site records in seed, not just is_default_site' (#9) from fix/seed-default-site into main
Reviewed-on: #9
2026-02-28 20:42:24 +00:00
codex_a
08e003e165 fix: update ALL site records in seed, not just is_default_site
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m22s
Wagtail's initial migration creates a localhost:80 site. Wagtail matches
incoming requests by hostname before ever checking is_default_site, so
updating only the is_default_site record left localhost:80 still pointing
at the Welcome page. Fix by updating root_page on every site.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:40:20 +00:00
076aaa0b9e Merge pull request 'fix: update existing default site in seed command' (#8) from fix/seed-default-site into main
Reviewed-on: #8
2026-02-28 20:35:15 +00:00
codex_a
7b2ad4cfe5 fix: remove server-specific playwright volume from dev compose, auto-seed on startup
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m6s
CI / ci (pull_request) Successful in 1m23s
- /opt/playwright-tools/browsers only exists on agent-workspace; mounting it
  in docker-compose.yml breaks local dev for everyone else
- seed_e2e_content is idempotent so safe to run on every startup; removes the
  manual step that nobody knew about

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:33:40 +00:00
codex_a
56e53478ea fix: update existing default site in seed command instead of hardcoding 127.0.0.1
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m10s
CI / ci (pull_request) Successful in 1m22s
Wagtail initialises the default site with hostname 'localhost'. The previous
get_or_create on '127.0.0.1' left the localhost site intact (still pointing
to the Welcome page), so browsers got the wrong root page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:31:20 +00:00
96f9eca19d Merge pull request 'feat: comprehensive Playwright E2E test suite' (#7) from tests/e2e into main
Reviewed-on: #7
2026-02-28 20:25:29 +00:00
codex_a
f6edcadd46 fix: run E2E tests properly with mounted browsers and real postgres
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m33s
CI / ci (pull_request) Successful in 2m18s
- Mount /opt/playwright-tools/browsers into web container (docker-compose.yml
  and CI docker run) — never download browsers, use the ones on this host
- Set PLAYWRIGHT_BROWSERS_PATH in all container envs (compose + CI)
- Drop 'playwright install chromium' steps from pr-e2e and nightly-e2e jobs
- Bump playwright requirement to ~1.57.0 to match the installed browser builds
- Fix seed_e2e_content: de-duplicate default Site entries left by unit test
  fixtures so Wagtail always routes to the seeded home page
- Fix test_comments_section_absent_when_disabled: use exact=True on heading
  locator to avoid matching 'No Comments Article' h1 as 'Comments' heading
- Fix test_copy_link_button_updates_text: use [data-copy-link] data-attr
  locator (stable across text change) and force-override clipboard.writeText
  via page.evaluate() rather than relying on init_script polyfill

E2E suite verified locally: 34 passed via docker compose exec

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:20:18 +00:00
codex_a
4992b0cb9d fix: resolve 5 E2E test failures from first CI run
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m22s
CI / pr-e2e (pull_request) Failing after 1m32s
- test_homepage_title_contains_brand: to_have_title() requires a string or
  regex, not a lambda; switch to re.compile('No Hype AI')
- test_granular_preferences_save_dismisses_banner: wrong element clicked to
  open <details>; use 'details summary' locator directly
- test_subscribe_invalid_email_shows_error: browser HTML5 email validation
  swallows the submit event before the JS handler fires; add 'novalidate' via
  evaluate() so the fetch still runs and the server returns 400
- test_copy_link_button_updates_text: clipboard API unavailable in headless
  Docker; add polyfill + pre-grant permissions in conftest page fixture so
  the JS success path runs and button text becomes 'Copied'
- test_comments_section_absent_when_disabled: guard against Wagtail's
  add_child() resetting BooleanField defaults by calling an explicit
  .update(comments_enabled=False) + re-setting on the instance before
  save_revision().publish(); also tighten test to assert 200 + correct title

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 19:47:13 +00:00
codex_a
9d323d2040 feat: add comprehensive Playwright E2E test suite
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m22s
CI / pr-e2e (pull_request) Failing after 3m28s
- Create e2e/ directory with 7 test modules covering:
  - Home page: title, nav links, theme toggle, newsletter form
  - Cookie consent: accept all, reject all, granular prefs, persistence
  - Article index: loads, tag filter, click-through navigation
  - Article detail: title/read-time, share section, comments, newsletter aside, related
  - Comments: valid submit → redirect, empty body → error display, disabled check
  - Newsletter: JS confirmation message, invalid email error, aside form, duplicate
  - Feeds: RSS/sitemap/robots.txt validity, tag feed, seeded content present
- Extend seed_e2e_content management command with tagged article, about page,
  no-comments article, and legal pages for richer test coverage
- Add seed command tests (create + idempotency) to keep coverage ≥ 90%
- Add pr-e2e CI job (runs on pull_request): builds image, starts postgres + app,
  installs playwright, runs pytest e2e/
- Update nightly-e2e to run full e2e/ suite alongside legacy journey test
- Add --ignore=e2e to unit-test pytest step (coverage must not include browser tests)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 19:30:43 +00:00
aeb0afb2ea Merge pull request 'Run migrations before starting dev server' (#6) from fix/run-migrations-on-startup into main
Reviewed-on: #6
2026-02-28 19:13:57 +00:00
codex_a
b73a2d4d72 Run migrations before starting dev server
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m21s
Chains 'migrate --noinput' before 'runserver' in the web
service command so migrations are applied automatically on
'docker compose up'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 18:53:32 +00:00
7d226bc4ef Merge pull request 'fix: docker fix' (#5) from fix/docker-apt-retries into main
Reviewed-on: #5
2026-02-28 18:32:29 +00:00
Mark
9b677741cb fix: docker fix
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 3m27s
2026-02-28 18:27:56 +00:00
c5f2902417 Merge pull request 'Harden Docker apt install against transient mirror failures' (#4) from fix/docker-apt-retries into main
Reviewed-on: #4
2026-02-28 18:15:52 +00:00
Mark
5d1c5f43bc Harden Docker apt install with retry logic
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 3m48s
2026-02-28 18:09:24 +00:00
027dff20e3 Merge pull request 'Corrective implementation of implementation.md (containerized Django/Wagtail)' (#3) from codex_b/implementation-e2e into main
Reviewed-on: #3
Reviewed-by: codex_a <codex_a@linteldigital.com>
2026-02-28 17:55:13 +00:00
Mark
c4fde90a9c fix(spec): enforce read-time budget and re-render invalid comment submissions
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m1s
2026-02-28 17:36:34 +00:00
Mark
cfe0cbca62 fix(mypy): work around django-plugin annotate crash in comment viewset
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m20s
2026-02-28 17:21:29 +00:00
Mark
5adff60d4b docs+comments: align plan with gitea PR-only CI and close remaining blockers
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Failing after 20s
2026-02-28 17:17:19 +00:00
Mark
0c9340d279 chore(ci): remove github workflow mirror and use gitea as source
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m1s
2026-02-28 16:49:34 +00:00
Mark
ebddb6c904 fix(ci): validate tailwind output without host bind mount
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m21s
2026-02-28 16:47:58 +00:00
Mark
29e3589b1a fix(ci): avoid docker subnet exhaustion and harden nightly feed check
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Failing after 3m40s
2026-02-28 16:43:20 +00:00
Mark
14db1bb57e fix(ci): address PR blockers and move CI/nightly off sqlite
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Failing after 35s
2026-02-28 16:38:37 +00:00
Codex_B
36ac487cbd Resolve PR review gaps across comments, security, feeds, and UX
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / ci (pull_request) Successful in 48s
2026-02-28 13:47:21 +00:00
Codex_B
932b05cc02 Add performance regression tests for core page flows
All checks were successful
CI / ci (pull_request) Successful in 48s
2026-02-28 13:23:24 +00:00
Codex_B
683cba4280 Complete missing UX flows and production integrity commands
All checks were successful
CI / ci (pull_request) Successful in 32s
2026-02-28 13:20:25 +00:00
Codex_B
2cb1e622e2 Run PR CI via docker build/run without compose networks
All checks were successful
CI / ci (pull_request) Successful in 43s
2026-02-28 13:05:28 +00:00
Codex_B
11b89e9e1c Stabilize PR CI and harden compose startup
Some checks failed
CI / ci (pull_request) Failing after 6s
2026-02-28 13:01:27 +00:00
Codex_B
06be5d6752 CI: isolate compose projects and remove runner container conflicts
Some checks failed
CI / lint (pull_request) Failing after 6s
CI / typecheck (pull_request) Failing after 6s
CI / tests (pull_request) Failing after 8s
2026-02-28 12:56:44 +00:00
Codex_B
ebdf20e708 CI: remove buildx action dependency for runner compatibility
Some checks failed
CI / typecheck (pull_request) Failing after 31s
CI / lint (pull_request) Successful in 2m8s
CI / tests (pull_request) Failing after 2m8s
2026-02-28 12:51:24 +00:00
Codex_B
47e8afea18 CI: use Docker Compose checks for runner compatibility
Some checks failed
CI / typecheck (pull_request) Failing after 2m11s
CI / lint (pull_request) Failing after 2m51s
CI / tests (pull_request) Failing after 2m56s
2026-02-28 12:47:54 +00:00
Codex_B
630c86221f CI: mirror workflow under .gitea/workflows for Gitea Actions
Some checks failed
CI / lint (pull_request) Failing after 6s
CI / tests (pull_request) Failing after 6s
CI / typecheck (pull_request) Failing after 7s
2026-02-28 12:46:43 +00:00
Codex_B
2d2edd8605 Make Docker workflows independent of local .env file
Some checks failed
CI / lint (pull_request) Failing after 6s
CI / tests (pull_request) Failing after 6s
CI / typecheck (pull_request) Failing after 9s
2026-02-28 12:44:41 +00:00
Codex_B
0b5fca3be6 CI: switch to uv with caching and cancel in-progress PR runs
Some checks failed
CI / lint (pull_request) Failing after 12s
CI / tests (pull_request) Failing after 10s
CI / typecheck (pull_request) Failing after 39s
2026-02-28 12:43:40 +00:00
Codex_B
eb2cdfc5f2 Add granular consent preference flow and regression tests
Some checks failed
CI / typecheck (pull_request) Failing after 2m13s
CI / lint (pull_request) Failing after 2m20s
CI / tests (pull_request) Failing after 2m41s
2026-02-28 12:41:26 +00:00
Codex_B
82e6bc2ee0 Add security regression tests for headers, robots and CSRF forms
Some checks failed
CI / typecheck (pull_request) Failing after 2m21s
CI / tests (pull_request) Failing after 3m14s
CI / lint (pull_request) Failing after 3m16s
2026-02-28 12:40:20 +00:00
Codex_B
e279e15c9c Add canonical and social SEO meta tags for core page templates
Some checks failed
CI / typecheck (pull_request) Failing after 2m20s
CI / lint (pull_request) Failing after 3m3s
CI / tests (pull_request) Failing after 3m7s
2026-02-28 12:39:12 +00:00
Codex_B
6fc28f9d9a Implement newsletter double opt-in email flow and CSP nonce headers
Some checks failed
CI / lint (pull_request) Failing after 2m13s
CI / tests (pull_request) Failing after 2m18s
CI / typecheck (pull_request) Failing after 2m39s
2026-02-28 12:37:32 +00:00
Codex_B
ca211c14e9 CI: run lint/typecheck/tests on pull requests only
Some checks failed
CI / typecheck (pull_request) Failing after 2m11s
CI / lint (pull_request) Failing after 2m47s
CI / tests (pull_request) Failing after 2m57s
2026-02-28 12:32:38 +00:00