ReviewOS

also looking at this

stacks/lastsoulultra

LSU's own coaching surface, and what auditing the site turned up

#12
Merged glennmichael123 wants to merge claude/last-soul-ultra-web-6e0718 into main
86 files +3943 -1190

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

tests/coaching-views.test.tsmodified+2-1
Changes to tests/coaching-views.test.ts
@@ -2,6 +2,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'bun:test'
22import { resolve } from 'node:path'
33import { processDirectives } from '@stacksjs/stx'
44import { coachingModules } from '../resources/data/coaching'
5import { absolute } from '../resources/data/site'
56import { coachingOrigin, forgetBrand } from '../resources/functions/coaching-source'
67
78/**
@@ -54,7 +55,7 @@ describe('a module route, with a brand published', () => {
5455
5556 expect(html).toContain(`<title>${module.title} - Last Soul Ultra coaching</title>`)
5657 expect(html).toContain(`content="${module.summary}"`)
57 expect(html).toContain(`rel="canonical" href="https://lastsoulultra.com/coaching/${module.slug}"`)
58 expect(html).toContain(`rel="canonical" href="${absolute(`/coaching/${module.slug}`)}"`)
5859 }
5960 })
6061
tests/questions.test.tsmodified+5-1
Changes to tests/questions.test.ts
@@ -1,6 +1,7 @@
11import { describe, expect, it } from 'bun:test'
22import { resolve } from 'node:path'
33import { processDirectives } from '@stacksjs/stx'
4import { absolute } from '../resources/data/site'
45
56/**
67 * /contact and /faq are the same page under two published URLs. They used to
@@ -41,7 +42,10 @@ describe('the questions page', () => {
4142 })
4243
4344 it('canonicalises both to /contact', async () => {
45 // Built from APP_URL rather than written out: CI materialises a .env from
46 // .env.example, where APP_URL is stacks.localhost, so a hard-coded
47 // production origin passes on a laptop and fails on a runner.
4448 for (const view of ['contact', 'faq'])
45 expect(await render(view)).toContain('rel="canonical" href="https://lastsoulultra.com/contact"')
49 expect(await render(view)).toContain(`rel="canonical" href="${absolute('/contact')}"`)
4650 })
4751})