From 098e56a8950efbef79e551e12622ae7c8cd90c03 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sat, 8 Nov 2025 18:52:30 +0000
Subject: feat(extension): Allow writing notes directly in the extension
 (#2104)

* feat(extension): add notes editor to bookmark hoarded screen

Adds the ability to directly add and edit notes for bookmarks in the browser extension's hoarded screen (the page shown after saving a bookmark).

Changes:
- Created Textarea UI component for the browser extension
- Created NoteEditor component that uses useUpdateBookmark hook
- Added Notes section to BookmarkSavedPage, displayed between the header and tags
- Notes auto-save when the user clicks away from the textarea (onBlur)
- Shows saving state and error messages to the user

This brings feature parity with the web app's notes functionality.

* add explicit button

* more fixes

---------

Co-authored-by: Claude <noreply@anthropic.com>
---
 .../src/components/ui/textarea.tsx                 | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 apps/browser-extension/src/components/ui/textarea.tsx

(limited to 'apps/browser-extension/src/components/ui/textarea.tsx')

diff --git a/apps/browser-extension/src/components/ui/textarea.tsx b/apps/browser-extension/src/components/ui/textarea.tsx
new file mode 100644
index 00000000..6651e331
--- /dev/null
+++ b/apps/browser-extension/src/components/ui/textarea.tsx
@@ -0,0 +1,23 @@
+import * as React from "react";
+
+import { cn } from "../../utils/css";
+
+export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
+
+const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
+  ({ className, ...props }, ref) => {
+    return (
+      <textarea
+        className={cn(
+          "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+          className,
+        )}
+        ref={ref}
+        {...props}
+      />
+    );
+  },
+);
+Textarea.displayName = "Textarea";
+
+export { Textarea };
-- 
cgit v1.2.3-70-g09d2

