diff --git a/.agents/skills/formweb-harness/SKILL.md b/.agents/skills/formweb-harness/SKILL.md index fe25e017..151d0273 100644 --- a/.agents/skills/formweb-harness/SKILL.md +++ b/.agents/skills/formweb-harness/SKILL.md @@ -5,7 +5,7 @@ license: Apache-2.0 compatibility: "Project skill for Claude Code and other clients with the FormWeb MCP server connected. Requires a running local FormWeb FastAPI service and explicit Agents enablement." metadata: author: "nodemode-ai" - version: "0.36.0" + version: "0.37.0" --- # FormWeb Harness diff --git a/.claude/skills/formweb-harness/SKILL.md b/.claude/skills/formweb-harness/SKILL.md index fe25e017..151d0273 100644 --- a/.claude/skills/formweb-harness/SKILL.md +++ b/.claude/skills/formweb-harness/SKILL.md @@ -5,7 +5,7 @@ license: Apache-2.0 compatibility: "Project skill for Claude Code and other clients with the FormWeb MCP server connected. Requires a running local FormWeb FastAPI service and explicit Agents enablement." metadata: author: "nodemode-ai" - version: "0.36.0" + version: "0.37.0" --- # FormWeb Harness diff --git a/.docs/wiki/Home.md b/.docs/wiki/Home.md index 9fa38d76..2540ab56 100644 --- a/.docs/wiki/Home.md +++ b/.docs/wiki/Home.md @@ -2,7 +2,7 @@ FormWeb is the form family's visual website authoring application. A Rust engine owns editable sites and exports browser-native HTML, CSS and JavaScript. A Python/FastAPI service supplies projects, local publications, forms and MCP. A vanilla TypeScript/Vite window displays and changes the same engine state. -Release version: 0.36.0. Author: nodemode-ai. The repository README and changelog record this release. +Release version: 0.37.0. Author: nodemode-ai. The repository README and changelog record this release. | Surface | Current boundary | | --- | --- | diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b5f150..7971e98d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.37.0 · 2026-11-30 + +- Menus in the menu bar always open just under their button and are at most three quarters of the window tall; what does not fit scrolls. Before, in a short window a menu could be moved up over the menu bar. +- Submenus, and the menus that open beside More menus when the bar is narrow, never go above the menu bar's bottom edge and take the same limit. They still open beside their row. Before, a long one could start at the top of the window, over the bar. +- Right-click menus (layers, pages and the canvas) still open at the pointer, but never above the menu bar and at most three quarters of the window tall; the same holds for the menu of hidden levels in the path above the canvas. Before, a long one could cover the menu bar. +- A menu that is cut off fades out at its bottom and shows a small pill with a down arrow while rows remain below. The pill is there as soon as the menu opens, goes away at the last row and comes back when you scroll up. With reduced motion it shows and hides without fading. A menu that fits shows nothing. +- The arrow keys, Home and End keep the chosen row in view and above the fade. +- Settings > About shows the licence texts of everything FormWeb ships, and the installers carry the same file. +- Agent Connect in the installed app writes client entries that reach the running app at its own address, and an Antigravity entry that needs a token it does not have is shown as changed, with the reason. On Windows, agent programs installed with npm start without cmd.exe, and starts that would go through cmd.exe with characters it would change are refused. +- The installed app accepts requests only from its own window by default. +- Agents: `send_to_formpublisher` works again, and a batch that replaces the whole site waits for approval when Agent Connect is set to ask. +- Known gaps: the right-click menus were not measured in a browser for this release, because they need an open site; the menu bar menus were. Type-ahead in a menu bar menu (typing a row's first letters) can leave the row inside the fade. The pickers beside the Design fields (the list fields, the color picker, the grid chooser) and the insert flyout keep their own size limits. Nothing of the menu change was run in the desktop app, on Windows or macOS, in Firefox or Safari, or with a screen reader. + ## 0.36.0 · 2026-11-27 - The fifth of five releases that answer the follow-up on issue #36: imports that keep their look. diff --git a/README.md b/README.md index 7cc71cde..b9d94c7c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@
-
+
diff --git a/VERSION b/VERSION
index 93d4c1ef..0f1a7dfc 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.36.0
+0.37.0
diff --git a/backend/app/config.py b/backend/app/config.py
index 0b7f62ec..ac39b842 100644
--- a/backend/app/config.py
+++ b/backend/app/config.py
@@ -11,7 +11,7 @@
if FROZEN:
ROOT.mkdir(parents=True, exist_ok=True)
load_dotenv(ROOT / 'backend' / '.env')
-VERSION = '0.36.0'
+VERSION = '0.37.0'
PORT = int(os.getenv('FORMWEB_PORT', '8240'))
CORE_NAME = 'formweb-core.exe' if os.name == 'nt' else 'formweb-core'
CORE_BIN = Path(os.getenv('FORMWEB_CORE_BIN', str(BUNDLE / 'bin' / CORE_NAME if FROZEN else ROOT / 'native/target/release' / CORE_NAME)))
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 2b296e1a..4ba6717c 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -1,5 +1,29 @@
# Frontend context map
+## Menus keep under the menu bar, take a three-quarter cap and show a more-below hint · v0.37.0 (2026-11-30)
+
+FORM-MENU-OVERLAP-FIX 1.2.0 (FormVis 2.8.3 and 2.8.4), ported. No engine, service or command change. Changed: `ui/context-menu.ts`, `ui/shell.ts` (`Menubar`), `styles/shell.css`, and one selector in `tests/unit/ui/context-menu.test.ts`.
+
+The fault. `Menubar.place` capped a bar menu at `innerHeight - 4 - top` with a 120 px floor, so with less than 124 px of room under the bar the floor pushed the menu past the window and the `Math.min(top, ...)` then moved it up over the bar. Submenus (`beside`, including the folded menus that open beside More menus) had no inline cap at all, only the stylesheet's `calc(100vh - 8px)`, and were clamped to 4 px from the window top, so a long one covered the bar. `showContextMenu`'s `place` (layer, canvas, page and crumbs menus) also clamped to 4 px from the window top with the same stylesheet cap. Removed from `Menubar.place`:
+
+```ts
+view.popup.style.maxHeight = beside ? '' : `${Math.max(120, Math.floor(window.innerHeight - 4 - top))}px`;
+const y = Math.min(top, window.innerHeight - 4 - height);
+if (y !== top) view.popup.style.top = `${Math.max(4, Math.round(y))}px`;
+```
+
+and from `place` in `ui/context-menu.ts`:
+
+```ts
+menu.style.top = `${Math.round(Math.max(EDGE, top))}px`;
+```
+
+Now. `menuCap(top)` is `min(75% of innerHeight, innerHeight - top - 4)`, never negative. `barFloor()` is the bottom of `.fw-menubar` plus 4, or 4 when the bar has no box (the macOS system menu hides it with width 0, hence the width test as well as the height). A bar menu keeps `top` (button bottom + 4) and takes `menuCap(top)`, so it is never moved. A submenu and a More cascade entry take `menuCap(barFloor())` and their `y` is clamped to at least `barFloor()`; they still open beside their row. Context menus keep their pointer-corner placement and only take `menuCap(barFloor())` before measuring and `Math.max(floor, top)`. All of it is set while the card is `visibility: hidden` (the Menubar card now gets that too; the context menu already had it).
+
+The hint. Rows move from the card into a `.fw-menu-list` scroller built by `menuCard(className)`; the card keeps `max-height`, the glass and the padding, and holds the list and the pill `.fw-menu-hint` (not `.fw-menu-more`: that class is the More menus button). `showMore(card, list, instant)` sets `has-more` while rows remain below, with `no-fade` around the first call so the hint is in place on the first painted frame; the list's `scroll` listener calls it again. CSS as in the guide, with `--glass-bg` and `--glass-border` for the pill. `keepInView(list, row)` scrolls only the list so a row reached with the arrows, Home or End sits above the fade; the bar's `go()` and the context menu's arrows, Home and End use it and focus with `preventScroll`. Type-ahead in a bar menu still uses the browser's own focus scroll. Both menus close on window resize, so the cap is never stale. `tests/unit/ui/context-menu.test.ts` read the separators from the card's children; it now reads `.fw-menu-list`.
+
+Not changed: `native-menu.ts`, the try list (`.fw-tlist`), the color picker, the grid chooser and the insert flyout, which are pickers anchored to fields rather than menus.
+
## Settings > About with the third-party notices · unreleased (2026-11-29)
No engine change and no version bump. `backend/HASHOUT_LOG.md` has the file, its generator and `GET /api/notices`. New: `features/third-party-notices.ts` and `styles/third-party-notices.css`; in `main.ts` an `About` entry in `prefsIcons` (the `info` icon) and `prefsAdd('About', prefsGroup('Licences and notices', aboutRows()))` after Plugins.
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 35fbb56f..a225cf7c 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "formweb-frontend",
- "version": "0.36.0",
+ "version": "0.37.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "formweb-frontend",
- "version": "0.36.0",
+ "version": "0.37.0",
"dependencies": {
"@fontsource/inter": "5.3.0",
"@fontsource/jetbrains-mono": "5.3.0",
diff --git a/frontend/package.json b/frontend/package.json
index e3ac3f05..6d15519d 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "formweb-frontend",
"private": true,
- "version": "0.36.0",
+ "version": "0.37.0",
"type": "module",
"engines": {
"node": ">=22.12.0"
diff --git a/frontend/src/styles/shell.css b/frontend/src/styles/shell.css
index b4806d1b..f882e444 100644
--- a/frontend/src/styles/shell.css
+++ b/frontend/src/styles/shell.css
@@ -206,6 +206,15 @@ a.fw-home-action { text-decoration: none; }
.fw-menu-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-menu-keys { color: var(--text-muted); font-size: var(--fs-12); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.fw-menu-sep { height: 1px; margin: 6px 10px; background: color-mix(in srgb, var(--text-primary) 12%, transparent); }
+@property --menu-more { syntax: '
';
-interface MenuView { name: string; def?: MenuDef; button: HTMLButtonElement; popup: HTMLElement; rows: { row: HTMLButtonElement; item?: Command; child?: MenuView }[]; folded: boolean; row?: HTMLButtonElement; parent?: MenuView }
+interface MenuView { name: string; def?: MenuDef; button: HTMLButtonElement; popup: HTMLElement; list: HTMLElement; rows: { row: HTMLButtonElement; item?: Command; child?: MenuView }[]; folded: boolean; row?: HTMLButtonElement; parent?: MenuView }
const KEEPS_ALT = '.xterm, .ft-dock, .ft-consent, .ft-tour, [data-no-keys]';
const TYPE_AHEAD_MS = 700;
@@ -59,11 +60,10 @@ export class Menubar {
moreButton.setAttribute('aria-haspopup', 'menu');
moreButton.setAttribute('aria-expanded', 'false');
moreButton.append(icon('more'));
- const morePopup = element('div', 'fw-menu');
- morePopup.setAttribute('role', 'menu');
+ const { card: morePopup, list: moreList } = menuCard('fw-menu');
morePopup.setAttribute('aria-label', 'More menus');
morePopup.hidden = true;
- const more: MenuView = { name: 'More menus', button: moreButton, popup: morePopup, rows: [], folded: false };
+ const more: MenuView = { name: 'More menus', button: moreButton, popup: morePopup, list: moreList, rows: [], folded: false };
this.more = more;
this.press(moreButton, more);
moreButton.addEventListener('pointerenter', () => { if (this.open && this.open !== more) this.show(more); });
@@ -75,11 +75,10 @@ export class Menubar {
button.dataset.menu = name;
button.setAttribute('aria-haspopup', 'menu');
button.setAttribute('aria-expanded', 'false');
- const popup = element('div', 'fw-menu');
- popup.setAttribute('role', 'menu');
+ const { card: popup, list } = menuCard('fw-menu');
popup.setAttribute('aria-label', name);
popup.hidden = true;
- const view: MenuView = { name, def, button, popup, rows: [], folded: false };
+ const view: MenuView = { name, def, button, popup, list, rows: [], folded: false };
const row = element('button', 'fw-menu-item fw-menu-sub');
row.type = 'button';
row.hidden = true;
@@ -93,7 +92,7 @@ export class Menubar {
row.addEventListener('click', () => this.show(view));
row.addEventListener('pointerenter', () => { if (this.sub !== view) this.show(view); });
view.row = row;
- morePopup.append(row);
+ moreList.append(row);
this.press(button, view);
button.addEventListener('pointerenter', () => { if (this.open && this.open !== view) this.show(view); });
this.menus.push(view);
@@ -144,7 +143,7 @@ export class Menubar {
}
private item(view: MenuView, spec: string): void {
- if (spec === '-') { view.popup.append(element('div', 'fw-menu-sep')); return; }
+ if (spec === '-') { view.list.append(element('div', 'fw-menu-sep')); return; }
const item = commands.get(spec);
if (!item) return;
const row = element('button', 'fw-menu-item');
@@ -154,7 +153,7 @@ export class Menubar {
row.title = t('{0} · {1}', [{ t: commands.label(item) }, item.id]);
row.append(element('span', 'fw-menu-check'), element('span', 'fw-menu-label', commands.label(item)), element('span', 'fw-menu-keys', commands.keyLabel(item)));
row.addEventListener('click', () => { this.close(); runCommand(item.id); });
- view.popup.append(row);
+ view.list.append(row);
view.rows.push({ row, item });
}
@@ -168,11 +167,10 @@ export class Menubar {
const chevron = element('span', 'fw-menu-keys');
chevron.append(icon('chevron'));
row.append(element('span', 'fw-menu-check'), element('span', 'fw-menu-label', spec.label), chevron);
- const popup = element('div', 'fw-menu');
- popup.setAttribute('role', 'menu');
+ const { card: popup, list } = menuCard('fw-menu');
popup.setAttribute('aria-label', spec.label);
popup.hidden = true;
- const child: MenuView = { name: spec.label, button: row, popup, rows: [], folded: false, row, parent };
+ const child: MenuView = { name: spec.label, button: row, popup, list, rows: [], folded: false, row, parent };
for (const id of spec.items) this.item(child, id);
row.addEventListener('click', () => this.nest(child));
row.addEventListener('pointerenter', () => this.nest(child));
@@ -182,7 +180,7 @@ export class Menubar {
if (over && this.leaf?.parent === parent && over !== this.leaf.row) this.unnest();
});
}
- parent.popup.append(row);
+ parent.list.append(row);
parent.rows.push({ row, child });
this.overlay.append(popup);
}
@@ -249,17 +247,22 @@ export class Menubar {
}
private place(view: MenuView, left: number, top: number, beside?: DOMRect): void {
+ const floor = beside ? barFloor() : top;
+ view.popup.style.visibility = 'hidden';
view.popup.style.left = `${Math.round(left)}px`;
view.popup.style.top = `${Math.round(top)}px`;
- view.popup.style.maxHeight = beside ? '' : `${Math.max(120, Math.floor(window.innerHeight - 4 - top))}px`;
+ view.popup.style.maxHeight = `${menuCap(floor)}px`;
view.popup.hidden = false;
+ view.list.scrollTop = 0;
const width = view.popup.offsetWidth;
const height = view.popup.offsetHeight;
let x = left;
if (x + width > window.innerWidth - 4) x = beside ? beside.left - width - 2 : window.innerWidth - 4 - width;
- const y = Math.min(top, window.innerHeight - 4 - height);
+ const y = beside ? Math.max(floor, Math.min(top, window.innerHeight - 4 - height)) : top;
if (x !== left) view.popup.style.left = `${Math.max(4, Math.round(x))}px`;
- if (y !== top) view.popup.style.top = `${Math.max(4, Math.round(y))}px`;
+ if (y !== top) view.popup.style.top = `${Math.round(y)}px`;
+ showMore(view.popup, view.list, true);
+ view.popup.style.visibility = '';
}
private reveal(view: MenuView): void {
@@ -368,7 +371,7 @@ export class Menubar {
const rows = this.focusable(view);
const at = rows.indexOf(document.activeElement as HTMLButtonElement);
const child = at >= 0 ? view.rows.find(entry => entry.row === rows[at])?.child : undefined;
- const go = (index: number): void => { if (rows.length) rows[(index + rows.length) % rows.length].focus(); };
+ const go = (index: number): void => { if (!rows.length) return; const row = rows[(index + rows.length) % rows.length]; row.focus({ preventScroll: true }); keepInView(view.list, row); };
const ring = this.ring();
const turn = (step: number): void => { this.show(ring[(ring.indexOf(this.open as MenuView) + step + ring.length) % ring.length], true); };
const folded = view === this.more && at >= 0 ? this.menus.find(entry => entry.row === rows[at]) : undefined;
diff --git a/frontend/tests/unit/ui/context-menu.test.ts b/frontend/tests/unit/ui/context-menu.test.ts
index 5dc9a310..ad54cd6a 100644
--- a/frontend/tests/unit/ui/context-menu.test.ts
+++ b/frontend/tests/unit/ui/context-menu.test.ts
@@ -31,7 +31,7 @@ describe('opening the menu', () => {
it('shows the given entries in order with a separator between groups', () => {
showContextMenu(menuEntries(), { x: 40, y: 60 }, { host });
expect(items().map(item => item.textContent)).toEqual(['Open', 'Rename', 'Duplicate', 'Home', 'Delete']);
- expect(Array.from(host.querySelector('.fw-menu')!.children).map(child => child.classList.contains('fw-menu-sep') ? '|' : (child as HTMLElement).dataset.command)).toEqual(['open', 'rename', '|', 'duplicate', 'home', '|', 'delete']);
+ expect(Array.from(host.querySelector('.fw-menu-list')!.children).map(child => child.classList.contains('fw-menu-sep') ? '|' : (child as HTMLElement).dataset.command)).toEqual(['open', 'rename', '|', 'duplicate', 'home', '|', 'delete']);
});
it('a separator at the start, at the end or twice in a row is not drawn', () => {
diff --git a/native/Cargo.lock b/native/Cargo.lock
index 717bae63..93721a92 100644
--- a/native/Cargo.lock
+++ b/native/Cargo.lock
@@ -54,7 +54,7 @@ dependencies = [
[[package]]
name = "formweb-core"
-version = "0.36.0"
+version = "0.37.0"
dependencies = [
"formweb-engine",
"formweb-export",
@@ -64,7 +64,7 @@ dependencies = [
[[package]]
name = "formweb-engine"
-version = "0.36.0"
+version = "0.37.0"
dependencies = [
"formweb-model",
"getrandom",
@@ -73,7 +73,7 @@ dependencies = [
[[package]]
name = "formweb-export"
-version = "0.36.0"
+version = "0.37.0"
dependencies = [
"formweb-model",
"serde_json",
@@ -82,7 +82,7 @@ dependencies = [
[[package]]
name = "formweb-model"
-version = "0.36.0"
+version = "0.37.0"
dependencies = [
"serde",
"serde_json",
diff --git a/native/Cargo.toml b/native/Cargo.toml
index 95226947..b0dedf0f 100644
--- a/native/Cargo.toml
+++ b/native/Cargo.toml
@@ -5,7 +5,7 @@ exclude = ["crates/formweb-render"]
resolver = "2"
[workspace.package]
-version = "0.36.0"
+version = "0.37.0"
edition = "2021"
license = "Apache-2.0"
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index b2df0733..f81b42cf 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -1124,7 +1124,7 @@ dependencies = [
[[package]]
name = "formweb"
-version = "0.36.0"
+version = "0.37.0"
dependencies = [
"formweb-render",
"objc2",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 08e0ce38..022b79e5 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "formweb"
-version = "0.36.0"
+version = "0.37.0"
description = "FormWeb desktop shell"
authors = ["nodemode-ai"]
license = "Apache-2.0"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 359cd898..cbac6f9d 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "FormWeb",
- "version": "0.36.0",
+ "version": "0.37.0",
"identifier": "ai.nodemode.formweb",
"build": {
"frontendDist": "../frontend/dist"