# Knowledge File Viewer — Research & Implementation Plan ## Current State The gap is a single `
` fallback in `App.tsx:4523–4527`. The decision tree today:

```
selectedPath ends in .md  →  MarkdownEditor (full ProseMirror, works great)
selectedPath is anything else  →  
 raw text dump  ← THIS IS THE ENTIRE GAP
```

Everything else needed already exists:

| What's needed | What exists | Where |
|---|---|---|
| Read binary files | `shell:readFileBase64` IPC handler | `apps/main/src/ipc.ts:648–667` |
| Read text files | `workspace:readFile` with `encoding` param | `packages/shared/src/ipc.ts:55–67` |
| File type detection | `attachment-presentation.ts` utilities | `renderer/src/lib/attachment-presentation.ts` |
| Audio player component | `AudioFileCard` (base64 → `