# Change Request: CR-002

> Created: 2026-01-23
> Status: Approved
> Classification: Modification
> Related Feature: FEATURE-008

## Request Details

**Requestor:** User
**Date Received:** 2026-01-23
**Priority:** Medium

## Description

Add the ability to drag and drop files directly into existing idea folders in the Workplace tree view. Currently, drag-and-drop only works with the "New Idea" upload view, which creates a new timestamped folder. This CR enables users to add files to existing idea folders by dropping them onto folder nodes in the tree.

## Business Justification

Users often need to add additional files to ideas they're already working on. Currently, they must use the filesystem directly or create new folders. This enhancement streamlines the workflow by allowing direct file addition to existing folders.

## Impact Analysis

### Classification

**Type:** Modification to FEATURE-008 (Workplace - Idea Management)

**Reasoning:**
- Same users (idea managers)
- Same data model (files in x-ipe-docs/ideas/)
- Extends existing drag-drop workflow (currently only for new folders)
- Reuses existing `/api/ideas/upload` endpoint (with target folder param)
- No new screens or fundamental workflow changes
- Works within existing system boundaries

### Affected Components

| Component | Impact Level | Details |
|-----------|--------------|---------|
| Frontend: WorkplaceManager | Medium | Add drag-drop handlers to tree folder nodes |
| Backend: /api/ideas/upload | Low | Add optional `target_folder` parameter |
| UI: Tree nodes | Low | Visual feedback on dragover (highlight) |

### Dependencies

- None - builds on existing FEATURE-008 implementation

## Proposed Approach

1. **Backend:** Update `/api/ideas/upload` API to accept optional `target_folder` param
   - If provided, upload files directly to that folder
   - If not provided, create new timestamped folder (existing behavior)

2. **Frontend:** Add drag-drop handlers to folder nodes in the tree
   - `dragover`: Highlight folder as drop target
   - `dragleave`: Remove highlight
   - `drop`: Call upload API with `target_folder` set to folder path

3. **Visual Feedback:**
   - Folder highlights on dragover
   - Toast notification on success/failure

## Approval

- [x] Classification approved by human
- [x] Approach approved by human
- [x] Ready for execution

## Links

- Feature Specification: [specification.md](./specification.md)
- Requirement Details: [requirement-details.md](../requirement-details.md)

---
