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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# FormRef changelog

## v0.46.1 · 2026-11-20

A picture's caption can be read in the light themes again.

- The name that shows over a picture when you hover or select it, and the caption in the compare view, are now light text on the dark band in every theme. In the light themes they were dark text on that dark band and could not be read. The dark themes look exactly as before.
- The desktop app's notes on how it works moved from its source into its log; the app itself is unchanged.

## v0.46.0 · 2026-11-20

FormRef now uses the same design names as the other Form apps, and its README says it is released.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p align="center">
<img alt="version 0.46.0" src="https://img.shields.io/badge/version-v0.46.0-eef0f4?style=flat-square">
<img alt="version 0.46.1" src="https://img.shields.io/badge/version-v0.46.1-eef0f4?style=flat-square">
<img alt="Rust engine" src="https://img.shields.io/badge/Rust%20engine-b7410e?style=flat-square&logo=rust&logoColor=white">
<img alt="TypeScript and FastAPI" src="https://img.shields.io/badge/TypeScript%20%2B%20FastAPI-3178c6?style=flat-square&logo=typescript&logoColor=white">
<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
2 changes: 1 addition & 1 deletion backend/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path

ROOT = Path(getattr(sys, "_MEIPASS", "")).resolve() if getattr(sys, "frozen", False) else Path(__file__).resolve().parents[3]
VERSION = "0.46.0"
VERSION = "0.46.1"

@dataclass(frozen=True)
class Settings:
Expand Down
2 changes: 1 addition & 1 deletion clipper/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "FormRef Clipper",
"version": "0.46.0",
"version": "0.46.1",
"description": "Save images, selected text, links and pages to the FormRef board running on your computer.",
"author": "nodemode-ai",
"icons": { "16": "icons/icon-16.png", "32": "icons/icon-32.png", "48": "icons/icon-48.png", "128": "icons/icon-128.png" },
Expand Down
4 changes: 4 additions & 0 deletions frontend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -786,3 +786,7 @@ FormRef had no About box, and the owner chose a minimal one for such apps (famil
## Unreleased · FormVis's token names and values

The family's design alignment (FormVis's names are the family's names). FormRef's surfaces, text, borders, radii and spacing already had FormVis Studio Dark's values (26 of 42 shared names equal) and its 28 themes are FormVis's, so FormRef shares FormVis's palette: the values path. `src/styles/tokens.css` now defines the 89 FormVis names it lacked, with FormVis Studio Dark's values; none of them was used anywhere in FormRef before. Shared names that differed take FormVis's value: `--bg-scrim`, `--danger`, `--ok`, the three shadows, `--font-ui`, `--font-mono`. Kept as FormRef's: the accent and the tokens made from it (`--accent-soft`, `--accent-line`, `--accent-ink`, and `--text-on-accent`, dark text on the orange for contrast), `--bg-hover` (made from each theme's text colour, so it still shows on the light themes, where a fixed white would not), and the whole z-index scale; three FormVis stacking names that have a FormRef twin point at it (`--z-menu` the dropdown, `--z-modal` the overlay, `--z-context` the popover) so there stays one scale. The light profiles already equal FormVis's first light profile except the grid colour, which stays (the canvas draws it). No rule outside the token file was changed. Checked in headless Chromium at 1280x800, Studio Dark, Light and Midnight: Home identical to the pixel; the menu, Preferences and the bottom of the page differ only by the deeper scrim and the shadows; the resolved-token dump changes in exactly the names above.

## v0.46.1 · A picture's caption is light on its scrim in every theme

The canvas was looked at with the Rust engine after the values above, on the "First light" demo board, in Studio Dark and Light, against the commit before them. The caption that shows on a hovered or selected picture (`.image-caption` in `main.css`, and the compare view's `.compare-caption` in `board.css`) sits on a gradient to `--bg-scrim`, which is black in every theme, and took its text from `--text-primary`. In the dark themes that is near white and reads; in the nine light themes it is near black on black and could not be read, before 0.46.0 as after (the deeper scrim made it a little darker still). Both captions now take `--note-ink-light`, the light ink FormRef already uses on dark notes (#f7f7f7 in every theme), so the text is light on the scrim whatever the theme. Studio Dark is unchanged to the pixel, since its `--text-primary` is the same #f7f7f7; in Light the caption now reads. No token value and no token name changed.
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<div class="sidebar-bottom">
<div class="local-indicator"><span class="status-dot"></span><span id="connection-state">Engine connecting</span></div>
<button class="sidebar-row" data-action="help"><span data-icon="keyboard"></span><span>Keyboard shortcuts</span><span class="key">?</span></button>
<div class="sidebar-foot">FORM FAMILY<span>v0.46.0</span></div>
<div class="sidebar-foot">FORM FAMILY<span>v0.46.1</span></div>
</div>
</div>
</aside>
Expand Down Expand Up @@ -715,7 +715,7 @@ <h3 class="prefs-label">NODEMODE HOST</h3>
<div class="prefs-secbody">
<section class="prefs-group">
<h3 class="prefs-label">ABOUT</h3>
<p class="field-description" data-no-i18n translate="no">FormRef <span>v0.46.0</span></p>
<p class="field-description" data-no-i18n translate="no">FormRef <span>v0.46.1</span></p>
<p class="field-description" data-no-i18n translate="no">by nodemode.ai</p>
<p class="field-description">Apache License 2.0. Third-party notices are in NOTICE.md.</p>
</section>
Expand Down
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,6 +1,6 @@
{
"name": "formref-frontend",
"version": "0.46.0",
"version": "0.46.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/board.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.compare-spacer { flex: 1; }
.compare-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 24px; overflow: hidden; touch-action: none; }
.compare-box { position: relative; overflow: hidden; flex: none; background: var(--bg-tertiary); }
.compare-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-2) var(--space-3); background: linear-gradient(transparent, var(--bg-scrim)); color: var(--text-primary); font-size: 11px; pointer-events: none; }
.compare-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-2) var(--space-3); background: linear-gradient(transparent, var(--bg-scrim)); color: var(--note-ink-light); font-size: 11px; pointer-events: none; }
.compare-overlay:not([data-mode="side"]) .compare-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.compare-overlay:not([data-mode="side"]) .compare-box + .compare-box .compare-caption { display: none; }
.compare-overlay[data-mode="swipe"] .compare-stage { cursor: ew-resize; }
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion native/formref-core/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/formref-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "formref-core"
version = "0.46.0"
version = "0.46.1"
edition = "2021"
rust-version = "1.82"
authors = ["nodemode-ai <mackin@nodemode.ai>"]
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/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 src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "formref-desktop"
version = "0.46.0"
version = "0.46.1"
description = "FormRef desktop shell"
authors = ["nodemode-ai <mackin@nodemode.ai>"]
edition = "2021"
Expand Down
28 changes: 28 additions & 0 deletions src-tauri/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ src-tauri/
binaries/ Frozen sidecars per host triple (built, not tracked)
```

## After v0.46.0 · The shell's comments, moved here

- refers-to: src/main.rs :: ENGINE_PORT, Engine, sidecar, stop_engine, open_outside, open_main, CLICK_THROUGH, ON_BOTTOM, toggle_visible, announce, TrayChecks, window_configure, window_layout, window_place, main
- kind: rationale
- logged: v0.46.1 · 2026-11-20

The family keeps no comments in code; `main.rs` carried 28 lines of them. They are removed and what they said is kept here, name by name. No code token changed: the file with the comment lines taken out of the 0.46.0 copy is identical to the new one.

- `ENGINE_PORT`: the port the dev service, the command line and outside MCP clients use; the app takes it when it is free.
- `Engine`: the bundled engine (FastAPI service), started by a packaged app and stopped when it exits.
- `sidecar`: Tauri installs each externalBin beside the app's own executable, without the target triple.
- `stop_engine`, the unix branch: the onefile engine is a launcher with the server as its child. Asked to stop, it stops the server and removes the folder it unpacked; a forced kill reaches only the launcher and leaves both behind.
- `open_outside`: a link the page opens in a new window (a link card, a Markdown link, a cloud sign-in) goes to the system browser. The web view opens no window of its own, so without this the link did nothing.
- `open_main`: builds the main window from its config entry (created by hand, `create: false`). A packaged app points it at the engine's own origin, which serves the window and the API together, so relative `/api` calls, event streams and terminal sockets work as they do from `./formref serve`. Dev keeps the configured URL, which Tauri resolves against `devUrl` (Vite, which proxies `/api` to 8320).
- `open_main`, the download handler (`cfg(not(windows))`): the macOS web view cancels every download unless a handler is set, so exports and Save Board did nothing there. With one, the file goes to the Downloads folder and the page is told when it has arrived.
- `CLICK_THROUGH`: click-through has no getter in Tauri, so the shell remembers it. While it is on, the window cannot be clicked at all, which is why a global shortcut (Ctrl or Cmd + Alt + K) can always turn it back off.
- `ON_BOTTOM`: always on bottom has no getter either. It keeps the board behind other windows, like a desktop backdrop.
- `toggle_visible`: summon or dismiss. A hidden, minimised or unfocused window comes to the front; a focused one hides.
- `announce`: tells the page the window changed from outside it (tray or shortcut), so its desktop checkboxes stay honest.
- `TrayChecks`: the tray's check marks, kept in step whichever way a mode changed (page, tray or shortcut).
- `window_configure`, before `always_on_top`: on top and on bottom exclude each other; turning one on turns the other off.
- `window_layout`: the window's outer position and inner size in logical pixels, the units a saved board layout uses.
- `window_place`: moves and sizes the window to a saved layout, kept on a connected monitor so a layout from a larger or since-unplugged screen never leaves the window out of reach.
- `main`, `summon`: brings FormRef to the front from any app, or hides it when it already has focus.
- `main`, `setup`: a packaged app starts its own engine and opens the window on it once it answers; a dev shell (`./formref desktop`) uses the service and Vite server the launcher started.
- `main`, the `toggle` registration: the escape hatch for click-through; if another app owns the keys the shell still runs.
- `main`, `build_tray`: a desktop without a tray (some Linux sessions) still runs; the summon shortcut remains.

## After v0.44.0 · The two shortcuts are made once per system

- refers-to: src/main.rs :: main (`toggle`, `summon`)
Expand Down
28 changes: 0 additions & 28 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}
use tauri::{AppHandle, Emitter, LogicalSize, Manager, RunEvent, WebviewUrl, WebviewWindow, WebviewWindowBuilder};
use tauri_plugin_global_shortcut::{Code, GlobalShortcutExt, Modifiers, Shortcut, ShortcutState};

/// The port the dev service, the command line and outside MCP clients use; the app takes it when it is free.
const ENGINE_PORT: u16 = 8320;

/// The bundled engine (FastAPI service), started by a packaged app and stopped when it exits.
struct Engine(Mutex<Option<Child>>);

fn engine_port() -> Result<u16, String> {
Expand All @@ -39,7 +37,6 @@ fn engine_port() -> Result<u16, String> {
listener.local_addr().map(|address| address.port()).map_err(|error| error.to_string())
}

/// Tauri installs each externalBin beside the app's own executable, without the target triple.
fn sidecar(name: &str) -> Result<PathBuf, String> {
let exe = std::env::current_exe().map_err(|error| error.to_string())?;
let dir = exe.parent().ok_or("the app's folder could not be found")?;
Expand Down Expand Up @@ -152,8 +149,6 @@ fn stop_engine(app: &AppHandle) {
if let Some(mut child) = slot.take() {
#[cfg(windows)]
win_job::end();
// The onefile engine is a launcher with the server as its child: asked to stop, it stops the server
// and removes the folder it unpacked; a forced kill reaches only the launcher and leaves both behind.
#[cfg(unix)]
{
let pid = child.id().to_string();
Expand All @@ -179,8 +174,6 @@ fn stop_engine(app: &AppHandle) {
}
}

/// A link the page opens in a new window (a link card, a Markdown link, a cloud sign-in) goes to the system
/// browser: the web view opens no window of its own, so without this the link did nothing.
fn open_outside(url: &str) {
#[cfg(target_os = "macos")]
let mut command = Command::new("open");
Expand All @@ -199,10 +192,6 @@ fn open_outside(url: &str) {
}
}

/// Builds the main window from its config entry (created by hand, `create: false`). A packaged app points it
/// at the engine's own origin, which serves the window and the API together, so relative `/api` calls,
/// event streams and terminal sockets work as they do from `./formref serve`. Dev keeps the configured URL,
/// which Tauri resolves against `devUrl` (Vite, which proxies `/api` to 8320).
fn open_main(app: &AppHandle, port: Option<u16>, key: Option<String>) -> Result<(), String> {
let mut config = app.config().app.windows.iter().find(|window| window.label == "main").cloned().ok_or("Main window missing")?;
if let Some(port) = port {
Expand All @@ -218,8 +207,6 @@ fn open_main(app: &AppHandle, port: Option<u16>, key: Option<String>) -> Result<
)),
_ => builder,
};
// The macOS web view cancels every download unless a handler is set, so exports and Save Board did nothing
// there. With one, the file goes to the Downloads folder and the page is told when it has arrived.
#[cfg(not(windows))]
let builder = builder.on_download(|webview, event| {
if let tauri::webview::DownloadEvent::Finished { success, .. } = event {
Expand Down Expand Up @@ -325,10 +312,7 @@ fn boot(app: AppHandle) {
}
}

/// Click-through has no getter in Tauri, so the shell remembers it. While it is on, the window cannot be
/// clicked at all, which is why a global shortcut (Ctrl or Cmd + Alt + K) can always turn it back off.
static CLICK_THROUGH: AtomicBool = AtomicBool::new(false);
/// Always on bottom has no getter either. It keeps the board behind other windows, like a desktop backdrop.
static ON_BOTTOM: AtomicBool = AtomicBool::new(false);

#[derive(Serialize, Clone)]
Expand Down Expand Up @@ -364,7 +348,6 @@ fn read_window_state(window: &WebviewWindow) -> Result<WindowState, String> {
})
}

/// Summon or dismiss: a hidden, minimised or unfocused window comes to the front; a focused one hides.
fn toggle_visible(app: &AppHandle) {
if let Some(window) = app.get_webview_window("main") {
let shown = window.is_visible().unwrap_or(false) && !window.is_minimized().unwrap_or(false);
Expand All @@ -378,15 +361,13 @@ fn toggle_visible(app: &AppHandle) {
}
}

/// Tells the page the window changed from outside it (tray or shortcut), so its desktop checkboxes stay honest.
fn announce(window: &WebviewWindow) {
sync_tray(window);
if let Ok(state) = read_window_state(window) {
let _ = window.emit("formref://window-state", state);
}
}

/// The tray's check marks, kept in step whichever way a mode changed (page, tray or shortcut).
struct TrayChecks {
top: CheckMenuItem<tauri::Wry>,
through: CheckMenuItem<tauri::Wry>,
Expand Down Expand Up @@ -456,7 +437,6 @@ fn window_configure(
if let Some(value) = click_through {
set_click_through(&window, value)?;
}
// On top and on bottom exclude each other: turning one on turns the other off.
if let Some(value) = always_on_top {
if value && ON_BOTTOM.swap(false, Ordering::SeqCst) {
window.set_always_on_bottom(false).map_err(|error| error.to_string())?;
Expand Down Expand Up @@ -488,7 +468,6 @@ struct Placement {
height: f64,
}

/// The window's outer position and inner size in logical pixels, the units a saved board layout uses.
#[tauri::command]
fn window_layout(window: WebviewWindow) -> Result<Placement, String> {
main_window_only(&window)?;
Expand All @@ -498,8 +477,6 @@ fn window_layout(window: WebviewWindow) -> Result<Placement, String> {
Ok(Placement { x: position.x, y: position.y, width: size.width, height: size.height })
}

/// Moves and sizes the window to a saved layout, kept on a connected monitor so a layout from a larger
/// or since-unplugged screen never leaves the window out of reach.
#[tauri::command]
fn window_place(window: WebviewWindow, x: f64, y: f64, width: f64, height: f64) -> Result<Placement, String> {
main_window_only(&window)?;
Expand Down Expand Up @@ -549,7 +526,6 @@ fn main() {
let toggle = Shortcut::new(Some(Modifiers::CONTROL | Modifiers::ALT), Code::KeyK);
#[cfg(target_os = "macos")]
let toggle = Shortcut::new(Some(Modifiers::SUPER | Modifiers::ALT), Code::KeyK);
// Summon: brings FormRef to the front from any app, or hides it when it already has focus.
#[cfg(not(target_os = "macos"))]
let summon = Shortcut::new(Some(Modifiers::CONTROL | Modifiers::ALT), Code::KeyF);
#[cfg(target_os = "macos")]
Expand Down Expand Up @@ -581,22 +557,18 @@ fn main() {
])
.setup(move |app| {
reveal::round_splash(app.handle());
// A packaged app starts its own engine and opens the window on it once it answers; a dev shell
// (./formref desktop) uses the service and Vite server the launcher started.
if cfg!(debug_assertions) {
open_main(app.handle(), None, None)?;
} else {
let handle = app.handle().clone();
std::thread::spawn(move || boot(handle));
}
// The escape hatch for click-through; if another app owns the keys the shell still runs.
if let Err(error) = app.global_shortcut().register(toggle) {
eprintln!("FormRef: click-through shortcut unavailable: {error}");
}
if let Err(error) = app.global_shortcut().register(summon) {
eprintln!("FormRef: show and hide shortcut unavailable: {error}");
}
// A desktop without a tray (some Linux sessions) still runs; the summon shortcut remains.
if let Err(error) = build_tray(app) {
eprintln!("FormRef: tray icon unavailable: {error}");
}
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "FormRef",
"version": "0.46.0",
"version": "0.46.1",
"identifier": "ai.nodemode.formref",
"build": {
"beforeDevCommand": { "cwd": "../frontend", "script": "npm run dev", "wait": false },
Expand Down
Loading