Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/branch-review-ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ Use this ledger to prevent repeated branch and PR reviews when the reviewed HEAD
| 2026-07-15 | HEAD detached 570e6ba56 + WIP tree | 570e6ba56ae60bea56a32801b9cc96c5a8dfde4f | thorough multi-lens review: WIP RAG/schema + clinical design/UI + architecture/bug-hunt | Changes requested: no P0. Confirmed P1s in WIP � registryCorpusDetailHref typecheck break; ChunkLoadCache error/null poisoning across parallel hydrations; registry cleanup `::uuid` cast abort; corrector GIN unused by query path; new table-facts trgm index expression mismatch vs trgm_matches. Design: production clinical shell stays token/a11y-aligned; favourites nav multi-gradient bars and mockup hex drift fight clinical density. Residual: concurrent cache race, SECURITY DEFINER revoke gaps, schema/migration lifecycle drift, accidental pnpm-lock.yaml. | `npm run typecheck` (red: registry link callers + stale .next apps types); static SQL/expr/diff review; architecture + bug-hunt agents; design-system grep (tokens, reduced-motion, forced-colors). Not run: vitest, verify:*, ensure/browser screenshots, live Supabase/OpenAI. frontend-ui-reviewer subagent blocked by usage limit � design pass done inline. |
| 2026-07-18 | claude/clinical-kb-pwa-review-asi3wb (PR #826) | 3d9ee5f44dea9edb1ef5af28f5f265d88d8b9f29 | PWA hardening implementation (plan Phase 1) | Implemented the three open findings from the 2026-07-17 PWA setup review with zero cache-semantics change: committed the rule-6 retirement worker `public/sw-kill-switch.js` with a five-test lock (`tests/pwa-kill-switch.test.ts`), bound the `offline.html` sha256 to the sw.js `CACHE_VERSION` pairing in `tests/pwa-manifest.test.ts` (drift trap closed), added the `?pwa-dev=0` local teardown to `pwa-lifecycle.tsx` with a dom test proving foreign workers and caches stay untouched, and updated `docs/pwa.md` rules 1 and 6 plus the local-dev cleanup step. Phase 0 of the approved plan (pr-policy `base_ref` checkout fix + the Set-Cookie worker-test case) was found already merged to main and skipped. | Focused Vitest 53/53. `verify:cheap` and the `verify:pr-local` unit stage green except `tests/pdf-extraction-budget.test.ts`, which fails identically on clean main in this container (child-process semantics; baselined twice). `verify:ui` 218 passed with 2 container-baselined pre-existing failures: the `ui-pwa` installability test (Chromium `in-incognito` artifact, reproduced from a clean-main detached worktree with its own server) and the `ui-smoke` document-viewer PDF-canvas mobile test (also fails on clean main `54229f0`; flagged as possible upstream regression). `format:check` clean for repo files. Conditional build/bundle stages deferred to the blocking hosted CI Build job on PR #826. No provider-backed checks run. |
| 2026-07-18 | claude/clinical-kb-pwa-review-asi3wb (PR #835) | d46f381ac27b53b1bd5ac0ef77962fbd48cf3aa7 | PWA manifest and install-UX polish (plan Phase 2) | Implemented Phase 2 of the PWA plan with cache semantics untouched: `launch_handler` navigate-existing/auto and `display_override` standalone/minimal-ui in `manifest.ts`; `monochrome-192/512` icon variants rendered as a white alpha-only silhouette from the shared brand mark via `BRAND_MONOCHROME`; a one-time iOS/iPadOS Add to Home Screen hint in `pwa-lifecycle.tsx` (30-day dismissal key, never in standalone, timer-deferred eligibility for the set-state-in-effect lint rule). Docs Installability section updated; manifest screenshots remain deferred per the production-capture precondition. Phase 2 re-scout confirmed zero upstream drift before implementation. | Focused Vitest 55/55. `verify:cheap` 2773 passed/1 failed and `verify:pr-local` unit stage identical — the lone failure is the known container-only `pdf-extraction-budget` artifact (clean-main baselined; hosted CI green on #826). `test:e2e:pwa`: privacy journey passed; icon probes validated both new monochrome PNGs; sole installability error remains the container `in-incognito` artifact. `verify:ui` 219 passed/2 failed — exactly the two clean-main-baselined container artifacts, no new failures. `format:check` clean. Build/bundle stages deferred to the blocking hosted CI Build job on PR #835. No provider-backed checks run. |
| 2026-07-18 | claude/clinical-kb-pwa-review-asi3wb (Phase 3, PR #872, final reviewed head ba46c1581a3c4e87d5d5989f3eb77483c9aa8aa5) | ba46c1581a3c4e87d5d5989f3eb77483c9aa8aa5 | PWA offline-page design upgrade (plan Phase 3) | Rebuilt the `public/offline.html` visual shell on mirrored Clinical White / Aegean Graphite tokens (each value annotated with its source token): pure-white canvas, aligned text/border/hover values, system UI font stack, and the clinical-accent focus ring replacing the off-contract amber. Privacy copy, structure, forced-colors behavior, safe-area insets, and target sizes unchanged. `CACHE_VERSION` bumped to the new unique `2026-07-18-v1` with the offline.html sha256 pairing updated — the Phase 1 binding guard exercised for real and enforced the paired move. A transient typecheck failure from stale `.next/dev` route types (cross-branch dev-server state) self-resolved after server regeneration; nothing was deleted. | Focused Vitest 55/55 including the binding guard on the new pairing. `verify:cheap` 2778 passed/1 failed and `verify:pr-local` unit stage identical — the lone failure is the known container-only `pdf-extraction-budget` artifact (clean-main baselined; hosted CI green on #826/#835). `test:e2e:pwa`: the cold-offline journey rendered and asserted the redesigned page through the new-version worker; sole installability error remains the container `in-incognito` artifact. `verify:ui` 219 passed/2 failed — the same two clean-main-baselined container artifacts, no new failures. Build/bundle stages deferred to the blocking hosted CI Build job. No provider-backed checks run. |
Comment thread
BigSimmo marked this conversation as resolved.
| 2026-07-18 | codex/rag-merge-final-20260718-655a | 20e5964bbfdcac0311b89c96931a43544be545a6 | RAG recovery, grounding, and latency merge closure | Reviewed the recovered historical RAG fix series against fresh `origin/main`. No additional source change was needed: current main already contains the stricter source-scoped numeric grounding, blocked-retrieval-only extractive recovery, generic LAI deterministic recovery, per-case answer latency diagnostics, and agitation lexical-path protections. The only residual branch diff was proven unreachable because every medication-chart trigger yields explicit search terms; it was intentionally not carried forward. | Full local Vitest: 301 files / 2,779 tests passed. Offline RAG fixture and production-contract validation: 36 golden cases, 21 suites, 294 tests passed. Prettier and `git diff --check` passed. `verify:cheap` reached its lint stage after all preceding static guards passed, but was blocked twice by active heavyweight jobs in other registered worktrees; it was not retried. No Supabase, OpenAI, live retrieval, production-readiness, deployment, or hosted CI command was run. |
| 2026-07-18 | codex/main-merge-51278-final-20260718-late | 45fa3c6c7, 14a0a898c | merge integration of 51278a70d onto fresh origin/main | Replayed the requested historical design-audit commit onto fresh `origin/main`. Kept current-main versions for five conflicts, including the regenerated drift manifest and current schema assertions. Fixed the duplicate sitemap-generator declaration, corrected redirect-section coverage, and restored the current `Clinical Guide` UI contract. | `git diff --check` and `npm run sitemap:check` passed. `npm run test` was attempted twice but blocked by the repository-wide heavy-command lock held by a separate Playwright worktree; no provider-backed checks ran. |
| 2026-07-18 | origin/main framework and dependency modernization snapshot | 4057677c8b92a5e1d997ec44958764fa91f5d424 | parallel build/infra, backend, and frontend modernization audit | Changes requested. No P0. Confirmed two P1 defects: Supabase SSR 0.12 auth-cookie responses discard mandatory anti-cache headers, and reindex bypasses the server-only-aware TSX runner after mutation-capable setup. Five P2 blockers cover the Webpack-to-Turbopack production cutover, incomplete Railway image-build watch ownership, missing clean `next typegen`, Node 26 types over a Node 24 runtime, and App Router retry actions that reset without re-fetching. P3 removal-readiness debt remains in Zod and Next Image APIs. Manual rewrite zones are auth response ownership, bundler/CSP/artifact consumers, JSZip resource limits, OpenAI request typing, and React Compiler adoption in the stateful dashboard/viewer roots. | Parallel read-only source/config/test audit against the exact snapshot; Node 24.18.0/npm 11.17.0; exact-version Next 16.2.10 bundled upgrade, Turbopack, error-boundary, and codemod guidance; TypeScript 6 backend no-emit analysis and Node import probes via a separately installed exact-version local dependency tree; `git diff --check`. No install, registry outdated/audit, full repo lint/typecheck/test/build/browser/Docker, Supabase/OpenAI, deployment, or hosted CI run; this worktree had no `node_modules`. |
102 changes: 56 additions & 46 deletions public/offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,38 @@
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#060708" />
<title>Clinical KB is offline</title>
<style>
/* Standalone page: cannot import globals.css, so the Clinical White /
Aegean Graphite tokens are mirrored here as local custom properties.
Each value is annotated with its source token from
docs/redesign/permanent-colour-direction.md and src/app/globals.css.
Editing this file requires a new unique CACHE_VERSION in public/sw.js
(enforced by the pairing guard in tests/pwa-manifest.test.ts). */
:root {
color-scheme: light dark;
font-family: Arial, Helvetica, sans-serif;
background: #f4f7f8;
color: #142126;
/* System stack: the app's webfont cannot load here (zero external
requests), so approximate its metrics with the platform UI face. */
font-family:
system-ui,
-apple-system,
"Segoe UI",
Roboto,
Arial,
sans-serif;
--page-background: #ffffff; /* --background */
--page-surface: #fcfcfd; /* --surface-raised */
--page-border: #e5e7eb; /* --border */
--page-border-lux: rgb(205 213 223 / 55%); /* --border-lux */
--page-text: #101418; /* --text */
--page-heading: #080b0f; /* --text-heading */
--page-muted: #475467; /* --text-muted */
--page-accent: #0b6f86; /* --clinical-accent */
--page-accent-hover: #095d70; /* --clinical-accent-hover */
--page-accent-contrast: #ffffff; /* --clinical-accent-contrast */
--page-focus: var(--page-accent); /* --focus: var(--clinical-accent) */
--page-glow: rgb(11 111 134 / 10%); /* accent at low alpha */
--page-shadow: 0 1rem 3rem rgb(16 20 24 / 10%);
background: var(--page-background);
color: var(--page-text);
}

* {
Expand All @@ -29,16 +56,16 @@
place-items: center;
padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right))
max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
background: radial-gradient(circle at 15% 10%, rgba(11, 111, 134, 0.12), transparent 34rem), #f4f7f8;
background: radial-gradient(circle at 15% 10%, var(--page-glow), transparent 34rem) var(--page-background);
}

main {
width: min(100%, 34rem);
padding: clamp(1.5rem, 5vw, 2.5rem);
border: 1px solid #cbd7da;
border: 1px solid var(--page-border-lux);
border-radius: 1.25rem;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 1rem 3rem rgba(20, 33, 38, 0.12);
background: var(--page-surface);
box-shadow: var(--page-shadow);
}

.mark {
Expand All @@ -48,29 +75,30 @@
place-items: center;
margin-bottom: 1.25rem;
border-radius: 1rem;
background: #0b6f86;
color: #ffffff;
background: var(--page-accent);
color: var(--page-accent-contrast);
font-size: 1.5rem;
font-weight: 800;
}

h1 {
margin: 0;
color: var(--page-heading);
font-size: clamp(1.75rem, 6vw, 2.35rem);
line-height: 1.08;
letter-spacing: -0.035em;
}

p {
margin: 1rem 0 0;
color: #465b63;
color: var(--page-muted);
font-size: 1rem;
line-height: 1.65;
}

.privacy-note {
padding-top: 1rem;
border-top: 1px solid #dbe3e5;
border-top: 1px solid var(--page-border);
font-size: 0.9rem;
}

Expand All @@ -82,53 +110,35 @@
margin-top: 1.5rem;
padding: 0.75rem 1rem;
border-radius: 0.75rem;
background: #0b6f86;
color: #ffffff;
font-weight: 750;
background: var(--page-accent);
color: var(--page-accent-contrast);
font-weight: 700;
text-decoration: none;
}

a:hover {
background: #075b6e;
background: var(--page-accent-hover);
}

a:focus-visible {
outline: 3px solid #f59e0b;
outline: 3px solid var(--page-focus);
outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
:root {
background: #060708;
color: #f1f6f7;
}

body {
background: radial-gradient(circle at 15% 10%, rgba(76, 207, 208, 0.12), transparent 34rem), #060708;
}

main {
border-color: #344147;
background: rgba(17, 20, 22, 0.96);
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
}

.mark,
a {
background: #4ccfd0;
color: #04252a;
}

a:hover {
background: #72dcdd;
}

p {
color: #b8c6ca;
}

.privacy-note {
border-color: #344147;
--page-background: #060708; /* dark --background */
--page-surface: #171a1d; /* dark --surface-raised */
--page-border: rgba(255, 255, 255, 0.08); /* dark --border-lux */
--page-border-lux: rgba(255, 255, 255, 0.08); /* dark --border-lux */
--page-text: #f5f7f7; /* dark --text */
--page-heading: #f5f7f7; /* dark headings share --text */
--page-muted: #a7b0ad; /* dark --text-muted */
--page-accent: #4ccfd0; /* dark --clinical-accent */
--page-accent-hover: #72dcdd; /* dark accent, one step lighter */
--page-accent-contrast: #04252a; /* brand dark ink */
--page-glow: rgb(76 207 208 / 10%);
--page-shadow: 0 1rem 3rem rgb(0 0 0 / 45%);
}
}

Expand Down
2 changes: 1 addition & 1 deletion public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

const CACHE_PREFIX = "clinical-kb-pwa-";
const CACHE_VERSION = "2026-07-15-v1";
const CACHE_VERSION = "2026-07-18-v1";
const SHELL_CACHE = `${CACHE_PREFIX}shell-${CACHE_VERSION}`;
const STATIC_CACHE = `${CACHE_PREFIX}static-${CACHE_VERSION}`;
const STATIC_CACHE_PREFIX = `${CACHE_PREFIX}static-`;
Expand Down
4 changes: 2 additions & 2 deletions tests/pwa-manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ describe("PWA manifest and public bootstrap resources", () => {
// value (never reuse a previous one, even for rollbacks) and record the
// new offline.html hash here.
const expectedPairing = {
cacheVersion: "2026-07-15-v1",
offlineHtmlSha256: "52d290906336bf7d6d71797e3ede038e0ac84c826dc1c09f04f3f27d29117f8a",
cacheVersion: "2026-07-18-v1",
offlineHtmlSha256: "a7c0106c30621d5191db06cf4dea1516186f0fdb945529aeb083d5a88148721e",
};

const workerSource = readFileSync(join(process.cwd(), "public", "sw.js"), "utf8");
Expand Down