Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v0.14.0 · 2026-11-30

Menus that stay under the menu bar, and a sign that a long menu has more below.

- Fixed: a menu from the menu bar that was taller than the room under the bar opened upwards and covered the bar. It now always opens under its button and is at most three quarters of the window tall; its submenus keep under the bar too.
- Fixed: a long right-click menu, such as those of the Queue, the Media Browser and the Preset Browser, could cover the menu bar and the title. It still opens at the pointer, but never above the bar's bottom edge, and takes the same height limit.
- New: when a menu is cut off, its bottom rows fade and a small arrow shows that more rows are below. Both go away at the last row and come back when you scroll up. End and Home in an open menu go to its last and first row.
- Open menus close when the window is resized.
- The three browser demos are rebuilt from this version and say 0.14.0.

## v0.13.2 · 2026-11-29

Safer agent changes, folder destinations that keep every file, and a cache folder of its own.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>

<p align="center">
<img alt="version 0.13.2" src="https://img.shields.io/badge/version-0.13.2-eef0f4?style=flat-square">
<img alt="version 0.14.0" src="https://img.shields.io/badge/version-0.14.0-eef0f4?style=flat-square">
<img alt="Rust" src="https://img.shields.io/badge/Rust-engine-b7410e?style=flat-square&logo=rust&logoColor=white">
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-interface-3178c6?style=flat-square">
<img alt="macOS, Windows, Linux" src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-native-2f7bf5?style=flat-square">
Expand Down Expand Up @@ -102,7 +102,7 @@ FormEncoder loads extensions made to the Form Extension Contract (API 1): FormPo

## Under the hood

Version 0.13.2 · Apache-2.0 · Rust encoding engine, Python service, TypeScript interface, Tauri 2 shell
Version 0.14.0 · Apache-2.0 · Rust encoding engine, Python service, TypeScript interface, Tauri 2 shell

- **Engine:** seven `fencoder` Rust crates in `native/`, loaded by the Python service as the `fe_core` extension.
- **FFmpeg:** a pinned LGPL build, run as a separate program and never linked.
Expand Down
2 changes: 1 addition & 1 deletion backend/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.13.2"
__version__ = "0.14.0"
2 changes: 1 addition & 1 deletion demo/assets/demo.css

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions demo/assets/demo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demos/broadcast/assets/broadcast.css

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions demos/broadcast/assets/broadcast.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demos/inspect/assets/inspect.css

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions demos/inspect/assets/inspect.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion form-functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"format": "form-functions",
"format_version": 1,
"app": "formencoder",
"app_version": "0.13.2",
"app_version": "0.14.0",
"functions": [
{
"id": "encode",
Expand Down
44 changes: 44 additions & 0 deletions frontend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,47 @@ Refers to `ui/notices.ts` (new) `thirdPartyNotices`, `app/app.ts` `about`, `styl
- Help > About formencoder gains a closed Third-party notices section under the licence lines. Opened, it fetches `/api/notices` once (the text is about 1.4 MB, so not with the dialog) into a fixed 280 px box that scrolls inside itself, so the dialog does not move when the text arrives. A failed fetch says where the same text is and tries again on the next opening.
- The FFmpeg line now says NOTICE.md lists the components and the full licence texts follow.
- Checked: `npm run build` (tsc and Vite). Not opened in a desktop window.

## Bar menus open under the bar (0.14.0)

Refers to `ui/popup.ts` `menuCap`, `PopupMenu.floor`, `PopupMenu.openUnder` (new), `PopupMenu.openBeside`; `ui/menubar.ts` `MenuBar.show` · kind: fix · logged: v0.14.0 · 2026-11-30

- Why: FORM-MENU-OVERLAP-FIX 1.2.0, rules 1 to 3. `MenuBar.show` opened its menus with `openAt`, the right-click routine. A menu taller than the room under the bar was flipped above its point and clamped to 4 px from the window top, over the bar; the stylesheet's `calc(100vh - 8px)` cap was taller than that room. `openBeside` clamped submenus the same way.
- `openUnder(x, y)` keeps the top at `y` (the button's bottom plus 4) and sets an inline `max-height` of `menuCap(y)` (75% of the window, and never past its bottom less 4 px) while the card is still `visibility: hidden`, so it never paints at another size or place. It remembers `y` as the menu's `floor`. `openBeside` reads the root menu's floor, takes the same cap before measuring and never goes above the floor; with no floor it keeps the 4 px clamp.
- Removed, `MenuBar.show` and `openBeside`:

```ts
m.menu.openAt(r.left, r.bottom + 4);
```

```ts
const y = Math.max(4, Math.min(row.top - 4, window.innerHeight - h - 4));
```

## The more-below hint (0.14.0)

Refers to `ui/popup.ts` `PopupMenu` constructor, `setItems`, `openAt`, `openUnder`, `openBeside`, `showMore` (new), `key`; `styles/base.css` `.cv-menu`, `.cv-menu-list`, `.cv-menu-more` · kind: feat · logged: v0.14.0 · 2026-11-30

- Why: FORM-MENU-OVERLAP-FIX 1.2.0, rule 8. This app hides every scrollbar (`styles/scrollbars.css`), so a capped menu gave no sign that rows remained below.
- The card no longer scrolls: it holds `.cv-menu-list`, which does, and the pill `.cv-menu-more`. The mask goes on the list so the rows fade into the card's own glass; a mask on the card would fade its glass, border and shadow too, and a gradient over the rows would show as a band. `max-height` stays on the card. Nothing outside `popup.ts` reads the card's children or `scrollTop` (`ui/keys.ts` only asks whether a `.cv-menu` is shown).
- `showMore(true)` runs while the card is still hidden, with `no-fade` set for one style read, so the hint is in place on the first painted frame and never fades in on opening. The list's `scroll` calls `showMore()`, so the transition that runs is the one of the state being entered: 160 ms out at the last row, 490 ms back in. `--menu-more` is a registered `@property` so the mask can animate; reduced motion drops both transitions.
- `scroll-padding-block-end` on the list while the hint shows keeps a row focused with the arrow keys out of the fade. End and Home now focus the last and first row: the card used to be the scroller, so End scrolled it while it had focus, and the list is not an ancestor of the card's focus.
- Removed from `styles/base.css` `.cv-menu` (the cap is inline now, with `max-height: 75vh` left as the fallback; scrolling moved to the list):

```css
max-height: calc(100vh - 8px); overflow-y: auto; overscroll-behavior: contain;
```

## Right-click and other point menus keep under the bar (0.14.0)

Refers to `ui/popup.ts` `barFloor` (new), `PopupMenu.openAt`, the window `resize` listener · kind: fix · logged: v0.14.0 · 2026-11-30

- Why: FORM-MENU-OVERLAP-FIX 1.2.0, rule 5 and section 3b. `openAt` clamped to 4 px from the window top with only the stylesheet's cap, so a long right-click menu could cover the menu bar and the title.
- Every menu opened at a point goes through `openAt`, through `contextMenu()`: the Queue's item and output menus, the Media Browser and Preset Browser menus, the panel menus of the dock, the Agent button, the Export Settings, Watch, Family and Extensions pickers, and the three demos' bar and right-click menus. None has code of its own to change.
- `openAt` now takes `barFloor()` (the bottom of `.cv-menubar` plus 4, or 4 when the bar is hidden for the macOS system menus) as the menu's floor, sets the inline `menuCap(floor)` while the card is hidden, keeps the pointer-corner placement and its flips, never goes above the floor, and runs `showMore(true)`. Submenus take the same floor and cap through `openBeside`.
- Open menus close when the window is resized, so a cap is never left at an old window height; no rows are rebuilt.
- Removed, `openAt`:

```ts
const top = Math.max(4, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4));
```
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "formencoder",
"private": true,
"version": "0.13.2",
"version": "0.14.0",
"description": "formencoder · the media encoder of the form family",
"license": "Apache-2.0",
"type": "module",
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ body { font-size: var(--fs-12); line-height: 1.35; }
.cv-search-item.is-picked, .cv-search-item:hover { background: var(--accent-soft); color: var(--text-primary); }
.cv-search-keys { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }

.cv-menu { position: fixed; min-width: 232px; max-height: calc(100vh - 8px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 12px; }
.cv-menu { position: fixed; min-width: 232px; max-height: 75vh; padding: 6px; border-radius: 12px; }
.cv-menu:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
.cv-menu, .cv-search-pop { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); }
.cv-menu[hidden] { display: none; }
.cv-menu-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; width: 100%; height: 30px; padding: 0 10px 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text-primary); font: inherit; font-size: 13px; text-align: left; cursor: default; }
Expand All @@ -58,6 +59,14 @@ body { font-size: var(--fs-12); line-height: 1.35; }
.cv-menu-sub .cv-menu-keys { display: inline-flex; }
.cv-menu-sub.is-open:not(:disabled) { background: color-mix(in srgb, var(--text-primary) 10%, transparent); }
.cv-menu-sep { height: 1px; margin: 6px 10px; background: color-mix(in srgb, var(--text-primary) 12%, transparent); }
@property --menu-more { syntax: '<number>'; inherits: false; initial-value: 0; }
.cv-menu-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; --menu-more: 0; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - min(88px, 40%)), rgb(0 0 0 / calc(1 - var(--menu-more))) calc(100% - min(22px, 10%))); mask-image: linear-gradient(to bottom, #000 calc(100% - min(88px, 40%)), rgb(0 0 0 / calc(1 - var(--menu-more))) calc(100% - min(22px, 10%))); transition: --menu-more 160ms ease-out; }
.cv-menu-more { position: absolute; left: 50%; bottom: 6px; width: 56px; height: 12px; margin-left: -28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass-bg); color: var(--text-secondary); pointer-events: none; opacity: 0; transition: opacity 160ms ease-out; }
.cv-menu-more svg { width: 12px; height: 8px; }
.cv-menu.has-more > .cv-menu-list { --menu-more: 1; scroll-padding-block-end: min(88px, 40%); transition-duration: 490ms; }
.cv-menu.has-more > .cv-menu-more { opacity: 1; transition-duration: 490ms; }
.cv-menu.no-fade > .cv-menu-list, .cv-menu.no-fade > .cv-menu-more { transition: none; }
@media (prefers-reduced-motion: reduce) { .cv-menu-list, .cv-menu-more { transition: none; } }

.cv-toast { max-width: 420px; padding: var(--space-2) var(--space-3); background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); color: var(--text-primary); font-size: var(--fs-12); pointer-events: auto; }
.cv-toast.is-error { border-color: var(--danger-fill); color: var(--danger-text); }
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ui/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class MenuBar {
const items: PopupEntry[] = [...before, ...(before.length && body.length ? ['-' as const] : []), ...body, ...(after.length && body.length ? ['-' as const] : []), ...after];
m.menu.setItems(items.length ? items : [{ label: 'The engine is not answering', enabled: false }]);
const r = m.btn.getBoundingClientRect();
m.menu.openAt(r.left, r.bottom + 4);
m.menu.openUnder(r.left, r.bottom + 4);
}

close(): void {
Expand Down
68 changes: 60 additions & 8 deletions frontend/src/ui/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ export const keyLabel = (s: string | null | undefined): string => {
return s.replace(/Cmd\+/g, '⌘').replace(/Ctrl\+/g, '⌃').replace(/Alt\+/g, '⌥').replace(/Opt\+/g, '⌥').replace(/Shift\+/g, '⇧');
};

const MENU_SHARE = 0.75, MENU_PAD = 4;
const menuCap = (top: number): number => Math.max(0, Math.min(Math.floor(window.innerHeight * MENU_SHARE), Math.floor(window.innerHeight - top - MENU_PAD)));
const barFloor = (): number => {
const r = document.querySelector('.cv-menubar')?.getBoundingClientRect();
return r && r.height > 0 ? r.bottom + MENU_PAD : MENU_PAD;
};

let openRoots: PopupMenu[] = [];

export function closeAllMenus(): void {
Expand All @@ -28,15 +35,19 @@ export function closeAllMenus(): void {

export class PopupMenu {
readonly panel: HTMLElement;
private readonly list: HTMLElement;
private openSub: PopupMenu | null = null;
private subRow: HTMLElement | null = null;
private subSeq = 0;
private focusIndex = -1;
private rows: Array<{ node: HTMLButtonElement; item: PopupItem }> = [];
private floor: number | null = null;
onClose: (() => void) | null = null;

constructor(private readonly parent: PopupMenu | null = null) {
this.panel = el('<div class="cv-menu fx-menu" role="menu" tabindex="-1" hidden></div>');
this.panel = el('<div class="cv-menu fx-menu" role="menu" tabindex="-1" hidden><div class="cv-menu-list" role="none"></div><div class="cv-menu-more" aria-hidden="true"><svg viewBox="0 0 12 8"><path d="M1.5 1.5 6 6l4.5-4.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></div></div>');
this.list = q(this.panel, '.cv-menu-list');
this.list.addEventListener('scroll', () => this.showMore(), { passive: true });
document.getElementById('overlay-root')?.appendChild(this.panel);
this.panel.addEventListener('contextmenu', (e) => e.preventDefault());
this.panel.addEventListener('keydown', (e) => this.key(e));
Expand All @@ -58,15 +69,15 @@ export class PopupMenu {

setItems(items: PopupEntry[]): void {
this.closeSub();
this.panel.replaceChildren();
this.list.replaceChildren();
this.rows = [];
const checks = items.some((i) => i !== '-' && i.checked !== undefined && i.checked !== null);
setClass(this.panel, 'has-checks', checks);
let lastSep = true;
items.forEach((item, idx) => {
if (item === '-') {
if (lastSep || idx === items.length - 1) return;
this.panel.appendChild(el('<div class="cv-menu-sep" role="separator"></div>'));
this.list.appendChild(el('<div class="cv-menu-sep" role="separator"></div>'));
lastSep = true;
return;
}
Expand All @@ -91,9 +102,9 @@ export class PopupMenu {
});
}
this.rows.push({ node, item });
this.panel.appendChild(node);
this.list.appendChild(node);
});
const last = this.panel.lastElementChild;
const last = this.list.lastElementChild;
if (last?.classList.contains('cv-menu-sep')) last.remove();
}

Expand Down Expand Up @@ -127,17 +138,38 @@ export class PopupMenu {
}

openAt(x: number, y: number): void {
this.floor = barFloor();
this.panel.style.visibility = 'hidden';
this.panel.hidden = false;
this.panel.scrollTop = 0;
this.panel.style.maxHeight = `${menuCap(this.floor)}px`;
this.list.scrollTop = 0;
const w = this.panel.offsetWidth;
const h = this.panel.offsetHeight;
const fitsRight = x + w <= window.innerWidth - 4;
const fitsBelow = y + h <= window.innerHeight - 4;
const left = Math.max(4, Math.min(fitsRight ? x : x - w, window.innerWidth - w - 4));
const top = Math.max(4, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4));
const top = Math.max(this.floor, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4));
this.panel.style.left = `${Math.round(left)}px`;
this.panel.style.top = `${Math.round(top)}px`;
this.showMore(true);
this.panel.style.visibility = '';
if (!this.parent) {
openRoots.push(this);
this.panel.focus({ preventScroll: true });
}
}

openUnder(x: number, y: number): void {
this.floor = y;
this.panel.style.visibility = 'hidden';
this.panel.hidden = false;
this.panel.style.maxHeight = `${menuCap(y)}px`;
this.list.scrollTop = 0;
const w = this.panel.offsetWidth;
const left = Math.max(MENU_PAD, Math.min(x, window.innerWidth - w - MENU_PAD));
this.panel.style.left = `${Math.round(left)}px`;
this.panel.style.top = `${Math.round(y)}px`;
this.showMore(true);
this.panel.style.visibility = '';
if (!this.parent) {
openRoots.push(this);
Expand All @@ -148,23 +180,42 @@ export class PopupMenu {
private openBeside(row: DOMRect): void {
this.panel.style.visibility = 'hidden';
this.panel.hidden = false;
const floor = this.root().floor;
this.panel.style.maxHeight = floor === null ? '' : `${menuCap(floor)}px`;
this.list.scrollTop = 0;
const w = this.panel.offsetWidth;
const h = this.panel.offsetHeight;
const right = row.right - 2;
const x = right + w <= window.innerWidth - 4 ? right : Math.max(4, row.left - w + 2);
const y = Math.max(4, Math.min(row.top - 4, window.innerHeight - h - 4));
const y = Math.max(floor ?? MENU_PAD, Math.min(row.top - 4, window.innerHeight - h - 4));
this.panel.style.left = `${Math.round(x)}px`;
this.panel.style.top = `${Math.round(y)}px`;
this.showMore(true);
this.panel.style.visibility = '';
}

private showMore(instant = false): void {
const l = this.list;
const more = this.root().floor !== null && !this.panel.hidden && l.scrollHeight - l.clientHeight - l.scrollTop > 1;
if (instant) setClass(this.panel, 'no-fade', true);
setClass(this.panel, 'has-more', more);
if (instant) {
void getComputedStyle(this.panel.lastElementChild ?? this.panel).opacity;
setClass(this.panel, 'no-fade', false);
}
}

private key(e: KeyboardEvent): void {
const enabled = this.rows.filter((r) => !r.node.disabled);
if (!enabled.length) return;
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
e.preventDefault();
this.focusIndex = (this.focusIndex + (e.key === 'ArrowDown' ? 1 : -1) + enabled.length) % enabled.length;
enabled[this.focusIndex].node.focus();
} else if (e.key === 'End' || e.key === 'Home') {
e.preventDefault();
this.focusIndex = e.key === 'End' ? enabled.length - 1 : 0;
enabled[this.focusIndex].node.focus();
} else if (e.key === 'Escape') {
e.preventDefault();
this.root().close();
Expand Down Expand Up @@ -199,3 +250,4 @@ document.addEventListener(
true,
);
window.addEventListener('blur', () => closeAllMenus());
window.addEventListener('resize', () => closeAllMenus());
2 changes: 1 addition & 1 deletion frontend/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.13.2';
export const VERSION = '0.14.0';
14 changes: 7 additions & 7 deletions native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ members = [
]

[workspace.package]
version = "0.13.2"
version = "0.14.0"
edition = "2024"
rust-version = "1.95"
license = "Apache-2.0"
Expand Down
Loading
Loading