Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
RFC 0055: menus that change
RFC 0056: the framework's own words
RFC 0057: rata upgrade
RFC 0058: @elyra/charts
RFC 0059: all of WireCharts
RFC 0060: exporting a chart
RFC 0061: zoom
RFC 0062: printing
RFC 0063: linked charts
RFC 0064: report pages
RFC 0065: marks
RFC 0066: taking a table out
RFC 0067: totals
RFC 0068: columns the user picks
RFC 0069: filters
RFC 0070: saved views
RFC 0071: lists over Laravel
RFC 0072: targets
RFC 0073: every row out
RFC 0074: grouped rows
RFC 0075: pinned columns
RFC 0076: views on the server
RFC 0077: every match selected
RFC 0078: editing in the table
RFC 0079: many cells at once
RFC 0080: a value for the selected rows
RFC 0081: a new row in the table
RFC 0082: a related record in a cell
RFC 0083: a filter by a related record
RFC 0084: one write for many rows
RFC 0085: the keys shown
RFC 0086: many rows in Laravel
RFC 0087: many rows deleted
RFC 0088: the trash
Release notes
Changelog
Elyra
Windows & multi-window

Windows & multi-window

The primary window is configured via App builder methods; additional windows can be declared at startup or opened at runtime. All windows share one event loop, one protocol handler, and one event bus (same origin, same commands).

Primary window

App::new()
    .title("My App")
    .size(900.0, 640.0)
    .min_size(420.0, 480.0)
    .resizable(true)
    .decorations(true)
    .always_on_top(false)
    .run();

Additional startup windows

use elyra::WindowConfig;

App::new()
    .window(
        WindowConfig::new("inspector")
            .title("Inspector")
            .size(360.0, 600.0)
            .path("inspector"),        // deep-link into the SPA
    )
    .run();

WindowConfig builder: new(label), title, size, min_size, resizable, decorations, always_on_top, visible (false makes it hidden, for Windows::show), skip_taskbar (Windows, Linux), path, and the limits below (deny, only_capabilities, only_abilities, deny_abilities).

path is appended to the app origin so a window can open a specific route of your frontend. A path without a file extension (settings, quick) is answered with the app's page, as Vite does in rata dev, and the page reads location.pathname; with the runtime's router, open a route with path("#/invoices/42").

Giving a window less

A window gets what the app grants, unless its WindowConfig narrows it (RFC 0016). A preview of a rendered invoice shows content the app didn't write; if a script got in there, it should reach only what the preview needs:

use elyra::security::Capability;

ctx.get::<Windows>().open(
    WindowConfig::new("preview")
        .path("#/invoices/42")
        .only_abilities(["invoices.view"])   // no invoices.delete, no billing.*
        .deny(Capability::Assistant),        // no assistant panel here
);
  • only_abilities([..]) keeps only the abilities the patterns cover, and deny_abilities([..]) takes some away. A command whose #[command(can = "…")] the window doesn't allow is refused (denied), its live queries too, and can says no, so its buttons hide.
  • deny(Capability::X) and only_capabilities([..]) do the same for whole routes: the assistant, the store, the sidecar, …
  • A command without can stays reachable wherever the window has Capability::Commands. Deny Commands for a window that must not run any, or declare abilities on the commands that matter.
  • It only narrows. Nothing here gives a window more than the app grants, and the signed-in user's abilities still apply.
  • The assistant in that window is offered only the tools it allows, and checks each call again.
  • Commands see it: CommandRequest::window is the label of the window a call came from, for a middleware to log or refuse.

The shell knows which window asks by the window's own protocol handler, not by anything the page sends, so a page can't borrow another window's limits. A command called from a narrowed window can still open a window with fewer limits: that's the app's decision, in its own code.

Only reading

.read_only() narrows a window to reading (RFC 0041): a preview of something someone else wrote, say.

WindowConfig::new("preview").path("#/invoices/42").read_only()
  • Only live commands run (#[command(live)]), and they run under the guard a live query's re-run has, whether subscribed to or called once: a model-layer write, or a write to the backend, in one fails with "x is a live command and must only read". Any other command is refused, denied, "this window only reads". Raw SQL and a command's own I/O are outside that guard, as for a live query.
  • can says no to an ability only commands that may write need, so their buttons hide; one a live command needs is as it was.
  • Only the routes that read are there: the store's get and all, the cache's get and has, storage's reads, paths, the update check, the backend's lists and state, the window's assistant conversation, joining and leaving presence and private channels, the translations, and cancelling its own calls. The store's set, the clipboard, dialogs, shell.openExternal, a sign-out, the queue, the sidecar, the microphone, diagnostics and quit aren't, nor anything that changes what's outside the window: the assistant's key, the app's locale, or what presence says to others (editing, following, a route).
  • The assistant in that window is offered only live tools.
  • It only narrows, and goes with only_abilities and the rest.

Quick Look

A record at a glance, from a list, without leaving it (RFC 0041). <Table preview> drives it from the keyboard (Table); from code:

import { quickLook } from "@elyra/runtime";

await quickLook.show("/customers/42");   // open it beside this window, or move it there
await quickLook.hide();
$quickLook;                              // { open, route }
quickLook.here();                        // true in the Quick Look window itself
ctx.get::<Windows>().show_quick_look("/customers/42");
  • One window for the app, labelled quick-look, read-only (above), made the first time and hidden after, so the next look is at once. Its page is the app's own at the route, which moves when it's shown again.
  • Beside the window it came from: to its right when the screen has room, else its left, else over its right part; as tall as that window, a third of its width (at least 360 px). That window keeps the focus.
  • Esc or Space in it closes it, as its close button does. It goes with the window it was shown beside, hides when the app goes to the background, and doesn't keep the app running.
  • Only the app's routes: /customers/42 or #/customers/42, never a URL.

Opening windows at runtime

App binds a Windows handle into the container. Resolve it anywhere — even inside a command — to open new windows:

use elyra::{Windows, WindowConfig};

#[command]
async fn open_settings(ctx: Ctx) {
    ctx.get::<Windows>().open(
        WindowConfig::new("settings").title("Settings").path("settings"),
    );
}

Windows::open sends a request to the main-thread event loop (via an EventLoopProxy), which builds the window and webview. It returns false if the event loop has already exited.

Controlling the window from the frontend

@elyra/runtime exports appWindow (named so it doesn't clash with the global window). Actions target the window they're called from, and are applied on the main thread:

import { appWindow } from "@elyra/runtime";

appWindow.minimize();
appWindow.toggleMaximize();
appWindow.toggleFullscreen();
appWindow.setTitle("Untitled — MyApp");
appWindow.setSize(1000, 700);
appWindow.center();
appWindow.hide(); appWindow.show(); appWindow.focus();
appWindow.close(); // exits the app when it's the last window

// Live state (pushed on resize / move / focus, and show / hide):
const off = appWindow.onState((s) => {
  console.log(s.label, s.width, s.height, s.maximized, s.fullscreen, s.focused, s.visible);
});

The same operations are available from Rust via the container-bound Windows handle (e.g. ctx.get::<Windows>().minimize(None)), which also takes an optional window label to target a specific window.

File drop

Native file drops onto the window are delivered to the frontend, each as a ChosenFile a command can take:

import { onFileDrop } from "@elyra/runtime";

const off = onFileDrop((files) => {
  console.log("dropped", files.map((f) => f.path));
  commands.importNotes({ files }); // `files: Vec<ChosenFile>` in Rust
});

The app's icon

Give the app its icon, a PNG, read when the app is built (RFC 0028):

use elyra::Icon;

App::new().icon(Icon::png(include_bytes!("../icons/app.png")))

It's every window's icon on Windows (the title bar, the taskbar button, Alt-Tab) and on Linux (the window switcher). macOS has no window icons: there the Dock's comes from the bundle (rata bundle makes a .icns from [bundle].icon), and App::icon is only the tray's when the tray has none of its own. Square, 256 px or more. An image that can't be read is a configuration problem, found before anything starts. On Windows it's also the icon of the app's notifications (system).

The .exe's own icon, the one Explorer and the Start menu show, is linked into the binary at build time, and isn't set by this: rata bundle links it from [bundle].icon (Windows: the .exe and its installer).

Remembering size & position

Opt in and the primary window's size, position, and maximized state are restored on the next launch:

App::new().title("MyApp").persist_window_state().run()

State is written to a small file under the OS config directory (~/Library/Application Support/<app>/ on macOS, %APPDATA%\<app>\ on Windows, $XDG_CONFIG_HOME/<app>/ on Linux), keyed by the About name, and saved when the window loses focus or closes.

A position is put back only when enough of the window's title bar to drag it by lands on a screen that's there now. Closed on an external screen that has since been unplugged, the window opens where the OS places a new one, at its saved size, instead of off every screen.

Lifecycle

The app exits when the last window closes. The tray's popover doesn't count: it's hidden, not closed, and the app ends with its last other window.

An app that stays in the tray doesn't end with its windows: closing the main window hides it, and the app runs until a quit (the tray's Quit item, ⌘Q, or quit()):

import { quit } from "@elyra/runtime";

quit(); // ends the app, as the tray's Quit item does

Whatever the app started outside itself is ended in an exit hook (App::on_exit), which runs however the app ends: the last window, Quit, an update's relaunch, or a signal.

Related