From 3ec8d16bc22c33bed5a9c69be7bbd7a6ab873343 Mon Sep 17 00:00:00 2001
From: Luciano Castillo <2213102+luccast@users.noreply.github.com>
Date: Wed, 4 Feb 2026 13:28:13 -0500
Subject: [PATCH] fix(workspace): address PR #47 review feedback
- Use stable keys (item.label) instead of array indices in FileContextMenu
- Add clipboard feedback showing "Copied!" or "Failed" status
- Fix empty catch block in createFile to preserve error context
- Remove duplicate empty line in workspace page
- Remove unused MarkdownViewer component (replaced by FileEditor)
---
src/components/workspace/FileContextMenu.tsx | 4 +-
src/components/workspace/MarkdownViewer.tsx | 224 -------------------
src/components/workspace/index.ts | 1 -
src/lib/workspace-fs.ts | 6 +-
src/routes/workspace/index.tsx | 13 +-
5 files changed, 16 insertions(+), 232 deletions(-)
delete mode 100644 src/components/workspace/MarkdownViewer.tsx
diff --git a/src/components/workspace/FileContextMenu.tsx b/src/components/workspace/FileContextMenu.tsx
index 3557200..58f00de 100644
--- a/src/components/workspace/FileContextMenu.tsx
+++ b/src/components/workspace/FileContextMenu.tsx
@@ -81,9 +81,9 @@ export function FileContextMenu({ open, position, items, onClose }: FileContextM
>
{/* Menu items */}
- {items.map((item, index) => (
+ {items.map((item) => (