diff --git a/docs/CURRENT_STATE.md b/docs/CURRENT_STATE.md index c2447db..cfe544c 100644 --- a/docs/CURRENT_STATE.md +++ b/docs/CURRENT_STATE.md @@ -23,3 +23,5 @@ Only the inherited starter is available; BortStack page implementation has not b BS-001 implementation/manual testing accepted by Captain on 2026-11-10. Captain explicitly authorized commit/merge; BS-001 is Complete under that integration order. Captain authorized BS-002 through BS-004 engagement as a group; task-specific briefs follow in their isolated branches. BS-005 onward remain Proposed. The previously reported missing testtask hook is resolved. ChatGPT ZIP snapshot interface reconciled with PitchInvader: `./scripts/create-chatgpt-snapshot.sh`, no arguments, exports the current checkout to `snapshots/bortstack-chatgpt-DATE-COMMIT.zip`. Available in integration root scripts/ and task scripts/. This is separate from testtask’s internal runtime copy. Root export includes integration-checkout content; run in task worktree to export unmerged BS-001 content. Git, dependencies, task/test worktrees, credentials/environment files, keys and databases excluded. + +BS-002 candidate: public routes/navigation now implemented without AuthProvider or public account routes. Unfinished pages are marked/noindex. Lint, 26 unit tests, Vite build, desktop/mobile route/navigation and targeted axe checks passed; 10 inherited npm audit alerts recorded without dependency changes. Separate bs-002 candidate awaiting review; codex remains BS-001. diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 3a1a1cf..ff91935 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -1,36 +1,11 @@ # BortStack handoff -Replaceable supplementary snapshot, 2026-11-10. Captain explicitly ordered operational testtask after the initialization report. This extends BS-001 tooling validation only; Captain subsequently authorized BS-001 commit/merge and engagement of BS-002 through BS-004. +Replaceable supplementary snapshot, 2026-11-10. BS-001 Complete and merged into codex at 5226596. Captain engaged BS-002–004 as a dependent group; no group merge/push/deploy authorized. -## Candidate +BS-002 branch/worktree: bs-002 at .task-worktrees/bs-002, based on codex. Public route shell replaces mounted account UI/AuthProvider; backend/inherited standalone account components retained. Approved primary links and honest noindex placeholders implemented. Contact submission is not exposed before BS-007. Local commit prepared as prerequisite for BS-003. -Branch bs-001; worktree `/home/rob/projects/bortstack/.task-worktrees/bs-001`; base codex/1ec90a0. Snapshot prepared for authorized BS-001 commit/merge. Integration checkout receives maintained scripts/testtask.sh dispatcher. Root executable removed; canonical interface is scripts/testtask.sh. BS-001 commit/merge authorized; no push/deployment. +Validation: lint, 26 unit tests, production build passed. Browser checks: 20 route/mobile checks passed, two automated contrast checks caught navbar inheritance; corrected variant and both passed on rerun. No public API session requests. 10 inherited npm audit alerts; no package changes. Backend unchanged, suites not rerun. -## Run from project folder +Next: BS-003 themes/branding, then BS-004 homepage, each isolated from prior task commit. BS-005+ untouched. Master logo and authentic project media missing: use explicitly marked placeholders. Final static SEO/legal/contact content remain later scope. -```bash -./scripts/testtask.sh 001 -# or ./scripts/testtask.sh TASK-001 -``` - -Default Firefox; terminal remains running. URL http://127.0.0.1:18081/. Ctrl-C stops browser and removes owned task containers/network. Docker images cached; owned snapshot retained for inspection and refreshed on rerun. First build downloads dependencies. Requires installed roborto-testtask, Docker/Compose permissions, Git/Python/flock/Firefox and graphical desktop. See TESTTASK.md. - -Snapshot script is `scripts/create-test-snapshot.py` inside the task worktree; testtask invokes it automatically. It copies exact Git-listed working state including permitted untracked files, excludes local/secret artifacts, verifies hashes, rejects symlinks and refuses replacing unowned snapshots. Source is the task worktree; `.test-worktrees/task-001` is a test-only copy, never development authority. Session lock prevents concurrent refresh. Runtime builds solely from snapshot with disposable SQLite tmpfs, closed registration and email disabled. No SWAG or production configuration. - -## Validation - -Original generation structural validator, source-preservation audit, context validator (zero warnings), shell syntax, tracked whitespace and inherited production Compose config passed. Docker testtask smoke passed build (including Vite production build), migrations, frontend/direct+proxied API HTTP readiness and real headless Firefox startup; engine reached ready and exited 0. Confirmed owned containers/network absent afterward. Snapshot fixture tests proved untracked inclusion, changed-content refresh, deleted-file removal, .env exclusion and full source/snapshot hash equality; concurrent snapshot refused during runtime. Unit/lint/full browser regression suites not run. Captain confirmed acceptance with “task complete” on 2026-11-10. - -Initial smoke trials found port-readiness and nginx/API ordering races; corrected by explicit HTTP readiness before browser startup and API-before-web dependency. Previous missing hook blocker is resolved; stale blocker notes in original source materials are historical. - -## Review gate - -BS-001 implementation/manual testing accepted by Captain on 2026-11-10. Captain explicitly authorized BS-001 commit/merge on 2026-11-10; BS-001 marked Complete for this integration. Final repeatability run from the project root using `./scripts/testtask.sh TASK-001` also reached ready and exited 0; numeric `001` succeeded in the preceding run. BS-002–004 are authorized as a dependent implementation group, with separate local commits/worktrees and no merge or deployment before review; BS-005+ remain Proposed. Missing authentic brand masters/portfolio media and unverified domain/email/legal/hosting remain product blockers. No redesign or API Admin integration. - -ChatGPT ZIP snapshot interface reconciled with PitchInvader: `./scripts/create-chatgpt-snapshot.sh`, no arguments, exports the current checkout to `snapshots/bortstack-chatgpt-DATE-COMMIT.zip`. Available in integration root scripts/ and task scripts/. This is separate from testtask’s internal runtime copy. Root export includes integration-checkout content; run in task worktree to export unmerged BS-001 content. Git, dependencies, task/test worktrees, credentials/environment files, keys and databases excluded. - -## Captain acceptance and cleanup - -Captain confirmed task complete on 2026-11-10. Recorded manual acceptance; a subsequent explicit order authorizes BS-001 commit/merge and BS-002–004 engagement. Checked and cleaned up remaining task-owned Docker resources using the isolated Compose project only. Preserve the accepted BS-001 worktree for traceability during authorized integration. - -Full staged whitespace audit found pre-existing trailing whitespace in inherited template code and preserved source-handoff Markdown hard breaks. These were retained to avoid unrelated source changes; the new snapshot-script whitespace was corrected. +Manual test from integration root: ./scripts/testtask.sh TASK-002. Isolated Docker runtime and snapshot tooling inherited from BS-001. Captain acceptance still pending. diff --git a/docs/TASKS.md b/docs/TASKS.md index de61b6d..0e4a210 100644 --- a/docs/TASKS.md +++ b/docs/TASKS.md @@ -46,3 +46,15 @@ BS-002 brief should include removing public account/navigation coupling and esta ## Lifecycle Proposed → Accepted/scoped → In progress → Implementation-ready → Captain/manual acceptance and authorized integration → Complete. No automatic continuation, commit, merge or deployment. Run appropriate checks, refresh context and test snapshots, then request Captain review. Missing logos block final branding; missing screenshots/permissions block portfolio publication; unverified domain/email/legal/hosting block launch. + +## BS-002 — Public frontend route shell + +Status: Implementation-ready; Captain review pending. Accepted by Captain’s group engagement on 2026-11-10. +Objective: public marketing routes/navigation independent of inherited authentication. +Scope: public router, header/footer, honest placeholders, site description, route/navigation tests. +Non-goals: page content for BS-005+, contact submission, backend account deletion, final SEO/prerendering, brand/homepage implementation. +Acceptance: approved public paths and case-study path load directly; primary navigation contains Services/Projects/About/Contact; mobile navigation closes on selection; no public login/register/dashboard or AuthProvider/API session dependency; unfinished pages clearly marked and noindex; no invented logo/email/portfolio claims. +Validation: frontend unit suite/lint/build; route, mobile and auth-absence browser checks. No backend behavior changed. +Dependencies: BS-001 merged at 5226596. Review base codex; branch bs-002, worktree .task-worktrees/bs-002. Dedicated local task commit forms the base for BS-003; no group merge authorization. + +BS-002 validation: ESLint passed; 26 unit tests passed; Vite production build passed; 20 desktop/mobile browser checks passed initially, then both contrast failures were fixed and passed on targeted rerun. No account API requests on public routes. npm audit reported 10 inherited alerts (5 moderate/3 high/2 critical); lockfile unchanged. diff --git a/react/e2e/public-shell.spec.js b/react/e2e/public-shell.spec.js index c82c516..c6efe04 100644 --- a/react/e2e/public-shell.spec.js +++ b/react/e2e/public-shell.spec.js @@ -1,66 +1,39 @@ import AxeBuilder from '@axe-core/playwright' import { expect, test } from '@playwright/test' -const publicPages = [ - ['/', 'Build your application from here'], - ['/contact', 'Contact'], - ['/privacy', 'Privacy policy'], - ['/terms', 'Terms of service'], - ['/login', 'Login'], - ['/register', 'Register'], - ['/forgot-password', 'Reset password'], -] - -for (const [path, heading] of publicPages) { - test(`${path} renders without horizontal overflow`, async ({ page }) => { +for (const [path, heading] of [ + ['/', 'Software development for real-world needs'], ['/services', 'Services'], + ['/projects', 'Projects'], ['/projects/example', 'Project details'], + ['/about', 'About BortStack'], ['/contact', 'Contact'], ['/privacy', 'Privacy policy'], + ['/login', 'Page not found'], ['/dashboard', 'Page not found'], +]) { + test(`${path} renders without overflow or auth requests`, async ({ page }) => { + const errors = [] + const accountRequests = [] + page.on('pageerror', error => errors.push(error.message)) + page.on('request', request => { if (/\/api\//.test(request.url())) accountRequests.push(request.url()) }) await page.goto(path) await expect(page.getByRole('heading', { name: heading, exact: true })).toBeVisible() - const dimensions = await page.locator('html').evaluate((element) => ({ - viewport: element.clientWidth, - content: element.scrollWidth, - })) - expect(dimensions.content).toBeLessThanOrEqual(dimensions.viewport) + expect(await page.locator('html').evaluate(el => el.scrollWidth <= el.clientWidth)).toBe(true) + expect(errors).toEqual([]) + expect(accountRequests).toEqual([]) }) } -test('public shell passes automated accessibility diagnostics', async ({ page }) => { - await page.goto('/contact') - const results = await new AxeBuilder({ page }).analyze() - expect(results.violations).toEqual([]) -}) - -test('skip link is the first keyboard navigation target', async ({ page }) => { +test('public shell has accessible landmarks and first keyboard skip link', async ({ page }) => { await page.goto('/') await page.keyboard.press('Tab') - const skipLink = page.getByRole('link', { name: 'Skip to main content' }) - await expect(skipLink).toBeFocused() - await expect(skipLink).toHaveAttribute('href', '#main-content') + await expect(page.getByRole('link', { name: 'Skip to main content' })).toBeFocused() + await expect(page.getByRole('main')).toHaveCount(1) + expect((await new AxeBuilder({ page }).analyze()).violations).toEqual([]) }) -test('mobile navigation expands and exposes public destinations', async ({ page, isMobile }) => { - test.skip(!isMobile, 'mobile navigation diagnostic') +test('navigation works and closes on mobile selection', async ({ page, isMobile }) => { await page.goto('/') - await page.getByRole('button', { name: 'Toggle navigation' }).click() - await expect(page.getByRole('link', { name: 'Contact', exact: true }).first()).toBeVisible() - await expect(page.getByRole('link', { name: 'Login', exact: true })).toBeVisible() -}) - -test('contact form reports mocked delivery success', async ({ page }) => { - await page.route('**/api/contact', async (route) => { - await route.fulfill({ status: 200, contentType: 'application/json', body: '{"success":true}' }) - }) - await page.goto('/contact') - await page.getByLabel('Name').fill('Example Person') - await page.getByLabel('Email').fill('person@example.com') - await page.getByLabel('Subject').fill('A useful question') - await page.getByLabel('Message').fill('This message is long enough to be accepted.') - await page.getByRole('button', { name: 'Send message' }).click() - await expect(page.getByRole('status')).toContainText('message has been sent') -}) - -test('protected dashboard with no session does not expose its content', async ({ page }) => { - await page.goto('/dashboard') - await expect(page.getByRole('heading', { name: 'Unauthorized' })).toBeVisible() - await expect(page.getByText('Protected application workspace')).toHaveCount(0) - await expect(page.locator('meta[name="robots"]')).toHaveAttribute('content', 'noindex, nofollow') + const navigation = page.getByRole('navigation', { name: 'Main navigation' }) + if (isMobile) await page.getByRole('button', { name: 'Toggle navigation' }).click() + await navigation.getByRole('link', { name: 'Services', exact: true }).click() + await expect(page.getByRole('heading', { name: 'Services', exact: true })).toBeVisible() + if (isMobile) await expect(page.getByRole('button', { name: 'Toggle navigation' })).toHaveAttribute('aria-expanded', 'false') + await expect(page.getByRole('link', { name: /login|register|dashboard/i })).toHaveCount(0) }) diff --git a/react/index.html b/react/index.html index e4a64ee..63d89d9 100644 --- a/react/index.html +++ b/react/index.html @@ -3,7 +3,7 @@
- +