mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
fix(reconcile): close W10 QA Mediums and Lows
Bundle of small reconcile fixes from the W10 QA round: - Switch tap-target padding -12 px -> -13 px closes the 1.6 px vertical short-fall to spec-strict WCAG 2.5.5 (design M1). - animate-pulse skeleton sites in daily-briefing, trend-annotation and doctor-report dialog now carry motion-reduce:animate-none (design M2). - Doctor-report unavailable rows render with text-muted-foreground instead of line-through so the visual reads as 'unavailable' rather than 'deleted'; the italic hint line below still carries the semantic (design M4). - WelcomeCarousel scrollIntoView now reads scrollBehaviorForUser from src/lib/motion so all four advertised call-sites share the helper (simplifier L-1). - Coach replay-injection audit row renamed audit.coach.replay-injection -> insights.coach.replay_injection to match the <surface>.<verb> convention across the audit ledger (simplifier L-2). - /api/integrations/withings/resume drops the unused request param (the handler reads neither body nor headers; requireAuth scopes the call) (simplifier M-4). - verifyRegistration body gets the same Zod boundary narrow W13 L-3 added to verifyAuthentication; SimpleWebAuthn still owns cryptographic validation (senior-dev L-1).
This commit is contained in:
1 parent
f1e16bf713
commit
468e38c3ef
10 files changed
+66
-33
No files matched your search
@@ -201,10 +201,12 @@ async function handleChatRequest(request: NextRequest): Promise<Response> {
|
||||
// slipped past the regex bank on a previous turn would re-enter
|
||||
// the prompt every reply. Re-run the detector against every
|
||||
// user-turn re-loaded from DB; on a hit, short-circuit the SSE
|
||||
// with a refusal AND drop an `audit.coach.replay-injection`
|
||||
// with a refusal AND drop an `insights.coach.replay_injection`
|
||||
// row so the failure case is observable. The audit row carries
|
||||
// the conversation id (server-owned), the turn index (no PII)
|
||||
// and the matched reason — never the message content.
|
||||
// and the matched reason — never the message content. v1.4.43
|
||||
// W10 simplifier-L-2 — action name follows the `<surface>.<verb>`
|
||||
// convention (no `audit.` prefix; no `.replay-injection` dash).
|
||||
for (let i = 0; i < priorTurns.length; i++) {
|
||||
const turn = priorTurns[i];
|
||||
if (turn.role !== "user") continue;
|
||||
@@ -214,7 +216,7 @@ async function handleChatRequest(request: NextRequest): Promise<Response> {
|
||||
action: { name: "insights.coach.replay_injection" },
|
||||
meta: { reason: replayed.reason, turnIndex: i },
|
||||
});
|
||||
await auditLog("audit.coach.replay-injection", {
|
||||
await auditLog("insights.coach.replay_injection", {
|
||||
userId,
|
||||
details: {
|
||||
conversationId: existing.id,
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
* idempotent — a second click in the same second sees the same
|
||||
* post-state and writes no extra audit row.
|
||||
*/
|
||||
import type { NextRequest } from "next/server";
|
||||
|
||||
import { apiHandler, requireAuth } from "@/lib/api-handler";
|
||||
import { apiSuccess, apiError } from "@/lib/api-response";
|
||||
import { checkRateLimit } from "@/lib/rate-limit";
|
||||
@@ -32,8 +30,7 @@ import { resumeIntegrationFromPark } from "@/lib/integrations/status";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export const POST = apiHandler(async (request: NextRequest) => {
|
||||
void request;
|
||||
export const POST = apiHandler(async () => {
|
||||
const { user } = await requireAuth();
|
||||
annotate({ action: { name: "integrations.withings.resume" } });
|
||||
|
||||
|
||||
Reference in new issue
Block a user