MAESTRO: run prettier for phase 03 checklist

This commit is contained in:
Mariusz Banach
2026-02-18 00:55:51 +01:00
parent f0c33a93f9
commit eadf475609
5 changed files with 10 additions and 21 deletions

View File

@@ -44,7 +44,7 @@ Note: `npx vitest run src/__tests__/AnalyseButton.test.tsx` passes; Vitest emits
- [x] Ctrl+Enter keyboard shortcut triggers the analyse action - [x] Ctrl+Enter keyboard shortcut triggers the analyse action
- [x] Dark hacker theme is visible with correct colour palette - [x] Dark hacker theme is visible with correct colour palette
- [x] Validation shows user-friendly errors for empty and oversized input - [x] Validation shows user-friendly errors for empty and oversized input
- [ ] `npx eslint src/` and `npx prettier --check src/` pass with zero errors - [x] `npx eslint src/` and `npx prettier --check src/` pass with zero errors
- [ ] Run `/speckit.analyze` to verify consistency - [ ] Run `/speckit.analyze` to verify consistency
Note: Wired `FileDropZone` into the main page to populate the header input state on drop. Note: Wired `FileDropZone` into the main page to populate the header input state on drop.

View File

@@ -39,7 +39,7 @@ const getTextarea = (container: HTMLElement): HTMLTextAreaElement => {
}; };
const getAlert = (container: HTMLElement): HTMLElement | null => const getAlert = (container: HTMLElement): HTMLElement | null =>
container.querySelector("[role=\"alert\"]"); container.querySelector('[role="alert"]');
afterEach(() => { afterEach(() => {
while (cleanups.length > 0) { while (cleanups.length > 0) {

View File

@@ -46,12 +46,10 @@ export default function Home() {
Decode Suite Decode Suite
</p> </p>
<div className="flex flex-col gap-3"> <div className="flex flex-col gap-3">
<h1 className="text-3xl font-semibold sm:text-4xl"> <h1 className="text-3xl font-semibold sm:text-4xl">Decode Spam Headers</h1>
Decode Spam Headers
</h1>
<p className="max-w-2xl text-sm text-text/70 sm:text-base"> <p className="max-w-2xl text-sm text-text/70 sm:text-base">
Paste SMTP headers or drop an EML/TXT file to reveal the Paste SMTP headers or drop an EML/TXT file to reveal the anti-spam signals baked
anti-spam signals baked into your message path. into your message path.
</p> </p>
</div> </div>
</header> </header>
@@ -63,12 +61,10 @@ export default function Home() {
<FileDropZone onFileContent={setHeaderInput} /> <FileDropZone onFileContent={setHeaderInput} />
<div className="rounded-2xl border border-info/10 bg-surface p-6"> <div className="rounded-2xl border border-info/10 bg-surface p-6">
<p className="text-xs uppercase tracking-[0.2em] text-info/80"> <p className="text-xs uppercase tracking-[0.2em] text-info/80">Ready To Analyse</p>
Ready To Analyse
</p>
<p className="mt-2 text-sm text-text/70"> <p className="mt-2 text-sm text-text/70">
Once input is provided, run the analysis to reveal scoring, Once input is provided, run the analysis to reveal scoring, heuristics, and
heuristics, and delivery path insights. delivery path insights.
</p> </p>
<div className="mt-4 flex flex-col gap-3 sm:flex-row sm:items-center"> <div className="mt-4 flex flex-col gap-3 sm:flex-row sm:items-center">
<AnalyseButton <AnalyseButton

View File

@@ -104,11 +104,7 @@ export default function FileDropZone({ onFileContent }: FileDropZoneProps) {
reader.readAsText(file); reader.readAsText(file);
}; };
const borderClass = error const borderClass = error ? "border-spam/70" : isDragging ? "border-info" : "border-info/40";
? "border-spam/70"
: isDragging
? "border-info"
: "border-info/40";
const surfaceClass = isDragging ? "bg-surface" : "bg-surface/70"; const surfaceClass = isDragging ? "bg-surface" : "bg-surface/70";
return ( return (

View File

@@ -4,10 +4,7 @@ import { type FormEvent, useEffect, useId, useRef, useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faXmark } from "@fortawesome/free-solid-svg-icons"; import { faXmark } from "@fortawesome/free-solid-svg-icons";
import { import { MAX_HEADER_INPUT_BYTES, validateHeaderInput } from "../lib/header-validation";
MAX_HEADER_INPUT_BYTES,
validateHeaderInput,
} from "../lib/header-validation";
type HeaderInputProps = { type HeaderInputProps = {
value: string; value: string;