A desktop application for building and evaluating population pharmacokinetic / pharmacodynamic (PK/PD) models with FeRx NLME.
Built with Rust + egui. Runs on macOS, Windows, and Linux.
- Browse, create, and edit
.ferxmodel files with syntax highlighting - Run models with configurable methods (FOCE, FOCEI, SAEM, Gradient Newton), covariance step, optimizer trace, and output tables
- Validate — static syntax/structure check of a model file (severity, error code, block, line, suggested fix) before committing to a fit, with no data required
- Recompute SEs — re-run the covariance step (
r/s/rsr) on an already-completed fit without re-optimizing, e.g. to add standard errors to a fit run with covariance off - Live log streaming, run queue, process detachment (runs survive GUI close or SSH disconnect)
- Model ancestry tree with ΔOFV labels, pan/zoom, and PNG export
- Goodness-of-fit plots (4-panel: DV vs PRED/IPRED, CWRES vs time/IPRED) with LOESS overlay and log-scale toggle
- Individual fits with subject paging
- iOFV waterfall per subject
- Convergence trace (OFV + method-specific metric: MH accept rate, LM λ, gradient norm)
- ETA–covariate correlations
- Parameter correlation heatmap from the covariance matrix
- NPDE/NPD — simulation-based normalized prediction distribution errors, robust to nonlinearity and non-Gaussian random effects (unlike CWRES): NPDE vs a selectable X-axis (time, PRED, IPRED, TAD, or any covariate — independently per panel, same as the GOF section), a QQ-normal plot, and tail-flag summary stats against the N(0,1) null
Powered by the R vpc package — all two-stage statistics, binning, and confidence bands are computed by the package; FeRx GUI renders them natively and interactively.
- Continuous VPC with configurable prediction intervals (5/95, 10/90, 25/75, custom), confidence intervals, and multiple binning methods (Jenks, k-means, density, time, data, manual)
- Prediction-corrected VPC (pcVPC) — normalises by population predictions from
fit$sdtab - Censored / BLOQ VPC — fraction-below-LOQ vs time via
vpc_cens(), with LLOQ/ULOQ reference lines - Stratification — split into panels by any dataset column (CMT, analyte, dose group, covariate); up to two stratification variables
- Sim cache: first run simulates; changing display options (PI, CI, binning) re-runs the ~1 s statistics step without re-simulating
- R ggplot export — editable R script editor (OS-native window) lets you customise the ggplot and save a publication-quality PNG
- Sequential Importance Resampling with effective sample size, 95% CI table, parameter correlation heatmap, and marginal distribution histograms
Runs ferx_simulate() and writes a CSV — paired with Simulation plot below, which displays whatever file it's pointed at.
- Basis: initial estimates (prior predictive), fitted estimates (posterior predictive), with parameter uncertainty (asymptotic MVN draws around the ML estimate, or resampled from the SIR tab's kept results), or adaptive dosing — runs the model's own
[adaptive_dosing]controller (ferx_simulate_adaptive()) against its declared parameters, with a dose ledger, decision log, and per-subject metrics (cumulative dose, dose adjustments, % time in therapeutic window) alongside the concentration-time trajectory - Output CSV carries the full input dataset (covariates,
EVID,CMT, dose rows, …) alongside the simulatedIPRED/DV_SIM— not justferx_simulate()'s bare return columns - "Open in Sim Plot" hands the written file straight to the Simulation plot tab below
Pure-Rust simulation plotter (no R required): load NONMEM-format or CSV simulation output, configure prediction-interval bands, MDV/column filters, observed data overlay, log Y-axis, and export PNG.
Two-pane file browser with filter pills, CSV table viewer with in-place cell editing (Tab/Shift-Tab/Enter navigation, Escape to discard), scatter plot with LOESS and log axes, and .ferx syntax-highlighted editor.
Scrollable in-app run report with parameter tables, DW statistic, IWRES lag-1 r, shrinkage, parameter correlation heatmap, and HTML export.
FeRx NLME runs entirely inside R. FeRx GUI calls Rscript for all modelling operations.
| Software | Minimum version | Notes |
|---|---|---|
| R | 4.2 | r-project.org |
| ferx R package | 0.3.0 (0.4.0 recommended) | Compiles a Rust backend on install — see Installing R packages |
| vpc R package | 1.0 | Required for VPC tab |
| ggplot2 R package | 3.0 | Required for R ggplot export |
| jsonlite R package | — | Usually installed with R |
| Tool | Version |
|---|---|
| Rust | stable (1.76+) |
| Cargo | bundled with Rust |
ferx ships with a compiled Rust backend, so installing it from source builds that backend the first time. A Rust toolchain must be installed before you install the ferx R package — this is a separate requirement from the Rust toolchain used to build FeRx GUI itself below; you need it even if you only download a prebuilt FeRx GUI binary. Expect the first install to take 15–30 minutes on a fast modern machine, up to 1–2 hours on an older laptop, while it compiles.
Prerequisites: R ≥ 4.2, a stable Rust toolchain, and cmake.
# 1. Install Homebrew if not present
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 2. Install cmake
brew install cmake
# 3. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThen in R — Apple Silicon:
Sys.setenv(PATH = paste("/opt/homebrew/opt/cmake/bin", Sys.getenv("PATH"), sep = ":"))
pak::pak("FeRx-NLME/ferx-r")Intel Macs:
Sys.setenv(PATH = paste("/usr/local/opt/cmake/bin", Sys.getenv("PATH"), sep = ":"))
pak::pak("FeRx-NLME/ferx-r")RStudio on macOS launches with a restricted
PATH, so theSys.setenv()step above is needed even ifcmake/rustcalready work in a regular terminal.
Alternative install method: devtools::install_github("FeRx-NLME/ferx-r").
- Install Rtools45 from CRAN's R Windows tools page — it ships
cmakeand the MinGWgccthe package links against. - Install Rust from rustup.rs, then:
No need to
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup defaultit — the package build pins this toolchain automatically on Windows. - In R:
pak::pak("FeRx-NLME/ferx-r")
sudo apt-get install -y cmake build-essential curl git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"Then in R:
pak::pak("FeRx-NLME/ferx-r")install.packages(c("vpc", "ggplot2", "jsonlite"))library(ferx)
ferx_example()
ex <- ferx_example("warfarin")
fit <- ferx_fit(ex$model, ex$data)
print(fit) # should report STATUS: CONVERGEDFull reference, including a Docker option and troubleshooting: ferx-r book — Installation.
# 1. Install Homebrew if not present
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 2. Install R
brew install --cask r
# 3. Install Rust
brew install rustup
rustup-init # follow the prompts; choose default install
# 4. Clone and build FeRx GUI
git clone https://github.com/robterheine/ferxgui.git
cd ferxgui
cargo build --release
# 5. Run
./target/release/ferxguiThe first launch auto-detects Rscript and the ferx package. If detection fails, go to Settings and browse to your Rscript executable manually.
-
Install R — download the installer from r-project.org. Accept defaults; ensure R is added to
PATH. -
Install Rust — download
rustup-init.exefrom rustup.rs and run it. Select the default installation. -
Clone and build
git clone https://github.com/robterheine/ferxgui.git cd ferxgui cargo build --release
-
Run
.\target\release\ferxgui.exe
Note for Windows: FeRx processes are spawned with
DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUPso they survive terminal close and SSH sessions. If your environment uses Job Objects that prevent breakaway (e.g. some CI runners), run FeRx as a normal desktop user outside the job.
# 1. Install system dependencies (needed by egui/eframe)
sudo apt-get update
sudo apt-get install -y \
r-base \
libgtk-3-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libxkbcommon-dev \
libssl-dev
# 2. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
# 3. Clone and build
git clone https://github.com/robterheine/ferxgui.git
cd ferxgui
cargo build --release
# 4. Run
./target/release/ferxguiLinux SSH note: If you use FeRx GUI over SSH/X11, model runs are spawned with
setsid()so they are immune to SIGHUP. However, if your system usesKillUserProcesses=yesin/etc/systemd/logind.conf, background processes may be killed when your session ends. Ask your administrator to runloginctl enable-linger <your-username>to allow lingering processes.
The release binaries are not signed or notarised (no Apple Developer ID, no Windows code-signing certificate), so your operating system will warn the first time you open one.
- macOS (Gatekeeper): right-click the
ferxguibinary in Finder and choose Open, then confirm; or remove the quarantine attribute that the browser added:xattr -d com.apple.quarantine ./ferxgui
- Windows (SmartScreen): on "Windows protected your PC" click More info, then Run anyway.
- Linux: the binary is built on Ubuntu 22.04 (glibc 2.35) and runs on that or newer. Mark it executable with
chmod +x ferxgui. It uses GTK 3 for file dialogs, solibgtk-3-0must be installed (it is on Ubuntu desktops;sudo apt-get install libgtk-3-0otherwise). Over X forwarding (MobaXterm,ssh -X) the folder dialog opens as a GTK window; if no dialog can be shown, type the folder path into the box beside the Choose button.
Building from source (above) avoids these prompts. The minimum supported Rust toolchain is recorded in Cargo.toml (rust-version) and checked in CI.
- Launch FeRx GUI and go to Settings to confirm R / ferx are detected (shown in green).
- Set your working directory — the folder containing your
.ferxmodel files. - Select a model in the Models tab, choose your data file in the Run pill, and click Run.
- After a successful run, explore Evaluation, VPC, and SIR tabs for diagnostics.
Test models and data for the warfarin example are included in the ferx R package under inst/examples/.
FeRx GUI stores its settings in ~/.ferxgui/settings.json. You can edit this file directly or use the Settings tab in the application. Key fields:
| Field | Description |
|---|---|
ferx_binary |
Path to Rscript (auto-detected; override here if needed) |
working_directory |
Default folder opened on launch |
rstudio_path |
Optional path to RStudio executable (adds "Open RStudio" button) |
cargo build --releaseThe binary is at target/release/ferxgui (or ferxgui.exe on Windows). No installer is required — copy the single binary to any location on your PATH.
CI runs on every push to main / master via GitHub Actions (.github/workflows/ci.yml), building and testing on macOS, Windows, and Ubuntu.
- New: double-clicking a model in the History tab goes to that run's project and opens the model file in the Models tab editor. It switches project first when the run belongs to another one; if that folder no longer exists, the status bar says so. A single click still selects the row.
- New: a Recent runs panel, opened from the status bar. It lists the last runs from every project in one place, live and finished: status (symbol and word), model, project folder, method, duration, OFV and end time. Running runs come first, then failures you have not looked at yet (they stay pinned until you open or dismiss them), then the rest newest first. Click a row to open that model, switching project if needed; right-click for "Open folder" and "Dismiss". "Show more" extends the list from 10 to 50 rows; "All history" opens the History tab. The status-bar button summarises it (
2 running · 1 new · 1 failed). - Fixed: the History tab showed the wrong OFV (or none) for runs from another project. It looked the model up by name in the open project. The OFV is now stored with each run when it finishes (older runs show "—" unless they belong to the open project). The History tab also gained a Project column, and its "go to model" button now opens the run's own project instead of any same-named model in the open one.
- Run history is capped at the last 500 runs. Times are UTC. The log is per computer (each machine keeps its own
~/.ferxgui/runs.json).
- Fixed: the Run tab kept the old dataset after you edited
[data]in the model editor and saved. The[data]path (and the parameter list) was parsed once when the folder was scanned, and saving the editor only replaced the displayed text, so "Run" and "Run now" used the previous dataset until a rescan. Saving now re-reads them and rescans the folder. - Fixed: no silent substitution of another dataset. If the declared
[data]file does not exist (a typo, a moved file), the run used the dataset of an earlier run or whatever was selected before. A model that declares a[data]path now runs on that dataset or not at all: the Run tab shows the path in orange with "(not found)" and Run stays disabled. - Fixed: removing the
[data]block kept running on the path it used to name. The old path is dropped; pick a file with Browse (or the previous-run fallback applies again). - The Run tab uses the saved file, not unsaved editor text (as for the method).
- No more "falling back to
f32" build warnings. On a recent Rust,cargo buildprinted dozens of future-incompatibility warnings (rust-lang issue 154024): plain float literals such as1.0passed to egui widths and radii were typed by a fallback that a future Rust release will turn into a hard error. All 68 literals are now written asf32(1.0_f32), so the program keeps building when that happens. No behaviour or numbers change. Checked with the nightly compiler (1.97), which now reports no warnings, tests included.
- Edit a model's description from the model list: right-click a model and choose Edit description…, or double-click its description cell. A small dialog starts from the description the list shows; Save stores it with the model's notes (the same Comment as in the Info tab), and leaving it empty falls back to the first comment line of the
.ferxfile. The model file itself is not changed. - A duplicated model is opened right away: after Duplicate as child… the new model is selected and shown in the Editor tab instead of the old one staying on screen. If the model being left has unsaved edits, the usual "Unsaved changes" prompt appears first.
- Sigma is shown on the scale the model file declares. ferx always returns the residual-error estimate as an SD, whatever the file says (checked on
~ 0.0001,~ 0.0001 (variance)and~ 0.01 (sd): all give 0.0105651), and records the declared scale assigma.init_as_sd. A variance-declared sigma (the default;(sd)opts out) used to appear as an SD, and the Models tab compared a variance initial value with an SD estimate. It now appears as a variance, with the SE by the delta method (SE(σ²) = 2σ·SE(σ)); RSE% and the log-scale interval follow. Bundles that do not record the scale keep showing the SD. - Both scales are visible. For σ the declared scale comes first and the other sits beside it (
VARIANCE (σ²)|SD (σ), or the reverse); for ω the tables showVARIANCE (ω²)andSD (ω). In the Models tab Parameters, Report tab, HTML report, bundle inspector and SIR table; hovering the second value shows its SE. The Compare dialog shows one scale (the shared one, or variance when the models differ). - SIR: the sigma intervals, histogram samples and correlations are put on the declared scale in the R script. A SIR result is tied to the declared scale, so the first run after this update on such a model is recomputed.
- Small values keep their digits in the tables (values below 0.01 show four significant digits): a variance of 0.000112 printed as "0.0001" and its SE as "0.0000" before.
- Omega is still always shown as a variance first, even if a model declares
omega … (sd).
- Fixed (Linux): "Open Folder…" could do nothing. The 0.10.6 fix kept an "a dialog is open" flag, so if the dialog never appeared (hidden behind the window over X forwarding, or no GTK available) every later click was ignored.
- All file dialogs now go through one service that never blocks the UI thread on Linux. This covers every "Choose data file…" and "Browse…" button (Models, Simulate, VPC, Sim Plot, the Evaluation dataset locator, Settings → Rscript) and every export (GOF figure, Files plot, Sim Plot, bundle "Save entry as…"). They all used the same blocking call and could freeze the window the same way. Exports now render to a temporary file first and copy it to the place you choose.
- A second click after 10 seconds opens a fresh dialog, and before that the status bar says a dialog is already open (it may be behind the window). A dialog that fails at once is reported ("could not be shown … type the path instead where the screen offers a path box"). The working-directory screen and Settings have a typed-path box; the other buttons do not.
- Opening files and folders no longer waits for
xdg-open(open::thatblocks on Linux until it exits and can hang the same way). - Not verified on Linux by me: macOS and Windows keep their native dialogs and are unchanged.
- Run as many fits at once as you like. Settings → Concurrent Runs → Max concurrent fits now has an Unlimited option (type
0oru), and a number can go up to 64 (it was capped at 16). Fresh installs start Unlimited; an existing settings file keeps its saved value, so set it to Unlimited in Settings if it was 1. When the limit is reached the greyed-out Run button now says where to raise it. - With Unlimited, the "runs slower together" warning explains the cost (each fit on
autothreads may claim up to cores − 1, capped at 8) and suggests a per-run thread count on the Run tab. - A single model still has one run at a time (its runs share one results file and log); duplicate the model to run variants side by side.
- Fixed (Linux): choosing a working directory froze the program over X forwarding (MobaXterm,
ssh -X). The default dialog backend needs a D-Bus session and portal service, which are absent there, and the call blocked the whole window. File dialogs now use GTK 3 on Linux (libgtk-3-0must be installed; Ubuntu desktops have it), and the folder chooser runs on a worker thread, so a dialog that does not appear cannot freeze the window. - Type a path instead: the "no working directory" screen and Settings have a box to type a folder path and press Open, for when no dialog can be shown.
- macOS and Windows are unchanged (native dialogs).
- Files plot: a Linear fit option next to LOESS draws an ordinary least-squares line through the plotted points, with its equation, R² and n in the legend (fitted on the log10 values when an axis is log). It is included in the exported figure. It needs at least 3 points with some spread in X.
- Fixed: no way to leave a sub-folder in the Files tab. The back button was labelled with an arrow that the bundled fonts draw as an empty box. It now reads Back, and a new Up button goes to the parent folder (never above the project folder).
- Files plot: X and Y range fields (data units, blank = automatic, Auto clears them) and an Export figure… button that saves a PNG (2400 × 1500, white background) with the same data, colours, scales and limits as on screen. Log X / Log Y now use log10 (the axis is labelled
log10(…)); they used the natural log before, so the displayed axis values change.
- Fixed: Recompute standard errors reported a JSON parse error. Since 0.10.0 the script printed a stray
[1] TRUE(from backing up the old bundle) ahead of its result, so the app showed an error even though the bundle had been replaced and the old one kept as.fitrx.bak. The covariance recompute is now covered by a live test. - Models without random effects (e.g. a logistic regression with
[binary_model]): the app reads their bundles, shows the report and runs SIR and the covariance recompute. This needs a ferx-r that includes ferx-r #553 (SIR and covariance on a fit withoutfit$ebe_etas, loading no-eta bundles); on older builds ferx itself fails, and the app now says why ("this model has no random effects … needs a newer ferx-r, fix #553") instead of showing ferx's cryptic message. - ferx-r #552 (SIR draws saved in
.fitrxbundles,sir_ci_*names kept on load) is compatible: the app keeps using its own fingerprint-checked SIR results, and tested against that build. SIR histograms for block-omega and IOV models stay hidden until ferx documents the packed column order (ferx-core #1863, #1864). - Tested against ferx-r
67e075e; the R-bridge CI workflow now installs that commit instead of thev0.4.0tag. - A fixed-effects fixture (
binary_logistic) and tests for its bundle, report and SIR/covariance runs were added. Note that ferx writesn_obs = 0for binary models, so n_obs-based figures (the lag-1 flag level) are unavailable for them.
- Simulation plot: the default band is now the pooled percentiles of every individual value across all replicates. The 0.10.0 default (percentile inside each replicate, then the median, the
vpcconvention) is noisy and biased inward when each replicate has few individuals; it remains available as "Per replicate", next to "CI of the mean profile". The plot says what the Y column means (IPRED: no residual error; DV_SIM: with residual error), warns thatDVis the observed value copied into every replicate, and no longer defaults toDV. - Intervals: thetas declared within 0…1 (fractions) get logit-scale intervals that stay inside the unit interval. Tables are labelled "approximate Wald", and a warning shows when ferx reports an estimate near a bound. The SIR histogram's asymptotic curve is now a lognormal for positive parameters, matching its dashed interval lines. Checked live: a theta with a lower bound of exactly 0 is log-packed by ferx, so its interval is on the log scale.
- Moved projects: when the dataset recorded in a bundle is missing, SIR, NPDE and the covariance recompute use the same-named file beside the bundle only if its SHA-256 matches the hash recorded at fit time; an edited or unverifiable file is refused with a message. A substituted path is never written back into the bundle.
- SIR tab: the asymptotic 95 % interval (comparison table and the dashed lines on the histograms) is now a log-scale Wald interval for ω², σ and thetas that cannot be negative, matching the Models and Report tables. It was still estimate ± 1.96 × SE and could fall below zero.
- A theta with a declared lower bound of exactly 0 (packed as log by ferx) now counts as positive for this purpose. Thetas with no or a negative lower bound keep the symmetric interval.
- R bridge: if the dataset path recorded in a bundle no longer exists (project folder moved or copied), SIR, NPDE and the covariance recompute use the file with the same name beside the bundle instead of failing.
This release closes the findings of the adversarial audit (items A-01 … A-49). Several changes alter numbers or behaviour a user might have relied on; each is listed. The scientific choices below (§6b of the remediation plan) have not yet been reviewed by a practising pharmacometrician.
Changed numbers
- Simulation plot bands are now prediction intervals (percentiles over individuals within each replicate, then the median across replicates, exactly as
vpcdoes; checked againstvpc::vpc()). Previously each replicate was averaged first, which gave a much narrower band. The old behaviour remains as an opt-in, labelled "CI of mean profile". Simulation curves also no longer sort negative times after positive ones. - 95 % confidence intervals are on the log scale for parameters that are positive by declaration (theta with a lower bound above zero, omega, sigma). Warfarin TVCL: [0.11879, 0.14661] becomes [0.11949, 0.14736]; the ETA_KA variance interval no longer extends below zero.
- ΔOFV is no longer coloured by a fixed −3.84. It is shown uncoloured with ΔAIC and ΔBIC in the tooltip. Tick Reference is nested to get a likelihood-ratio verdict with df = the parameter difference, and only when both fits used the same data (by hash).
- Durbin-Watson / lag-1: no pass/fail colour for DW (it has no test); the lag-1 flag level is 2/√n with n shown, instead of a fixed 0.2.
- ETA-covariate scan shows ferx's raw p, a Benjamini-Hochberg adjusted p, and a Fisher-z CI for r. ferx's own
[!]flag (|r| ≥ 0.3) is kept and labelled. - On-screen LOESS now matches ggplot's default (local quadratic, tricube, span 0.75) instead of a Gaussian-kernel local-linear fit. Exported figures are unchanged.
- NPDE defaults to a fixed seed (1234, editable; 0 = random), stores nsim and seed with the result, and shows a Wilson interval on the |NPDE| > 1.96 / 2.58 proportions.
- ETAbar (mean EBE with a t-test p) is now computed and shown. CV% is shown only for log-normal ETAs; additive ETAs show their SD.
- SIR: identity-packed thetas (declared lower bound below zero) are no longer exponentiated in histograms and correlations; for block-omega, block-sigma and IOV models the histograms and correlation matrix are hidden (the packed layout is unverified) while ferx's CI table stays. ESS and the settings shown are those stored with the result. The parameter-correlation heatmap is labelled as being on the packed scale. R JSON output now carries full precision (it was rounded to 4 decimals, which distorted small variances and p-values).
Changed rules
- Model parser follows ferx's grammar exactly:
[parameters] # comment,// comment, a tab before the comment and#commentare accepted;[ parameters ](rejected by ferx) is not.[fit_options]read from commented headers now works. fit.jsonmust containofv,aic,bic,convergedandmethod; a bundle missing one is reported as unreadable instead of showing zeros. A trace without an OFV column is an error.predictions.csvmust have TIME, DV, PRED and IPRED.- The boundary warning now uses ferx's own
estimate_near_boundaryverdict (absent in older bundles = no verdict, not "no"). FIXed parameters are tagged FIX. - Removed IV-bolus/infusion template keywords that ferx no longer accepts.
Changed cache keys and safety
- Fit identity: SIR results and the VPC simulation cache are keyed by the model and data hashes, the fitted estimates, the ferx version, n_sim and the seed (content, not file times). A SIR result from another fit is never reused for a simulation. A VPC is refused when the model or dataset differs from the fit's unless you tick "Use fitted estimates with the current files". Bundles written before ferx recorded hashes show "Re-fit to enable cache checks".
- Stratified VPC attaches stratifiers by row position (verified against the data), not by merging on (ID, TIME), which fanned rows out when several observations shared a time (e.g. PK/PD with CMT 2 and 3).
- Data files: the CSV editor refuses non-UTF-8 files with the line number (ferx refuses them too) and offers an explicit "Convert to UTF-8" that keeps a backup; untouched rows are written back byte for byte; saves are atomic with the last five
.bak-<time>copies; an external change to the file prompts before overwriting. A tab- or semicolon-separated dataset is named as such. The Models editor asks before switching away from unsaved edits; the quit prompt covers it; unsaved text is also written to~/.ferxgui/drafts/every 30 s. - Exports (
_sdtab/_patab) go toferx_outputs/and never overwrite a file the app did not create. Recomputing standard errors writes a verified temporary bundle and keeps the old one as.fitrx.bak. - Runs: cancelling a run the GUI did not start (after a restart) now verifies the process identity (start time) first and refuses otherwise; PIDs outside 1…2³¹−1 are never signalled. A run that ends while the GUI is closed is classified from an exit-status file and a valid bundle: Completed only with both, otherwise Unknown (amber). Worker-thread panics are reported instead of leaving the UI waiting. Windows liveness no longer spawns
tasklist. - R discovery probes every Rscript and picks the newest R that has ferx ≥ 0.4.0. The Windows toast script is a constant; text reaches PowerShell only through environment variables (best-effort: Windows may not show the toast). Release binaries are unsigned (see the README), Linux builds on Ubuntu 22.04. Colour palette now keeps ≥ 3:1 contrast on every surface in both themes and model status also shows a symbol.
Also fixed (0.9.26): NaN-safe sorting, non-ASCII-safe truncation of R output, a log reader that survives bad bytes, files opened through the open crate, Windows Reveal.
Developer: committed fixtures from ferx-r v0.4.0 with R-generated golden values (tests/golden/make_golden.R, tests/fixtures/make_fixtures.R); no test depends on a personal path any more; CI adds MSRV, clippy (-D warnings) and an R-bridge workflow (PRs touching the bridge, plus nightly). FERX_REQUIRE_FIXTURES=1 turns a skipped live-R test into a failure.
NaN-safe sorting, character-safe truncation, byte-tolerant log reader, open crate for opening files, negative-time ordering in the simulation plot, removed keywords ferx rejects.
Added: click a .fitrx in the Files tab to inspect it (it used to show "No preview")
- Overview: provenance (ferx and bundle-format version, creation time, model name, model and dataset paths with their SHA-256 prefixes), reproducibility checks (the bundled
model.ferxagainst the file on disk; a Verify data file button that hashes the dataset and compares it with the hash recorded at fit time), the run (method chain, converged, iterations, wall time, threads, inner/outer gradient method), fit statistics (OFV, AIC, BIC, n_obs, n_subjects, parameter breakdown), covariance (status, condition number, eigenvalue range, max |correlation|), diagnostics (Durbin-Watson, IWRES lag-1, shrinkage, EBE problems, stalled-at-init, estimate near boundary), data (columns, covariates, record and exclusion counts) and the warnings. - Parameters: THETA (init, estimate, SE, RSE %, fixed), OMEGA (variance, SD, SE, shrinkage, off-diagonal pairs with correlation and SE), KAPPA, SIGMA with
block_sigmacorrelations, and priors. Model: the bundled source, highlighted, with Copy. Contents: every archive entry with size, compressed size and description; click one to preview it (CSVs as a table with the row count, JSON pretty-printed) or Save entry as…. fit.json: the whole file as a collapsible tree with a key filter and Copy. - A file that is not a readable zip shows the reason instead of a blank pane. Adds a small
sha2dependency. Verified on a real 0.4.0 bundle (both recorded hashes match the files) and with headless render tests of every section.
Fixed (affects displayed numbers): shrinkage shown 100 times too small
- ferx writes ETA, EPS and kappa shrinkage as a fraction (0.316 = 31.6%) in every version through 0.4.0 — checked on 0.2.0, 0.3.0 and 0.4.0 bundles, where the values match the percentages in the bundles' own warnings. ferxgui displayed those numbers as if they were already percentages, so a 32% shrinkage appeared as "0.3%" in grey instead of orange/red. This affected the model list, the Parameters pill, the report and the tree. The values are now converted to percent when the bundle is read.
Fixed: "Export figure" sitting on top of the CWRES₂ picker
- Reported with a screenshot. The tab row also held DV scale, Log scale and both CWRES x-axis pickers, and v0.9.20's DV scale control pushed it past the window width: the CWRES₂ picker was clipped and the right-aligned Export button overlapped it.
- The GOF plot options (DV scale, Log scale, CWRES₁ x, CWRES₂ x, Export figure) now have their own row under the tabs, which wraps onto a second line on a narrow window instead of clipping. The filter / colour row follows. Individual Fits keeps DV scale in its tab row. Covered by headless layout tests at 1000 px and 520 px.
Fixed (safeguard): all text turning into squashed, scrambled glyphs after a while
- Reported again after v0.9.18: the main window as well as the Run popup showed squashed, scrambled text, which matches egui's "drunk text" bug (egui PR #8250): the GPU copy of the font texture drifts out of step with egui's own atlas when an upload is dropped, so every glyph is read from the wrong place. On eframe 0.31 with several OS windows I could not pin down which path drops the upload.
- The app now re-sends the complete font atlas to the GPU as a full texture update from the main window's own pass: for three frames after the atlas size or the set of open popups changes, and every 2 seconds otherwise. A drift should therefore clear within about 2 seconds, and immediately after a popup opens (about 0.5 ms per upload). The v0.9.18 glyph warm-up is kept.
- Not verified on a real display (the failure needs a GPU). If text still stays scrambled for more than a few seconds, the next step is embedding the popups in the main window, or upgrading to egui/eframe 0.35+ (which contains the upstream fix).
v0.9.22 (2026-10-07) — fixed the missing parameter correlation matrix for models with a fixed parameter
Fixed: "Correlation data not available" on the Param Corr tab despite a successful covariance step
- Reported on a real model with a FIXed theta. The covariance matrix (13 x 13, condition number 35.6) was in the bundle, but a fixed parameter has zero variance, and the correlation builder discarded the whole matrix as soon as it met a zero on the diagonal — the tab then showed an empty heatmap. This affected every model with a fixed or held parameter.
- Now only the held parameter's own row and column are blank: every other pair keeps its correlation. The heatmap draws them as grey "n/a" cells (hover: "not estimated (fixed or held parameter)"), the legend explains grey, and the HTML report does the same. The fallback condition-number calculation now uses the free parameters only. Verified on a copy of the real bundle (13 x 13, 13 names, blank 5th row/column) and with tests.
Fixed: "ETA-covariate scan failed — invalid type: map, expected f64"
- Reported on a real model. When a pair has no computable correlation (a constant or all-missing column, e.g. against
ofv_contribution), the R script returnedNULLforr/p_val. jsonlite writes aNULLinside a list as{}(an object), which the Rust parser rejected, failing the whole scan — not just that row. The scripts now sendNA_real_(a realnull), and the Rust side reads a number,nullor{}as "not computable" (NaN). - The same pattern was in the Declared Covariates screen (
ebe/eta), which also could not read a plainnull, and in Check inits (ofv_*). All three are fixed. Verified viaRscripton real fits ("ebe":nullwhere it previously broke) and with tests of the exact failing shapes.
Added: filter the GOF plots by any variable
- A second toolbar row under the Evaluation section tabs (GOF only) with a + Filter menu. Variables are grouped as prediction columns, declared covariates and original dataset columns (CMT, MDV, WT, OCC, SEX, ...). Filters are removable chips and combine with AND. Few distinct values or text gives a checklist of levels (with "(missing)"); continuous variables get a range; a column that allows both can be switched between them. A counter shows "n = X of Y obs", and all four plots, their axis limits and LOESS use only the rows that remain.
predictions.csvonly carries a few columns, so the original dataset is joined back on: its observation records are matched to the prediction rows in order on (ID, TIME, DV), which copes with dose rows, excluded rows, duplicate times, BLOQ and covariate datasets (verified on real 0.4.0 fits of warfarin_iov, warfarin_block_omega, warfarin_bloq and two_cpt_oral_cov). The dataset is found from the path recorded in the bundle, next to the bundle, or the model's[data]path; if it is missing or has changed since the fit, the badge says why and Locate dataset... lets you pick it. Variables with a single value are listed greyed out with a reason (e.g.CMT (all 1)) instead of disappearing.
Added: colour the GOF plots by a variable
- Color by: categorical variables get one colour and one marker shape per level (colour-blind-safe Okabe-Ito palette); continuous variables use six quantile bins on a sequential scale. One shared legend; clicking a category hides or shows it (it edits that variable's filter). LOESS stays a single overall line, with an optional "LOESS per group".
- Export figure honours the filters and colour: only the kept rows are written, points are coloured, and the legend is collected under the figure (ggplot and base-R paths).
Added: DV scale (back-transform) for GOF and Individual Fits
- A DV scale drop-down: As fitted, exp(ln), or 10^(log10). It back-transforms DV, PRED and IPRED for models fitted to log-transformed data (CWRES/IWRES are unchanged), including axis limits, titles, the Individual Fits axis label and the exported figure. It combines with the existing "Log scale" checkbox.
Filters, colour and DV scale apply to the GOF section only (Individual Fits uses the DV scale), are remembered per model for the session, and are not stored in the bundle. The dataset join reads the file on the UI thread, with a 200 MB cap.
Changed: the bundle path is absolute and derived from the model path
- A run's
.fitrxhas always been written to<model folder>/<stem>.fitrx(verified viaRscriptwith the app's own run script: only that file is created, and it is the file the scanner pairs with the model). The path handed to R is now built once from the model's absolute path (bundle_path_for), so it can no longer depend on the app's working directory if a model path is ever relative.
Added: a run that exits cleanly but leaves no bundle is reported
- If R finishes successfully and
<stem>.fitrxdoes not exist in the model's folder, the status bar says so ("Run finished but no .fitrx was written in …") instead of "Run completed".
Re-running a model still overwrites that model's existing .fitrx.
Fixed: Run popup text turning into scrambled glyph fragments
- Reported after a long run: the popup's status, log path and log body rendered as garbage while buttons and the "Running" label stayed fine. The pattern was exact: egui only pre-rasterises printable ASCII at the five
TextStylefont sizes, so the popup's monospace 10/11 pt and 10 pt text was first rasterised inside the popup's own pass, which runs nested inside the main window's pass. Glyphs added there were not reliably reaching the GPU font texture on eframe 0.31 (glow), the same failure class as egui PR #8250 (fixed upstream in 0.35). - The main window now rasterises every glyph the popups use, at every size they use, from its own pass (
warm_popup_glyphs: printable ASCII plus° · × — … → ↓ ⚠ ✔ ✖), and popups wait one frame at startup so that upload has happened first. The popups remain separate OS windows. The warm-up is a cache lookup after the first call and re-runs automatically when egui rebuilds its fonts. - Not verified on a real display (the failure needs a GPU); the root cause inside eframe is inferred, not proven. A full fix would be upgrading to egui/eframe 0.36 (a larger migration) — characters outside the warmed set can still be rasterised inside a popup.
Changed: the Run popup shows the last 400 log lines
- It laid out the whole 5,000-line buffer as one label every frame. Older lines are summarised ("… N earlier lines not shown") and remain in the log file.
v0.9.17 (2026-10-04) — ferx 0.4.0 compatibility: block-omega SEs corrected, validate before run, priors / MAP support
Written against ferx-r 0.4.0. Nothing in the R calls ferxgui makes broke, but 0.4.0 changes several results and exposed display bugs; each item below was checked against bundles fitted with 0.4.0 via Rscript. The minimum supported ferx stays 0.3.0; 0.4.0 is recommended.
Fixed: wrong omega standard errors for block-omega fits
- For a
block_omegafit,fit.jsonstoresomega.seas the packed lower triangle (column-major), not one SE per diagonal entry. ferxgui indexed it as the diagonal everywhere (Parameters pill, Compare, SIR, report), so on the bundledwarfarin_block_omegaETA_KA showed SE 0.0 (true 0.1608) and ETA_V 0.0053 (true 0.0043). Now layout-aware (omega_is_diagonal, with a length-based fallback for older bundles). The off-diagonal covariance tables gain an SE column, for omega and kappa. - Covariance-matrix parameter names are no longer
P1..Pnfor block-omega, IOV andblock_sigmamodels.
Fixed: [initial_values] was shown as live — ferx rejects the block (E_DEPRECATED_BLOCK); the Parameters pill no longer displays overridden "initial" values the engine never used.
Fixed: validate messages showed a literal <U+2014> — decoded to the character.
Fixed: model-file parsing — theta ... prior(...) no longer corrupts the theta bounds; block_omega / block_sigma names and initial values line up with the fit; // is a comment marker; (sd) tails parse.
Added: validate before run — Run validates the model first unless the current file contents were already validated. Errors hold the run behind a "Run anyway" prompt; if R itself cannot validate, the run proceeds. "+ Queue" is not gated.
Added: priors / MAP — a PRIORS table (prior value, estimate, shift in prior SDs, penalty, family, 95% prior interval), OFV split into data and penalty, and [priors] from_fit recognised. ΔOFV (model list, tree, Compare) now compares the data half of the objective, since a priored fit's OFV is the penalized total; Compare gains an "OFV (data)" row.
Added: block_sigma correlations shown under SIGMA.
Added: fitted-with version — the Info pill shows the ferx version that produced a fit and, for fits older than 0.4.0, a note that re-running picks up 0.4.0 changes (CWRES, SAEM defaults, block-omega handling). Nothing is refit automatically.
Added: level-block (MBMA) models — initial values match by block name; Run SIR and Recompute SEs are disabled with an explanation, since ferx 0.4.0 refuses both.
Added: editor highlighting for power, ode_template, prior, block_sigma, block_kappa, [priors]/from_fit, and the SAEM/IMP [fit_options] keys.
v0.9.16 (2026-08-31) — ferx-r 0.3.0 support: model validation, NPDE, adaptive dosing, standalone covariance recompute
A gap analysis against ferx-r's full function reference (every documented topic checked against what FeRx GUI actually calls, not the module map) turned up four ferx-r capabilities with real value and no GUI surface. All four are new in ferx-r 0.3.0; each R call was verified directly via Rscript against a real fit before being wired in.
Added: static model validation (ferx_model_validate)
- A ✔ Validate button next to Check inits — parses a
.ferxfile for syntax/structural errors via the Rust engine itself, no fit or optimizer iterations required. Distinct from Check inits, which runs 5 real FOCEI iterations to sanity-check starting values; Validate answers "is this file even valid" instead. - Findings render as severity-grouped cards (error/warning/info, plus an uncategorised bucket for any future severity the engine might introduce) with the block, line number, ferx-core error code, and suggested fix where available. A clean model shows an explicit "No issues found" card rather than an empty panel.
- Timely given ferx-core's move toward stricter validation: unknown or deprecated model-file blocks (e.g. the long-dead
[initial_values]spelling) are becoming hard parse errors instead of failing silently mid-fit — this surfaces exactly those errors with a line number instead of a raw R stack trace.
Added: NPDE/NPD diagnostics (ferx_calc_npde)
- A new NPDE section in the Evaluation tab. Unlike CWRES/IWRES (free reads off the
.fitrxbundle), NPDE requires Monte-Carlo simulation from the model + data recorded on the fit — nsim/seed are user-configurable (default 1000 replicates) and it's always explicitly triggered via a Compute NPDE button, never auto-computed, since it's the single most expensive diagnostic in the app. - Two scatter panels (NPDE vs a selectable X-axis, independently per panel — time, PRED, IPRED, TAD, or any covariate, matching the GOF section's CWRES₁/₂ pickers) with ±1.96/±2.58 reference bands, plus a QQ-normal plot against the N(0,1) the NPDE should follow under a correctly specified model — the distributional check the scatter panels alone don't show. Tail-flag counts (expect ~5%/~1% beyond ±1.96/±2.58) are reported for both NPDE and its whole-subject decorrelated counterpart, NPD.
- Results are cached per model and invalidated on re-fit (same
.fitrx-mtime staleness check already used for ETA-Cov/Covariate-screen), not recomputed on every tab switch.
Added: adaptive dosing simulation (ferx_simulate_adaptive)
- A new Adaptive dosing basis in the Simulate tab (only enabled on a model that declares an
[adaptive_dosing]block), alongside Initial/Fitted/uncertainty estimates. Runs the model's own dosing controller against its declared parameters — dose titration, not population simulation — withn_sim, seed, and a cap on controller decisions per subject. - Unlike every other basis,
ferx_simulate_adaptive()takes nofitargument at all — no posterior/uncertainty concept applies, since the controller logic lives entirely in the model file's[adaptive_dosing]block, not in fitted parameters. The result view goes beyond the usual concentration-time trajectory (still openable in Sim Plot) with a dose ledger, a full decision log (including holds the ledger omits), and per-subject metrics — cumulative dose, dose increases/decreases/holds, discontinuation, and % time in the therapeutic window.
Added: standalone covariance recompute (ferx_covariance)
- A Recompute SEs action on the Parameters pill of any already-fitted model, with a covariance-method picker (
r/s/rsr). Adds standard errors to a fit run with covariance off, or tries a different method, without a full re-optimization. - Overwrites the
.fitrxbundle in place — the same fit, only its SE/covariance fields refresh — behind an explicit confirmation dialog, since it mutates a saved file on disk. The Models list picks up the refreshed condition number/SEs via the same rescan a normal run already triggers; no new refresh mechanism was needed.
Changed: minimum supported ferx R package version is now 0.3.0 (was 0.2.0)
- All four features above are new in ferx-r 0.3.0 and hard-fail (an unhandled R error) on older installs. Everything else in FeRx GUI is unaffected — ferx-r 0.3.0's other breaking changes (several function renames,
ferx_cor_matrix()/ferx_estimates()/ferx_eta_cov()removed in favour of fit-object fields) touch none of the calls FeRx GUI makes; theferx_eta_cov()migration happened back in v0.6.0.
Fixed: two ferx-r 0.3.0 compatibility issues, found before they could bite
- The Run popup's Gradient dropdown offered
"ad"(Enzyme AD) as a choice; ferx-r 0.3.0 makesgradient = "ad"a hard parse error (E_AD_RETIRED) now that it's retired in favour of the analytic Dual2 path"auto"already provides. Removed from the dropdown — a.ferxfile that still declaresgradient = adin[fit_options]still round-trips as free text, it just isn't offered as a fresh choice. - The "auto" thread-count setting was documented (in a comment and in the oversubscription warning's own wording) as "use every core"; ferx-r 0.3.0's doc corrections state the real default is cores − 1, capped at 8. The warning now quotes that estimate instead of the raw core count.
Added: editor syntax highlighting for ferx-core 0.3.0's new model-file surface
[binary_model](categorical/binary endpoints) is now a recognised section, and itscmt/logitkeys plus the new[fit_options]ode_methodsetting are coloured consistently withmethod/maxiter/etc. Per-route absorptionlag=needed no change — it's a plain function argument, rendered the same aska=/cl=/dur=already were.
Fixed: stale hint text pointed at a run panel that no longer exists
- The Run pill's footer note ("Live output appears in the run panel at the bottom of the window") described a layout FeRx GUI hasn't had since the Run popup became its own OS-native window (v0.8.0) — reported as confusing after a Validate run produced no visible change nearby. Corrected to describe where live output actually appears now.
Added: several models can now be fitted at the same time
- Previously ferxgui fitted strictly one model at a time — while a fit was running, every other model's Run button was disabled, and the only way to line up more work was the sequential queue. A new Max concurrent fits setting (File → Settings… → Concurrent Runs) allows several fits to run in parallel.
- Default is 1, which behaves exactly as before — existing setups are unchanged until the setting is raised, and a settings file written by an earlier version loads as 1.
- Each model keeps its own run output: selecting a model shows that model's log, not a merged stream. The same model still cannot be fitted twice at once, since it would overwrite its own results.
- The run queue now fills every free slot rather than starting one fit at a time, skipping (rather than dropping) any queued model that is already running.
- A warning appears when the chosen combination would oversubscribe the machine — e.g. four parallel fits while the per-run thread count is left on "auto", where each fit expects the whole machine and the batch can finish slower than running them one after another. The warning never changes the thread setting; that stays an explicit choice.
- When the Run button is disabled it now names the actual reason (all slots busy, this model already running, ferx not configured, no data file, no declared method) instead of listing every possibility, and points at + Queue when the reason is simply that all slots are busy.
Fixed: runs were silently abandoned when ferxgui restarted
- Fits run as detached processes and survive the GUI closing. On restart, ferxgui reconnected to only one of them and silently dropped the rest — those processes kept running, consuming CPU and writing results, with no way to see them finish or stop them. All live runs are now reconnected.
Fixed: a failed queue start could discard the rest of the queue
- If a queued run failed to launch (ferx unconfigured, or the OS refusing to start the process), the queue kept pulling the next model into the same fault, consuming the whole queue and leaving only the last error visible. It now stops at the first failure so the remaining models stay queued.
Fixed: writing the run helper script was not atomic
- The shared R helper script was truncated and rewritten on every launch. Harmless with one run at a time; with several starting together, one could read a partially written file. It is now written and renamed into place atomically.
v0.9.14 (2026-07-16) — corrects v0.9.13 pcVPC results; custom VPC x-axis (TAD/TAFD/covariates); clearer project bar
Fixed (correctness — affects results produced by v0.9.13): prediction-corrected VPC could silently compute on duplicated rows
- v0.9.13 made pcVPC work by joining the fit's PRED onto the simulated data by
(ID, TIME). On datasets where that pair isn't unique, the join silently duplicates simulated rows and the bands are computed on a corrupted table — the plot still renders and looks entirely plausible. Measured on a real multi-occasion dataset: 27,400 simulated rows became 27,600. Two observations sharing an(ID, TIME)had PRED values differing only by solver noise (~1e-8), so de-duplication couldn't collapse them. (ID, TIME)is legitimately non-unique in multi-occasion data, where anEVID=4reset restarts the time course and two rows share a nominal time while each carries its own time-after-dose.- Fixed by attaching values positionally instead:
ferx_simulate()returns the observed rows replicated once per replicate in the same order, so each simulated row inherits from its own observation. The row count now cannot change, and the alignment is verified element-wise per replicate — if a future ferx version ever reorders its output, the VPC fails loudly instead of silently misattributing values. If you ran a pcVPC on multi-occasion or duplicate-time data with v0.9.13, re-run it.
Added: the VPC x-axis is now selectable — TIME, TAD, TAFD, or any covariate
- A new "X-axis" section in the VPC panel. Time-after-dose (TAD) and time-after-first-dose (TAFD) collapse multi-occasion or staggered-dosing data onto a common axis; previously the VPC was always against TIME.
- Any numeric column in the dataset can also be used, including covariates the model does not declare — often the more useful diagnostic, since it can reveal a covariate effect you failed to include. Covariate values are read from the data file and matched to each observation, with the join verified against the fit rather than assumed (pointing at a data file that doesn't match the fit is reported clearly instead of producing a wrong plot).
- Both the on-screen plot and the exported R/ggplot figure follow the selection.
- Guidance is shown inline: a covariate-binned VPC pools each subject's observations across the whole time course, so pcVPC is recommended alongside it (Bergstrand 2011); for categorical covariates, Stratification is usually the better tool than binning the x-axis.
Changed: the Models tab project bar is clearer
- The project name is now labelled as such and doubles as the switcher — one
⌄ <project>menu holding bookmarking, switching between bookmarked projects, and opening a folder, with the project's full path shown beside it. Previously the bookmark control used the same accent colour as the model status filters, so project controls and model filtering read as one group; the accent now means one thing (selection) in that view, and a separator divides the project scope from the model list below.
Fixed: the last-used project folder could be forgotten (affects builds from source)
- A regression test constructed a live app state and set a temporary working directory, which was then persisted over the real one in
~/.ferxgui/settings.json— so runningcargo testleft the app starting in a folder that no longer existed. The test no longer writes to the real config. Startup now also reports when a remembered project folder can't be found, instead of showing an empty model list with no explanation.
v0.9.13 (2026-07-16) — fixed prediction-corrected VPC, added TAD/covariate GOF axes, fixed Files tab scrolling
Fixed: prediction-corrected VPC (pcVPC) failed with "specified pred-variable (pred) not found in simulated dataset"
- The
vpcR package requires a PRED value on every simulated replicate to compute a pcVPC, not just on the observed data —ferx_simulate()'s own output never included one, so the package's own internal check failed as soon as pred-correction was enabled. Fixed by merging each observation's PRED (constant across replicates for a given subject/time, like any other population prediction) into the simulated dataset before handing both tovpc(). Verified by reproducing the failure and the fix against a real model and dataset via directRscriptruns. The identical script duplicated in the "Edit and execute R script" popup's default had the same bug and is fixed the same way.
Added: TAD and the model's own declared covariates as GOF x-axis options
- The CWRES x-axis pickers only ever offered TIME/PRED/IPRED. Time-after-dose (TAD) was already being written into every fit bundle but silently never read; it's now a selectable axis. Declared covariates (whatever the model's own
[covariates]block names — e.g. WT, HT) are now loaded from the bundle and offered too, matched to each observation by subject and time. The "Export figure…" path was extended the same way, since it writes its own temporary CSV independently of the on-screen plot and would otherwise have silently exported against TIME instead of the axis actually selected on screen.
Fixed: the Files tab's CSV/text preview couldn't be scrolled horizontally
- Wide tables (many columns) were clipped at the right edge of the panel with no way to reach the remaining columns — the table's own scroll area only ever handled the vertical axis.
v0.9.12 (2026-07-16) — fixed GOF, ETA-Cov, and Covariate-screen showing results from a previous fit after re-running a model
Fixed: the Evaluation tab's GOF/Individual-Fits, ETA-Cov, and Covariate-screen views could keep showing a previous fit's results after re-running the same model
- All three views cache their computation per model name, but re-fitting a model under the same name produces a new
.fitrxfile without changing that name — so the cached results from the earlier (possibly incorrect) fit kept displaying with no indication they were outdated. Each view now also checks the.fitrxfile's modification time and recomputes when it's changed, instead of reusing a stale cache.
Fixed: the Run tab's data file could silently carry over from a previously viewed model
- "Data file" was a single field shared across every model, only auto-filling once per session. Switching from one model to another didn't re-check whether the new model's own dataset differed — so a run could silently launch against a completely different, previously-selected file, with no visible sign anything was wrong.
- When a model declares its own
[data] path=..., the Run tab now shows it as read-only (matching how "Method" already works when[fit_options]declares one) — no stale file to carry over, since there's nothing left to override. The manual "Browse…" picker only appears for models with no declared dataset. - The right-click "Run now" action had the same underlying issue from a different angle and is fixed the same way: a model's own declared dataset now always takes priority over whatever the Run tab happens to be showing for a different model.
Fixed: switching projects in the Models tab didn't switch the Files tab
- The Files tab's own directory only ever picked up the workspace directory once, the first time it was unset (a fresh app launch). Switching to a different project afterward — via the folder picker, a bookmark, or the Projects dropdown — updated the Models tab but left Files silently showing whichever directory it had last been pointed at. Switching projects now also resets the Files tab to the new directory (clearing its stale selection and back-history from the previous project), so its contents can be browsed immediately without manually re-navigating.
Fixed: VPC compute failed with a JSON parse error on any model computed for the first time
- R's
file.rename()returns a value visibly, and the bridge script's cache-write step never captured it — so on the very first VPC compute for a given model (before a cache existed), R auto-printed that stray value ahead of the actual result, corrupting what's supposed to be a clean JSON payload. Already-cached recomputes never hit this path, which is why it could look intermittent. Verified against a real model and dataset, before and after the fix. - The same duplicated code in the "Edit and execute R script" popup's default script had the identical bug — fixed there too, even though it wasn't yet causing a visible failure.
Fixed: a latent bug in the base-R GOF export fallback (used only when ggplot2/patchwork aren't installed)
dev.off()also returns a value visibly, which would have corrupted the exported figure's returned path the same way. Verified end-to-end with real prediction data.
Fixed: "Set as Reference" was forgotten every time ferxgui restarted
- The reference model (used for ΔOFV in the model list) only ever lived in memory for the current session, unlike every other per-model annotation (starred, tags, comment, status) which is already saved to
model_meta.json. Setting a model as reference now persists it the same way — clearing the flag on any other model first, since only one model can be the reference at a time — and it's restored on the next launch or rescan.
Fixed: a model that had never been run showed "Data file: — not set —" even though the model file already declares one
- The Run tab's data-file field, and the right-click menu's "Run now", only ever auto-populated from a previous run's history for that exact model. A freshly created or duplicated model has no run history yet, so it showed as if no dataset were available at all — forcing a manual re-browse for a file the model's own
[data]block already names. Both now fall back to the model's declared path (resolved relative to the model file's own directory, only used if that file actually exists) when there's no run history to inherit from.
v0.9.6 (2026-07-14) — failed background computations (SIR, VPC, ETA-Cov, Simulate, run launch) are no longer silent
A full pass triggered by a review of every async R computation in the app, prompted by a SIR run that failed with no visible error. Found and fixed the same silent-failure gap in several other places, plus one that was worse than silent.
Fixed: a failed model run showed nothing at all — no popup, no error, nothing
- If launching a run failed before any R process even started (
ferxnot configured, the embedded run script couldn't be written, no app data directory, or the OS refused to spawn the process), the Run popup never opened, since it only auto-opens when a run actually starts. The only trace was a one-line message in the small status bar at the bottom of the window — indistinguishable from the click not having registered. Now shown as a persistent card next to the Run button.
Fixed: a failed ETA-covariate scan or covariate screen retried itself forever
- Both views auto-launch their R computation the moment their section is opened, with no button in between. On failure, nothing recorded that a computation had already been tried and failed, so the exact same conditions that triggered the first attempt were still true on the very next frame — silently re-launching (and re-failing) the computation every single frame for as long as that section stayed open. Now a failure is tracked and stops the retries, with a clear error message and a "Retry" button.
Fixed: a failed VPC compute, VPC script export, or Simulate-tab run looked identical to never having clicked the button
- All three reverted to the exact same hint shown before anything was ever attempted, with the only sign of failure being that same easy-to-miss status-bar line. Now shown as a proper error card, matching the treatment SIR already got in v0.9.5's follow-up fix.
Fixed: SIR, VPC, and ETA-Cov/Covariate-screen results could hide behind a stale success from a previous attempt
- Recomputing (or "Re-run") after an earlier success, if the new attempt failed, left the old successful plot or table on screen with no indication the retry had failed — the new error card was only reachable once the previous result was cleared, which wasn't happening.
Fixed: "Save output tables" after a run had no failure indicator at all, and reused a stale one
- This opt-in post-run export had zero in-flight or failure indicator, even on success. Now a failure shows as a line in the Run popup — and correctly clears on the model's next run, rather than continuing to show an old failure from an unrelated run.
Added: "Duplicate as child…" now lets you edit the description before creating the copy
- The dialog shows a multi-line description field pre-filled with the source model's current description (per-user comment if set, otherwise the model file's own comment line). Leave it as-is to inherit it unchanged, or edit it to note what's different about the child — saved to the new model's own per-user annotation, independent of the parent's.
Fixed: right-clicking a model row only opened the context menu when aimed at the model's name text, and row-hover highlighting was inconsistent everywhere else
- The menu was attached solely to the NAME column's label, so right-clicking anywhere else in the row — description, OFV, method, any other column — did nothing. The row list's own hover highlighting had the same gap, for the same underlying reason: the table library's per-cell tracking only works for a column whose content is itself a clickable widget, which previously was true only for the star and name columns. Every column now has its own explicit click/hover tracking, so right-clicking or hovering anywhere in a model's row works consistently.
Fixed: model list's horizontal scrollbar appeared to overlap the last row when only a few models were loaded
- The model table's
ScrollAreadefaulted to shrinking to fit its content on both axes. With few rows, that meant the scroll area (and its scrollbar) ended right after the last row instead of filling the panel, making the scrollbar look like it was cutting into the final row rather than sitting at the bottom of the list. Now pinned to fill the available space regardless of row count.
Fixed: starting a new run/SIR job while the previous run's popup was still open in the background didn't bring it to the front
- Both popups are backed by a single persistent OS window (keyed by a stable viewport ID) that gets its content updated on every new run, but nothing previously told the window manager to raise it — so if you switched away from an already-open popup and then started another run, the window silently updated behind whatever else was focused, making it look like nothing had happened. Both the Run popup and the SIR popup now explicitly request focus whenever a genuinely new run/SIR job starts.
Cleanup: removed two write-only fields that never carried any information back out
ActiveRun.pid/.manifest_path(and the equivalent fields on the internalSpawnedRuntype they were copied from) were set on every run launch but never read anywhere —pid's own doc comment admitted it was "stored for potential future use." Removed both; no behavior change, just eliminates a standingdead_codecompiler warning on every build.
Changed: model_meta.json moved from the shared workspace folder to a per-user location
- Model annotations (starred, comment, status, decision, tags, notes, and lineage/
based_onused by the Ancestry Tree) now live under~/.ferxgui/model_meta/instead of directly in the workspace directory alongside the.ferxfiles. Relevant for FeRx GUI's documented SSH/X11 central-deployment use case: previously, everyone pointed at the same shared project folder shared onemodel_meta.json, so starring/tagging/commenting on a model — or duplicating one "as a child" to set its lineage — silently overwrote whatever anyone else had set. Each user now gets their own file, keyed by the workspace path, so annotations (including Ancestry Tree lineage) are personal to whoever set them rather than shared team state. - On first use for a given (user, workspace) pair, any existing shared
model_meta.jsonalready sitting in the workspace directory is imported once as a starting point, so previously starred/tagged/commented models don't appear to reset on upgrade. The legacy file itself is left in place, not deleted — other users on the same shared project may not have upgraded yet.
A full pass triggered by a comprehensive security/reliability/accessibility audit, addressing every High- and Medium-severity finding plus the outstanding Low-severity items.
Security: zip-bomb protection, hardened R-helper temp files
.fitrxbundle reader: all 8 zip-entry readers (previously only 4) now hard-cap actual decompressed bytes viaRead::take(), not just a declared-size check — closes a gap where a maliciously crafted bundle could forge its declared entry size to bypass the existing limit and exhaust memory.- R-helper temp files (VPC/Simulate/SIR config JSON, the
.Rscript itself, stdout/stderr capture, the VPC sim cache) now live in a private, permission-hardened, per-user subdirectory instead of the shared OS temp root, with an explicit symlink refusal and an ownership check before trusting any existing directory. Relevant for FeRx GUI's documented SSH/X11 central-deployment use case: on a shared multi-user machine, another local user could previously pre-plant a symlink or race the write-then-execute window for the.Rscript. Every R-helper call now hard-fails with a visible error if this directory can't be established safely, rather than silently falling back to the unprotected shared temp root (a fallback would have made the whole protection trivially defeatable by any local user). ~/.ferxgui/gets the same symlink refusal and permission hardening.
Reliability: R subprocess timeout/cleanup, stale-result races, data loss
- R-helper calls (VPC, SIR, Simulate, ETA-cov, cov-screen, check-init, GOF export, model inspect) no longer block forever on a hung Rscript — a 30-minute timeout now kills the process and reports a clear error. stdout/stderr are captured via temp files rather than pipes, specifically to avoid a pipe-buffer deadlock a naive polling implementation would otherwise reintroduce.
- Any R-helper subprocess still running when the GUI quits is now killed via a tracked-PID cleanup hook, instead of being orphaned to run indefinitely in the background (fit runs remain intentionally detached and unaffected — that's a documented, deliberate feature).
- GOF figure export: concurrent exports no longer race on a shared temp CSV filename; each export gets a unique file, and an in-flight guard stops a second export from starting mid-export.
- VPC tab: the native plot now always renders using the exact options that were actually sent to R for a given computation, not whatever the options panel has since been changed to — fixes a mismatch where, say, toggling prediction-correction after a compute completes could relabel the axis without the underlying data having actually been recomputed.
- VPC "Compute" and "Run Script" can no longer run concurrently for the same model, since both read/write the same on-disk R simulation cache; the R-side cache write is now atomic (write-then-rename) as defense in depth against the remaining cross-process case.
- Sim Plot: loading a new file while a previous file's quantile computation is still in flight no longer applies the stale result under the new file's labels once it lands — a generation counter now discards superseded results.
- Files tab: switching to a different file, or quitting the app, while the current file has unsaved edits now prompts to save or discard instead of silently losing the edit.
Accessibility & UI consistency
- Escape now dismisses every native popup window (Run, SIR, About, VPC Script editor), matching the existing Settings popup convention.
- The Bookmark and Duplicate-model dialogs no longer re-claim keyboard focus every frame — Tab can now reach their buttons.
- Several empty-state and dialog titles — including the Delete Model confirmation — that rendered as invisible white-on-white text in light mode are now readable.
- The Compare Models parameter table can now be scrolled horizontally, so long model names no longer push columns out of reach.
- A non-ASCII model name (accented characters, non-Latin scripts) no longer risks crashing the Ancestry Tree view when its label is truncated.
- Four independently reimplemented date/time formatters (with inconsistent spacing and, in one case, a stray literal
T) are consolidated to the app's one canonical format.
Added: a "Simulate" tab, paired with Sim Plot
- Runs
ferx_simulate()against a model + dataset and writes the result as a CSV file — Sim Plot (unchanged) is the viewer, not a component this tab calls into directly. An "Open in Sim Plot" button hands the written file straight to Sim Plot and switches tabs, with the replicate/X/Y columns auto-selected. - The output CSV carries the full input dataset alongside the simulated values — covariates,
EVID,CMT,AMT, etc. all survive, not justferx_simulate()'s bareSIM/TIME/IPRED/DV_SIMcolumns. Dose rows are kept with blankIPRED/DV_SIM(no corresponding simulated observation), soEVIDstays meaningful and dosing events remain visible/filterable downstream. - Basis picker: "Initial estimates" (prior predictive, no fit required), "Fitted estimates" (posterior predictive, requires a completed fit), "With uncertainty (asymptotic)" (parameter draws from a multivariate normal around the ML estimate, requires
covariance = TRUE), and "With uncertainty (SIR)" (parameter draws resampled from the SIR tab's own results, requires a SIR run with "Keep resamples" enabled) — each greyed out with a tooltip when its prerequisite is missing. - SIR-based uncertainty needed one extra piece of plumbing:
ferx_load_fit()doesn't restore SIR resamples the way it restores theta/omega/sigma/covariance, so the SIR tab's cached results now also persist the raw resample matrix, which gets re-injected onto the fit before simulating.
v0.8.7 (2026-07-08) — estimation method now file-declared only, method-chain bracket syntax fixed, covariance defaults on
Changed: estimation method is no longer user-editable in the Run tab or the model list's right-click Run submenu
- The model's own
[fit_options]is now authoritative for which method(s) to fit with, in both places — matching how the model file already governs everything else about the fit. Both surfaces show the declared method as read-only text, parsed fresh from the current file content on every frame (this also fixes a staleness bug: the method previously only refreshed on model selection, so editing[fit_options]and coming back to the Run tab could still show the old value). - If a model's file doesn't declare a method at all, both surfaces show a warning ("No estimation method declared in
[fit_options]") and disable Run/Queue — there's nothing to run with otherwise.
Fixed: a bracket-syntax method chain in [fit_options] failed to run at all
method = [saem, imp]was passed through as the literal string"[saem, imp]"(brackets included) instead of being parsed as a two-step chain —ferx_fit()'s method validation rejected it outright, since it isn't a recognised method name. The bracket-array syntax is consistent with how[initial_values]already declares lists (theta = [0.2, 10.0, 1.5]), so this was a reasonable thing to write; ferxgui just didn't handle it for this field. Now normalised into the "+"-joined chain format ("saem+imp") the run pipeline already expects.
Changed: covariance step now defaults on
- Previously, a model file that didn't mention
covariancein[fit_options]defaulted the Covariance step checkbox to off (opt-in). It now defaults on (opt-out) — an explicitcovariance = falsein the file still turns it off.
Fixed: the About popup's title text was nearly invisible, and "FeRx GUI" appeared twice
show_ferx_logo()already renders "FeRx" + "GUI" as its own wordmark next to the curve icon; the About popup then repeated a separate "FeRx GUI" label right after it. That label was also hard to read:.strong()resolves tovisuals.widgets.active.text_color(), which this theme sets to white in both themes (correct for text on accent-filled buttons, invisible on this popup's plain light-mode background).- Also fixed the underlying layout bug that caused the wordmark itself to render as two stacked lines instead of one:
show_ferx_logoassumes a horizontal layout from its caller (correct in the header, where it's already inside one), but the About popup called it inside a vertical, centered layout. Now wrapped in its own horizontal group. - The duplicate white-text pattern likely affects other
.strong()labels elsewhere in the app that sit on a plain (non-accent-filled) background — flagged as a follow-up, not fixed in this pass.
v0.8.5 (2026-07-07) — model-list context menu overhaul, run-launch guard fix, declared-dataset column
Changed: the model-list right-click menu
- Removed "Open in Finder" and the three Copy path/folder/name items.
- Added a Run submenu: flip Method, Covariance step, and Optimizer trace right there, then "Run now" — no need to visit the Run pill first. Shares the same launch guard the Run pill uses (
can_launch_run), so it can't be used to sneak a second run past an already-active one. - "View run log" / "View run record…" are now greyed out (with a tooltip) for a model that has never run, instead of silently going nowhere.
Fixed: Run was disabled for a model that had already run, just not the currently-selected one
- The data path used to launch a run is a single global field, only auto-populated for whichever model is currently selected in the list. Right-clicking a different model — one that had run before, just not this session's selected one — saw that field as unset and showed Run as permanently disabled. It now falls back to that specific model's own run-history entry when the global field is empty.
Fixed: the Run submenu showed a cluster of redundant triangles
egui::menu_buttonalready draws its own submenu arrow; a manually-typed▶on both sides of the label was piling two more triangles on top of it. Now just "Run".
New: a DATA column in the model list
- Shows the dataset path declared in a model's own
[data]block (ferx's equivalent of NONMEM's$DATArecord —path = warfarin.csv, resolved relative to the model file's directory), blank when the model has none. Parsing this also surfaced that ferxgui doesn't yet read a model's own[data]block when launching a run — it always supplies an explicit external data path, which silently overrides the model's declaration; noted as a follow-up, not fixed in this pass.
v0.8.0 (2026-07-07) — usability pass from peer feedback: editor/focus bugs, contrast, native popups, model comparison
A full triage of external peer feedback on the GUI (see design/ferx-gui-peer-feedback-plan.md), plus five further bugs found while manually verifying the fixes.
Fixed: Enter in the model editor jumped out to the Output pill
- The model list's
Space/Enterrow shortcuts read global key state every frame, with no check for whether another widget (e.g. the code editor) currently had keyboard focus — so pressing Enter while typing in the editor also triggered the list's "jump to Output" shortcut. Now guarded on focus.
Fixed: the code editor's cursor jumped to the wrong line while typing
- The editor's syntax-highlighting layouter cached its output keyed on the previous frame's buffer, but
egui::TextEditcalls the layouter again mid-frame with the post-edit text to compute cursor placement — the stale cache mismatched what was asked, corrupting the cursor's row/column mapping. Fixed by keying the cache on the text actually queried, not an external buffer reference.
Fixed: VPC "Log y-axis" changed the data but not the axis labels
- The log transform was applied to the data and combined with
egui_plot::log_grid_spacer(designed for raw, untransformed data) — double-applying log spacing and leaving the axis labelled in small linear numbers instead of 1/10/100/1000. Replaced with a proper axis-tick formatter that converts back to power-of-ten labels.
Fixed: readability/contrast
- App-wide: any selected
selectable_label(VPC's Continuous/Censored toggle, the theme picker, etc.) rendered accent-coloured text on an accent-coloured background — fixed at the theme level (Visuals::selection), which fixes every instance at once, in both themes. - The Editor's Save button had unreadable near-white text on its green fill in dark mode; the Output pill's warning cards used a translucent orange wash that went nearly invisible in light mode. Both now use explicit, theme-independent, high-contrast colours.
- The VPC and SIR tabs now show the selected model's name (previously only the Evaluation tab did), so it's never ambiguous which model's fit is being visualised.
Changed: layout
- The Editor/Run/Output/Parameters/Info/Report row now reads as an actual tab strip (accent underline on the active tab, no background fill) instead of a row of pill-shaped buttons.
- Individual Fits now lays subjects out in a roughly square grid (2×2, 3×3, …) instead of forcing 2 columns regardless of how many are shown per page; the per-page count goes up to 9 (new default) instead of maxing at 6.
New: Settings is a floating window, not a sidebar tab
- Opens via a header button or Cmd/Ctrl+,, matching the native-app convention that Preferences lives in its own window, not the main document view.
New: a File / View / About menu bar
- An in-window bar (not the OS-native macOS menu bar — that would need a separate crate and platform-specific integration this pass didn't take on), so it renders identically on macOS/Linux/Windows. File has Settings and Quit; View has the theme toggle, sidebar collapse, and the tab list; there's no Edit menu, since the editor's Cut/Copy/Paste/Undo already work via native OS shortcuts with nothing else for it to expose.
New: model comparison — GOF plots, a discoverable entry point, real windows
- The existing (but easy-to-miss, right-click-only) "Compare with…" now has a visible Compare Models… button in the Models tab toolbar, opening a picker restricted to models with a completed fit.
- The compare dialog gained a GOF-comparison section (DV vs PRED, side by side per model), reusing the Evaluation tab's existing scatter/LOESS plotting code rather than duplicating it.
- Both the picker and the compare dialog are now real OS windows (matching the existing About/Run/SIR/Settings popups), not in-window dialogs — the latter could render partially outside the main window with the Cancel/Close button unreachable (reported: "cannot close it anymore and it not fully visible on screen").
- The comparison table now ends with a plain OFV/AIC row per model (no delta computed) instead of a separate ΔOFV/ΔAIC/LRT summary line above the table.
Fixed: app-wide missing-glyph "tofu" boxes
- ✓ (U+2713) and ✗ (U+2717) — used as status icons in the model list, Check Init, Info pill, VPC package status, and the compare dialog — aren't covered by any font
eframe'sdefault_fontsfeature bundles (confirmed by direct inspection of each font's character map), so they always rendered as empty boxes. Replaced with ✔/✖ (U+2714/U+2716), which are covered. Added a regression test that scans the whole source tree for the broken codepoints so this can't silently reappear.
Fixed: switching to an unrun model kept showing the previous model's GOF plots
- The Evaluation tab's prediction-data reload was gated on the newly-selected model having a completed fit, so switching to a model without one skipped the staleness check entirely and left the previous model's data cached and displayed.
Fixed: a failed "Check inits" was invisible
- A failed run only surfaced as a few words in the small status bar at the bottom of the window — easy to miss entirely ("spinner appears then disappears, nothing else"). Failures now show a proper error card with the actual R error message, next to the Check inits button.
Fixed: starting a run showed the previous run's log history
- The run popup's log text is a separately-maintained cache of the log-line buffer, rebuilt incrementally rather than every frame; starting a new run cleared the buffer but not this cache, so the popup kept showing the entire previous run's output until enough new lines arrived to push it out.
v0.7.0 (2026-07-06) — fit.json parsing fix for single-parameter/single-warning models, surfaced parse errors
Fixed: a completed run could show "no run output" for a valid, converged fit
- R's jsonlite
auto_unbox = TRUEserializes a length-1 vector as a bare scalar instead of a single-element array — e.g. a model with exactly one theta serializestheta.estimatesas0.134, not[0.134]; a fit with exactly one warning serializeswarningsas a bare string, not a one-element array. This is not a rare edge case: a single-method (non-chained) fit'smethod_chaincollapses the same way, and it hit the bundled warfarin tutorial model directly, whose.fitrxhad aconverged: true, fully valid fit that FeRx GUI reported as "no run output yet." - Several fields (
sigma,shrinkage_eps,method_chain,eta_param_info) already had deliberate scalar-or-array handling for exactly this reason —warnings, and the nestedtheta/omega/iovnames/SE/shrinkage/estimates fields, did not. All of them now go through the same scalar-or-array conversion, so a model with exactly one theta, one ETA, one kappa, or one warning parses correctly. Consolidated two byte-identical duplicate helper functions in the process. - Added a dedicated regression test reproducing this exact single-element shape end-to-end, independent of any local file, so this class of bug is caught on every machine and in CI — not just by chance on whichever
.fitrxhappens to be lying around during manual testing.
Fixed: a .fitrx parse failure was silently indistinguishable from "never run"
- The scanner discarded any
.fitrxparse error via.ok(), so a bundle that failed to parse for any reason — this bug, a future ferx-schema change, a corrupt file — looked identical to a model that had simply never been run.ModelEntrynow carries the parse error when this happens, distinguished from "never run" everywhere it's shown: the Models list (a distinct row colour, with the actual error on hover), and the Output, Parameters, Report, and Param Corr empty-states, which now explain that a bundle exists but couldn't be read instead of prompting the user to re-run a model that already produced valid results.
v0.6.0 (2026-07-06) — ferx 0.2.0 impact audit: ETA-Cov fix + declared-covariate screen, convergence trace fix, DSL parser hardening
A full audit of the ferx-core/ferx-r 0.2.0 release against every R call and parser FeRx GUI relies on. Two things were confirmed broken, one recently-added GUI feature is now confirmed live, one latent parser bug (unrelated to the version bump, but found while checking the new DSL sections) is fixed, and the ETA-Cov section gains a second, more formal screening view.
Fixed: ETA-Covariate screen — ferx_eta_cov(fit, data) removed in ferx-r 0.2.0
- ferx-r's fit-accessor cleanup removed
ferx_eta_cov(),ferx_cor_matrix(), andferx_estimates()as callable functions, replacing them with fields computed automatically at fit time (fit$eta_cov,fit$cor_matrix,fit$estimates). FeRx GUI's ETA-Cov section called the removed function directly and would fail on any ferx-r ≥ 0.2.0 install. - Switched to reading
fit$eta_covafterferx_load_fit(). This also simplifies the feature: the dataset picker and "Run ETA-Cov Screen" setup step are gone — the screen now loads automatically the moment a fit exists, matching how the other Evaluation sections already behave, since ferx-r recomputes it from the dataset path recorded on the fit itself. fit$eta_covcan be empty for two different reasons — too few subjects, or the original dataset no longer being readable at its recorded path — which the previous single-message empty state couldn't tell apart. The GUI now distinguishes them and explains the second case explicitly instead of silently showing a misleading "no pairs found."
New: Declared Covariates view, merged into the ETA-Cov section
- The ETA-Cov section now has two views, toggled at the top: Dataset Scan (the informal
fit$eta_covscreen above — correlates raw EBEs against every numeric dataset column, no covariate needs to be declared) and Declared Covariates (new —ferx_cov_screen(fit), a formal screen using the model's own[covariates]block, aggregated to one value per subject exactly as the model would use it, reporting association against both the raw individual parameter estimate and its random effect). - Each view carries a short caption plus a "ⓘ" hover with the full statistical explanation — including that the two views use independently-calibrated thresholds (Dataset Scan: |r| ≥ 0.3; Declared Covariates: |association| ≥ 0.2, both ferx-r's own defaults) and that neither view's flagged pairs are themselves a formal covariate test.
- The Declared Covariates table labels its two measure columns "EBE ASSOC." / "ETA ASSOC." rather than reusing
ferx_cov_screen()'s bareetacolumn name, which would otherwise read as "the ETA value itself" rather than "association strength with the ETA." - Distinguishes three legitimate empty states: no
[covariates]block declared (the common case for most models), no random effects to screen against, and nothing clearing the threshold — each explained separately. - Computed lazily and independently per view (its own cache, its own in-flight tracking) — switching views only triggers an R call for whichever one hasn't been computed yet, not both up front.
Fixed: convergence trace lost after a temp-file cleanup
- ferx-r 0.2.0 now bundles the optimizer trace directly inside
.fitrxastrace.csv, specifically because the external temp filetrace_pathpoints to "usually doesn't survive" a reboot or OS temp-file cleanup (its own words, from the ferx-r source). FeRx GUI's Convergence tab only ever read the external path, so any bundle whose temp file had since been cleaned up showed "Trace file not found" — even though the trace was sitting right there in the bundle. - The Convergence tab now reads
trace.csvfrom inside the bundle first, falling back to the external path only for older bundles that don't carry it. - Added a Monotonic OFV toggle (on by default) to the Convergence tab: FOCE/FOCEI iterations now show the running-minimum OFV, hiding the transient upticks from rejected line-search trial steps — matching the default of ferx-r's own
plot(fit). The reported "Final OFV" always stays the raw value regardless of the toggle; only the plotted line is smoothed.
Confirmed working, no GUI change needed: Cond. Dist. section
- The
conddist.csvbundling this was waiting on (ferx-core#675, filed in v0.5.0) shipped in ferx-core/ferx-r 0.2.0, in exactly the schema FeRx GUI already reads. The "Cond. Dist." Evaluation section added in v0.5.0 is live for any SAEM fit run withconddist = true.
Fixed: an unrecognised [section] could leak into whatever came before it
- ferx-core 0.2.0 adds several new model-file sections (
[event_model]for joint PK-TTE,[adaptive_dosing],[initial_conditions]). Checking these against the.ferxparser surfaced a pre-existing bug unrelated to the version bump: an unrecognised bracketed section didn't reset the parser's "current section" state, so its content — and anything after it, up to the next recognised section — could be silently misattributed to whichever recognised section came before it. Fixed, and the four new section names are now recognised (editor syntax highlighting for[...]headers already worked regardless, since it colours by bracket pattern, not by a recognised-name list).
Investigated, no action needed: every other ferx_* call FeRx GUI makes (ferx_check_init, ferx_fit, ferx_load_fit, ferx_model, ferx_model_inspect, ferx_save_fit, ferx_simulate, ferx_sir) is unaffected by ferx-core/ferx-r 0.2.0's other breaking changes (section-function collapse, ferx_plot_trace → plot(), ferx_selection_excluded removal, and the various renames) — none of them touch calls FeRx GUI actually makes.
Backlog, not implemented this round: dedicated GUI controls for the large set of new [fit_options] keys (npde_*, imp_*/impmap_*, cov_inner_tol, outer_xtol/outer_ftol, global_search, bloq_method, mu_referencing, iov_column, inits_from_nca, and others) — all of these already work correctly when set directly in the model file; this is about deciding which, if any, deserve a dedicated widget rather than staying file-only.
v0.5.0 (2026-07-02) — model-file fit options, SAEM conditional distributions, ferx-r 0.2.0 compatibility
Model file [fit_options] is now authoritative
covariance,method,gradient, andthreadsare parsed from the model file's[fit_options]block and used to initialise the Run pill whenever a model is selected. Previously these keywords were only recognised for syntax highlighting — the values were parsed but silently discarded, so editing them (including commenting one out) had no effect on what actually ran.- Covariance is now opt-in from the file: an absent or commented-out
covarianceline means the covariance step is off, matching what commenting it out visibly implies. Fixes a bug where disabling covariance in the model file left the previous (ticked) Run-pill state in effect, so the fit ran — and reported results — with covariance still on. - Per-run overrides in the Run pill still work as before; the file only sets the starting point on load.
New Evaluation section: Cond. Dist. (SAEM conditional distributions)
- Reads
conddist.csvfrom.fitrxbundles (when present) and adds a "Cond. Dist." tab to the Evaluation view with three sub-views: a per-ETA histogram of the conditional mean with a theoreticalN(0, ω)overlay and distribution-based shrinkage annotation, a caterpillar plot of per-subject mean ± SD, and a Mode-vs-Mean scatter against the identity line. - Distribution-based shrinkage (
1 - SD(cond_mean)/√ω_jj) is computed client-side, since it isn't part of the CSV schema. - The empty-state hint is method-aware: SAEM fits without
conddist.csvare told to re-run withconddist = true; non-SAEM fits are told the feature requires SAEM, with no dead-end retry prompt. - This section is currently dormant for everyone:
conddist.csvbundling into.fitrxhasn't shipped inferx-coreyet (ferx-core#675, filed as part of this work). The reader degrades cleanly (None) on any bundle without it, so this activates automatically — no ferxgui update needed — once that lands.
Fixed: ferx_model_new — removed in ferx-r 0.2.0
- ferx-r's API cleanup removed
ferx_model_new()(hard break, no deprecation shim) in favour of atemplate =scaffold mode onferx_model(). FeRx GUI's "Create model" feature called the removed function directly and would fail on any ferx-r ≥ 0.2.0 install. Updated the call site; the minimum supported ferx R package version is now 0.2.0 (was 0.1.5). - Audited the rest of ferx-r's cleanup tracking issue against every
ferx_*function FeRx GUI calls: one further item is a known upcoming break to watch (ferx_eta_cov(fit, data)is slated to drop itsdataargument once ferx-r#226 lands — not yet merged, no action needed today) and one is worth re-checking once unblocked (trace storage moving onto the fit object, ferx-r#228, could affect how the Convergence tab locates its trace CSV — blocked upstream onferx-core#640, not yet merged either).
VPC plot theming (mirrors the vpc package new_vpc_theme())
- New Theme controls in the VPC Appearance panel: simulated prediction-interval and median band opacity; observed median and 5th/95th line width and style (solid/dashed/dotted); observed point size; bin-separator toggle and colour; and LLOQ/ULOQ reference-line colour.
- Theme applies live to the native egui render (display-only — no re-simulation) and is forwarded to the R ggplot export via
vpc::new_vpc_theme(), so the exported publication figure matches what's on screen. - Defaults mirror the package (
sim_piopacity 0.15,sim_medianopacity 0.30, solid observed median, dashed 5th/95th). A Reset appearance button restores them. - Bin separators are now controlled by their own toggle (previously tied to the vertical-grid checkbox), matching the package's treatment of them as a distinct theme element.
Notes on scope
- Categorical VPC (
vpc_cat) and time-to-event VPC (vpc_tte) were investigated and found to be blocked upstream inferx-core(no categorical/count outcome likelihood; TTE simulation lacks horizon censoring). Tracking drafts live underdesign/. Theming was the only one of the three remainingvpcfeatures buildable today.
Statistical correctness
- LRT in Compare dialog: degrees of freedom are now computed from the difference in estimated-parameter counts between the two models, with a chi-square critical-value table for df 1–20. The previous code had an unreachable branch and always reported 1 df regardless of model complexity.
- Log-scale GOF toggle: the "Log scale" checkbox in the Evaluation tab now actually log₁₀-transforms the plotted points, the LOESS trendline, and the identity reference line. Non-positive observations are filtered out. Previously the toggle had no visual effect.
- Parameter comparison tooltip: the ÷ (shrinkage) branch now shows the reciprocal ratio for parameters that decreased from initial to final estimate; previously both branches showed the same ×ratio string.
Security
- Notification strings containing special characters (e.g.
"on macOS,'on Windows) are now properly escaped before insertion into AppleScript / PowerShell command strings.
Performance
push_logrebuilt the full cached log string on every incoming line (O(n²) with a 5,000-line ring buffer). The common path is now an O(1) append; the buffer-full eviction path is O(n) drain of the front entry — a significant improvement when R floods stdout.- Windows orphan-run liveness poll throttled from 100 ms to 500 ms, eliminating ~10
tasklistsubprocess spawns per second per reconnected run.
Code quality
- Removed dead
ModelUpdated(1,256-byte enum variant and the source of thelarge_enum_variantclippy warning),VersionCheckResult, and the phantom "Update available" header badge — no version check was ever implemented. RunRecordinWorkerMsg::RunFinishedis now boxed; reduces the channel message size from 296 to ~72 bytes.- Removed unused
window_geometryfield fromSettings(was serialised but never read back). - Sim Plot
==/!=column filters now use a 1 × 10⁻⁹ relative epsilon instead of exact float equality. - Log-axis label in Sim Plot uses portable ASCII
log10(...)instead of Unicode subscript characters that may be absent from the bundled font. - Guarded
.unwrap()calls replaced withmatch/if let/.expect(). - 63 clippy warnings resolved (from 69 down to 6); remaining 6 are pre-existing
too_many_argumentsand onedead_codefield.
Models tab — project bookmarks redesign
- Replaced the ambiguous ☆/★ bookmark icon (which clashed visually with the per-model ★ column) with an explicit "+ Bookmark project" / "✓ Bookmark project" pill button.
- Adding a bookmark now opens a name dialog so the project can be given a meaningful label; the directory path is shown as context, Enter confirms, Escape cancels.
- The bookmarks dropdown is renamed to Projects.
Bookmark dialog bug fixes (from code review)
- Switching directories while the name dialog was open could bookmark the wrong directory;
set_directorynow closes the dialog. - Pressing Enter with an empty name field no longer silently dismisses the dialog without saving.
- Escape key now dismisses the dialog (parity with all other dialogs).
Security
- Fixed ZIP path traversal in
.fitrxreader: entry names containing..or absolute paths are now rejected. - Added per-entry and per-R-output size limits (256 MB / 10 MB) to prevent memory exhaustion.
Correctness
- SIR: fixed duplicate auto-trigger when a run finished while SIR was already running; added cancellation support (closing the popup now stops a queued SIR sleep).
- SIR: fixed context-string ambiguity that caused error messages to be attributed to the wrong run.
- VPC bins: NaN and Inf are no longer accepted as valid manual bin values.
- VPC R script: emits a warning when a requested stratification column is not found in the data.
- Worker threads: panics are now caught and reported as run errors instead of leaving the run stuck.
.ferxmodel files with non-UTF-8 bytes are loaded with replacement characters instead of silently skipped.- Non-UTF-8 paths passed to Rscript now produce an explicit error rather than silent data loss.
- Windows R path search:
bin/x64is now joined correctly on all platforms.
Reliability
- Corrupt
settings.jsonis backed up to.json.bakand defaults are used with a visible warning; write failures are also surfaced. - Startup warnings (missing home directory, corrupt settings) are shown in the status bar.
- Per-frame log-text allocation eliminated:
log_textis rebuilt only when new lines arrive. - Syntax highlighter in the model editor is now cached across frames.
- All
open::that()errors (open in Finder, open log, open RStudio, etc.) are shown in the status bar. - Duplicate model stems can no longer be added to the run queue.
save_settings()andsave_bookmarks()failures are surfaced to the status bar.- Windows desktop notification: fixed PowerShell line-continuation character (
\→`).
Cleanup
- Removed unused
notify(filesystem watcher) crate and deadFsEventmessage variant. - Removed dead
is_terminal()method; cleaned up#[allow(dead_code)]attributes.
- FeRx NLME by the FeRx-NLME team — ferx-nlme.github.io
- vpc R package by Ronkeizer et al. — vpc.ronkeizer.com
- egui / eframe by Emil Ernerfeldt and contributors
MIT — see LICENSE.
