Overhaul extraction pipeline with new TradeItem model, conversation flow, and dedicated extraction endpoint. Add sidebar navigation with NavMenu component and landing page. Introduce few-shot prompting service and tests. Add prompt settings and email upload specs. Update OpenSpec tooling with improved export-spec and extract-feature commands. Archive completed changes and export full specs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.7 KiB
Markdown
43 lines
1.7 KiB
Markdown
## Purpose
|
|
|
|
Define the email upload UX — drag-and-drop, file picker, and upload behavior constraints during streaming.
|
|
|
|
## Requirements
|
|
|
|
### Requirement: Drag-and-drop email upload
|
|
|
|
The chat message area SHALL accept files dragged from the desktop or file explorer. When a supported file is dropped, the client SHALL read the file content and send it to the extraction endpoint.
|
|
|
|
#### Scenario: Drag HTML file onto chat
|
|
|
|
- **WHEN** the user drags an .html file over the message area
|
|
- **THEN** a visual drop indicator appears (e.g., highlighted border, overlay text "Drop email here")
|
|
|
|
#### Scenario: Drop HTML file triggers extraction
|
|
|
|
- **WHEN** the user drops an .html file onto the message area
|
|
- **THEN** the client reads the HTML content, sends it to `POST /api/chat/extract`, and streams the extraction response in the chat
|
|
|
|
#### Scenario: Unsupported file type rejected
|
|
|
|
- **WHEN** the user drops a non-.html file (e.g., .pdf, .docx)
|
|
- **THEN** the client shows a brief error message indicating only .html files are supported
|
|
|
|
### Requirement: File picker upload button
|
|
|
|
The chat input area SHALL include an upload button (e.g., attachment icon) that opens a file picker dialog for selecting .html email files.
|
|
|
|
#### Scenario: Upload via file picker
|
|
|
|
- **WHEN** the user clicks the upload button and selects an .html file
|
|
- **THEN** the client reads the HTML content and sends it to the extraction endpoint, same as drag-and-drop
|
|
|
|
### Requirement: Upload disabled during streaming
|
|
|
|
The upload zone and file picker SHALL be disabled while a response is streaming.
|
|
|
|
#### Scenario: Drop during streaming
|
|
|
|
- **WHEN** the user attempts to drop a file while the assistant is streaming
|
|
- **THEN** the drop is ignored and no extraction request is sent
|