From 3b89eefa73fa384aade775a65e327f1cdcb455cb Mon Sep 17 00:00:00 2001 From: Amirhossein Khalili Date: Sat, 26 Sep 2026 22:21:33 +0330 Subject: [PATCH] docs: record approved website redesign plan --- tasks/baseline-2026-09-24.md | 44 + tasks/build-content-line-ledger.ps1 | 52 + tasks/bundle0-review.md | 44 + tasks/cms-api-contract-draft.md | 73 + .../concepts/assets/Vazirmatn-variable.woff2 | Bin 0 -> 111152 bytes tasks/concepts/assets/event-algorithms.webp | Bin 0 -> 52014 bytes tasks/concepts/assets/event-docker.webp | Bin 0 -> 22666 bytes tasks/concepts/assets/event-git.webp | Bin 0 -> 22580 bytes tasks/concepts/assets/favicon.ico | Bin 0 -> 144230 bytes tasks/concepts/d-component-map.md | 18 + tasks/concepts/d-logo-led-about.html | 27 + tasks/concepts/d-logo-led-home.html | 52 + tasks/concepts/d-logo-led.css | 18 + tasks/concepts/d-lucide-icons.svg | 12 + tasks/content-inventory.md | 73 + tasks/content-source-lines.csv | 209 ++ tasks/evidence/2026-09-24/.gitignore | 1 + tasks/evidence/2026-09-24/about-1440.png | Bin 0 -> 322330 bytes tasks/evidence/2026-09-24/about-320.png | Bin 0 -> 319819 bytes tasks/evidence/2026-09-24/about-390.png | Bin 0 -> 336310 bytes tasks/evidence/2026-09-24/about-768.png | Bin 0 -> 312429 bytes tasks/evidence/2026-09-24/admin-390.png | Bin 0 -> 161175 bytes tasks/evidence/2026-09-24/auth-390.png | Bin 0 -> 122356 bytes .../2026-09-24/backend-focused-tests.txt | 1701 +++++++++++++++++ tasks/evidence/2026-09-24/blog-390.png | Bin 0 -> 242207 bytes tasks/evidence/2026-09-24/events-390.png | Bin 0 -> 73774 bytes tasks/evidence/2026-09-24/home-1440.png | Bin 0 -> 176530 bytes tasks/evidence/2026-09-24/home-320.png | Bin 0 -> 164421 bytes tasks/evidence/2026-09-24/home-390.png | Bin 0 -> 161175 bytes tasks/evidence/2026-09-24/home-768.png | Bin 0 -> 172386 bytes tasks/evidence/2026-09-24/local-replay.md | 29 + .../2026-09-24/test-rerun-2026-09-26.md | 12 + tasks/plan.md | 70 + tasks/product-review.md | 32 + tasks/todo.md | 82 + 35 files changed, 2549 insertions(+) create mode 100644 tasks/baseline-2026-09-24.md create mode 100644 tasks/build-content-line-ledger.ps1 create mode 100644 tasks/bundle0-review.md create mode 100644 tasks/cms-api-contract-draft.md create mode 100644 tasks/concepts/assets/Vazirmatn-variable.woff2 create mode 100644 tasks/concepts/assets/event-algorithms.webp create mode 100644 tasks/concepts/assets/event-docker.webp create mode 100644 tasks/concepts/assets/event-git.webp create mode 100644 tasks/concepts/assets/favicon.ico create mode 100644 tasks/concepts/d-component-map.md create mode 100644 tasks/concepts/d-logo-led-about.html create mode 100644 tasks/concepts/d-logo-led-home.html create mode 100644 tasks/concepts/d-logo-led.css create mode 100644 tasks/concepts/d-lucide-icons.svg create mode 100644 tasks/content-inventory.md create mode 100644 tasks/content-source-lines.csv create mode 100644 tasks/evidence/2026-09-24/.gitignore create mode 100644 tasks/evidence/2026-09-24/about-1440.png create mode 100644 tasks/evidence/2026-09-24/about-320.png create mode 100644 tasks/evidence/2026-09-24/about-390.png create mode 100644 tasks/evidence/2026-09-24/about-768.png create mode 100644 tasks/evidence/2026-09-24/admin-390.png create mode 100644 tasks/evidence/2026-09-24/auth-390.png create mode 100644 tasks/evidence/2026-09-24/backend-focused-tests.txt create mode 100644 tasks/evidence/2026-09-24/blog-390.png create mode 100644 tasks/evidence/2026-09-24/events-390.png create mode 100644 tasks/evidence/2026-09-24/home-1440.png create mode 100644 tasks/evidence/2026-09-24/home-320.png create mode 100644 tasks/evidence/2026-09-24/home-390.png create mode 100644 tasks/evidence/2026-09-24/home-768.png create mode 100644 tasks/evidence/2026-09-24/local-replay.md create mode 100644 tasks/evidence/2026-09-24/test-rerun-2026-09-26.md create mode 100644 tasks/plan.md create mode 100644 tasks/product-review.md create mode 100644 tasks/todo.md diff --git a/tasks/baseline-2026-09-24.md b/tasks/baseline-2026-09-24.md new file mode 100644 index 0000000..ced8b1f --- /dev/null +++ b/tasks/baseline-2026-09-24.md @@ -0,0 +1,44 @@ +# Bundle 0 flow, accessibility and performance baseline + +Captured 2026-09-24 with the current Next.js 15 frontend, Playwright Chromium, and local production build. Viewports: 320×800, 390×844, 768×900 and 1440×900 CSS pixels. The backend at `127.0.0.1:8000` was not running for this initial capture; a backend-backed replay followed on 2026-09-25 below. Screenshots in [`evidence/2026-09-24/`](evidence/2026-09-24/) are full-page browser captures, not design comps. + +## Route and state map + +| Journey | Current route/transition | States to preserve and replay | +| --- | --- | --- | +| Visitor/association | `/` → `/about`, `/events`, `/blog` | Home/About render and responsive shell; external contact links | +| Auth | `/auth` mobile lookup → existing user password or OTP login; new user OTP → registration details → profile/return; `/auth/google/callback`; `/verify-email/[token]`; `/reset-password` → `/reset-password/[token]`; `/logout` | Invalid mobile, expired/incorrect OTP, resend cooldown, duplicate submit, Google failure, expired reset, protected redirect | +| Event | `/events` search/filter → `/events/[slug]` → free registration `/events/[slug]/success` or paid gateway → `/payments/result` | Open, full, closed, already registered, ineligible, invalid coupon, payment pending/success/failure/canceled, callback replay | +| Blog | `/blog` banners/search/category/tag/author → `/blog/[slug]` | Empty/failure, long article, media fallback, comments/interactions and share | +| Staff | `/admin` → dashboard, events, users, taxonomy, coupons, authorizations, blog editor/review/assets | Anonymous redirect, role denial, save conflict, validation, successful edit/publish, mobile table/form navigation | + +## Browser evidence + +| Page | Captures | Observed behavior | +| --- | --- | --- | +| Home | `home-320.png`, `home-390.png`, `home-768.png`, `home-1440.png` | Loads with current identity/CTA. At 390px the fixed mobile navigation overlays the first offering card while scrolling; record for later shell work. | +| About | `about-320.png`, `about-390.png`, `about-768.png`, `about-1440.png` | Loads with static statistics, affiliations and contacts. The long page contains no `
` landmark. | +| Auth | `auth-390.png` | Mobile entry screen loads. OTP/login success requires a working auth backend and test account. | +| Events | `events-390.png` | Listing displays `رویدادی یافت نشد` when its API request fails, which looks like a real empty catalog. Browser console has `ERR_CONNECTION_REFUSED` to `127.0.0.1:8000/api/events/`. Registration states cannot be replayed from this environment. | +| Blog | `blog-390.png` | Listing shell loads; API requests fail and a mock banner is visible. Post navigation and interactions need backend fixtures. | +| Staff | `admin-390.png` | Anonymous `/admin` redirects to `/`. Authorized staff walkthrough requires a test account. | + +Screenshots were inspected for page identity and nonblank content. The route screenshots listed above are the accepted current-site baseline; screenshots of rejected concept drafts are not part of that baseline. + +## Measured baseline + +`npm run build` passed on 2026-09-24. Its First Load JS report (production build, compressed route estimate): shared **102 kB**, Home **107 kB**, About **103 kB**, Auth **163 kB**, Events listing **124 kB**, Event detail **469 kB**, Blog listing **141 kB**, Blog detail **469 kB**, Admin dashboard **302 kB**, Admin event editor **727 kB**, Payment result **613 kB**. The build emitted existing `no-img-element` warnings and an ESLint plugin detection warning; it also logged API connection refusal during static page generation. + +`npm run lint` exited successfully with 14 existing `no-img-element` warnings and no errors. A focused backend baseline command, `.venv/Scripts/python.exe manage.py test apps.users.tests apps.events.tests apps.payments.tests --settings=config.settings.test`, was started and stopped after repeated failures reaching the notification store at `127.0.0.1:6379`. Docker Desktop's engine was unavailable, so Redis could not be started locally. This test run has **no passing-suite result**; rerun it with an isolated Redis service for the flow gate. + +At 390px in one local Chromium production run, Home navigation duration was **554 ms** and first contentful paint **424 ms**; About was **173 ms** and **204 ms**. These are local machine observations, not network performance targets or p75 Web Vitals. Both pages had one `

`, no horizontal overflow, and zero `` elements missing an `alt` attribute. Home had one `
` landmark; About had none. The desktop and 320px screenshots establish layout comparison points. No automated WCAG score is claimed; a full axe/keyboard/screen-reader audit remains part of the release gate. + +## Manual replay status and next gate + +At the initial capture, completed: Home/About rendering at four widths; auth entry; unauthenticated admin redirect; event API failure display; blog shell with backend unavailable. The backend-backed journeys were pending at that point. Do not infer a business-rule change from the initial frontend-only failure state. + +## Follow-up with Redis and isolated backend, 2026-09-25 + +The owner started a Redis container on port 6379. The local backend and frontend then ran against an isolated SQLite test database and disposable fixtures. See the [local journey replay](evidence/2026-09-24/local-replay.md) for auth, free/full/paid event, blog, staff, and failure-state evidence. The event integration suite passed 25 tests. The broader users/events/payments test run executed 148 tests with 89 errors from stale test fixtures/patch targets; its [raw log](evidence/2026-09-24/backend-focused-tests.txt) is preserved. `manage.py check` passed. + +The core browser flows are now captured. External SMS delivery, Google OAuth, and a live payment gateway were deliberately replaced with safe local mocks or left for staging. The baseline also found a countdown hydration mismatch and a notification stream-token 405. The owner accepted this baseline with its then-current limitations in `bundle0-review.md` on 2026-09-26, closing T02 and Checkpoint A at discovery scope. On 2026-09-26, the repository's current pytest suites passed: 79 unit and 158 integration tests. See [the rerun record](evidence/2026-09-24/test-rerun-2026-09-26.md). The original 148-test/89-error run remains historical evidence; the external SMS, OAuth, and live gateway paths remain untested. diff --git a/tasks/build-content-line-ledger.ps1 b/tasks/build-content-line-ledger.ps1 new file mode 100644 index 0000000..3410c19 --- /dev/null +++ b/tasks/build-content-line-ledger.ps1 @@ -0,0 +1,52 @@ +# Rebuild the line-level source ledger for the static public-content files. +# Run from any directory: pwsh -File tasks/build-content-line-ledger.ps1 +$frontend = (Resolve-Path (Join-Path $PSScriptRoot '../../guilan-ace-frontend')).Path +$sources = @( + 'src/views/Home.tsx', + 'src/views/AboutUs.tsx', + 'src/components/Navbar.tsx', + 'src/components/Footer.tsx', + 'src/components/MobileBottomNav.tsx', + 'src/app/page.tsx', + 'src/app/about/page.tsx', + 'src/app/layout.tsx', + 'src/app/events/page.tsx', + 'src/app/blog/page.tsx' +) + +$rows = foreach ($source in $sources) { + $lineNumber = 0 + foreach ($line in [System.IO.File]::ReadAllLines((Join-Path $frontend $source))) { + $lineNumber++ + if ($line -notmatch '[\u0600-\u06FF]|https?://|favicon\.ico|enamad\.png') { continue } + + $category = 'CMS editorial' + $note = '' + if ($line -match 'schema\.org|contactType|availableLanguage') { + $category = 'code-owned UI' + $note = 'Schema structure or vocabulary; referenced identity values remain editorial.' + } elseif ($source -match 'Navbar|MobileBottomNav') { + if ($line -match 'auth|profile|reset-password|logout|admin|ورود|ثبت‌نام|حساب|داشبورد|پروفایل|رمز|خروج|منوی') { + $category = 'code-owned UI' + } + } elseif ($source -eq 'src/views/Home.tsx') { + if ($line -match 'aria-label|