Use analytic springs and instrument resize barriers

Share a stable damped oscillator solver across scalar and rectangle animations while preserving retarget and explicit no-crossing presentation policies. Add deterministic traces, scrolling and zoom continuity coverage, and pause-aware advancement.

Measure resize barrier and handoff timing behind resize-metrics, expose the feature through the release installer, and wait for the intended backend in isolated portal tests.
This commit is contained in:
Samuel Onoja committed 2026-10-02 00:49:52 +01:00
1 parent 42f022fde5
commit 28e03a2624
18 files changed
+1502 -84

No files matched your search

+8
View File
@@ -13,6 +13,7 @@ Run from any directory as your normal user. Existing user config is preserved.
--skip-build Install existing target/release binaries
--replace-portal-config Back up and replace existing Ferese portal configuration
--offline Build using only cached Cargo dependencies
--resize-metrics Build with resize-barrier measurements (reported on exit)
--dry-run Print commands without building or installing
-h, --help Show this help
@@ -48,6 +49,7 @@ release_id="$(date -u +%Y%m%d-%H%M%S)-$$"
skip_build=false
replace_portal_config=false
offline=false
resize_metrics=false
dry_run=false
while (($#)); do
case $1 in
@@ -59,12 +61,17 @@ while (($#)); do
--skip-build) skip_build=true; shift ;;
--replace-portal-config) replace_portal_config=true; shift ;;
--offline) offline=true; shift ;;
--resize-metrics) resize_metrics=true; shift ;;
--dry-run) dry_run=true; shift ;;
-h|--help) usage; exit 0 ;;
*) fail "unknown option: $1 (see --help)" ;;
esac
done
[[ $release_id =~ ^[a-zA-Z0-9][a-zA-Z0-9._-]*$ ]] || fail 'invalid release ID'
if $skip_build && $resize_metrics; then
fail '--resize-metrics requires a build; omit --skip-build'
fi
[[ $(uname -s) == Linux ]] || fail 'Ferese requires Linux'
for tool in desktop-file-validate dbus-run-session; do
command -v "$tool" >/dev/null || fail "required command not found: $tool"
@@ -79,6 +86,7 @@ build=(cargo build --manifest-path "$repo_dir/Cargo.toml"
--target-dir "$repo_dir/target" --release --locked
-p ferese -p ferese-shell -p ferese-settings -p feresectl -p ferese-lock -p ferese-polkit-agent -p xdg-desktop-portal-ferese)
if $offline; then build+=(--offline); fi
if $resize_metrics; then build+=(--features ferese/resize-metrics); fi
if ! $skip_build; then
((EUID != 0)) || fail 'build as your normal user, without sudo (or use --skip-build)'
command -v cargo >/dev/null || fail 'install the Rust toolchain and Cargo first'
+17
View File
@@ -101,6 +101,23 @@ class PortalTest(unittest.TestCase):
connection = Gio.DBusConnection.new_for_address_sync(env["DBUS_SESSION_BUS_ADDRESS"],
Gio.DBusConnectionFlags.AUTHENTICATION_CLIENT | Gio.DBusConnectionFlags.MESSAGE_BUS_CONNECTION, None, None)
backend = launch("backend", [str(binary)])
# The frontend can D-Bus-activate an installed backend if it
# starts before this test's binary owns its service name.
def backend_ready():
bus_name = "org.freedesktop.DBus"
impl_name = "org.freedesktop.impl.portal.desktop.ferese"
owner = connection.call_sync(bus_name, "/org/freedesktop/DBus", bus_name,
"NameHasOwner", GLib.Variant("(s)", (impl_name,)), GLib.VariantType("(b)"),
Gio.DBusCallFlags.NONE, 1000, None).unpack()[0]
if not owner:
return False
pid = connection.call_sync(bus_name, "/org/freedesktop/DBus", bus_name,
"GetConnectionUnixProcessID", GLib.Variant("(s)", (impl_name,)), GLib.VariantType("(u)"),
Gio.DBusCallFlags.NONE, 1000, None).unpack()[0]
return pid == backend.pid
until(backend_ready)
frontend = launch("frontend", [os.environ.get("FERESE_TEST_PORTAL_FRONTEND", "/usr/libexec/xdg-desktop-portal")])
name, path, iface = "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", "org.freedesktop.portal.ScreenCast"
responses = {}