From b8b03a2b3cecf519e5e6c2d9f88e4ff6e3eae8d5 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 7 Sep 2026 10:41:40 -0700 Subject: [PATCH] =?UTF-8?q?feat(compliance):=20add=2045=20CFR=20=C2=A7=201?= =?UTF-8?q?64.312=20inactivity=20lockout,=20break-glass=20protocol,=20Fed?= =?UTF-8?q?=20R=20Evid=20902(11)=20self-authenticating=20affidavit,=20and?= =?UTF-8?q?=20aai.dev=20legal=20dossier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/page.tsx | 28 +++ src/components/ui/CommandPalette.tsx | 15 ++ src/components/ui/InactivityLockoutModal.tsx | 234 +++++++++++++++++++ src/lib/clinical-audio.ts | 25 ++ src/lib/pdf-generator.ts | 8 +- 5 files changed, 306 insertions(+), 4 deletions(-) create mode 100644 src/components/ui/InactivityLockoutModal.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index 15b3c1f..6410269 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -37,6 +37,7 @@ import { TelehealthRoom } from '@/components/telehealth/TelehealthRoom'; import { WaitlistModal } from '@/components/waitlist/WaitlistModal'; import { CourtAuditVaultModal } from '@/components/compliance/CourtAuditVaultModal'; import { CommandPalette } from '@/components/ui/CommandPalette'; +import { InactivityLockoutModal } from '@/components/ui/InactivityLockoutModal'; import { ClinicalToastContainer, ToastMessage } from '@/components/ui/ClinicalToast'; import { clinicalAudio } from '@/lib/clinical-audio'; import { @@ -60,6 +61,7 @@ import { VolumeX, Sparkles, Scale, + Lock, } from 'lucide-react'; export default function Home() { @@ -90,6 +92,7 @@ export default function Home() { // Polish state: Command Palette, Toasts & Audio const [isCommandPaletteOpen, setIsCommandPaletteOpen] = useState(false); const [isCourtVaultOpen, setIsCourtVaultOpen] = useState(false); + const [isTerminalLocked, setIsTerminalLocked] = useState(false); const [toasts, setToasts] = useState([]); const [audioEnabled, setAudioEnabled] = useState(true); @@ -360,6 +363,20 @@ export default function Home() { Vault + {/* Quick Terminal Lockout Button (HIPAA 45 CFR § 164.312(a)(2)(iii)) */} + + {/* Clinic Dropdown */}
{ + setPin(e.target.value); + setError(false); + }} + placeholder="••••" + className={`w-full text-center text-xl tracking-widest px-4 py-2.5 bg-slate-50 border ${ + error ? 'border-red-500 bg-red-50 text-red-900' : 'border-slate-300 text-slate-900' + } rounded-xl focus:outline-none focus:border-sky-500 font-mono transition`} + /> + +
+ {error && ( +

+ Invalid PIN. Enter 1234 or authorized staff credentials. +

+ )} + + + + +
+ Hotkeys: Enter to unlock • Cmd+L to lock + +
+ + ) : ( + /* Emergency "Break-Glass" Access Mode (45 CFR § 164.312(a)(2)(ii)) */ +
+
+
+ + EMERGENCY ACCESS PROTOCOL (45 CFR § 164.312(a)(2)(ii)) +
+

+ Break-glass access overrides standard credential requirements for acute clinical emergencies. + This event is permanently recorded in the 21 CFR Part 11 audit ledger with timestamp, IP address, + and declared medical justification. +

+
+ +
+ +