# fursa-next review — current-state handoff

Written for the engineer who picks this up next.

This is the **current state** only. The full per-pass history, including every
superseded count and the reasoning behind each decision, stays in
[`REVIEW_CHECKLIST.md`](./REVIEW_CHECKLIST.md) and is not restated here.

Measured **2026-10-03**, after the last code edit. Baseline is git `HEAD`
`9c80f10` (committed 2026-09-29 17:13, the day before the review began).

> **Not a production-readiness statement.** No part of this work has been run in
> a browser and only 2 of 120 endpoints have been exercised live. Every
> behavioural claim below is a claim about source, types and mounted-hook tests.
> "Behaviour preserved" is **not** asserted for anything on the browser
> checklist in §4.

---

## 1. Final checks — exact commands and results

Run from `fursa-next/`, in this order, after the last edit.

| # | Command | Exit | Result |
|---|---|---|---|
| 1 | `npx tsc --noEmit` | **0** | no output |
| 2 | `npm run check:lines` | **0** | `All 553 UI files are within 200 lines (largest: 200, src/components/ui/DateField.tsx)` |
| 3 | `npm test` | **0** | `tests 647 / suites 150 / pass 647 / fail 0` |
| 4 | `npx eslint src` | **1** | **`7 problems (5 errors, 2 warnings)` — FAILED** |
| 5 | `npx eslint src --report-unused-disable-directives` | **1** | same 7; **no unused-directive reports** (there are no directives) |
| 6 | `npm run build` | **0** | `✓ Compiled successfully in 7.6s`; `✓ Generating static pages using 9 workers (57/57)` |

**The lint gate is FAILED.** Exit 1, 5 errors. No rule was disabled, downgraded
or reconfigured, and no suppression comment was added — `eslint.config.mjs` is
`eslint-config-next/core-web-vitals` + `/typescript` and nothing else. The 7 are
enumerated in §2 and are the same 7 as before this pass.

**`npm test` works and is the command to use.** An earlier revision of this file
said it was broken and told you to run the underlying `node --test` invocation
instead; that was wrong. It worked because npm runs scripts through `sh`, where
`**` does not expand, leaving Node to glob the pattern itself — accidental
rather than intended, and it would have silently stopped finding top-level test
files the moment a subdirectory of tests appeared. The glob is now quoted, so
Node always does the globbing. Verified by adding a test in `tests/nested/`
(647 → 648 → 647 on removal).

`npm run build` emits a Turbopack multiple-lockfiles warning from the parent
workspace — pre-existing, unrelated.

### Four kinds of verification, kept apart

| Kind | What it covers | Status |
|---|---|---|
| **Source-contract verification** | Request bodies and response types read off the Laravel controllers, FormRequests and API Resources, then expressed as TypeScript. Commands 1 and 6. | **Done.** 77/77 write functions and 51/51 read functions typed; 0 loose. Route guards and session handling re-audited in source — §3a. |
| **Mounted-hook tests** | Real `createRoot` + `act` renders on jsdom, for the hooks whose risk is scheduling rather than shape. Command 3. | **Done** for the five remaining lint errors' hooks. |
| **Hydration tests** | `renderToString` then `hydrateRoot`, collecting `onRecoverableError`. A *different* kind from the above and not substitutable for it: a fresh mount has no server output to disagree with and no hydration render, so it cannot see either a mismatch or an effect that fires on the server snapshot. | **Done** for the session stores and the guard decision, with a control proving the harness detects a real mismatch. 655 tests in all, headless and non-visual. |
| **Browser verification** | Layout, RTL, tab order, focus, mobile breakpoints, anything rendered. | **NOT DONE — no browser was available in this environment.** §4 is the checklist to run. |
| **Live integration** | Calling the API and reading what comes back. | **2 of 120 endpoints.** Everything else is source-read. §4 marks which flows need it. |

---

## 2. The 5 errors and 2 warnings — FAILED, and why each stands

No suppressions. Each is kept because the alternatives are worse, and each has a
test standing behind the claim rather than a comment alone.

### Errors — `react-hooks/set-state-in-effect` (5)

| # | Path | Line:col |
|---|---|---|
| 1 | `src/hooks/useIsMounted.ts` | 27:5 |
| 2 | `src/hooks/useNavState.ts` | 35:5 |
| 3 | `src/features/auth/components/useStashedSocialProfile.ts` | 36:5 |
| 4 | `src/features/auth/components/useStashedSocialProfile.ts` | 72:17 |
| 5 | `src/components/ui/useObjectUrls.ts` | 45:5 |

**1–4 read a browser-only value in a Client Component that is also
server-rendered.** The rule's preferred fix — derive during render — is
unavailable: a lazy `useState` initialiser runs during render, including the
server render, where `sessionStorage` does not exist. It would yield `null` on
the server and the real value on the client: a hydration mismatch.

Alternatives considered and rejected, per hook:

- **`useIsMounted`** — the value must *differ* between the server render and the
  first client render; that is the whole point. No render-time expression can
  express that.
- **`useNavState`** — `useSyncExternalStore` was considered. Rejected: there is
  nothing to subscribe to (the writer is the previous screen, before a
  `router.push`), and a `getServerSnapshot` returning `null` reintroduces the
  mismatch. The three-state return (`null` = not read, `{}` = read-and-empty) is
  load-bearing and tested.
- **`useStashedSocialProfile` (36)** — `useSyncExternalStore` rejected because
  `clearSocialSignupState()` deletes the entry on success, and `getSnapshot`
  would then report `null` into a screen that is mid-submit holding the profile
  it read.
- **`useConsumedSocialPrefill` (72)** — the read *consumes*. `getSnapshot` is
  called repeatedly and must be side-effect free, so `useSyncExternalStore` is
  out; a lazy initialiser would be consumed by StrictMode's first render and
  find nothing on the second.

These four hold **9 reports' worth** of duplication: each replaced an
identical `useState(null)` + mount-effect pair in three to six screens.

**Supporting test:** `tests/sessionStorageHookLifecycle.test.ts` — 18 cases
through a real root (`tests/reactHarness.ts`): StrictMode double invocation,
unmount/remount, corrupt entries, two consumers in one commit, the `skip` path,
and consume-once semantics. The `if (parked)` guard at line 72 is covered by a
test that fails without it.

**5 — `useObjectUrls`** allocates `URL.createObjectURL` per file and revokes in
the cleanup. This is the external-resource synchronisation the rule's own
message describes as legitimate; the `setState` only publishes the allocation.

- **`useMemo` rejected**: React documents a memo as a hint it may discard and
  recompute, and a discarded array of blob URLs has no cleanup path. StrictMode
  makes it concrete — the render runs twice, two sets of URLs exist, and a
  cleanup keyed on the memo sees only the second. The leak this hook exists to
  prevent returns.
- **Lazy `useState` rejected**: allocates once, never tracks the file list, so
  re-picking shows the previous thumbnails.
- **`useSyncExternalStore` rejected**: no store, and allocating a blob in
  `getSnapshot` is a side effect.

**Supporting test:** `tests/objectUrlLifecycle.test.ts` — counts
`createObjectURL` against `revokeObjectURL` across a file-list change, a
StrictMode mount and an unmount. A blob leak is invisible in a browser, so
counting is the only evidence available. It also pins the hook's one
requirement — `files` must be referentially stable — and both production call
sites (`LearnServeCompletionGallery`, `volunteer-event/CompletionGallery`) pass
`pendingFiles` from `useState`.

### Warnings — `@next/next/no-img-element` (2)

| # | Path | Line:col |
|---|---|---|
| 1 | `src/features/events/components/eventDetailsParts.tsx` | 112:13 |
| 2 | `src/features/opportunities/components/OpportunitySponsors.tsx` | 162:15 |

Both are sponsor logos: a user upload of unknown aspect ratio, in an element
sized by its own content (`max-h-20 max-w-full object-contain` /
`max-h-[80px] w-auto object-contain`).

- **The rule's two stated costs do not apply here.** `next.config.ts` sets
  `images.unoptimized: true`, so `next/image` emits the same `src` with no
  resizing, no format negotiation and no `srcset`. Converting changes neither
  the bytes on the wire nor the LCP candidate.
- **`width`/`height` rejected**: there is no honest pair, and a wrong one is
  worse than none — it sets the reserved aspect ratio, letterboxing every logo
  to the guess.
- **`fill` rejected**: Next's own docs state the parent "**must** assign
  position: relative | fixed | absolute" and the image is `position: absolute`.
  Out of flow, so the cell can no longer be sized by the logo, and a row of
  short logos stretches.

Accepted cost: the reflow the rule warns about — these grids' row heights settle
as logos arrive. **No supporting test**; this is a layout judgement and belongs
on the browser checklist (§4, item 9).

---

## 3. Scope reconciliation

Areas as stated in `REVIEW_CHECKLIST.md`. Five statuses, used strictly:

- **implemented** — changed, and the change is covered by a test or a type.
- **verified** — checked against an authority (backend source, Next docs, a
  measured run) with the evidence recorded.
- **reviewed** — read and assessed; nothing to change, or the change was
  deliberately declined.
- **blocked** — cannot proceed without something outside this environment.
- **unverified** — done in source, but the thing that would confirm it (a
  browser, a live call) was unavailable.

| ID | Area | Status | Note |
|---|---|---|---|
| A1 | `react-hooks/refs` | implemented | 2 → 0 |
| A2 | `react-hooks/immutability` | implemented | 1 → 0 |
| A3 | `react-hooks/exhaustive-deps` | implemented | 8 → 0, and the 22 `eslint-disable` directives removed rather than kept. Each rule-named missing dependency was addressed, not silenced. |
| A4 | `react-hooks/set-state-in-effect` | implemented + **unverified** | 97 → **5**. Each infinite-scroll list was judged individually, as the criterion required. The *source* work is tested; the *rendered* result of the 11 adjust-on-change conversions is not — see §4. |
| A5 | unused disable directive | implemented | 1 → 0; 0 directives remain in `src` |
| B1 | dead code | implemented | 46 unused bindings → 0 |
| C1 | `"use client"` audit | verified | Null result: bundle identical (8568 KB) either way |
| C2 | server/client API boundary | verified | `server.ts` imports neither zustand nor axios; no client component imports one |
| C3 | secrets | verified | only `NEXT_PUBLIC_*` referenced; nothing secret-shaped in `.next/static` |
| C4 | SSR safety | verified | no `window`/`document`/`localStorage` at module scope |
| C5 | routing / dynamic `params` | verified | all dynamic routes type `params` as a promise and `await` it; re-checked across all 67 `page.tsx` |
| C6 | caching per screen | verified | ISR `s-maxage=60`, dynamic detail routes `no-store`, read from live response headers |
| C7 | `next/image` / `next/link` / metadata | **implemented** | 82 → **2** image warnings; no internal `<a href="/…">`; no `next/head`. Metadata now on **67 of 67** pages — see §3b. (An earlier revision said 61 of 67; that count included layout files and was wrong — eight pages had none, not six.) |
| C8 | `loading` / `error` / `not-found` / Suspense | **implemented + reviewed** | Error boundaries at all three levels (the app had none) and `not-found.tsx` at root and `(main)`. Loading and Suspense audited flow by flow: one confirmed gap, fixed. **No `loading.tsx` was added, because no route needs one** — see §3c. |
| D1 | `@typescript-eslint/no-explicit-any` | implemented | 319 → **0** |
| E1 | endpoints vs Laravel routes | implemented + verified | URL and method for all literal `apiClient` endpoints diffed against the route file. **Request bodies: 77/77 typed against the FormRequest. Response bodies: 77/77 write + 51/51 read typed against the Resource.** This is source-contract verification, not live. |
| E2 | auth / authorization / session expiry | **implemented + verified; one live test pending** | Guards and session handling re-audited in source and tested — 15 decision cases plus **8 server-render-then-hydrate cases**. Three unguarded routes fixed; the access decision lifted out of a duplicated inline copy; **a wrong redirect on every signed-in reload found and fixed** (§3a). 401-vs-403 re-confirmed. **Live session expiry still untested** — it needs a genuinely expired token. |
| E3 | pagination / filters / uploads / validation / errors | implemented | Two upload defects fixed; the keep-set defect fixed in six forms; one backend filter bug filed (BE-104) |
| F1 | XSS | verified | all 5 `dangerouslySetInnerHTML` sites sanitized server-side |
| F2 | sensitive data in ISR cache | verified | nine protected routes fetched unauthenticated render no token, email, civil id, phone or guardian name |
| F3 | duplicate submission | implemented | 26 of 26 submitting components guarded |
| F4 | accessibility | implemented + **blocked on browser** | See the caveat below. |
| F5 | RTL + i18n | verified (keys) + **unverified (layout)** | All literal `t("…")` keys exist in both locales; no key invented this pass (one was declined for exactly that reason — `ScanQR`'s back control takes its name from the image `alt` instead). **RTL layout is unverified.** "i18n keys preserved" is not "RTL preserved". |
| G1 | 200-line limit | implemented | 88 of 315 over → **0 of 549** |

### 3a — Route guards and session handling, re-audited

Re-read in source, and the decision is now tested. 15 cases in
`tests/routeGuards.test.ts`.

**What was verified**

| Question | Answer | Where |
|---|---|---|
| Unauthenticated access | Children withheld in the **same render** that schedules the redirect, so the screen never flashes; `replace`, not `push`, so Back does not return to it | tested |
| Authenticated redirects | `RedirectIfLoggedIn` sends a signed-in reader off the auth screens to `/` | source |
| Role restrictions | `individual` collapses to `volunteer`; the wrong type goes to `/` (not `/login`, which `RedirectIfLoggedIn` would bounce them out of); **`admin` matches no guard** and is sent to `/` | tested |
| Reload behaviour | **No bounce.** Zustand's `persist` rehydrates *synchronously* while the store module is evaluated, so the user is in place before React renders. Measured against the real store with a seeded `localStorage`, not assumed | tested |
| 401 vs 403 | Interceptor logs out on **401 only** — correct: all 44 API-facing 403s are authorization, and only `Authenticate::unauthenticated()` returns 401 | re-confirmed |

**Three changes**

1. **The access decision was written out twice** inside `ProtectedRoute` — once
   in the effect that redirects and once in the render that withholds the
   children. Two copies of an access-control rule is one too many: they could
   drift into a screen that renders while the redirect is in flight. It is now
   one function, `components/shared/routeAccess.ts`. It is a `.ts` module and
   not logic inside the `.tsx` component because that is what makes it
   testable — Node's type stripping runs `.ts` and not `.tsx`.
2. **Three routes were missing the guard their siblings have:**
   `/learn-share-register-list`, `/leran-share-register-list` and
   `/volunteer-scan-qr`. Each reads an authenticated endpoint, so an anonymous
   visitor reached a **blank screen** with nothing saying why and no way on.
   Each now carries the same `ProtectedRoute` as its already-guarded
   counterpart. 13 guarded routes → 16.
3. **`is_verified` is the approval field, not `organization.organization_status`.**
   `CLAUDE.md` describes the latter as gating org-only actions "independently
   of the login state", which reads as though the two were separate.
   `WebsiteLoginUserResource::isVerified()` returns
   `organizationProfile->isApproved()`, so `is_verified` **is**
   `organization_status === 'approved'`, already computed server-side, and it
   is the same condition `PublishPolicy::allows()` calls `$isApprovedOrg`. The
   frontend reads the right field. Recorded because the first draft of the
   tests set `organization_status` alone, built a payload the API cannot
   produce, and read as a permission hole.

### The hydration question — a correction, and the real defect it was hiding

This replaces what an earlier revision of this section said. **There is no
hydration mismatch**, and there *was* a wrong redirect — the opposite of pass
19's report on both counts. Both are now measured rather than reasoned about,
in `tests/sessionHydration.test.ts`.

**No mismatch.** `zustand/react`'s `useStore` is `useSyncExternalStore`, and it
already passes a server snapshot:

```js
React.useSyncExternalStore(
  api.subscribe,
  () => selector(api.getState()),        // client
  () => selector(api.getInitialState()), // server *and hydration*
)
```

React uses the third argument for the SSR render **and the hydration render**,
compares it with the second, and schedules an ordinary re-render if they differ.
`persist` reads `localStorage` synchronously during store creation, so
`getState()` has the session — but `getInitialState()` stays the signed-out
default. Asserted directly: `getInitialState().user === null` while
`getState().user.id === 7`.

Pass 19 claimed the opposite, from reading `zustand/middleware`'s
`return stateFromStorage || configResult` and inferring that `initialState`
would be the hydrated value. Measurement says otherwise. The signed-out "Sign
In" header *is* in the prerendered HTML — the server cannot know the session,
because the token lives in `localStorage` and not a cookie — and the hydration
render produces the same thing, which is what makes it consistent rather than a
mismatch. So nothing needed changing, and nothing was: `skipHydration` plus a
module-scope rehydrate was tried in this pass and **reverted** once the
measurement came in, because it bought nothing.

That claim rests on a **control** in the same file: the harness is shown to
report a deliberate SERVER/CLIENT mismatch through `onRecoverableError`. Without
it, every "no mismatch" assertion would also pass against a harness that could
not see one.

**The real defect: a signed-in reader was sent to `/login` on every reload of a
guarded page.** Measured sequences for a signed-in reader:

```
renders: [null, null, user]
effects: [null, user]
```

The render sequence is why there is no mismatch. **The effect sequence is the
defect** — an effect fires once with no session, before the re-render that has
one. `routeAccess` correctly answers `/login` for a null user, so
`ProtectedRoute`'s effect called `router.replace("/login")` on that pass.
`RedirectIfLoggedIn` had the inverse exposure.

Pass 19 missed it because its test used `renderHook`, which mounts a *fresh*
client tree: no hydration render, so the first committed value is already the
real session. That is exactly why mounted-hook tests cannot settle a hydration
question. The misleading assertion has been retitled rather than left to
mislead again.

**The fix.** `store/useSessionReady.ts` — `useSyncExternalStore` over
`persist.onFinishHydration`, with `getServerSnapshot: () => false`. It reports
*which snapshot this render is working from*, not a loading state. Both guards
return early from their effect while it is `false`. Neither renders anything
new, so the header's dimensions, navigation, role behaviour and redirects are
unchanged. No `suppressHydrationWarning`, no `dynamic(…, { ssr: false })`,
nothing hidden while the session resolves.

Four detail screens — `useEventDetails`, `useCommunityDetail`,
`useLearnServeDetailsData`, `useVolunteerOpportunity` — also gate their query on
it. They put the token in the query key, so without the gate the first
committed render fired a request keyed "no token" and the re-render fired a
second keyed "token": two requests per signed-in load. The wait is one render,
before paint, not a round trip.

**Why there is no 401 risk.** `lib/api/client.ts`'s interceptor reads the token
through `getState()`, which is hydrated from module evaluation, so every request
carries its `Authorization` header even on the render where React sees no
session. Tested. It is also why the rehydrate must not move into an effect: a
root provider's effect runs *after* its children's, so a child's query would go
out unauthenticated and the 401 handler would log the reader out.

**The one-render signed-out paint remains, and is correct output.** The session
cannot be known server-side at all. Item 1 of §4 measures what it looks like.

An earlier revision of this document said the only remedy was moving the token
to a cookie. That was wrong — it conflated *knowing the session server-side*
with *not showing the wrong answer*. There are two remedies, and they differ in
kind:

1. **Move the token to an HTTP-only cookie.** The server then knows the session
   and renders the signed-in header directly: no flash, and it is the only
   option that makes the guards a real security boundary rather than a UX one.
   It is an auth-transport change — backend session handling, CSRF, the axios
   interceptor and the 401 path — and far out of scope for this review.
2. **Render a neutral, dimension-preserving auth area until session
   readiness.** The header's auth slot renders a non-committal placeholder at
   its exact committed dimensions — not “Sign In”, not an avatar — and swaps to
   the real control once `useSessionReady()` is `true`. Nothing is hidden and no
   layout shifts, because the placeholder occupies the same box. It is
   frontend-only, needs no backend change, and composes with the hydration
   architecture already in place: `useSessionReady()` is `false` in the server
   snapshot *and* the hydration render, so server output and initial client
   output agree by construction — it introduces no mismatch.

   Its cost: a signed-*out* visitor — the majority of traffic — also sees the
   neutral slot for that one render instead of “Sign In” immediately. It trades
   a wrong-then-corrected answer for a briefly absent one. Whether that is an
   improvement is a visual judgement, not a derivable one, which is why it is
   not implemented here.

**Neither is implemented, and neither should be until the current behaviour has
been seen in a browser.** Item 1 of §4 exists to produce that evidence. The
flash may well be imperceptible at real paint timing — the wait is one render
before paint, not a round trip — in which case the correct action is to change
nothing.

**Also corrected:** `CLAUDE.md` and earlier passes said "a protected page still
ships its HTML to unauthenticated visitors". That is true of the **layout
shell** and not of the page body — `ProtectedRoute` returns `null` during the
server render, so the guarded content is not in the prerendered HTML at all.
The security conclusion is unchanged and unweakened: the guards run after
hydration and only the backend token check keeps data secret.

### 3b — Metadata: 67 of 67, and what "missing" meant

The earlier count of "61 of 67" was wrong — it counted files in `src/app`
containing a metadata export, which included the layouts. **Eight** pages had
none, all of them in the `(auth)` group.

And "missing" needed splitting, which is the substance here. All eight already
**inherited** everything except a name:

- the root layout supplies `description`, `icons`, `openGraph`, and a title
  `template: "%s | Fursa"` with a `default`;
- `(auth)/layout.tsx` supplies `robots: { index: false, follow: false }` once
  for the whole group.

So nothing was un-described and nothing was indexable that should not be. What
every auth screen lacked was a **page-specific title**, which meant the tab,
the history entry and a bookmark all read the root layout's default — the same
string for sign-in, password reset, email verification and the LinkedIn
callback. That is a real cost, and it is a navigation cost rather than an SEO
one, since the group is `noindex` either way.

Fixed through the existing route architecture, with no UI or behavioural change:

- **Five were already Server Components** and simply took a `metadata` export:
  `complete-details`, `forgot-password`, `volunteer-mandate-details`, and both
  LinkedIn callbacks.
- **Three were Client Components** — `login`, `reset-password`,
  `email-verification` — and a Client Component cannot export `metadata` at
  all. Each was `"use client"` for one reason: a `useSearchParams` call. That
  call moved into a client child (`LoginRoute`, `ResetPasswordRoute`,
  `EmailVerificationRoute`), leaving the page as the thin server shell the
  other 64 pages already are. **This is the pattern `CLAUDE.md` documents**, not
  a new one.

Two things were deliberately *not* done. The search params were **not** moved
to the page's server-side `searchParams` prop: reading them on the server makes
the route dynamic, and all eight are prerendered static today. And no reset
token was put into a server-rendered payload. Verified: `npm run build` still
reports all eight as `○ (Static)`.

`tests/routeMetadata.test.ts` now asserts that every page declares a title,
that no page both declares `metadata` and is a Client Component (Next ignores
the export silently, so this would fail quietly), and that the `robots`
directive stays on the layout rather than being copied into eight files.

### 3c — Loading and Suspense, flow by flow — one confirmed gap

Audited rather than swept. **No `loading.tsx` was added, because no route needs
one.** What was checked:

| Flow | Finding |
|---|---|
| `about-us`, `contact-us`, `faq`, `privacy-policy`, `termsofuse` | Prerendered `○`. The fetch happens at build, so there is nothing to wait for at request time. **No gap.** |
| `pages/[slug]` | `●` with `generateStaticParams`. Prerendered for known slugs. **No gap** for those. |
| The four `ƒ` detail routes (`event-details`, `learn-share-event-detail`, both `volunteer-event-detail`) | The page awaits `params` only — the data fetch is client-side through React Query, and each screen renders a `<Loader />` while it runs. `generateMetadata` does fetch, but Next 16 **streams metadata** (confirmed in `node_modules/next/dist/docs/.../generate-metadata.md`), so it does not block the initial UI for a browser. **No gap.** |
| Every page-level component that issues a query | Scanned all 67: **0** fetch without a visible wait state. |

**The one confirmed gap, and it was a bad one.** Both `(main)/layout.tsx` and
`(auth)/layout.tsx` opened with `await fetchHomeCms()`, so **the entire page
body waited on a request whose only consumer is the footer** at the bottom of
the page. On a cold ISR window — every 60 seconds, and on every cold start —
the reader saw nothing at all until the CMS answered. On the auth layout that
means someone trying to sign in waited for the footer's link list.

Fixed where the gap is: the fetch moved into `components/layout/FooterSection.tsx`
and each layout wraps it in `<Suspense fallback={null}>`. The content streams
immediately; the footer fills in behind it. `fallback={null}` because the
footer is below the fold on every route and `flex-1` on `<main>` already holds
the page to full height, so there is nothing to reserve and no jump to avoid.
The data is unchanged — same ISR-cached, React-`cache()`-deduped read, so no
extra request — and the five prerendered `(main)` routes still resolve it at
build time. Build output confirms 57/57 static pages, unchanged.

### F4 — the accessibility caveat, stated plainly

**Scanner results are not accessibility coverage.** What was actually run:

- `eslint-config-next`'s built-in `jsx-a11y` subset — part of command 4, clean.
- A **one-off** audit with `eslint-plugin-jsx-a11y`'s `strict` preset, which
  surfaced 41 findings the project's config does not check. 16 fixed, 25
  assessed and left, each with a reason tabulated in `REVIEW_CHECKLIST.md` §6 of
  pass 18. **That audit config was deleted; it is not part of `npm run lint`,**
  so re-running it means re-creating it.
- An AST-based nested-interactive scan over all 549 `.tsx` files (0 findings),
  also a one-off and also deleted.

What those three cannot see, and what therefore remains **unverified**: whether
focus is visible, whether the tab *order* makes sense after ~16 new tab stops
were added, whether a screen reader announces any of it usefully, colour
contrast, zoom/reflow, motion, and every WCAG criterion that is not a static
markup property. One real defect this pass — both date fields' labels pointing
at a non-existent `id` — was found by reading, not by a scanner, which is the
measure of how much a scanner sees.

### Remaining formatting noise — 99 files, unrecovered

A pass-9 overreach ran `npx prettier --write` over the output of
`git diff --name-only`, far wider than the files being edited. **137 `.tsx`
files were reformatted to prettier's defaults** — a style this project never
chose, having no prettier config and no prettier dependency. Reconciled in pass
13 to **107 confirmed noise**, of which 8 were later legitimately re-edited,
leaving **99 files whose diff against `HEAD` is partly or wholly formatting**.

This is **not recoverable** without reverting files that also contain real
fixes. It inflates the diff and will inflate review time; it changes no
behaviour. No further formatting runs were made, and none should be.

---

## 4. Minimum browser acceptance set — **PENDING, blocked on BE-110 by decision**

> **2026-10-05.** These checks are now deliberately held until BE-110 is
> fixed. A newly registered account *can* sign in — the API hashes with
> bcrypt (`User.php:103` casts `password => 'hashed'`, `config/hashing.php:18`
> is `bcrypt`), so only Django-migrated accounts are refused — and running the
> set against fresh accounts was offered. The product owner chose to wait for
> real migrated accounts so the checks exercise real data. **No new frontend
> work is being started in the meantime**, and both feature gates stay
> `false`, by the same decision.

**Status: not run. No browser is available in this environment.** Implementation
stops here; this is the handover. §4b is the full regression checklist, of which
this is a subset.

### How to start the app

```bash
cd fursa-next
npm ci                 # or `npm install` — the lockfile is committed
npm run dev            # http://localhost:3000
```

`npm run dev` uses Turbopack. For a production-shaped run — which is what
exercises the prerendered HTML that items 1 and 14 are about — use:

```bash
npm run build && npm start
```

Toolchain this was validated on: **Node 24.16.0, npm 11.13.0**. Node 22+ is
required by the test runner (native type stripping and `--test` globbing).

Expect a Turbopack warning about multiple lockfiles, from the parent workspace.
It is pre-existing and unrelated.

### Environment variables

`fursa-next/.env.local` is present in this workspace but **is not committed**,
so whoever runs this needs their own. Names only — no values are recorded here
or anywhere in these documents:

| Name | Needed for | Required? |
|---|---|---|
| `NEXT_PUBLIC_BACKEND_URL` | the API origin | **yes** for every LIVE item. Falls back to a default origin in `lib/api/config.ts`, so an unset value fails silently rather than loudly — set it deliberately. |
| `NEXT_PUBLIC_FRONTEND_URL` | building the LinkedIn redirect URI | yes for LinkedIn sign-in only. `${value}/linkedin-callback` must be registered **verbatim** in the LinkedIn app *and* match the backend's `LINKEDIN_REDIRECT_URI`, or the callback 400s. Empty falls back to the current origin. |
| `NEXT_PUBLIC_GOOGLE_CLIENT_ID` | Google sign-in | yes for Google sign-in only |
| `NEXT_PUBLIC_LINKEDIN_CLIENT_ID` | LinkedIn sign-in | yes for LinkedIn sign-in only |
| `NEXT_PUBLIC_GOOGLE_MAPS_API_KEY` | the map picker on the create/edit forms | yes for item 4 |
| `NEXT_PUBLIC_OTP_TIMER` | the resend countdown on email verification | optional |

All six are `NEXT_PUBLIC_*` and reach the browser by design; there are no
server-side secrets in this app. If a new third-party origin is added, it must
also go in the CSP in `next.config.ts`'s `headers()` — a missing entry fails
silently in the browser console, not at build time.

### Accounts and roles required

| # | Account | Must have |
|---|---|---|
| 1 | **Volunteer, adult** | password login; a completed profile; at least one registration on a *completed* opportunity |
| 2 | **Volunteer, under 18** | date of birth under 18, so the guardian block renders; a guardian already saved |
| 3 | **Organization, approved** | `organization_status: approved`; owns ≥1 volunteer opportunity, ≥1 learn-and-serve opportunity and ≥1 event |
| 4 | **Organization, pending** | `organization_status: pending` — for the publish-form refusal |
| 5 | **Volunteer team, approved** | `organizer_type` = "Volunteer Team", approved — for BE-108's affordance |
| 6 | A second volunteer | to register on #3's opportunities, so the attendance list has more than one row |

Note that `is_verified` on the sign-in payload **is** `organization_status ===
'approved'`, computed server-side — so #3 and #4 differ in one field, not two.

### Test data required

- An opportunity of each of the three kinds owned by #3, each **with exactly
  one image** (for the keep-set check) and one with **several**.
- A community post, a reply, and a reply-of-reply, each with exactly one image.
- A **completed** learn-and-serve opportunity #1 is registered on, so a review
  can be created.
- An opportunity with **≥25 registrations**, so the attendance list paginates.
- An opportunity spanning **≥2 days**, so the attendance date can be changed.
- Two sponsor logos of **visibly different heights** — one short and wide, one
  tall and narrow (for the two retained `<img>` elements).
- A valid Kuwaiti IBAN and an invalid one that passes the format but fails the
  mod-97 checksum — **only if** a feature gate is being enabled (§6).

### The checks

Each in **three configurations**: desktop LTR English, ≤480px mobile, Arabic
RTL. Run #2–#5 keyboard-only at least once. "Expected" is the pass condition;
anything else is a finding.

#### How to record a result

Each of the 14 gets exactly one of three verdicts, with evidence attached:

- **PASS** — observed in the browser, in all three configurations. Evidence: a
  screenshot per configuration, plus the DevTools console for anything that
  mentions console output.
- **FAIL** — observed to misbehave. Evidence: the steps, the configuration, a
  screenshot or recording, the console output, and the failing request/response
  from the Network tab for a LIVE item.
- **BLOCKED** — could not be run. Evidence: what was missing (an account, a
  fixture, an environment variable, a backend endpoint returning an error).

A check is **not PASS** on the strength of source review, `npx tsc --noEmit`,
`npm test` or any jsdom test in `tests/`. Those verify different things and are
reported separately in §1; none of them paints a pixel or runs a real request.
A check that was partly run is FAIL or BLOCKED, never PASS.

Report FAILs back rather than fixing them in place: for a reproducible frontend
defect the fix is a focused change plus a regression test, which is a code
change and so outside what remains authorized here.

#### Results log — to be filled in by whoever runs these

All 14 are **BLOCKED** as of 2026-10-03: no browser is available in the
environment this review ran in. That is an absence of evidence, not evidence of
a problem.

| # | Desktop LTR | Mobile ≤480px | Arabic RTL | Evidence |
|---|---|---|---|---|
| 1 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 2 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 3 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 4 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 5 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 6 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 7 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 8 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 9 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 10 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 11 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 12 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 13 | BLOCKED | BLOCKED | BLOCKED | no browser |
| 14 | BLOCKED | BLOCKED | BLOCKED | no browser |

| # | Check | Expected | Account |
|---|---|---|---|
| 1 | **Reload a guarded page while signed in** (`/account-information`), DevTools console open. | Two parts. **Pass/fail:** you stay on the page — no redirect to `/login` — and there is **no React hydration error** in the console. **Judgement, recorded separately:** the header may show "Sign In" for one frame before switching; note whether you can perceive it, and in which of the three configurations. Record it even if you think it is fine. The redirect was a real defect and is fixed; the flash is correct output. If the flash is rejected, §3a sets out the two options — do not pick one before this check is run. | 1 |
| 2 | **Password login**, right and wrong password; reload after. | Session persists across the reload. A wrong password shows the backend's message once and leaves the form usable. | 1 |
| 3 | **Register as an adult, and as a minor.** | Country selector opens on **Kuwait / +965** on first paint, no flicker. Save is **not** enabled on an untouched account form. The adult's request carries **empty** guardian fields; the minor's carries all five. | new |
| 4 | **Create and edit** one opportunity of each kind and one event. | All four save, and reload showing what was entered. A multipart key the server does not know 422s the whole request, so a mistake fails loudly. | 3 |
| 5 | **Remove the last image** from a post, a reply, a reply-of-reply, an event and both opportunity kinds. | After save and reload the image is **gone**, in all six. Before this review it silently stayed. | 1, 3 |
| 6 | **Submit a review on a learn-and-serve opportunity**, both locales. | It saves. This has never worked — the body sent `learn_serve_opportunity` where the controller requires `learn_serve_opportunity_id`, so every create was a 422. The event review next door must still work. | 1 |
| 7 | **Paginate, then change a filter; edit a row and let the list refetch; scroll to the last page.** | The list resets rather than appending; the edited row shows its new values; requests **stop** at the end. | 3 |
| 8 | **"Select all" attendance, then page through and change the date.** | The selection covers the rows the organizer means on every page, and re-resolves for the new date. A volunteer with no profile row cannot be selected. | 3, 6 |
| 9 | **The nine `CoverImage` conversions**, at three widths. | No image escapes its box. Each moved `aspect-*` and `relative` from the image onto its ancestor; a missing `relative` makes a `fill` image break out. **Highest-risk visual change in the review.** | any |
| 10 | **A row of mixed-height sponsor logos** — event detail grid and opportunity carousel. | The row sizes to the tallest; no short logo stretched. Judge the settle-on-load reflow; if unacceptable, that is a product decision about fixing the logo box, not a defect. | any |
| 11 | **The publish forms**, as a pending organization and as an approved volunteer team. | Pending is redirected away from every publish form. The team **is offered** paid development, internships and events and the server refuses with 403 — BE-108's open affordance, so record it rather than filing it again. | 4, 5 |
| 12 | **Session expiry.** Invalidate the token server-side, then act. | A 401 logs the reader out; a 403 (a permission wall) does **not**. The only check here that cannot be done from source. | 1 |
| 13 | **The eight auth screens' tab titles.** | Each reads its own name, not `Fursa \| Volunteer & Community Platform`. | — |
| 14 | **First paint of any `(main)` route with the CMS cache cold** — use `npm run build && npm start`, wait >60s, then load. | Page content appears **before** the footer, not after it. | — |

**If any of 1–14 cannot be run, say which and why rather than marking it
passed.** Nothing in this table has been executed.

## 4b. Full browser regression checklist

Nothing below has been run. Two columns matter:

- **UI** — testable against `npm run dev` with no working backend, or with
  whatever the API returns; the thing being checked is rendered output.
- **LIVE** — needs a real backend that accepts the request; the thing being
  checked is the round trip.

Run each item in **three configurations**: desktop LTR English, mobile width
(≤480px, which is where `mobilescreen:` and `xss:` variants apply) and **Arabic
RTL**. Arabic is a first-class direction here, not a translation — `dir` is
applied client-side after hydration, so check the first paint too.

Throughout, **drive it by keyboard at least once**: Tab/Shift-Tab only, no
mouse. Confirm focus is visible at every stop, that Tab order follows reading
order, that Escape closes dialogs and that nothing traps focus except a dialog
that should.

### 1. Password login — LIVE
1. Sign in with a correct password. Confirm the session persists across a reload
   and that `authStore` holds the user.
2. Sign in with a wrong password. Confirm the message is the backend's, shown
   once, and that the form is still usable.
3. Confirm "remember my email" survives a sign-out, and that signing out **in
   another tab** clears the prefill here (it is a `useSyncExternalStore`
   subscription now, not a one-shot read).
4. Both locales: the message arrives already localized from the API.

### 2. Registration — LIVE, with a UI half
- **UI:** every form that shows a country selector opens on **Kuwait / +965**,
  on first paint, with no flicker. The eight forms are individual sign-up,
  organization sign-up, the join-us volunteer modal, the volunteer mandate
  screen, complete-details, the sponsorship form, and the two account-settings
  forms. *This is the highest-risk change of the final pass.*
- **UI:** the Save/Submit button is **not** enabled on a freshly loaded account
  form — the form must not be `dirty` before you touch it.
- **UI:** `resetForm()` paths (cancel, successful submit) leave the country
  selector showing Kuwait, not blank.
- **UI:** set a date of birth under 18 — the guardian block appears, its country
  selector also on Kuwait.
- **UI:** both date fields (`DateField`, `BirthDateField`) — click the floating
  label and confirm focus moves to the input; confirm you can type a date
  without opening the picker; with a screen reader, confirm the field is
  announced with its label.
- **LIVE:** register as an adult — confirm the request carries **empty** guardian
  fields, not `+965`.
- **LIVE:** register as a minor — confirm all five guardian fields arrive.
- **LIVE:** social sign-up (Google and LinkedIn), including abandoning it
  halfway and starting a different account type, which must not inherit the
  first one's typed answers.

### 3. Opportunity / event create and edit — LIVE
1. Create a volunteer opportunity, a learn-and-serve opportunity and an event.
2. Edit each; confirm the loaded form matches what was saved.
3. Republish/repost each.
4. Confirm the multipart keys are accepted — the three controllers use
   `RejectsUnknownWriteKeys` and **422 the whole request** on an unknown key, so
   a mistake here fails loudly rather than silently.
5. Confirm the map picker: typed address → coordinates, and a pin → address,
   without the typed text being overwritten mid-keystroke.

### 4. Removing the last image — LIVE, and the specific regression to look for
Six forms: community post, reply, reply-of-reply, event, volunteer opportunity,
learn-and-serve opportunity. In each: open an item **that has exactly one
image**, remove it, save, reload. **The image must be gone.** Before this
review it silently stayed — an absent `existing_image_ids` means "keep
everything", and appending `existing_image_ids[]` zero times *is* absent.
Also confirm removing one of several leaves the rest, and that a reply can drop
its last image without retyping its text.

### 5. Reviews — LIVE, and the headline fix
1. **Submit a review on a learn-and-serve opportunity.** This has never worked:
   the body sent `learn_serve_opportunity` where the controller requires
   `learn_serve_opportunity_id`, with no alias normaliser, so every create was a
   422. Confirm it now saves, in both locales (the comment goes to
   `comment_en` or `comment_ar` by current language).
2. Submit a review on an event — the same screen next door, which always worked
   because *its* controller normalises the alias. Confirm no regression.
3. Edit and delete a review of each kind.
4. Confirm a star rating with no words is accepted (both comment fields are
   nullable server-side).

### 6. Pagination and refetch — LIVE
1. Scroll any infinite list past page 1, then change a filter: confirm the list
   **resets** rather than appending to the old results.
2. Edit a row, then let the list refetch: confirm the **changed row** shows its
   new values. A refetch of page 1 must be treated as a reload, not as a
   duplicate append.
3. Scroll to the last page: confirm requests **stop** rather than repeating
   forever (`VolunteerFilterModal` had no last-page guard).
4. Switch between two opportunities: confirm the role list clears.
5. Resize the window on the opportunities feed — the page size is viewport-driven
   and a different size is a different query key.

### 7. Bulk attendance selection — LIVE
1. "Select all", then page through the registrations: confirm the selection
   covers the rows the organizer means on every page, not just the loaded ones.
2. Change the attendance date with "select all" active: confirm the selection
   re-resolves for that date.
3. Confirm a volunteer with **no profile row** cannot be selected — the checkbox
   is disabled when `volunteer_uuid` is null.
4. Edit hours inline: Enter saves, Escape cancels, and focus lands in the field
   when it opens (it uses `autoFocus` deliberately).
5. Reassign a role: confirm the in-flight state shows on the right row.
6. QR self-scan: confirm one sheet held up sends **one** request, and that a
   rejected code re-arms the camera without reopening the dialog.

### 8. The restructured cards — UI
Eleven cards were restructured and are visually unverified. For each, compare
against the legacy app at `fursa_frontend/`: spacing, truncation, the delete
control's position, and the stretched-link overlay (the whole card should be
clickable without the buttons inside it becoming unreachable). Check the
community card, event card and volunteer card at mobile width especially — their
visible-item counts are viewport-driven.

### 9. The image conversions — UI
- **Nine `CoverImage` conversions** are the highest-risk visual change in the
  review: each moved `aspect-*` and `relative` from the image onto its
  ancestor. A missing `relative` makes a `fill` image escape its box. Check
  every one at three widths.
- **Thirteen `AssetIcon` conversions** — confirm each icon's size and that none
  is distorted.
- **The two retained `<img>` sponsor logos** (§2) — confirm a row of
  mixed-height logos still sizes to the tallest, that a short logo is not
  stretched, and judge whether the settle-on-load reflow is acceptable. If it
  is not, the fix is a product decision about fixing the logo box, not a code
  defect.
- **Two avatars** moved to `RemoteImage` and the certificate to `next/image`.

### 10. Changed interaction, from the a11y work — UI, keyboard-first
- Notification rows, mini-calendar day cells, the calendar "+N more" chip, the
  day-modal event rows and the scan screen's back control are now keyboard
  reachable. Confirm each activates on **both** Enter and Space, and that Space
  does not also scroll the page.
- The language menu lost its `listbox`/`option` roles. Confirm it still opens,
  selects, and announces sensibly.
- Two reply author names and one event interest tag are now `<button>` inside
  their original element. Confirm **no visual change** — Tailwind's preflight
  should make the button inherit font, colour and weight.
- The header nav dropdowns now close on Escape. Confirm hover-close still works.
- The bar chart's hours are now in the accessibility tree. Confirm the hover
  tooltip is unchanged and that a screen reader reads each bar's value.

---

## 5. Backend issues BE-104 … BE-109

Filed in [`/FURSA_BACKEND_ISSUES.md`](../../FURSA_BACKEND_ISSUES.md).
**The backend was not modified and no issue was worked around in the frontend.**
Next free id: **BE-110**.

> **There are five backend-issue documents, not one.** Their id ranges overlap,
> and this section covers only the six newest. The consolidated list of
> everything open — **15 code-defect items (14 distinct ids, one of them a
> sub-item) and 5 production/data-repair items** — is
> in [`BACKEND_ISSUES_INDEX.md`](./BACKEND_ISSUES_INDEX.md), which also shows
> why the seven ids that appear in two documents are not conflicts. Read that
> first if the question is "what is still open?"; read on here for the six this
> review filed.

### BE-104 — In-person / online never filter the development list

- **Flow:** `GET /learn-serve-opportunities/` with the In Person or Online
  filter, on the development/learn-and-serve listing.
- **Severity:** medium.
- **Blocks functionality: yes.** `baseQuery()` looks the format choice up with
  `where('name', 'format')` on the choice *type*, which matches no row, so the
  id is null and the filter is skipped silently. The reader gets **unfiltered
  results that look filtered**, which is worse than an error. No frontend fix
  exists — the parameter is sent correctly and the server accepts it.

### BE-105 — `POST /social-auth/` discards seven fields the organization onboarding screen requires

- **Flow:** organization sign-up via Google or LinkedIn → the
  "complete details" screen.
- **Severity:** high — the highest of the six.
- **Blocks functionality: yes.** The screen collects fourteen keys and the
  endpoint's `validate()` accepts eleven, so `company_name`, `organizer_type`,
  `license_number`, `latitude`, `longitude`, `nickname` and `documents[]` are
  dropped. An organization completes a mandatory form and **none of it is
  stored** — including the upload the form itself makes required for volunteer
  teams. Not workaroundable: there is no second endpoint to send them to.

### BE-106 — "Edit and resubmit" can never appear

- **Flow:** an organization's own profile cards, for a volunteer opportunity
  that was **rejected**.
- **Severity:** medium.
- **Blocks functionality: partially — an affordance, not an operation.** The
  card payload omits `approval_status`, and `getButtonText()` branches on it, so
  the one control that signals "this was rejected, fix it and send it back"
  never renders; the organization sees the ordinary **Edit** button and the
  rejection is never surfaced on the card. Editing still works if they find it;
  resubmission as a distinct action does not.

### BE-107 — Opportunity reviews cannot show the reviewer's avatar

- **Flow:** the reviews list on a development opportunity.
- **Severity:** low.
- **Blocks functionality: no — display only.**
  `OpportunityFeedbackResource` emits the author as `user_id` + `user_name` and
  nothing else, so `FeedbackList` falls back to the placeholder with no gender
  and lands on `org_profile.svg` even for a reviewer who has uploaded a photo.
  Same defect shape as BE-103, in a third resource.

### BE-108 — volunteer-team publish set — **reclassified, not a defect**

- **Flow:** the publish UI for an approved **volunteer team**.
- **Severity as filed:** medium/high. **After tracing: not an authorization
  issue at all.**
- **Blocks functionality: no.** `App\Policies\PublishPolicy::allows()` is the
  single gate and is called on **both write verbs of all three** API
  controllers. A volunteer team is **accepted** for volunteer and free
  development opportunities and **rejected with 403** for paid development,
  internships and events — exactly the product rule. **Nothing is wrongly
  created.** The cost is a team being walked through a form it cannot submit, so
  this is an **incorrect frontend affordance**, and fixing it is a product
  decision about which options to hide rather than a backend change. The entry
  in the issues file now carries the trace rather than the original assertion.

### BE-109 — two gaps the BE-108 trace turned up

- **Flow:** any 403 from the three publish controllers, and the learn-serve
  create in particular.
- **Severity:** low.
- **Blocks functionality: no — message and ordering only.** (a) The English 403
  body is the bare word `"Forbidden"` with no indication of which rule was hit,
  while the Arabic message is specific. (b)
  `LearnServeOpportunityController::store()` validates every field *before* the
  policy check, so a volunteer team receives a wall of field errors and *then*
  the refusal, in that order — the reader fixes six fields and is refused
  anyway.

Full traces, repro steps and severity rationale for each are in the issues file.

---

## 6. The two feature gates — both `false`, two separate product decisions

Neither was flipped. Each gate's definition carries the full backend trace, what
flipping it exposes call-site by call-site, and the verification list. Summarised:

### `TRAINER_REQUEST_LIVE` — `src/features/trainer/trainerRequest.ts:75`

BE-95 appears to have shipped: `Api/Volunteer/TrainerRequestController` exists,
`trainer_types` validates against the same three slugs the frontend holds,
`show_real_name` is validated and persisted on all three write paths, and an
approved trainer is refused permission to turn it off. The 422 risk the gate
guarded against is also gone — `RejectsUnknownWriteKeys` is used only by the
three opportunity/event controllers.

**What `true` exposes:** the trainer question and block on individual sign-up;
the `trainer-request/settings/` query; the request card and IBAN field in
account settings; `show_real_name` on a profile save.

**Why it is a product decision, not a code one:** answering the trainer question
switches the **whole individual registration from a JSON body to `FormData`** so
a certificate can ride along. That is the one path on which registration changes
transport, and it cannot be verified from source.

**Required before flipping:** (1) a trainer sign-up with a PDF certificate
completes; (2) a *non*-trainer sign-up still completes, confirming the JSON path
did not move; (3) an under-24 applicant is refused by both sides with an
actionable message; (4) an invalid-but-plausible Kuwaiti IBAN surfaces as a
field error — the server checks format *and* mod-97 checksum; (5) an approved
trainer cannot unset `show_real_name`, and the field-scoped 422 renders where
the reader expects it; (6) `trainer_status: 'pending'` renders as pending, not
as "not requested".

### `DO_NOT_DISTURB_FIELD_LIVE` — `src/data/Constants.ts:268`

BE-96 appears to have shipped: validated on all three write paths, persisted
with an `array_key_exists` guard, returned by five resources including
`WebsiteLoginUserResource`, and acted on — `DynamicEmailService` converts a
non-account email to an in-app notification, and
`RegistrationManagementService::notifyStatus()` skips the mail entirely.

**What `true` exposes:** one checkbox in `VolunteerGuardianSection`, plus
`do_not_disturb` on the profile save. The field is additive, so a save made
while the gate is off cannot clear a setting made while it was on.

**Required before flipping:** (1) the value survives a save *and a reload* — the
read path is `authStore`, seeded at sign-in, so a value that saves but does not
come back reads as un-ticked until the next login; (2) the label matches which
of the **two different behaviours** the client means (in-app instead of email,
versus no notification at all); (3) an organization account is unaffected — this
is a volunteer-only field.

**These are independent.** Either can be enabled without the other.

---

## 7. What is still open

1. **Lint FAILED** — 5 errors, 2 warnings. §2. Do not "fix" these by adding
   suppressions; the project has zero and that is worth keeping.
2. **Browser verification not done.** §4 is the minimum set and §4b the full checklist. Until they are
   run, no claim of behavioural preservation should be made for anything
   rendered — the 11 adjust-on-change conversions, the 9 `CoverImage`
   conversions, the 11 restructured cards, ~16 new tab stops, and RTL.
3. **Live integration: 2 of 120 endpoints.** Every contract finding is
   source-read. A type that matches the Resource can still be wrong about what
   the Resource *does* in a given state.
4. **A one-render signed-out paint remains, and is correct output**, not a
   defect: the session cannot be known server-side, because the token is in
   `localStorage` rather than a cookie. There is **no hydration mismatch** —
   measured, with a control. The wrong redirect that the same measurement
   exposed **is fixed**. Whether the flash is acceptable is a product
   judgement; item 1 of §4 collects the evidence. If it is judged unacceptable
   there are **two** options, not one — an HTTP-only cookie (auth-transport
   change, backend work) or a neutral, dimension-preserving auth area gated on
   `useSessionReady()` (frontend-only, no mismatch, but briefly neutral for
   signed-out visitors too). §3a sets out both. Neither is implemented, and
   neither should be before the current behaviour is seen in a browser.
5. **Live session expiry untested.** It needs a genuinely expired token, so it
   is the one guard behaviour that cannot be settled from source. §4 item 12.
6. **25 jsx-a11y strict findings** left deliberately, each with a reason. The
   audit that found them is not part of `npm run lint` and was deleted, so
   re-running it means re-creating it.
7. **99 files carry formatting-only noise** that is not recoverable without
   reverting files that also contain real fixes.
8. **20 backend items open** — 15 code-defect items (14 distinct ids; the
   fifteenth is `BE-90 b`, a part of an otherwise-closed issue) and 5
   production/data-repair items, across five documents, consolidated in
   [`BACKEND_ISSUES_INDEX.md`](./BACKEND_ISSUES_INDEX.md). None worked around;
   BE-108 is reclassified as a frontend affordance question.
9. **Both feature gates `false`**, awaiting two separate product decisions.

Closed across the last two passes, and no longer open: C7 (metadata 67/67), C8
(loading and Suspense audited; one real gap fixed), E2's source half (guards
re-audited and tested, three missing guards added, and a wrong redirect on every
signed-in reload found and fixed), the `npm test` script, and the backend-issue
reconciliation.

## 8. Working-tree state

Nothing is committed, pushed or deployed. `fursa-next` is a git repository;
`HEAD` is `9c80f10`. Everything is in the working tree.

Outside `src/`, `tests/`, `scripts/` and `docs/`, exactly three files are
touched, all additive:

| File | Change |
|---|---|
| `package.json` | three scripts — `typecheck`, `check:lines`, `test` (whose glob is now quoted so Node, not the shell, expands it). **No dependency added, removed or changed.** |
| `locales/en/translation.json` | 3 keys, for the error boundaries |
| `locales/ar/translation.json` | the same 3 keys |

`jsdom`, used by `tests/reactHarness.ts`, is a **transitive** dependency the app
already relies on at runtime (`lib/sanitizeHtml` runs isomorphic-dompurify on
it). It was not installed for the tests; `tests/jsdom.d.ts` declares the two
members the harness touches rather than adding an `@types` dev dependency.

Two files **outside** `fursa-next/` were edited, both documentation and both at
the monorepo root or above:

| File | Change |
|---|---|
| `/FURSA_BACKEND_ISSUES.md` | a header note pointing at the consolidated index and flagging that its own summary table predates BE-103 … BE-109. **No issue deleted, renumbered or reworded.** |
| `~/.claude/.../memory/` | the backend-issues memory, updated to record that there are five issue documents rather than one |

**Nothing under `fursa_backend/` was touched** — both backend-side issue
documents still carry their 2026-09-28 mtime. Nothing in `fursa_frontend/` was
touched.
