MAESTRO: wire file drop to header input

This commit is contained in:
Mariusz Banach
2026-02-18 00:42:54 +01:00
parent 1eb9655751
commit 180084ad84
2 changed files with 5 additions and 12 deletions

View File

@@ -39,10 +39,12 @@ Note: `npx vitest run src/__tests__/AnalyseButton.test.tsx` passes; Vitest emits
- [x] All vitest tests pass: `npx vitest run src/__tests__/HeaderInput.test.tsx src/__tests__/FileDropZone.test.tsx src/__tests__/AnalyseButton.test.tsx`
- [x] User can paste text into the header input area
- [ ] User can drop an EML/TXT file and see it auto-populate the input
- [x] User can drop an EML/TXT file and see it auto-populate the input
- [ ] Analyse button is disabled when input is empty
- [ ] Ctrl+Enter keyboard shortcut triggers the analyse action
- [ ] Dark hacker theme is visible with correct colour palette
- [ ] Validation shows user-friendly errors for empty and oversized input
- [ ] `npx eslint src/` and `npx prettier --check src/` pass with zero errors
- [ ] Run `/speckit.analyze` to verify consistency
Note: Wired `FileDropZone` into the main page to populate the header input state on drop.

View File

@@ -2,6 +2,7 @@
import { useState } from "react";
import FileDropZone from "../components/FileDropZone";
import HeaderInput from "../components/HeaderInput";
export default function Home() {
@@ -30,17 +31,7 @@ export default function Home() {
<HeaderInput value={headerInput} onChange={setHeaderInput} />
<div className="flex flex-col gap-6">
<div className="rounded-2xl border border-dashed border-info/40 bg-surface/70 p-6 text-center">
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full border border-info/30 bg-background/40">
<span className="font-mono text-xs text-info">.eml</span>
</div>
<p className="mt-4 text-sm text-text/80">
Drop an EML or TXT file to auto-populate the header field.
</p>
<p className="mt-2 font-mono text-xs text-text/50">
Max size 1MB
</p>
</div>
<FileDropZone onFileContent={setHeaderInput} />
<div className="rounded-2xl border border-info/10 bg-surface p-6">
<p className="text-xs uppercase tracking-[0.2em] text-info/80">