From 7c1bbc8176928f47be3dead15c7d18b00c673278 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 25 Aug 2026 12:00:15 +0200 Subject: [PATCH] refactor(honeybar): HONEYBAR_ORIGIN statt INKNOTE_HONEYBAR_ORIGIN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dieselben Namen wie in Aether. Die Leiste gehoert keiner App, sie ist ueberall dieselbe Sache — dann soll sie auch ueberall gleich heissen. Ein zweiter Name fuer dieselbe Einstellung ist eine Fehlerquelle beim Umziehen und beim Suchen. Co-Authored-By: Claude Opus 5 --- .env.example | 4 ++-- CHANGELOG.md | 2 +- backend/server.js | 4 ++-- docker-compose.dev.yml | 4 ++-- docker-compose.yml | 4 ++-- readme.md | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index a12c7b3..f668a33 100644 --- a/.env.example +++ b/.env.example @@ -28,11 +28,11 @@ INKNOTE_ADMIN_PASSWORD= # ── HoneyOS bar ─────────────────────────────────────────────────────────────── # The strip along the top that ties the apps together. Empty = no bar. # Wirkt beim Neustart, nicht beim Bauen. -# INKNOTE_HONEYBAR_ORIGIN=https://honeyos.example.com +# HONEYBAR_ORIGIN=https://honeyos.example.com # Only needed when HoneyOS lives on a different site than InkNote — then the # browser will not send its session and the bar needs this to fetch the app # list. Same domain (notes.example.org + example.org): leave empty. -# INKNOTE_HONEYBAR_KEY= +# HONEYBAR_KEY= # INKNOTE_MAX_PDF_MB=200 # imported PDFs, limited separately # INKNOTE_UID=1000 # must own INKNOTE_DATA_DIR # INKNOTE_GID=1000 diff --git a/CHANGELOG.md b/CHANGELOG.md index 257da0a..258f04b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ a rebuild is not bit-identical. **Added** - **A strip along the top that leads to the other apps.** It is served by HoneyOS, so what it looks like and which apps it lists are settled there — - InkNote only says where to find it. `INKNOTE_HONEYBAR_ORIGIN` in the `.env` + InkNote only says where to find it. `HONEYBAR_ORIGIN` in the `.env` switches it on, empty leaves everything exactly as before. - **`GET /api/public/config`** hands out that origin, and the key that goes with it when HoneyOS lives on a different site. Runtime, not build time: an image diff --git a/backend/server.js b/backend/server.js index 600d926..cd9e2b2 100644 --- a/backend/server.js +++ b/backend/server.js @@ -890,10 +890,10 @@ app.get("/api/auth/methods", (req, res) => { * nothing to unlock, and it should not sit in the page for no reason. It buys * the list of apps and nothing else. */ app.get("/api/public/config", (req, res) => { - const origin = String(process.env.INKNOTE_HONEYBAR_ORIGIN || "").replace(/\/+$/, ""); + const origin = String(process.env.HONEYBAR_ORIGIN || "").replace(/\/+$/, ""); res.json({ honeybar: origin - ? { origin, key: String(process.env.INKNOTE_HONEYBAR_KEY || "") } + ? { origin, key: String(process.env.HONEYBAR_KEY || "") } : null, }); }); diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a5370bf..b6033cd 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -35,8 +35,8 @@ services: # HoneyOS bar. Empty origin means no bar at all; the key is only needed # when HoneyOS sits on a different site, where the browser withholds its # session. Takes effect on restart — nothing here is baked into the image. - - INKNOTE_HONEYBAR_ORIGIN=${INKNOTE_HONEYBAR_ORIGIN:-} - - INKNOTE_HONEYBAR_KEY=${INKNOTE_HONEYBAR_KEY:-} + - HONEYBAR_ORIGIN=${HONEYBAR_ORIGIN:-} + - HONEYBAR_KEY=${HONEYBAR_KEY:-} - INKNOTE_MAX_PDF_MB=${INKNOTE_MAX_PDF_MB:-} - MAX_VERSIONS_PER_NOTE=${MAX_VERSIONS_PER_NOTE:-} - VERSION_RETENTION_DAYS=${VERSION_RETENTION_DAYS:-} diff --git a/docker-compose.yml b/docker-compose.yml index e49b0d8..04113ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,8 +33,8 @@ services: # HoneyOS bar. Empty origin means no bar at all; the key is only needed # when HoneyOS sits on a different site, where the browser withholds its # session. Takes effect on restart — nothing here is baked into the image. - - INKNOTE_HONEYBAR_ORIGIN=${INKNOTE_HONEYBAR_ORIGIN:-} - - INKNOTE_HONEYBAR_KEY=${INKNOTE_HONEYBAR_KEY:-} + - HONEYBAR_ORIGIN=${HONEYBAR_ORIGIN:-} + - HONEYBAR_KEY=${HONEYBAR_KEY:-} - INKNOTE_MAX_PDF_MB=${INKNOTE_MAX_PDF_MB:-} - MAX_VERSIONS_PER_NOTE=${MAX_VERSIONS_PER_NOTE:-} - VERSION_RETENTION_DAYS=${VERSION_RETENTION_DAYS:-} diff --git a/readme.md b/readme.md index 95ac60c..cc48672 100644 --- a/readme.md +++ b/readme.md @@ -171,7 +171,7 @@ otherwise the app is reachable on the host's address without TLS. #### The HoneyOS bar -`INKNOTE_HONEYBAR_ORIGIN` puts a strip along the top of every page that leads to +`HONEYBAR_ORIGIN` puts a strip along the top of every page that leads to the other apps of the same system — it is served by HoneyOS, so what it looks like and which apps it lists are settled there, not here. Empty means no bar at all, and nothing about the app changes. @@ -181,7 +181,7 @@ The value takes effect on restart: the page asks the server for it built into the image — an image is pulled ready-made, and a service worker keeps whole responses, so anything frozen into `index.html` would outlive the setting. -`INKNOTE_HONEYBAR_KEY` is only needed when HoneyOS sits on a *different site* +`HONEYBAR_KEY` is only needed when HoneyOS sits on a *different site* than InkNote (`honeyos.example.com` vs `notes.example.org`). The browser then withholds the HoneyOS session, and the bar has no other way to ask for the list of apps. Under a shared domain it can stay empty.