Skip to content

About

Rust KDE Plasma Wayland window/app launcher and daemon tracking window history, crash recovery, timed snapshots, and tmux/terminal restoration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Applicationlauncher

Find what is already open, launch what is missing, and recover your workspace when something closes.

Applicationlauncher is a keyboard-friendly window switcher, app launcher and workspace recovery tool for KDE Plasma on Wayland. It searches your open windows and installed apps side by side. A search for a project can take you straight to its terminal or tmux pane instead of making you remember which terminal window to pick. Its background tracker keeps history even while the launcher is closed. Show Info tells you what a window actually runs and can restart a supported component without restarting the rest of your workspace.

Complete feature list

Area Functionality
Search both panels Search open windows on the left and installed applications on the right from one field. Match titles, apps, executable and desktop metadata, paths and available terminal context. Fuzzy word matching handles typos; punctuation such as ~, /, :: and ++ can be searched literally. Highlight the matching text.
Find the right running window View the open-window count, icons, title, configured path/command context and last activation. Group windows by application or toggle newest activation first. See when a window requests attention and when supported title components are stale.
Navigate and launch Move between panels and through the app grid with the keyboard. Click or press Enter on a window to raise it. A normal app click opens a matching running window if there is one, otherwise launches the app. Middle-click or use Open new window to explicitly launch another. Opening the launcher again raises the existing instance.
Manage windows Right-click to inspect, activate, open a new window, update a supported XFCE Terminal window, clone, control matched audio, or close that window. A red border briefly identifies the activated window without adding an item to the window list or history.
Organise applications Switch between an icon grid and list, display or hide KDE system modules and icon labels, see app tooltips, pin and unpin apps, and reorder pins by dragging, menu actions where available, or keyboard. Open installed-app Show Info or reveal the exact desktop entry in Progs.
Terminal shortcuts and context Run in Terminal executes the entered command at a normal interactive Fish prompt. cd in Terminal starts in the entered directory. Terminal rows can show the active command, working directory, normalized terminal title and tmux session/pane title even when tmux is not setting the window title.
Clone a window Reopen supported terminal or file-manager context, or an address visible in a supported browser window title. This launches a new window; it is not an in-memory copy of the old one.
Reopen closed windows Press Ctrl+Shift+T to reopen the latest eligible window, or choose a specific entry in Recently closed. Clear the history when you no longer need it. Chrome, Chromium and Firefox keep their own tab-reopen shortcut while focused.
Save and recover a workspace Name, save, restore or delete sessions, or restore an automatic five-minute or hourly snapshot. Recover from a protected checkpoint after a session interruption; reuse existing windows and place missing ones without closing unrelated work. Reattach to a surviving local tmux session when its saved identity still matches.
Inspect windows and apps Open independent, selectable Show Info windows. Inspect the window owner, ancestors, descendants, active program, scripts and hosted applications. Copy text or formatted HTML, and reveal normally hidden image-loader helpers without stopping them. Compatible XFCE Terminal builds can open this view directly.
Identify what is installed and what is running Compare running and installed ELF builds, inspect native/runtime and hosted-code metadata separately, see build-input changes and upstream package references, and inspect launch chains, desktop entry overrides and package provenance where supported. Python scripts, retained Bash launchers and Pi have specific evidence views.
Inspect tmux See the exact client attachment, pane, working directory, foreground process, transport, sockets and sizing. Inspect the server's listener, build, sessions and clients separately, including detached sessions and supported remote client metadata.
Restart at the right scope Update one or several outdated XFCE Terminal windows, just Fish/Codex/Pi/agy, one tmux client, or an entire tmux server. Restart CopyQ through its user service. Reports identify refused, completed and partial operations, with recovery records for supported restarts.
Find and control playback See measured playback waveforms on app icons and on windows whose streams are attributable. Change volume and mute for matched streams in a window's menu. The optional Firefox bridge can attribute background-tab audio to the correct Firefox window.
Configure the interface Resize the launcher; adjust UI scale, icon and text sizes, padding, row and line heights, visibility, and independent scroll sensitivity. Use optional close-on-blur and an icon theme override. An opt-in terminal attention action can send Enter to a matched active tab after five seconds.
Diagnose problems Compare the exact GUI/daemon build pair, capture runtime evidence without restarting the app, inspect a slow update's stages, replay persisted events and verify symbolization. Observable builds are the default; a separate minimal release removes optional observers at build time.

Install and run

The committed build uses two local Cargo dependencies. It is not a turnkey public build: without a compatible program-metadata checkout it cannot compile. See the source layout below before trying Cargo.

Requirements

To use You need
Launcher and history Linux, KDE Plasma on Wayland, a user systemd session and session D-Bus, kdotool, qdbus6, kwriteconfig6, and Python 3 for the launcher wrapper
Build from source A stable Rust toolchain with Rust 2024 support, Cargo, a C toolchain, pkg-config, libpulse development files, Git history, and Python 3.11+ for version stamping
Run/CD and terminal cloning XFCE Terminal and Fish
Terminal and process updates Python 3 with PyGObject and Gio; some actions also need the supported XFCE Terminal or tmux integration described in Updates
Playback indicators A PulseAudio-compatible server such as pipewire-pulse; pactl is used for volume and mute actions

Arch package comparisons, Progs integration, and the Firefox audio bridge are optional. None is required to use the launcher as a window switcher.

Prepare the source workspace

The committed Cargo manifest uses sibling checkouts:

workspace/
  applicationlauncher/
  fuzzy-rank/
  program-metadata/

From workspace/, clone the repositories available on GitHub:

git clone https://github.com/Terrydaktal/applicationlauncher.git
git clone https://github.com/Terrydaktal/fuzzy-rank.git

You also need a compatible program-metadata checkout at the path shown. It is not bundled here, and this project does not provide a public clone URL for it. Without access to that checkout, a clean build cannot proceed. Progs uses the same library, but the Progs GUI does not have to be installed or running.

If you relocated the repositories, use the paths in your Cargo.toml for the build. The launcher wrapper's dependency freshness checks use the sibling layout above.

Build and start

From the applicationlauncher/ checkout:

cargo build --release --locked --bins
./scripts/applicationlauncher

This builds both the GUI and applicationlauncherd. The wrapper starts the user daemon when needed. The daemon enables the bundled KWin script for the window feed. The daemon keeps recording history while the GUI is closed.

To make the launcher available by name, create a symlink from the same checkout:

mkdir -p "$HOME/.local/bin"
ln -s "$(pwd -P)/scripts/applicationlauncher" "$HOME/.local/bin/applicationlauncher"

The installer also maintains a symlink to applicationlauncherd under ~/.local/bin/ and configures its user service. These commands do not need root privileges.

Make sure ~/.local/bin is on your desktop session's PATH. You can assign applicationlauncher to a Plasma keyboard shortcut to open or raise it.

Add the desktop entry and icon

This is optional for launching from a shell. From the checkout root:

mkdir -p "$HOME/.local/share/applications" "$HOME/.local/share/icons/hicolor/scalable/apps"
ln -s "$(pwd -P)/src/assets/applicationlauncher.desktop" "$HOME/.local/share/applications/applicationlauncher.desktop"
ln -s "$(pwd -P)/src/assets/applicationlauncher.svg" "$HOME/.local/share/icons/hicolor/scalable/apps/applicationlauncher.svg"
kbuildsycoca6

To give launcher-owned subwindows the desktop icon on KDE Wayland, import the bundled KWin rule in System Settings > Window Management > Window Rules. Append it after existing rules. It sets only the desktop-file association for launcher-owned windows; it does not change their native IDs, focus, or geometry.

Build verification and troubleshooting

cargo build --release --locked --bins is enough to try the application. For a verified release with matching diagnostic artifacts, use:

scripts/build-debuggable-release

That runs the release-variant checks, archives exact binaries and symbols, and publishes the observable pair in target/release/. It does not restart running processes. To archive an already-built pair without rebuilding, add --no-build. See release builds and diagnostics for the build tools and profiles.

The launcher wrapper checks that the GUI and daemon were built from the same inputs. It can rebuild a mismatched pair in the background and only replaces running launcher components after verification. It does not restart your other applications. If the pair matches but the sources are newer, rebuild explicitly. Run ./target/release/applicationlauncher to skip the wrapper's build and deployment checks.

If the open-window panel stays empty, first confirm you are in a KDE Wayland session and check systemctl --user status applicationlauncherd.service. The wrapper logs deployment problems in ${XDG_STATE_HOME:-$HOME/.local/state}/applicationlauncher/launcher-build.log. If only a desktop entry or icon is missing, check the symlinks, desktop session PATH, and KDE's desktop-entry cache before troubleshooting the tracker. The current command-line options are listed below.

Search, window and application actions

The launcher has two independently scrolling panels. Move across the edge of the app grid to switch panels; keyboard selection and mouse hover are separate. Running the launcher again raises the existing main window rather than creating another copy or raising an unrelated Show Info window.

Keyboard shortcuts

Shortcut Action
Up / Down Move through the current panel or app grid
Left / Right Move across the grid or switch panels at its edge
Enter Activate the selected window; for an app, open a matching window or launch it
Escape Close the active launcher or popup
F5 Refresh the relevant list
Ctrl+P Pin or unpin the selected application
Ctrl+Shift + arrow Reorder a selected pinned app (up/down in the list, arrows in the grid)
F9 or the H button Open Window History and Sessions
F10 or the gear button Open settings
Ctrl+Shift+T Reopen the latest eligible closed window; Chrome, Chromium, and Firefox retain their own shortcut while focused

Search, sorting and live titles

Search preserves the shared matcher's token, typo and field-ranking rules. Punctuation-only queries match literal symbols, not patterns, globs, shell expansion or regular expressions. As an example, search for a project path to find its terminal, a pane's task title to find a Codex session, or an app name to see both existing windows and its launcher.

With no query, the right panel puts regular apps before KDE system modules. Within each category, pinned apps use your saved order and the others sort by name. Search results prioritize the fuzzy score and prefix matches, then pins and stable name/type ordering. In the left panel the default grouping keeps an application's windows together and uses group size and application name; terminal groups also take the foreground application and tmux into account. Click the ordering control next to the window count to switch to recent-first. This changes the order of both default and matching windows without changing what matches. The application panel keeps its normal ranking.

Window titles show available working-directory and foreground-program context. A background tmux monitor maps the local attachment to the active pane, so the session name, working directory, task title and spinner can appear even when tmux does not update the native title. Strikethroughs and attention indicators retain their meaning. Raw window and pane titles remain inspectable in Show Info. Spinner-only frames do not reorder search results or rewrite saved history.

An optional version-checked field-rank model can rerank the leading 256 matches: set APPLICATIONLAUNCHER_FIELD_RANK_MODEL or supply $XDG_STATE_HOME/applicationlauncher/field-rank-model.json. Missing, invalid or inactive models leave the normal deterministic ranking in place.

Window and application menus

Action Behaviour
Show info Inspect the selected running window or installed app, not whichever application currently has keyboard focus.
Open window Raise the exact window. When geometry is available a temporary red border identifies it. The overlay is excluded from window counts and restore snapshots.
Open new window / middle-click Launch a new instance through the associated desktop entry or supported application launch route. This can still be handled by an app's own single-instance policy.
Update window Choose one outdated XFCE Terminal window or review eligible outdated windows. This targets the terminal that owns the window, not any one foreground program.
Clone window Open a new terminal with the known working directory and a supported recipe (Codex resume, agy -c, htop, or a fresh Fish prompt), or reopen a directory in Dolphin/PCManFM or a URL visible in a Chrome-like title. Otherwise request a normal new window. This does not duplicate a browser tab set, shell state, arbitrary commands or a live tmux pane.
Volume Control When the window has matched playback streams, adjust their volume or mute. Streams from the same identified process can be grouped.
Close window Ask KWin to close the selected window, not kill every process of the application.
Pin / Unpin Keep a desktop entry in the saved pinned order. Drag between pinned entries in either app view, or use the keyboard shortcuts above.
Show in Progs Open Progs for the exact selected desktop entry. A unique result can be selected automatically; a shared wrapper is not resolved by guessing the app name.

Run or change directory in a terminal

Run in Terminal uses one interactive Fish shell. After startup it submits the command through Fish's normal reader, so the shell shows the prompt, normal history, pre/post-command hooks, timing and exit status as configured. It returns to that same shell after the command finishes, even if the command is unknown. Your normal Fish history policy still applies; avoid entering secrets that should not be recorded.

cd in Terminal opens a fresh shell with the requested working directory. Directory and title values are passed without interpreting them as shell source. Both actions can be hidden in Settings.

Attention prompts

The window panel can highlight attention requests. The separate Auto-send Enter on Attention (5s) setting is off by default. If enabled, the daemon can send Enter to a uniquely matched active XFCE Terminal tab when the window's title reports action required. It uses the terminal's D-Bus API, not a simulated keypress to whichever window has focus, and skips ambiguous matches and windows being updated. Enable it only if you want the launcher to accept such prompts; the title is not a guarantee of what the prompt does.

Window history and workspace recovery

Press F9 and choose Recently closed to reopen an individual window or Saved sessions to select an automatic or named snapshot. Ctrl+Shift+T reopens the latest eligible entry without opening the history window. A successful reopen removes that entry from Recently closed.

The daemon saves a rolling set of 120 five-minute snapshots and up to 120 older hourly snapshots. Named snapshots and the recovery checkpoint are not pruned by this schedule. After reboot or an unexpected loss of windows, a recovery prompt can offer the last protected state; it is retained until you restore or dismiss it.

Restoration reuses matching windows and opens missing ones. It does not close unrelated windows. Restored windows are repositioned when reliable placement information is available. A report distinguishes verified placement from adjustments and failures.

Saved item What can be restored
Browser The application window. Tabs and URLs depend on the browser's own restore feature.
File manager The saved directory when the path is known and available.
Terminal Working directory and a supported launch recipe. Shell state, scrollback, and arbitrary commands are not snapshots.
Local tmux Reattachment to a surviving session by its exact identity, without restarting its programs. If it no longer exists, the saved information can recreate the session but not its full layout or unsaved pane state.

What a restore can reconstruct

A snapshot stores window identities, supported launch recipes and placement, not process memory. Each snapshot shows its window count, age and the daemon version that produced it, where recorded. Hover the version to see its exact build identity. Save current session creates a named snapshot; Restore and Delete act on the selected snapshot. Clear history on the Recently closed tab clears closed-window records instead.

Restored applications run in independent user systemd scopes. Literal arguments such as tmux's $6 are not treated as variables. Results distinguish Exact, Adjusted (for example when the original layout, desktop/activity membership or skip-switcher state cannot be reproduced), and Failed. A changed placement or missing launch recipe is not silently counted as exact.

A saved tmux attachment includes its local server socket and session ID, name and creation time, including custom listeners. An exact surviving session is attached without replacing its panes or detaching another client. For a missing session, the restore recipe can start a new one in the saved directory with a supported foreground app or fresh shell. It cannot recreate unsaved state, arbitrary commands, extra panes/windows, or remote tmux behind SSH. Codex snapshot replay may use resume --last, and agy may use -c; these need not reopen the conversation that was visible when the snapshot was taken. An in-place update refuses to guess a conversation this way.

Settings, commands and local data

Open Settings with F10 or the gear button.

Settings group Controls
General Global interface scale and whether text-selection cursors use an I-beam
Application panel System modules, icon-grid mode, icon and tile sizes, app names and font size, padding on each edge, and scroll sensitivity
Open window view Show launcher window, icon size, padding, row and line heights, text spacing and font sizes, path/command display, last activation, Run/CD shortcuts, attention automation, and scroll sensitivity
Show Info Independent wheel scroll sensitivity

Window size, panel settings and pinned order persist. Show Launcher Window only affects the main launcher row; it does not save the launcher as a session window. Dates are displayed as DD-MM-YYYY without changing stored timestamps.

Command line

Command Effect
applicationlauncher Open or raise the existing launcher
applicationlauncher --close-on-blur Dismiss the launcher when it loses focus
applicationlauncher --theme THEME Override automatic icon theme detection
applicationlauncher --show-terminal-info PID WINDOW_UUID Open only the verified XFCE Terminal window's Show Info
applicationlauncher --version / --build-id Print the product version or exact application build ID
applicationlauncher --build-info / --lifecycle-build-info Print build provenance or the embedded lifecycle identity for verification
applicationlauncher --diagnose auto Capture bounded evidence from the running GUI and daemon; see release builds and diagnostics
applicationlauncher debug-doctor Check diagnostic attachment, symbolization and capture prerequisites
applicationlauncher replay RING_OR_BUNDLE Replay saved boundary events into a deterministic state summary
applicationlauncher --help Display the help for the selected build

Local files

File or directory Purpose
~/.config/applicationlauncher/settings.txt Launcher preferences
~/.config/applicationlauncher/window_size.txt Launcher window size
~/.config/applicationlauncher/pinned_apps.txt Pinned desktop entries and their order
$XDG_STATE_HOME/applicationlauncher/history.sqlite3 Open and closed window records, recovery state, automatic snapshots, and named sessions
~/.config/systemd/user/applicationlauncherd.service Persistent user-session tracker
$XDG_STATE_HOME/applicationlauncher/ Private recovery plans, verified build archive, flight recorders, panic logs and diagnostic bundles

If XDG_STATE_HOME is unset, the state directory is ~/.local/state/applicationlauncher/. See recovery plans and diagnostic evidence for what those records contain.

Show Info and build metadata

Right-click a window and choose Show Info to see which process owns it and what is running inside it. Expand a process to inspect its own fields. Window properties such as the KWin ID, title and geometry belong to the window owner. A terminal, its shell, its tmux client and a program in a tmux pane can all have different versions and different restart actions.

Right-click an application in the app panel to inspect the installed copy without selecting a running window. This view does not infer a running PID or running build from an installed executable. You can keep several Info windows open to compare them. Choosing Show Info again for the same target raises its existing window.

You can select text across the visible tree. Copy retains the original text, including any strikethrough markers in raw titles; Copy HTML also retains the formatting. Ordinary metadata is captured when inspected. Exited processes can disappear from the tree; close and reopen Show Info to capture new processes or recheck installed metadata. Image loaders and their sandbox wrappers are hidden when positively identified. Use Show image-loader helpers at the bottom to include them.

Open Show Info from XFCE Terminal

A compatible XFCE Terminal Show Info menu calls applicationlauncher --show-terminal-info PID WINDOW_UUID. The command finds the exact terminal PID and lifetime window UUID in terminal D-Bus and KWin records. It refuses a closed or ambiguous target, not switching to a same-titled window. If no launcher is open, it starts an info-only window. If the launcher already exists, it keeps the search window separate and does not raise it instead of Show Info.

The process tree follows actual process ancestry. A shell's Pi process and backend tunnel can appear as siblings, and tmux panes do not become Unix children of the client that currently shows them. A shared browser or terminal owner can have child processes for more than one window. Threads are not listed. Current selections and scroll positions do not reset on a title's spinner frame.

Running and installed builds

Field What it answers
Running executable image original path What path Linux reports for the running executable via /proc/PID/exe. A (deleted) suffix means that directory entry no longer names the running image. The process can keep running and the same pathname can now point to a different build.
Executable Version (ELF build ID) Which native image the process is running, when it can be read. When identity can be compared, a matching running build is green and a mismatch is red.
Latest version on disk (ELF build ID) Which native image is installed at the verified launch target. It is not a package repository version or a colour-coded recommendation to update.
Uncompiled changes Whether known build inputs differ from the recorded build inputs. Green means no detected changes, red means changes, and yellow marks uncertainty. Missing coverage can leave the full build status unknown even when no recorded inputs changed.
Latest package (in last Pacman sync) and other upstream versions What version is known from the package source. The last sync can be old, and an upstream package for a fork is labelled as an upstream comparison, not its owning package.

The command line, the running image and the current Launch chain can all differ: a symlink can change, a wrapper can replace itself, and argv can be rewritten. If the running image is unreadable, a separately labelled on-disk candidate is not treated as proof of what is running. Not-applicable fields are omitted where possible instead of taking up space with placeholders.

Field labels use blue-grey for window information, green-grey for generic process and loaded-code evidence, rose-grey for program-specific context such as script targets and tmux sessions, and warm grey for installed metadata. These label colours are separate from build status on the values.

Scripts and hosted applications

An interpreter's executable and a script running inside it are different kinds of evidence. The process row shows the interpreter's native build. A script or hosted application section shows the entry point and whatever launch, source or startup evidence is available for that program.

  • Python can show Interpreter, the script and its arguments, its virtual environment and interpreter path, the configured base interpreter, package directories and project dependency metadata. System packages (configured) describes whether global Python site-packages are visible in the environment, not whether it can run other system programs. An on-disk script hash alone cannot establish which bytes the process started with.
  • Where a Bash launcher retained a verified script image, the script section can distinguish that retained content from the current source file. A sealed memfd is an anonymous open file, not a missing source checkout. Write and resize seals describe what can still be changed in that retained file. A pathname match alone does not prove that an ordinary script is unchanged.
  • Application: Pi describes the JavaScript and extensions hosted by the Node.js process. The runtime's ELF build is separate. The running code and extension fingerprints are compared independently against their installed counterparts, so current code and stale extensions can show different colours. A validated startup receipt provides running evidence; an npm version is a separate upstream reference.

Interpreter and hosted-app details

  • Python: Use the Script or Module name child to inspect a file or -m target separately from the interpreter process. It can report original arguments and interpreter options, virtual/Conda environment, pyvenv.cfg, configured base interpreter, the creating tool (e.g. uv), site-packages, dependencies and a separately expandable Referenced project modules section. Its static references describe on-disk files, including conditional references, not imports proven to have run. Configuration alone does not prove which script bytes were loaded; Script SHA256 (on disk) is explicitly the current file.
  • Bash and retained scripts: A verified retained script image can show the original and installed source hashes separately. /memfd:NAME (deleted) is an anonymous open file, not a missing checkout. Write and resize seals describe which changes are blocked. Heading context identifies the script without replacing the native shell process identity or duplicating the name.
  • Pi: The runtime's native Node.js build is separate from the hosted JavaScript version and entry point. A validated startup receipt can show the running code and extensions fingerprints, selected extension roots and installed build manifest. Each running fingerprint compares against its own installed reference; a matching code build does not prove extensions match. Installed fingerprints stay neutral. Missing or untrusted receipts do not establish freshness. Expanded Pi sections can refresh receipt evidence without repeating package/repository lookups.
  • Other hosted code: Known Node entry points, Java JARs/modules/classes and Electron apps have a separate application identity when proven. A native process's executable still belongs to its own PID section; a hosted code child is metadata, not an extra OS process.

Where the metadata comes from

The launcher combines Linux process evidence, local files and package records, and metadata from the shared program-metadata library. Progs can add information about installed programs and launch origins when available; it is not needed to list windows or launch desktop entries. See the source workspace setup for the build-time dependency.

Installed metadata can include application language, build system, description, capabilities and package ownership. FRK (fork) and DEV (development checkout) describe installation origins, not freshness. Package and Root package are omitted when there is no package owner. Root package is inferred from available install history and the current dependency graph. Pacman comparisons use existing sync data without refreshing it; optional upstream lookups such as npm run in the background and do not install anything.

Desktop file shows the associated entry or None. Additional matching entries are appended in the same field with context in parentheses. A per-user entry can override a system entry with the same desktop ID. Different IDs are only grouped when the lookup can verify a shared installation; a matching display name is not enough.

Package, desktop and build evidence

A package-installed executable can be compared using verified package and file ownership without a desktop entry or PATH alias. An app loaded through Node, Python, Java or Electron stays separate from that runtime. The runtime cannot supply the hosted application's version, description or build system. When proven, supported compiled metadata or a private loaded library can supply the running version without launching the app. For example, Mousepad's running version can come from its actual mapped private library, whereas the installed version comes from the current loader target. Equal main ELF build IDs do not prove both loaded libraries match.

Version and build-ID reads are pinned to the corresponding images, including a deleted original. Unknown programs and launch scripts are not executed to resolve them. Fixed native version probes are a targeted fallback restricted by the shared reader's trust policy, or a local exact-path grant in $XDG_CONFIG_HOME/program-metadata/version-probes.toml (default ~/.config/program-metadata/version-probes.toml). Inferred argv-only paths do not qualify for those probes.

Package and Root package describe actual package ownership and inferred install provenance, not an upstream comparison. Pacman reads the last sync data instead of starting a sync. Identified AUR packages may be queried online; concurrent identical requests share the in-flight lookup rather than adding a persistent result cache. An identified npm tool can show the registry's latest dist-tag separately from its installed version, loaded code and runtime. An upstream reference for a fork does not make it a package-managed installation.

Record-based input checks apply to source builds when supported (such as Cargo inputs or a Ninja target graph), not to Pacman/AUR executables or unbuilt interpreted sources. Newer and missing recorded inputs are distinct; newly added, unrecorded inputs may remain unknown. This is not a clean-build certificate, and inspection does not run a build. Package-managed installs do not get a source build-system field. A checkout with insufficient evidence can have an explanatory Unknown rather than a fabricated tool. Language, capabilities and exported entry points reflect available evidence for that exact target, not a neighbouring command's metadata.

Desktop entries with the same ID include effective and overridden copies under XDG precedence. Additional IDs can appear in the same Desktop file field when their entry points match the same verified application; a shared display name alone is insufficient. Different flags remain distinct. Annotations identify the precedence and target; Name, Comment and Icon come from the primary entry without merging other records.

tmux client and server

The client and server have separate process entries. On the client, expand the Session row below Desktop file for the exact attachment's pane, working directory, foreground program, sizing, transport, and available connection details. Keyboard idle time is distinct from network packet age. An unavailable network field does not mean the client is disconnected.

The server shows its listener, host, capture time, sizing monitor and counts below Desktop file. Expand its session and client groups for details, including detached sessions. Its installed native build is identified by the ELF build ID, not a second installed SHA256 field.

Detailed inventory uses the optional tmux-mosh collector. Opening a tmux section can request a background, read-only capture of the matching server. Unavailable helpers, unsupported servers and changed identities are reported rather than filling the record with data from another attachment. The inspection does not attach, detach, start, or update tmux.

Updates and recovery plans

An Update restarts a supported target using an already installed build. It does not compile, download, or upgrade a package. Read the scope before confirming: replacing a terminal, reconnecting a tmux client and replacing a tmux server are three different operations.

What an update restarts

Action What changes
Update window for XFCE Terminal Replaces the terminal at the same placement. tmux tabs reconnect to existing sessions; supported non-tmux programs restart.
Update for Fish, Codex, Pi, or agy Restarts that program in its tab or pane. For supported agents, the exact saved conversation must be verifiable.
Update client for tmux Reconnects that terminal tab to the same tmux session. The server and pane programs keep running.
Update tmux server Restarts that server and recreates its supported sessions. This interrupts their programs and needs separate confirmation.
Restart CopyQ Restarts CopyQ through its user autostart service after confirmation.

Update one or more terminal windows

Choose Update window in the launcher or Update next to an outdated XFCE Terminal window owner in Show Info. Choose This window for that exact window, or All outdated windows to review and confirm a bulk update. The first choice starts validation and shows progress and errors inline without opening a second launcher review. The terminal's own Update in Place menu uses the same daemon policy with its own confirmation.

The replacement uses the same placement. tmux tabs reconnect to their existing server and sessions: the server and pane programs keep running. Outside tmux, supported shells and programs (including Codex, htop and nvtop) restart instead. A direct Codex session must be idle and have an identifiable saved conversation. It resumes that exact conversation and returns to Fish when Codex exits. A persistent MCP or code-mode helper alone is not proof of active work. Busy or unverified targets are refused.

Supported non-tmux programs include Fish, Bash, Zsh, Codex, htop and nvtop, subject to the captured tab and arguments. A non-tmux Pi tab blocks whole-window replacement, and direct agy is supported by the agy-only action, not the whole-window recipe. Pi or agy inside tmux keeps running because the terminal update only reconnects the client. If a window is running something the preview cannot safely restart, the entire window is not replaced. Bulk updates let you review each window, tab, replacement and eligibility result, choose which eligible windows to update, refresh the preview, and confirm interruption.

With native holds, the old terminal can remain until replacement identities verify. On the compatibility path, a replacement is staged and positioned before the original programs stop. The old terminal may then close normally when its child exits. Both paths check the installed and running identities again; a compatibility update is not an unconditional force-close.

Recent compatible terminals can supply exact tab metadata and cooperate in the handoff. For older terminals without the native window-hold API, the daemon can stage a replacement through the terminal's CLI and restore it through KWin. Without tab metadata, the fallback requires one unambiguous KWin window and one verifiable controlling-PTY session. It cannot safely infer multiple tabs, arbitrary commands or which process belongs to a tab from window titles. Both paths use the same restart eligibility checks.

Window updates bind the selected and original native images by open file descriptors. Neither path copies executable files or computes content hashes of them for handoff. This is separate from reading build IDs and from the evidence required by individual application adapters.

Update one program

Use Update beside the target process in Show Info. The preview identifies what will restart; click the update button to confirm. When this succeeds, the confirmation closes and Show Info recaptures the process tree. If it fails or is refused, read the status before retrying.

Program Eligibility and restart
Fish An idle shell without unrelated jobs. The replacement returns to a fresh prompt in that tab or pane.
Codex Exact saved conversation and verified idle state. Related child-agent state can be checked; ambiguous conversation identity is not replaced with --last.
Pi Verified outdated build, supported Radiance launcher, and exact project session. An active tool, an unrelated job, or an unverified session blocks the update. The launcher's verified SSH tunnel can be restarted with it; an arbitrary SSH process is not assumed to belong to Pi.
agy Verified exclusive conversation lock and local save. The replacement selects the exact conversation, not the latest one. It preserves the relevant desktop and SSH login environment without persisting those values or copying credentials. Success does not verify Google sign-in.

In tmux only the selected pane's program restarts. Outside tmux, a program update requires a terminal with the tab restart API. This is not a way to transfer a live child process between PTYs or preserve shell-local state.

A Codex activity check reads bounded turn-state evidence for the exact conversation, including related child-agent records. Persistent MCP and code-mode helpers are not by themselves active tools. A model turn without a tool subprocess still counts as busy. Missing, unreadable or conflicting activity evidence can still prevent an update. The daemon revalidates it rather than assuming an old preview still applies. After a supported restart, Codex runs under interactive Fish so exit or failure returns to a prompt instead of closing the tab.

Pi resumes the exact project session through its verified Radiance launcher. The backend verifies the launcher, activity marker, session and any owned tunnel rather than trusting the process title pi. The older Bash route uses a verified sealed launcher image. The Python route checks the installed interpreter, startup profile, private PID/start-bound connection receipt and live port lock. Unrelated SSH workers or active tool jobs still block it.

An agy restart uses --conversation for the verified save rather than --continue. The memory-only login environment overlay preserves absent variables as well as present ones. Signing in again may still be required if the service itself has changed the required permissions.

Update a tmux client

Update client reconnects the same local terminal tab to the same session on the same existing server. Neither the server nor its pane applications restart. The updater verifies the client, listener, target session, and replacement compatibility before detaching. It refuses unsupported attachment modes, unsafe detach behaviour and unrelated shell jobs instead of modifying the server's configuration.

Update a tmux server

The server's Update preview lists the exact listener, sessions (including detached ones), programs to restart, and remote attachments to disconnect. Confirming it interrupts all sessions on that server, not on any other server. The daemon verifies local tab handoffs, supported pane recipes and replacement startup before stopping the original server. Unsupported layouts, ambiguous clients or unverified applications can block the preview or final preflight. Update any older terminal that cannot hold its local tab, then request a new preview.

The new server recreates the supported windows and pane layouts and local clients reattach in the same tabs. Verified remote Mosh clients disconnect and must reconnect manually; the updater does not kill Mosh itself. Scrollback, shell-local state and runtime-only tmux options are not saved. The old server's colour preferences, including unset values, are carried forward so the updater's own environment does not override them.

After confirmation the dialog becomes a progress and results view. It reports server replacement, local reattachments and per-pane results separately. If the server and attachments are valid but a program fails to return, the result is completed with warnings. Working panes stay running. Restore only the affected programs with the exact saved recipe; do not restart the server again just to retry one application.

The preflight rehearses the new server on a private socket with startup gates closed. Grouped sessions, linked windows, unsupported programs, unrelated jobs, too many panes or ambiguous local handoffs are refused before shutdown. Remote clients must have verified Mosh ancestry to be disconnected without a local tab handoff. The confirmed operation targets one specific PID, process start and listener, with automatic server creation disabled for later commands. An unexpected first-start failure can be retried only while the listener remains unused and no application gate has opened.

Restored panes are verified under shared startup deadlines rather than giving each slow application a fresh serial timeout. Pi recovery verifies the local conversation and process independently of backend availability. Colour-related settings such as NO_COLOR, FORCE_COLOR, CLICOLOR, CLICOLOR_FORCE and COLORTERM are preserved, including intentional unset values. A failed pane does not roll back verified running panes. Topology, replacement-server or client handoff failures remain operation failures, not a success message.

Restart CopyQ

The verified CopyQ window owner offers Update even when build freshness is unknown or current. Restart CopyQ confirms a restart of app-com.github.hluk.copyq@autostart.service so it loads the installed program. It does not install a package or restart other applications.

If an update fails

Before the shutdown stage, a refusal should leave the original target running. After shutdown has begun, inspect the report and recovery plan before retrying. A missing original window or a failed application resume is not reported as a successful restart.

  • If an Update action is absent, the target may not be supported or a newer installed build may not be verified. Check the running and installed evidence separately and reopen Show Info for a fresh capture.
  • Codex activity could not be verified does not necessarily mean that the conversation is busy. The updater needs readable, consistent evidence tying idle state to that exact conversation before it stops it.
  • When a tmux client or local terminal binding cannot be identified, use the exact session, client PID or listener named by the preview to identify the affected window or tab. Do not substitute a session just because its name or title looks similar.

The report links to private state below $XDG_STATE_HOME/applicationlauncher/ (default ~/.local/state/applicationlauncher/):

Record Purpose
lifecycle/<operation-id>/ Terminal-window plan, stage journal and actual per-window result
application-updates/<operation>/restart-plan.json Individual program and tmux recovery recipes
restart-events.jsonl, restore-status.json, and result.json in the tmux server operation directory Startup attempts, bindings, application results and failing stages

Recovery plans are retained until manually removed. They identify the original target and how to relaunch it; they are not copies of executable files, unsaved data or running process memory. F9 snapshots are a separate workspace restore feature.

Ownership

applicationlauncherd owns policy and coordination through its versioned /Lifecycle interface. The GUI selects scope, obtains consent and displays results. XFCE Terminal supplies native tab/window information and handoff mechanisms; it does not decide how to resume Codex or Pi. Confirmed operations use separate transient user workers so closing the GUI does not abort one. Restarts and workspace restores are serialized to avoid competing changes.

See release builds and diagnostics for finding timing records and collecting diagnostics, and Architecture for the regular window feed.

Playback indicators and Firefox integration

A playback waveform around an app or window icon means that the launcher measured sound from a corresponding playback stream. It is not an animation based on the volume slider. When there is sound but its window is ambiguous, the app tile can show the waveform without marking every window for that app. Mute and volume actions operate on playback streams, not on individual tabs.

What is measured

The audio worker monitors individual sink inputs through PulseAudio or pipewire-pulse. It uses output monitors only: it does not record the microphone or fall back to the system's default recording source. Samples are discarded after analysis. The GUI gets levels, not audio samples. Silence, mute, corking and stale samples clear the indicator.

A background matcher ties streams to their owning apps and windows. Browser audio helpers can be attributed to their browser process, but a shared PID cannot identify which window owns an audible background tab. The launcher withholds a window waveform when it cannot verify ownership. On PipeWire the output-only monitors are marked as virtual so Plasma can distinguish them from real microphone clients.

Optional Firefox bridge

The bridge provides Firefox's own audible-tab ownership for more precise window attribution. It can identify a playing background tab. Where several Firefox windows are audible, ambiguous or stale titles still prevent a window-level match rather than choosing a window arbitrarily.

This is optional privileged Firefox AutoConfig code, not a WebExtension or a remote debugger. Review the installer before using it. It enables unrestricted AutoConfig, not unrestricted web pages or a disabled content sandbox. To install from the checkout:

sudo python3 scripts/install-firefox-audio-bridge.py

Start Firefox normally at your next browser restart. Installation does not close any browser windows. A package upgrade or configuration deployment can remove the installed bridge files.

Firefox writes a private, short-lived $XDG_RUNTIME_DIR/applicationlauncher-firefox-audio/firefox-PID.json containing playback ownership metadata, which can include private-window titles. The launcher reads it locally, checks the browser's identity and matches it to measured playback. There are no URLs, saved PCM samples or network endpoints. Stale files are ignored, and Firefox removes its file on normal shutdown.

Verify changes

From the checkout:

node --test tests/firefox_audio_bridge.test.cjs
uv run --no-project python -m unittest discover -s tests -p test_firefox_bridge_install.py
cargo test --release --bin applicationlauncher audio::

The Firefox integration fixture runs a disposable browser/profile against a private audio server. It is separate from the opt-in live probe, which samples the real desktop's playback for a short interval without saving audio or changing playback.

Architecture and project layout

Applicationlauncher separates its short-lived UI from the services that need to run while it is closed.

KWin window feed -> applicationlauncherd -> launcher and Show Info
                           |
                           +-> SQLite history and workspace snapshots
                           |
                           +-> lifecycle worker -> verified terminal/app handoff
Component Inputs and responsibility
KWin window feed Sends window additions, changes, removals and activations, with KWin identities and properties.
Tracker and user daemon Maintains the live list, reconciles changes, records history and snapshots, and coordinates workspace restores and the global reopen shortcut. kdotool handles window actions and reconciliation rather than being the primary feed.
Launcher UI and popups Reads the live list and local desktop entries. Ranks results with fuzzy-rank, presents metadata, and asks the daemon for supported operations.
Window and metadata adapters Combine process/build evidence and the shared program-metadata library with window-specific context.
Lifecycle worker Previews, validates and performs a confirmed restart independently of the GUI. Writes recovery recipes and reports. See Updates.
Audio worker Analyses playback off the UI thread and publishes levels and stream ownership, not samples. See Playback indicators.

The launcher wrapper resolves the source checkout, checks the local binary pair and starts it. The release matrix builds variants and checks their artifacts. Install and run puts these operations in order; Release builds and diagnostics explains the release profiles, logs and diagnostic bundles.

Window changes and rendering

The tracker exposes incremental window changes and an authoritative snapshot for reconnect or journal overflow. The GUI renders visible rows and tiles, updates changed search documents, and keeps transient spinner frames separate from persistent history and search ordering. Metadata and audio work run off the drawing path.

See Performance and verification and the behaviour contracts for the performance design and isolated verification commands.

Terminal build freshness API

The daemon's com.terrydaktal.ApplicationLauncher session-bus service exposes com.terrydaktal.ApplicationLauncher.Freshness1 at /Freshness.

  • GetProcessStatus(pid: u32, start_time: u64, image_dev: u64, image_ino: u64, launch_path: string) -> string returns a versioned JSON report: current, outdated or unknown, with the requested target, observed identity, ELF build IDs and generation.
  • ProcessStatusChanged(report: string) publishes changed reports. Consumers must match the target, pin the unique service owner, and reject older generations from that owner. Generations reset on daemon restart.

Calls enqueue checks or return cached reports. The background worker checks leased targets and sleeps when idle. Native comparisons are read-only and same-user. They verify process start time, executable device/inode and the launch target before comparing builds, without executing candidate files. Zero identity fields allow identity discovery.

This is comparison against the installed native image, not package, source-tree or interpreted-code freshness. Missing or ambiguous evidence is unknown; consumers should clear daemon-derived stale markers when the service is lost. The terminal owns title rendering and the native handoff, while lifecycle policy lives in the daemon. The freshness interface does not initiate a restart.

cargo test --release --lib freshness::tests checks the inspector and cache. The uninstalled freshness-service example serves the same implementation for isolated terminal integration tests.

Source tree

applicationlauncher/
  README.md                all end-user, operator and developer documentation
  Cargo.toml, Cargo.lock   GUI/library/daemon build and dependency lock
  src/
    main.rs                launcher binary and command-line entry point
    bin/applicationlauncherd.rs
                           tracker, restore and lifecycle service entry point
    app/, popups/          panels, input handling, info and confirmation UI
    windows/, launch/     identity, installation/desktop metadata and launch mechanics
    tracker/, lifecycle/  history, replay, restore and restart transactions
    audio/, assets/        playback workers, icons, desktop entry and KWin rule
  kwin/                    event feed installed in the user's KWin session
  firefox/                 optional browser-side playback bridge
  scripts/                 launch, verified release, diagnostics and bridge commands
  build-support/           version stamping, variant generation and release tooling
  examples/                isolated freshness service fixture
  tests/                   behaviour and release verification fixtures
  debuggability.toml       machine-readable diagnostic contract

Build and integration scripts

Script Inputs and outputs
scripts/applicationlauncher Uses the local checkout and release pair; checks compatibility, starts the tracker, and forwards arguments to the GUI.
scripts/build-debuggable-release Runs the verified release pipeline and archives the matching binary and symbol artifacts; --no-build archives an existing verified input pair.
scripts/build-release-matrix Builds and verifies observable, minimal and diagnostic variants in isolated build directories, then publishes the validated pair.
scripts/capture-release-diagnostics.py Takes an explicit PID and private output directory and collects bounded external evidence.
scripts/install-firefox-audio-bridge.py Installs the optional Firefox AutoConfig integration that publishes private playback metadata.
build-support/ Generates frozen version/provenance inputs, checks portable script runtimes, and prepares the compile-time minimal workspace.
tests/ Contains isolated regressions, release acceptance checks and behaviour contracts. Opt-in live tests are separate.

Release builds and diagnostics

The normative Stateful, schema-version-6 contract is debuggability.toml. This is its operator guide. Ordinary launches remain observable without a tracing flag. Build verification never restarts an existing application.

Artifacts

Artifact Location Evidence
release-observable Default target/release/{applicationlauncher,applicationlauncherd} Bounded events, counters, gauges/high waters, worker states, sink health and independent diagnostic socket
release-minimal target/release-profiles/release-minimal/ Exact optimized ELF, private symbols/unwind data, immutable identity/source manifests, required recovery records and external capture; no optional in-process diagnostic runtime
diagnostic-build target/release-profiles/diagnostic-build/ Same release optimization plus explicitly gated fault hooks and contained synthetic probes

Runtime off in an observable artifact is not an erased artifact. --build-info reports the actual profile, features, lock/source hashes and canonical product semantics without starting the GUI, daemon or worker.

Build, verify, archive and publish the normal observable pair:

scripts/build-debuggable-release

This delegates to scripts/build-release-matrix, which:

  1. Compiles variants in target/profile-build, never over the active pair.
  2. Packages actual ELFs with compressed full DWARF and GNU build IDs.
  3. Rejects minimal observer symbols/strings, residual Python observer AST/bytecode, altered product dependencies and ordinary-release fault hooks.
  4. Archives exact/stripped binaries, split symbols, hash-verified source inputs, immutable Rust source packages, the generated lock and native DT_NEEDED modules.
  5. Runs private packaged-daemon and archive-only symbol-recovery trials.
  6. Compares canonical product digests and designated optimized instructions.
  7. Publishes the observable pair after its gates pass. The wrapper's build-ID agreement check also guards against a partial two-file publication.

Compatibility repair uses --only release-observable: it runs that artifact's gates, not a new three-profile comparison, and does not overwrite a complete matrix receipt. Plain Cargo builds remain useful for development but do not constitute matrix verification. A source change after linking refuses archival rather than recording a nearby but different source tree.

Optimization level, LTO/codegen defaults, target CPU, allocator, panic strategy, renderer and product features remain unchanged.

Erasure Mechanism

build-support/minimal_workspace.py generates a disposable manifest using the authoritative product source. cfg and token macros erase own observers before Rust type checking. lifecycle_sources.py erases Python timing and optional traceback capture without removing required errors or recovery writes.

Pinned Linux log/tracing observer adapters erase transitive event tokens and identity-only instrumentation wrappers. They are generation tools, not an alternative product implementation or proof by themselves: actual linked observer symbols/markers must be zero. Product dependency versions must remain identical. New dependency API usage fails compilation or verification rather than silently broadening this supported graph.

Physically omit optional source modules and test the remaining product:

uv run --offline --no-project --python /usr/bin/python python -I -B build-support/minimal_workspace.py --negative --test

Safety checks, operation IDs used by product coordination, required CLI errors, restart plans/status, scheduling clocks and renderer behavior are not erased as convenience logs.

Runtime Controls

Observable startup controls:

APPLICATIONLAUNCHER_DIAGNOSTICS=off
APPLICATIONLAUNCHER_DIAGNOSTIC_CATEGORIES=baseline,stderr,update-timings

The default is observable. Legacy runtime minimal aliases off. An explicitly empty category allow-list disables all optional categories. Disabled macros do not evaluate fields or log arguments. Baseline-disabled startup creates no recorder writer; the independent same-user control socket remains available.

baseline covers state, counters, gauges and workers; stderr covers optional log macros; update-timings permits, but does not activate, detailed update tracing. Fault hooks exist only in diagnostic-build.

For a slow update, an agent can directly invoke the running daemon's same-user D-Bus API LifecycleTiming1.ActivateUpdateTimings(seconds) on /LifecycleTiming. The user need not run a command or restart the daemon. There is no --trace-updates flag. Leases last at most 300 seconds; zero stops new leases, and existing workers retain their original deadline.

Only new window-update jobs receive a private lease. JSONL spans distinguish confirmation, planning, recovery-metadata publication, discovery, staging, replacement, verification and recovery. Neither native nor compatibility updates copy or hash executables. Older captures can contain hash/copy stages from the removed recovery-image cache. Monotonic wall and process CPU times are separate. Nested spans are inclusive, not additive; a missing end means incomplete evidence, not success. IPC duration does not claim remote CPU attribution.

Files live under $XDG_STATE_HOME/applicationlauncher/lifecycle/timings/OPERATION.jsonl, readable without the UI or daemon executor. They are not automatically included in normal capture bundles; retain the matching file alongside a bundle.

Required private restart plans, status and results remain in every build profile. Running application images are held by open descriptors during handover, even if unlinked; file/process/session identities and structured restart scope are checked without content hashing. These records are not persistent executable backups: once all descriptor holders and processes exit, an unlinked image cannot be recovered from the plan alone. Existing recovery-image caches are left untouched.

Window updates stop the foreground application, not its dedicated return-shell ancestry. The coordinator checks those shells for identity changes or new jobs before handing over to the verified replacement. Native interrupted recovery keeps the original tab held open through delayed child exit and restores input when the pending update ends. This last safeguard requires a terminal containing the recovery-hold fix; it cannot retrofit older running native terminal code. Freshness compares retained restarted images with a verified published installation rather than treating their old build path as the current version.

Show Info Presence Checks

Process fields remain captured metadata, not periodically refetched discovery. The window-process-presence worker reads only captured /proc/PID/stat entries to remove proven exits, zombies or reused PIDs. At most one check per info window is pending, with a one-second interval, 512-process/8-KiB-stat limits and a 500-ms collection budget. No process-directory scan, executable hashing, version execution or package query occurs in this path. Unknown reads retain the entry; a lost worker retains metadata and retries after the interval, while a late reply cannot prune a newer capture. Surviving process IDs, cached metadata and dropdown state are not reset. Reopen the panel to capture new processes.

Recognised image-loader branches are hidden, not terminated. The per-window checkbox exposes their captured live entries and count; generic sandboxes and important process/ancestor paths are never hidden by name alone. The notice states the capture/removal policy. Observable builds use the existing bounded worker registry; minimal builds erase that registry and worker-state strings, not the required presence behavior. Regression coverage lives in src/windows/process_tree/{helper_tests,presence}.rs, src/app/popups/refresh_tests.rs and src/popups.rs.

Capture

The agent can collect ordinary observable evidence directly:

applicationlauncher --diagnose auto

The collector discovers private same-user PID sockets independently of GUI repaints and the daemon D-Bus executor. It collects build/process identity, best-effort semantic state, bounded /proc data, repeated stacks, relevant journals and checksums. Exact-peer-PID debugger authorization expires after 60 seconds and is explicitly revoked. --perf and --core request additional sensitive evidence explicitly.

Minimal has no in-process diagnostic endpoint. Its external helper needs no application flag:

uv run --offline --no-project --python /usr/bin/python python -I -B scripts/capture-release-diagnostics.py --pid PID --output PRIVATE_DIRECTORY

Add --stacks for debugger attachment, or use --executable ARCHIVED_ELF --core CORE for post-exit stacks. Failed/unavailable sources are reported without discarding other evidence. PID/start/boot identity is checked before and after. No environments or open-file contents are collected. GDB disables auto-loading, debuginfod, locals and frame arguments; it never executes target methods.

Same-UID sibling ptrace can be refused by Yama, especially for minimal without debugger authorization. Passive evidence remains available; a parent-debugger fixture does not prove arbitrary live attachment permission. Cores can contain private memory. OOM/SIGKILL may leave no core or semantic tail.

Build archives default to $XDG_STATE_HOME/applicationlauncher/builds/by-build-id/ELF_BUILD_ID/. Three builds/component plus running and published-profile IDs and their source archives are retained. Automatic capture retains at most eight directories; completed captures older than seven days expire on collection. Unfinished evidence is preserved and can refuse new collection when the budget fills. Explicit external-helper output is caller-managed. Required recovery plans/progress/results are never pruned.

Budgets

Facility Bound
Events 512 events, 1000 admitted/second/process; contention drops rather than blocks
Persistent evidence 512 checksummed 4 KiB slots/component; nonblocking queue 64; 64 MiB logical writes/recorder lifetime
Fields / boundary payload 96 UTF-8 bytes / 2 KiB
Workers / semantic snapshot 64 workers / 1 MiB; unavailable locks explicitly reported
Ordinary capture 32 MiB, 45 seconds; explicit full cores are separate sensitive requests
External helper 32 MiB, 45 seconds plus command-termination grace; 1 MiB/command, 128 threads
Update tracing 300 seconds, 256 rows, 1 KiB/row, 128 KiB/file, depth eight
Timing retention 64 files / 8 MiB; no-wait allocation, active-file locks, 128-entry scan
Runtime / symbols 64 MiB stripped / 512 MiB exact or separate-symbol file

Loss/overwrite counters and persistent sink health/first errno expose recorder degradation. Sink failure cannot change restart policy or replace the original product exception. The ring is optional evidence, not a durable audit trail. No events belong in fuzzy-rank candidate loops, tile/row layout, spinner frames or audio samples. Frame/wheel detail is capture-activated only.

Detailed update timing is admitted to distinguish delays combined by existing recovery journals, not as an always-on profiler. Tests enforce disabled-boundary p99 under 2 microseconds, activated-boundary p99 under 1 millisecond, initialization p99 under 5 milliseconds and incremental Python allocation under 1 MiB. Only fixed scalar labels are captured, not titles, prompts, argv, user paths or exception payloads. Demote it when equivalent cheaper evidence exists, privacy needs change or measured budgets fail.

Lifecycle Restoration Results

Tmux recovery evidence is required product state, not optional instrumentation. Private application-update directories retain restart-plan.json, restart-events.jsonl, restore-status.json, per-pane exit receipts and result.json in both observable and minimal artifacts. Progress/results are atomically replaced and bounded by the existing 2 MiB metadata limit and 128-pane scope limit. Recovery directories remain until manually removed.

The status record separates verified server replacement and local client reattachment from each application's pending/restored/failed outcome. The journal identifies the session, rebuilt pane and final verification reason; exit receipts retain launcher status without recording terminal output. Shared verification deadlines avoid serial waits for each Pi. A missing result from an exited worker is still a failure, while a verified running server with individual application failures completes with explicit warnings. Working sessions are not automatically restarted as recovery.

These files include application names and working-directory/session metadata already required by the private recovery plan. They do not add conversation text, raw process environments, credentials or captured terminal payloads.

Assurance And Limits

Run ordinary Rust/Python tests, diagnostic-build integration tests, negative minimal compilation and the release matrix. Exact ELF proof and acceptance receipts live in target/release-profiles/; failures retain logs/trial records.

tests/verify_release_diagnosis.py uses a private bus without activation directories, private HOME/XDG state, stubbed desktop commands and no inherited display or credentials. It exercises typed malformed-request errors, healthy idle/startup controls, passive capture and independent snapshots. GDB stops a private fixture before product initialization and recovers its source frame after exit using archived stripped ELF, split symbols, source and native modules. This proves retrieval, not real crash causal localization. tests/production_diagnostics.rs separately tests contained diagnostic-only panic/native crash and capture while the main thread is blocked.

Residual coverage is explicit: historical whole-GUI non-inferiority, real GPU fault capture, heap-leak localization and arbitrary minimal sibling-debugger permission are not certified. Optimized-code identity covers named search, projection and build-comparison functions, not every GUI instruction. Private-daemon/startup and Python-boundary measurements do not establish every whole-GUI CPU/RSS/p99 budget. Link/load-time native modules are archived; later GPU-driver loads and device memory require incident-specific evidence. No deterministic OS/GPU/thread replay or complete named-lock ownership is claimed.

Performance and verification

Implemented without changing search ranking, visible animation cadence, window ordering rules, restoration policy, snapshot retention, or release compiler flags.

  1. Reuse tmux identities and per-poll process reads. Validate client inode, start time and executable before reusing its socket. Query live titles every poll; resolve each shared pane once. Process scratch data expires every poll.
  2. Virtualize window rows and application tiles. Allocate the entire scroll extent but render only visible rows plus one overscan row. Retain global item indexes, stable widget IDs, selection scrolling and cross-pane navigation.
  3. Cache default window ordering. Reuse the sorted row model across frames. Invalidate on real identity/grouping/sort changes and activation changes; patch spinner frames in place without sorting.
  4. Separate transient title frames from metadata changes. Spinner/attention frames reuse verified window metadata for at most 500 ms. Audio attribution still refreshes for ownership changes or explicit stream-title matches.
  5. Prepare search documents incrementally. Prepare only dirty/new windows; reuse unchanged document allocations. Empty-query startup does not eagerly prepare documents. Removed windows are pruned from the dirty set.
  6. Send bounded incremental tracker updates. GetWindowChanges returns the latest changed records and removal IDs in one RPC. A daemon restart or journal overflow requests an authoritative resynchronization. Legacy daemons retain the GetStatus/GetWindows fallback. An inactive GUI backlog exceeding 4096 events is replaced by one authoritative snapshot, not historical removals.
  7. Separate visual updates from durable database changes. Ignore spinner and blinking attention frames for persistence. Patch only changed/deleted records transactionally; retain newer dirty revisions arriving during I/O. Restore metadata reuse also expires at 500 ms, independently of title frames.
  8. Refresh history by generation. Reuse its tracker connection and fetch history/snapshots only when their generation or daemon run changes. Record the generation read before fetching, so concurrent changes trigger another read. Both history and session tabs continue refreshing while open.
  9. Cache desktop-entry parsing. Key parsed data by inode, size, nanosecond modification/change times and locale. Enumerate paths every scan, reevaluate TryExec and desktop visibility, and resolve each icon name once per scan. Negative icon lookups never persist between scans.
  10. Map highlight offsets once. Build one Unicode byte-offset table per rendered search string instead of repeatedly scanning prefixes. Preserve all occurrences, exact-over-typo precedence and focus on the winning match.
  11. Write settings off the UI thread. A named worker coalesces the latest settings, pins and size values in a three-path queue. It keeps the existing atomic-write/fsync behavior; normal GUI exit drains queued writes after the event loop has stopped. Worker and I/O failures remain visible as errors.
  12. Collect subprocess output with readiness notifications. On Linux, poll stdout/stderr and pidfd in the calling worker instead of creating two reader threads and polling child exit every 10 ms. Retain a bounded compatibility fallback, four-MiB captures per pipe, deadline checks and private-group cleanup before reaping. Application launches still use independent scopes.

Verify performance contracts

The scoped behavior inventory is optimization-contracts.json. Native regression tests check work counts, layout/IDs, Unicode mapping, journal overflow/reconnect, in-flight writes, file freshness and bounded worker queues. These prove work reduction and preservation of the specified contracts, not a particular live desktop CPU percentage or FPS improvement.

cargo fmt --check
cargo check --offline
cargo test --offline --release
cargo test --offline --release --lib private_server_live_titles_preserve_spinners_and_escape_record_controls -- --ignored
dbus-run-session -- env APPLICATIONLAUNCHER_TEST_PRIVATE_BUS=1 cargo test --offline --release --lib private_bus_incremental_feed_and_legacy_fallback_preserve_end_state -- --ignored
python -m unittest discover -s tests -p test_firefox_bridge_install.py
cargo build --offline --release --bins

The opt-in tests above own an isolated tmux server and a private D-Bus session; they do not restore, close or inject input into the user's windows. Live GPU, desktop activation, audio capture and terminal-maintenance tests remain separate environment-dependent checks. Do not run all ignored tests against a live desktop.

Build versioning

Layout

APP-VERSION                         tracked manual epoch: 0.HISTORY_GENERATION
build-support/
  app_version.py                    commit count, locked counter and frozen metadata
  app_version.rs                    Cargo build-script adapter
  app_version_runtime.rs            early, headless --version/-V handler
  AppVersion.cmake                  CMake executable integration
  stamp_bundle.cjs                   Node/Electron/web bundle build stamp
  build_go.py                        Go linker-version build entry point
  app_backend.py                     Python wheel/sdist/editable build adapter
  python_runtime.py                  template for the packaged version reader
  AppVersion.gradle.kts              Android variant/default versionName adapter
  AppVersionTask.gradle.kts           cached configuration preview + build reservation
  app-version.json                   optional generated-state location override
.app-version/                       ignored, machine-local counter database and lock

Applicationlauncher uses the Cargo adapter. The following also records the shared contract for the other build systems supported by the vendored tools. These files are maintained in the version repository and vendored into consuming repositories. Copies require no sibling checkout or network access. Python 3.11+ and Git are build dependencies only; built native applications do not invoke them.

Version Fields

The executable version is 0.HISTORY_GENERATION.COMMIT_COUNT-BUILD_COUNT:

  • 0 is reserved, not an upstream rebase counter.
  • HISTORY_GENERATION starts at zero. Change APP-VERSION manually only after an intentional whole-history reconstruction, not an amend or a small fixup pass.
  • COMMIT_COUNT is git rev-list --count HEAD, including all reachable commits. It is the actual current count, not the anticipated next commit or remote count. An initialized Git branch with no commits has count zero and the explicit source identity unborn; the first commit starts its own counter at zero.
  • BUILD_COUNT starts at zero for each full Git commit and build component. It advances across debug/release profiles and output directories in this checkout. Amendments start a new full-SHA counter even if the commit count stays unchanged. Dirty edits and manual epoch changes do not reset an existing commit's counter.

This is a custom display scheme, not SemVer compatibility promises. Dependency, ABI, Python distribution and Android numeric installation versions remain separate. Generation zero is the explicit initial baseline; no historical rewrites are guessed.

Build Pipeline

  1. The native build adapter reads the tracked APP-VERSION and complete Git history.
  2. app_version.py locks .app-version/counter.lock, reserves the next number for the full commit and component, then atomically persists the incremented state.
  3. It freezes that reservation into generated compiler inputs and JSON metadata.
  4. The compiler embeds the version in the executable. --version never counts a build, queries Git, reads mutable source metadata or changes running applications.

Cargo invokes the adapter only when its build script is invalidated. A cached, no-op Cargo build therefore does not consume another reservation. CMake's build target deliberately reserves and relinks on each build invocation. Only its small generated version object recompiles; the stable public header does not invalidate application source files. Failed attempts after reservation consume their number rather than risk reusing an artifact ID. Different Cargo packages or build-system components have independent counters; multiple executables in one Cargo package share its reservation.

Counter files must not be deleted to reset numbering. They are local to this checkout and cannot reconstruct unknown builds on another machine. Corrupt state, shallow histories, missing Git history and fork repositories fail explicitly rather than silently producing misleading zeros. Preserve .app-version/ when moving an existing checkout; vendored fork repositories keep their separate version scheme. Projects which require generated data under out/ can set {"state_directory":"out/.app-version"} in build-support/app-version.json. That path must remain inside the checkout. Preserve that directory instead. The display version is not an exact source identifier: an amendment can preserve the commit count and restart its build counter without changing the manual history generation. Keep the full source commit and native build ID when distinguishing those builds; uniqueness is scoped to a full commit and build component.

Inspect the next build without reserving it:

python3 build-support/app_version.py --root . --component rust:. --version-only

Use the adapter's exact component name; packages within a workspace are independent.

For Cargo, the adapter sets compiler environment versions without rewriting Cargo.toml, dependency constraints or the lockfile's package release numbers. CMake keeps project(VERSION ...) separate and embeds .program_metadata records. Build JSON includes the full source commit and dirty status for exact provenance.

Other Build Systems

  • Node/Electron: the normal npm run build variants reserve a version before compilation. Electron freezes it into dist/build-info.json; the application launcher's --version reads that artifact without starting Electron or rebuilding. Web builds can copy their frozen record into a generated public asset.
  • Go: use python3 build-support/build_go.py, make build where provided, or Wordelites' just go-build. Deployment scripts use that same entry point. It injects the version with linker flags and writes adjacent build-info JSON. Raw go build has no pre-build hook and deliberately reports unversioned development rather than inventing a build count. --output, --ldflags and --trimpath are supported; relative output paths are relative to the invoking working directory.
  • Python: the normal PEP 517 build invokes the original Hatch/setuptools backend, then embeds _app_version.json in the wheel and updates every wheel RECORD hash. Distribution release versions remain valid PEP 440 versions; the application reports the separate 0.HISTORY.COMMITS-BUILD version. Source distributions carry the frozen identity and backend so their subsequent wheel build does not need Git or reserve a second number for the same source-build pipeline. Editable builds freeze a local stamp as well. Running or importing the package never invokes Git.
  • Android: configuration reads the next version without reserving it and supplies the default and each APK variant's versionName. A preBuild dependency reserves and verifies that exact identity before compilation, never during IDE sync or gradle help. Configuration-cache inputs track the non-mutating query. Concurrent builds or source changes which invalidate the preview fail rather than stamp an APK with an unreserved or reused identity. Numeric versionCode and signing settings are unchanged. A working Android SDK and the project's original Gradle/Android plugin dependencies are still required.

Native CMake targets define APP_VERSION_BUILD for their version handlers. Shared C++ files compile without generated desktop headers when reused by Android or standalone library/test builds. No system libraries or running applications are updated or restarted by these adapters.

Verify build versioning

The canonical version checkout contains the focused regression suite:

UV_CACHE_DIR=/data/.cache/uv uv sync --dev
UV_CACHE_DIR=/data/.cache/uv uv run python -m unittest discover -s tests -p test_app_version.py -v

It exercises actual Cargo/CMake/Go release artifacts and Python packages, cached builds, local dependency edits, Node stamps, full-SHA resets, zero-commit branches, concurrent allocation, corruption refusal, generated-directory policy, and commit counts beyond 99. Vendored consumers do not need the test-only Python dependencies.

About

Rust KDE Plasma Wayland window/app launcher and daemon tracking window history, crash recovery, timed snapshots, and tmux/terminal restoration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages