# Change Request: CR-003

> Created: 03-27-2026
> Status: Approved
> Classification: Modification
> Related Feature: FEATURE-038-C

## Request Details

**Requestor:** User (via session feedback)
**Date Received:** 03-27-2026
**Priority:** Medium

## Description

Extend the CR-002 toolbar (download icon with `?download=true`, preview/raw toggle with smart defaults) to the folder browser modal's inline file preview. Currently, `FolderBrowserModal._makePreviewHeader()` only has a basic download button without `?download=true` and no preview/raw toggle. This creates an inconsistency — single-file previews have the full toolbar, but folder modal previews do not.

## Business Justification

UI consistency: users expect the same toolbar controls in both preview contexts. The folder modal is used frequently when browsing folder-type deliverables, and lacking toggle/download parity frustrates the workflow.

## Impact Analysis

### Classification

**Type:** Modification to FEATURE-038-C

**Reasoning:**
Same feature (Enhanced Deliverable Viewer), same users, same rendering infrastructure (`FilePreviewRenderer`). The folder modal already uses `FilePreviewRenderer` (CR-008). This CR extends the existing toolbar pattern to the folder modal context — no new endpoints, screens, or data models.

### Comparison Matrix

| Aspect | CR Requirement | Existing Feature(s) |
|--------|---------------|---------------------|
| Users | Same workflow users | Same |
| Workflow | Toggle/download in folder modal | Toggle/download in single-file preview only |
| Data Model | No changes | Same |
| UI Elements | Update `_makePreviewHeader()` | `_buildPreviewHeader()` in DeliverableViewer |
| API Endpoints | No changes | `?download=true` bypass already exists |

### Conflict Analysis

**Conflicts Found:** No

### Affected Components

| Component | Impact Level | Details |
|-----------|--------------|---------|
| `folder-browser-modal.js` | Medium | Update `_makePreviewHeader()` to add toggle + `?download=true`; pass `renderMode` to FilePreviewRenderer in `_selectFile()` |
| CSS (workflow.css or folder-browser) | Low | Ensure toolbar styles apply in folder-browser context |
| Tests | Low | Add tests for folder modal toolbar |

### Dependencies

- CR-002 (already implemented): provides `FilePreviewRenderer.isTextRenderable()`, `renderMode`, `setRenderMode()`

## Proposed Approach

1. Update `_makePreviewHeader(filePath)` to accept `contentEl` parameter
2. Add `?download=true` to download link href
3. Add toggle button (same pattern as CR-002 `_buildPreviewHeader`)
4. Pass `renderMode` based on smart default to `FilePreviewRenderer` constructor in `_selectFile()`
5. Add/reuse CSS styles for folder-browser toolbar group
6. Add tests

## Mockup Impact

**UI/UX Change:** Yes (minor — adding icons to existing header)
**Existing Mockups Referenced:** No mockup update needed — same icon pattern as CR-002.

## Approval

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

## Execution

**Classification Result:** modification
**Conflicts Resolution:** none

**Actions Taken:**
- [x] CR document created in feature folder
- [x] Conflict analysis completed and documented
- [x] Specification Version History updated with CR link
- [ ] Next task type set: x-ipe-task-based-feature-refinement

## Links

- Feature Specification: [specification.md](specification.md)
- Related CR: [CR-002.md](CR-002.md)

---

## Change History

| Date | Change | By |
|------|--------|----|
| 03-27-2026 | CR created | Quill ✒️ |
