From 94ee08406e8cb2f838aaed845706a8b50a7ff473 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 3 May 2026 19:09:33 -0400 Subject: [PATCH 01/32] chore(nix): make chrome-devtools shell evaluate on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nixpkgs ships no Chromium derivation for Darwin (its meta.platforms is Linux-only), so referencing pkgs.chromium fails eval on macOS. On Darwin, fall through to chrome-devtools-mcp's built-in browser discovery — Puppeteer locates a user-installed Google Chrome at the standard /Applications path, otherwise downloads chrome-headless-shell into its cache. Linux keeps the pinned nixpkgs chromium so the shell stays fully self-contained. --- nix/chrome-devtools/shell.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nix/chrome-devtools/shell.nix b/nix/chrome-devtools/shell.nix index a469d7c4c..53c568738 100644 --- a/nix/chrome-devtools/shell.nix +++ b/nix/chrome-devtools/shell.nix @@ -22,9 +22,20 @@ let }) { }; mcpVersion = "0.21.0"; + # nixpkgs ships no Chromium derivation for Darwin (its meta.platforms + # is Linux-only), so referencing pkgs.chromium fails eval on macOS. + # On Darwin, fall through to chrome-devtools-mcp's built-in browser + # discovery: Puppeteer locates a user-installed Google Chrome at the + # standard /Applications path, otherwise downloads chrome-headless-shell + # into its cache. On Linux we keep the pinned nixpkgs chromium so the + # shell stays fully self-contained. + executablePathFlag = + if pkgs.stdenv.isDarwin + then "" + else "--executable-path=${pkgs.chromium}/bin/chromium"; mcp = pkgs.writeShellScriptBin "chrome-devtools-mcp" '' exec ${pkgs.nodejs}/bin/npx -y chrome-devtools-mcp@${mcpVersion} \ - --executable-path=${pkgs.chromium}/bin/chromium "$@" + ${executablePathFlag} "$@" ''; in pkgs.mkShell { From 830abcbc8486ecfb05c43c9ddbb9ed637457fb5d Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sun, 3 May 2026 19:09:49 -0400 Subject: [PATCH 02/32] feat(ui): attach panels to a single card; right-margin TOC + backlinks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default layout now reads as one rounded card with chrome attached on every edge: title strip on top, sidebar on the left, right panel (TOC + backlinks) on the right at lg+, and a backlinks strip on the bottom at smaller widths. Right panel hides one breakpoint earlier than the sidebar so the prose keeps room as the viewport narrows. Backlinks in the right margin show titles only; hovering reveals the context as a flyout to the left of the card. The flyout uses a transparent hover-bridge — outer wrapper extends right up to the link, inner card sits 0.75rem inside — so cursor traversal between link and card never drops the hover. Also lands a one-shot page-load reveal (sidebar fade + main rise), gated on prefers-reduced-motion. --- .../templates/components/backlinks-bottom.tpl | 29 ++++++++++++++ .../templates/components/backlinks-margin.tpl | 39 +++++++++++++++++++ emanote/default/templates/components/body.tpl | 25 ++++-------- .../templates/components/note-title.tpl | 13 +++++-- .../templates/components/right-panel.tpl | 33 ++++++++++++++++ emanote/default/templates/components/toc.tpl | 5 ++- emanote/default/templates/layouts/default.tpl | 28 +++++++++---- emanote/default/templates/styles.tpl | 24 +++++++++++- 8 files changed, 165 insertions(+), 31 deletions(-) create mode 100644 emanote/default/templates/components/backlinks-bottom.tpl create mode 100644 emanote/default/templates/components/backlinks-margin.tpl create mode 100644 emanote/default/templates/components/right-panel.tpl diff --git a/emanote/default/templates/components/backlinks-bottom.tpl b/emanote/default/templates/components/backlinks-bottom.tpl new file mode 100644 index 000000000..0a86b8065 --- /dev/null +++ b/emanote/default/templates/components/backlinks-bottom.tpl @@ -0,0 +1,29 @@ + + + + diff --git a/emanote/default/templates/components/backlinks-margin.tpl b/emanote/default/templates/components/backlinks-margin.tpl new file mode 100644 index 000000000..40fc071d3 --- /dev/null +++ b/emanote/default/templates/components/backlinks-margin.tpl @@ -0,0 +1,39 @@ + + + + diff --git a/emanote/default/templates/components/body.tpl b/emanote/default/templates/components/body.tpl index def3fd28c..547704989 100644 --- a/emanote/default/templates/components/body.tpl +++ b/emanote/default/templates/components/body.tpl @@ -1,22 +1,11 @@ -
+ +
- - -
-
- -
- -
- - -
-
- - -
+ +
diff --git a/emanote/default/templates/components/note-title.tpl b/emanote/default/templates/components/note-title.tpl index a14d08fa4..c3fec040e 100644 --- a/emanote/default/templates/components/note-title.tpl +++ b/emanote/default/templates/components/note-title.tpl @@ -1,3 +1,10 @@ -

- -

+ +
+

+ +

+
diff --git a/emanote/default/templates/components/right-panel.tpl b/emanote/default/templates/components/right-panel.tpl new file mode 100644 index 000000000..be2feb3d3 --- /dev/null +++ b/emanote/default/templates/components/right-panel.tpl @@ -0,0 +1,33 @@ + + +flex-shrink hidden leading-relaxed lg:block lg:sticky lg:top-0 lg:max-h-screen lg:w-52 lg:min-w-52 xl:w-72 xl:min-w-72 bg-gray-50 dark:bg-gray-950 lg:border-l border-gray-200 dark:border-gray-800 + + + + + + + diff --git a/emanote/default/templates/components/toc.tpl b/emanote/default/templates/components/toc.tpl index b4722cbd0..dddcd2c19 100644 --- a/emanote/default/templates/components/toc.tpl +++ b/emanote/default/templates/components/toc.tpl @@ -1,8 +1,9 @@ -