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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed.codex-screenshots/rag-answer-structure.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,10 +68,14 @@ jobs:
run: npm run build

- name: Deployment boot smoke
run: npm run check:deployment-readiness
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')
# No placeholder fallbacks: when the repository secrets are missing the
# smoke must fail with its explicit missing-env error rather than
# "pass" against a server that never saw real production env.
env:
SUPABASE_SERVICE_ROLE_KEY: placeholder-ci-service-role
OPENAI_API_KEY: placeholder-ci-openai
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npm run check:deployment-readiness

- name: Restore Chromium browser cache
uses: actions/cache@v4
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,3 +62,9 @@ supabase/.temp/
# typescript
*.tsbuildinfo
next-env.d.ts

# agent/QA artifacts
.codex-screenshots/
.qa-smoke/
*.pid
tmp_output.txt
21 changes: 21 additions & 0 deletions COLOR_REDESIGN_PLAN.md
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
# Luxury Black-First Color Redesign Plan (Global UI Polish)

## 1) Intent

Apply a refined, premium dark-first visual system across the app with minimal risk:

- Keep semantics and component behavior unchanged.
- Keep token architecture centralized in CSS variables.
- Preserve accessibility and clinical readability.
- Ensure light mode remains available but visually secondary.

## 2) Boundaries and Constraints

- No functional/logic edits.
- No route/path rewrites, no new UI behavior.
- No dependency/toolchain changes.
- Primary work only in style tokens and tokenized usage in key components.
- All work is reversible and should be diff-reviewable in 3 small stages.

## 3) Success Definition (Done Criteria)

- Global theme reads as `obsidian/charcoal/luxury` (dark-first) while keeping high contrast.
- `--surface`, `--text`, `--primary`, `--border`, focus and state tokens are consistently used.
- Hard-coded production color usage reduced to near-zero in high-impact files.
Expand All@@ -24,14 +28,17 @@ Apply a refined, premium dark-first visual system across the app with minimal ri
## 4) Stage Overview

### Stage 1 — Token Refresh + Theme Metadata (No behavior change)

**Goal:** finalize token system to luxury black-first in one controlled sweep.

#### Files

- `C:\Dev\Apps\Database\src\app\globals.css`
- `C:\Dev\Apps\Database\src\app\layout.tsx`
- `C:\Dev\Apps\Database\src\lib\theme.ts`

#### Edit checklist

1. In `globals.css`, set foundation tokens for dark-first aesthetic:
- Neutral ramps (`--background`, `--surface*`, `--text*`, `--border*`, `--ring*`, `--shadow*`, `--overlay-backdrop`, `--panel-gloss`)
- Primary/accent tokens (reduced-brightness, high contrast on dark)
Expand All@@ -42,42 +49,50 @@ Apply a refined, premium dark-first visual system across the app with minimal ri
5. In `theme.ts`, keep server snapshot/default aligned with dark-first philosophy.

#### Exit checks

- `rg -n "(background|surface|text|border|primary|ring|shadow|overlay|panel-gloss)" src\app\globals.css`
- Confirm no token names were removed/renamed (only value changes).

---

### Stage 2 — Token Migration of Production Color Exceptions

**Goal:** remove hardcoded/non-token surface/color usage from high-impact components.

#### Files

- `C:\Dev\Apps\Database\src\components\ui\sheet.tsx`
- `C:\Dev\Apps\Database\src\components\ui-primitives.tsx`
- `C:\Dev\Apps\Database\src\components\DocumentViewer.tsx`
- `C:\Dev\Apps\Database\src\components\ClinicalDashboard.tsx`
- `C:\Dev\Apps\Database\src\components\clinical-dashboard\medication-prescribing-workspace.tsx`

#### Edit checklist

1. Replace `bg-white`, `text-white`, `border-white`, direct slate utilities and hex fills with token-backed references.
2. Replace hardcoded status badges with semantic variants (`toneDanger`, `toneInfo`, `toneSuccess`, etc.) where available.
3. Keep spacing/layout/logic unchanged.
4. Confirm sheet, modal, viewer, dashboard, and medication workspace now visually map to token surfaces.

#### Exit checks

- Token-first grep in target files:
- `rg -n "bg-white|text-white|border-white|bg-slate|text-slate|border-slate|#([0-9a-fA-F]{3,8})" src\components\ui\sheet.tsx src\components\ui-primitives.tsx src\components\DocumentViewer.tsx src\components\ClinicalDashboard.tsx src\components\clinical-dashboard\medication-prescribing-workspace.tsx`
- No behavior edits committed.

---

### Stage 3 — Depth & Polish + QA Validation

**Goal:** finalize tactile depth and verify polished output across themes.

#### Files (primarily)

- `C:\Dev\Apps\Database\src\app\globals.css`
- Any residual files flagged in Stage 2 follow-up

#### Edit checklist

1. Fine-tune overlay/gloss/shadow stack:
- reduce harsh white borders
- convert glow to low-sheen, alpha-safe ink reflections
Expand All@@ -86,6 +101,7 @@ Apply a refined, premium dark-first visual system across the app with minimal ri
3. Run final style consistency sweep for production files.

#### Exit checks

- Manual visual QA after server boot:
- `npm run ensure`
- Browse sample flows: search, dashboard, document viewer, sheet/modal, medication prescribing workspace.
Expand All@@ -95,29 +111,34 @@ Apply a refined, premium dark-first visual system across the app with minimal ri
---

## 5) Suggested Execution Order (Pragmatic)

1. Stage 1 tokens + metadata
2. Stage 2 component hardcode replacement
3. Stage 3 polish + QA

This keeps risk low and allows rollback at each stage.

## 6) Rollback Strategy

- Stage-specific commits (or checkpoints): Stage1 / Stage2 / Stage3.
- If any stage causes visual regression, revert only that stage’s files first.
- Preserve `git status` checkpoints between stages.

## 7) Risk Register

- **Contrast drift (high):** especially in dense clinical content -> verify muted text/disabled states.
- **Component inconsistency risk:** token-mapped components that rely on literal colors for hierarchy -> preserve local contrast hierarchy via token swaps only.
- **Theme metadata mismatch:** server/client defaults mismatch -> validate first paint and browser local toggle.

## 8) Done Checklist (single source of truth)

- [ ] Stage 1 complete (tokens + metadata)
- [ ] Stage 2 complete (component token migration)
- [ ] Stage 3 complete (polish + QA)
- [ ] Final review with screenshot evidence of main routes in dark mode

## 9) Current status (from this session)

- Stage 1 is partially started in `globals.css`.
- `layout.tsx` and `theme.ts` still need completion before Stage 1 is final.
- No files outside the plan scope should be edited until this document is approved.
Loading
Loading