Linux desktop: optimized release build, installer, Linux gaps

Build: split Dart debug info out of libapp.so (13.96 -> 11.27 MB, symbols
kept in the cache) and fix icon tree shaking, which Flutter 3.44's Linux
CMake backend silently disables by quoting the define; the build image
patches its SDK copy (MaterialIcons 1.6 MB -> 25 KB). Impeller cannot be
enabled in a Linux release build and was slower in a profile-build bench.

Install: `./install --linux --install` installs the bundle into
<prefix>/lib/app-linux with com.pipelines.app.desktop (the GTK/Wayland
app id), its icon and a ~/.local/bin/pipelines-app link, through
scripts/install-linux-app.sh.

Linux gaps: notifications through the freedesktop daemon; HTML artifacts
explain the missing web view instead of throwing; no Share for files;
a GTK clipboard reader for pasting files and screenshots (Ctrl+V and
Omarchy's Super+V); GTK header bar only on GNOME; window icon.

Bench: native fixture frame log, wheel/mark steps and
tool/perf/linux_desktop_bench.py (private Xvfb); results in
app/notes/linux-desktop-optimized.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 12:54:18 +00:00
parent c4de1de27b
commit 8138cdc3d9
26 changed files with 722 additions and 60 deletions
@@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:pipelines_app/application/server_endpoint.dart';
import '../perf/frame_log_native.dart';
import 'fixture_steps.dart';
import 'narrow_view.dart';
@@ -31,8 +32,10 @@ Map<String, String> fixtureParams() {
return raw.isEmpty ? const {} : Uri.splitQueryString(raw);
}
/// The DevTools probes are browser-only.
void installHostProbes(Map<String, String> params) {}
/// The DevTools probes are browser-only; `perf=1` prints frame timings to
/// stdout (tool/perf/frame_log_native.dart).
void installHostProbes(Map<String, String> params) =>
installNativeFrameLog(params);
/// The route goes through [fixtureRouteProvider] instead.
void openFixtureRoute(String route) {}
+24 -1
View File
@@ -9,7 +9,10 @@ import 'package:flutter/services.dart';
/// [script] is `;`-separated steps run after the first frame, 700 ms apart:
/// `wait:<ms>`, `tap:<label>` (a Text, Tooltip, Semantics label or field
/// hint; `tap:<label>#<n>` picks the n-th match), `tapxy:<x>,<y>`,
/// `drag:<x>,<y>,<dx>,<dy>`, `type:<text>` (into the focused field; `\n`
/// `drag:<x>,<y>,<dx>,<dy>`, `wheel:<x>,<y>,<dy>,<count>` (mouse-wheel
/// notches 16 ms apart, as the web interaction bench sends), `mark:<name>`
/// (prints `FIXTURE_MARK <name>`, so a bench can tell its phases apart),
/// `type:<text>` (into the focused field; `\n`
/// is a newline), `orient:landscape|portrait` and `labels` (prints the
/// visible labels with their centres to the device log).
void runFixtureSteps(String script) {
@@ -54,6 +57,12 @@ Future<void> _run(String verb, String value) async {
case 'drag':
final p = value.split(',').map(double.parse).toList();
await _drag(Offset(p[0], p[1]), Offset(p[2], p[3]));
case 'mark':
// ignore: avoid_print
print('FIXTURE_MARK $value');
case 'wheel':
final p = value.split(',').map(double.parse).toList();
await _wheel(Offset(p[0], p[1]), p[2], p[3].toInt());
case 'type':
_type(value.replaceAll(r'\n', '\n'));
case 'orient':
@@ -141,6 +150,20 @@ Future<void> _drag(Offset from, Offset by) async {
);
}
Future<void> _wheel(Offset at, double dy, int count) async {
final binding = GestureBinding.instance;
for (var i = 0; i < count; i++) {
binding.handlePointerEvent(
PointerScrollEvent(
kind: PointerDeviceKind.mouse,
position: at,
scrollDelta: Offset(0, dy),
),
);
await Future<void>.delayed(const Duration(milliseconds: 16));
}
}
void _type(String text) {
EditableTextState? focused;
void visit(Element element) {