From 9a6c21fa042573edbc3e23283ad60c6046a7980c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Sat, 28 Nov 2026 01:18:09 +0100 Subject: [PATCH] v0.43.0 --- CHANGELOG.md | 1 + SHA256SUMS | 6 +++--- src/admin/web/css/40-editors.css | 37 ++++++++++++++++++++++++++++++++ src/admin/web/vhosts/core.js | 2 +- 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5ad144..8c99c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Release history focused on **features, settings, default behavior, compatibility - **Information icons and bubbles:** every "i" information icon in the panel (Overview widgets, Cache settings, FastCGI profiles) and the Docker label help "?" button now share one look that follows Settings → Appearance (corner style, theme colors, UI scale). The "?" button still opens the label help dialog. Information bubbles open next to their icon, stay inside the visible area (horizontal shift, open upwards near the bottom), close on Escape or a click elsewhere, and only one is open at a time. Long help text inside a bubble is no longer collapsed to two lines in Settings. - **Docker Vhosts:** "Diagnostic headers" becomes **Headers**. It contains the diagnostic header switches and, collapsed inside it, **HTTP policies** (previously a separately styled box below). The section summary shows which diagnostic headers are on and how many policy rules exist. Stored assignment fields (`timing_headers`, `backend_header`, `backend_timing_header`, `policy`) are unchanged. - **Custom locations redesign:** the location list is now a routing table — collapsed rows show order, state, ID, match, path/conditions, action and chips for settings that differ from the Vhost (access, headers, cache, balancing, HTTP policies, error fallback). An expanded location is split into **When** (match), **What** (action; only the fields of the selected action are shown) and **Options** tabs (Access, Headers, Cache, Errors, Backends & balancing, HTTP policies) with per-tab state. **Add location** offers starting points (backend path, Web Service, redirect, fixed response, internal `error_page` location, whole-host rule, empty). Existing locations open collapsed; a validation error opens the location and the tab that holds the field. No field, setting or behavior was removed: an unchanged save produces the same JSON as 0.42.4, and the same edit sequence (internal fallback location proxied to a dedicated backend, backend change, cache/method/rewrite changes, reordering, deletion) produced identical configuration and identical proxy responses in 0.42.4 and 0.43.0. +- **Vhost editor layout:** the heading, status line and tabs stay at the top, only the fields area scrolls, and the save bar is a fixed footer of the dialog instead of a sticky element inside the scrolled content (expanded Custom Locations could leave the bar floating over the form). Switching tabs starts the new tab at the top. Verified in Chromium and Firefox. - **Vhost / Custom location error fallback:** "Intercepted status codes" is replaced by a status picker (403, 404, 500, 502, 503, 504) labelled "Run the fallback for these upstream statuses", with clearer help that explains `error_page` semantics and scope (main route vs. one location). The target field suggests the IDs of enabled internal locations. Saved `error_fallback` JSON is unchanged; at least one status always stays selected, and statuses are inactive until a target is set. - **FastCGI / PHP-FPM:** TCP connections to the responder use `TCP_NODELAY`; request records are buffered (one write for requests without a body), responses are read through a buffer, and already-received `STDOUT` records are merged into larger body chunks without delaying streamed output. Measured on a local PHP-FPM 8.3 pool: about 5 instead of 15 read/write system calls per small PHP request and 13 instead of 27 for a 200 KB page; throughput on the 2-core test machine stayed within measurement noise. Timeouts, limits, error handling and truncation behavior are unchanged; new regression tests cover many small records with interleaved stderr and a 200 KB upload, prompt delivery of flushed output, and a truncated stream. - **Panel stylesheet cleanup:** removed rules for classes that no element uses (`cache-reason`, `runtime-information-grid`, `overview-layout-hidden-item`), 20 declarations that a later rule with the same selector always overrides, an empty rule, and two references to undefined custom properties (replaced by their effective fallback). Removed `app/dashboard-layout-editor.js`, which has not been part of the panel bundle since 0.33.7 and targeted elements that no longer exist. Rendering is unchanged. diff --git a/SHA256SUMS b/SHA256SUMS index a64d7c9..30c98b2 100644 --- a/SHA256SUMS +++ b/SHA256SUMS @@ -2,7 +2,7 @@ 4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example 0a5e87541831edca0e7164c6469dba01a8a7053ab14dbfb8019c83e4db10edc2 .gitignore 903ca521af6ef7e54f83dc0b4b0436d116c88f064c36f0317b689b7cce79ab27 AGENTS.md -30a6ceefeeb80279c5bde1fcd698870be76211d4367b8af7b2cd2ae8dcd72b0f CHANGELOG.md +3bedb8644d82b2c306bea4caddb871b63b04d9ee093148bf5c92294384493f86 CHANGELOG.md 1ed75ec0adde5af3a0fe565689b45a973c5dad8a8e382ea279f631d9688f7326 Cargo.lock 8bfe4cf8793a43e61ad29a013092069381c51120f85c1ef358fd048d6a22556e Cargo.toml 788745d4f70a0382c6280020afbd48844bb2af65e835a826852143f8132cdeca Dockerfile @@ -286,7 +286,7 @@ c2912a5e218896177776d4c5920e240092a3de66f9a4b95c1631796771e0ce3c src/admin/web/ 90a03a0ec649801837a85b2cc3dfa2eb3b4b504c25a8f96e4fa3278afb84bbb3 src/admin/web/css/10-base.css 9cd9b62ff8cfba47cb180e29ea5f69b8e97c7817dfcfddcb55fc4e08d11a7184 src/admin/web/css/20-shell.css fa12ba689dd8002c3a8bf2b4d05de210ea2b6793d90d9e318da9ebfa07dace65 src/admin/web/css/30-overview.css -7893733ce807ccc83e8ededbb5b9fb7b76e8e8f8257897615147b9f91410ed41 src/admin/web/css/40-editors.css +f9ce91bfceabfbccd9ddfb333b529895a4aed864355e916e7ecfb5b5839317a5 src/admin/web/css/40-editors.css 5029fad7af88e1d4bc3f72cc66c0899c47c4269d51637e12e4efe2c1a8310841 src/admin/web/css/50-settings.css fbaca765920866bb77280d3d762a81ffdd4e730869d87c3e653b2d298b39ef89 src/admin/web/css/55-policy.css 7691a9608e376bcc1f0802edef8b19e5c5ecb522e560a2fa7168a14985eb561a src/admin/web/css/60-monitoring.css @@ -338,7 +338,7 @@ a68bc028c6b12a8c02ab097c49cfba57cf596da4a995d04d89dbd56980656958 src/admin/web/ 336cc5b2a3e5e2514b6b15eed5f2b1ba714458d0e3e913d6f9ad7c870623c758 src/admin/web/traffic-panel.js 675ea169d4cc55fda5e291af536338b882bede1eaa6c9d5cc7dfde0779c7c4d1 src/admin/web/transform-panel.js c30373b0f2dc5672f88bc6fad0ffd5f6d85496d75da8fae83c6aa306e4e0f676 src/admin/web/vhosts/balancing.js -95ba07e8533c39b05db12a45375a8ff1a3e70d3ca9224cd6e7c5b7a5905242ef src/admin/web/vhosts/core.js +7ef75bee12e36ed981e585eb9dec21fdf438600b4ac5b00ebc9ea4ec62440810 src/admin/web/vhosts/core.js b73051f1ecfecac3ccd4283e8c703983c0ab7c2c1868026b26d046c6859ae485 src/admin/web/vhosts/editor.js f082588c35d981fc689542d4c12a7614638279335220d587fdee5d3fff822e80 src/admin/web/vhosts/headers-tab.js 3776f72d7051af86ac5fbdd4581040dd88a424c0c6cde789301b032b159094d8 src/admin/web/vhosts/health.js diff --git a/src/admin/web/css/40-editors.css b/src/admin/web/css/40-editors.css index 09e7ab8..9e0f797 100644 --- a/src/admin/web/css/40-editors.css +++ b/src/admin/web/css/40-editors.css @@ -697,6 +697,43 @@ z-index: 2; } +/* Vhost editor: heading and tabs stay on top, only the fields scroll and the + save bar is a plain footer. No sticky positioning inside the scrolled area, + so long Custom Location editors cannot push the bar into the content. */ +#vhost-dialog[open] { + display: flex; + flex-direction: column; + overflow: hidden; +} + +#vhost-dialog>#vhost-form { + display: flex; + flex-direction: column; + flex: 0 1 auto; + min-height: 0; +} + +#vhost-form>#vhost-fields { + flex: 0 1 auto; + min-height: 0; + overflow-y: auto; + overflow-x: hidden; + overscroll-behavior: contain; +} + +#vhost-form>.card-heading, +#vhost-form>.vh-tabs, +#vhost-form>.vh-live-summary, +#vhost-form>.form-actions, +#vhost-form>.fine { + flex: none; + position: static; +} + +#vhost-form>.form-actions { + margin-top: 8px; +} + .vh-header-row { display: grid; grid-template-columns: 88px minmax(110px, 1fr) minmax(140px, 2fr) auto; diff --git a/src/admin/web/vhosts/core.js b/src/admin/web/vhosts/core.js index 71a3923..ce46ee4 100644 --- a/src/admin/web/vhosts/core.js +++ b/src/admin/web/vhosts/core.js @@ -59,7 +59,7 @@ const defaults = () => ({ error_fallback: null, cache: { enabled: false }, compression: { enabled: null, gzip: null, br: null, zstd: null, deflate: null }, transform: { enabled: false }, rate_limit: {}, method_policy: { mode: "off", methods: [] }, content_type_policy: { enabled: false, blocked: [] }, routes: [], headers: {}, acl_profile_id: null, acl_profile_ids: [], acl: null, allow_certificate_mismatch: false, tls_policy: null, proxy_timeouts: defaultProxyTimeouts() }); -function activateTab(name) { document.querySelectorAll("#vhost-tabs button").forEach(b => { const active = b.dataset.tab === name; b.classList.toggle("active", active); b.setAttribute("aria-pressed", String(active)); b.setAttribute("aria-selected", String(active)); b.tabIndex = active ? 0 : -1; }); container.querySelectorAll(".vh-group").forEach(g => g.hidden = g.dataset.tab !== name); } +function activateTab(name) { if (document.querySelector("#vhost-tabs button.active")?.dataset.tab !== name) container.scrollTop = 0; document.querySelectorAll("#vhost-tabs button").forEach(b => { const active = b.dataset.tab === name; b.classList.toggle("active", active); b.setAttribute("aria-pressed", String(active)); b.setAttribute("aria-selected", String(active)); b.tabIndex = active ? 0 : -1; }); container.querySelectorAll(".vh-group").forEach(g => g.hidden = g.dataset.tab !== name); } function initTabs() { const tabs = $("vhost-tabs"); tabs.replaceChildren(); tabs.setAttribute("role", "tablist"); for (const [name, key] of [["details", "vhDetailsTab"], ["backends", "vhBackendPool"], ["health", "vhHealth"], ["locations", "vhLocations"], ["auth", "vhTabAuth"], ["ssl", "vhSsl"], ["cache", "vhCache"], ["compression", "vhCompression"], ["transform", "vhTransform"], ["security", "vhSecurity"], ["headers", "vhTabHeaders"], ["pages", "vhPages"]]) { const b = button(key, () => activateTab(name)); b.dataset.tab = name; b.setAttribute("role", "tab"); b.addEventListener("keydown", event => { const buttons = [...tabs.querySelectorAll("button")], index = buttons.indexOf(b); let next; if (event.key === "ArrowRight" || event.key === "ArrowDown") next = (index + 1) % buttons.length; else if (event.key === "ArrowLeft" || event.key === "ArrowUp") next = (index + buttons.length - 1) % buttons.length; else if (event.key === "Home") next = 0; else if (event.key === "End") next = buttons.length - 1; else return; event.preventDefault(); activateTab(buttons[next].dataset.tab); buttons[next].focus(); }); tabs.append(b); } activateTab("details"); } function jsonDrawer(parent, { name, titleKey, helpKey, value, maxLength, validate = value => value, apply }) { const node = el("details", undefined, "vh-wide vh-json-editor"), summary = el("summary"), status = el("span", undefined, "vh-json-status");