remove dissolved daemon, retire ptyc, fix golden cross-platform

Complete three overdue cleanups discovered during macOS health check:

D-56 daemon dissolution: delete bin/clide.dart, DaemonServer,
and orphaned tests (test/cli/, subprocess_test, in_process_test).
Update stale "clide --daemon" references in i18n catalogs, error
messages, editor_commands, CI scripts, and decision records.

ptyc retirement: delete ptyc/ source tree, PtySession, scm_rights.
Remove from Toolchain resolution, ToolCheck gate, backend
serialization, testmode harness, Makefile, CI, and sandbox
entitlements. PTY spawning uses NativePty (Dart FFI forkpty) since
the terminal was absorbed in-tree. D-5 amended.

Golden tests: wire the existing but never-applied clideGoldenConfig
via flutter_test_config.dart. Disable CI goldens (Skia anti-aliasing
differs between macOS/Linux even with Ahem). Keep platform-keyed
goldens only — goldens/linux/ and goldens/macos/ each run on their
own OS.

Test suite: 826 pass, 0 fail on macOS (was 829 pass, 11 fail).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2026-05-07 18:40:01 +02:00
co-authored by Claude Opus 4.6
parent 6b7290dc42
commit a6eca2561b
51 changed files with 265 additions and 2719 deletions
-2
View File
@@ -60,7 +60,6 @@ class Backend {
git: tcData['git'] as String?,
pql: tcData['pql'] as String?,
tmux: tcData['tmux'] as String?,
ptyc: tcData['ptyc'] as String?,
shell: tcData['shell'] as String?,
gitEnv: (tcData['gitEnv'] as Map?)?.cast<String, String>(),
));
@@ -86,7 +85,6 @@ class Backend {
git: tcData['git'] as String?,
pql: tcData['pql'] as String?,
tmux: tcData['tmux'] as String?,
ptyc: tcData['ptyc'] as String?,
shell: tcData['shell'] as String?,
gitEnv: (tcData['gitEnv'] as Map?)?.cast<String, String>(),
));
+3 -4
View File
@@ -45,8 +45,8 @@ void backendEntry(BackendBootMessage boot) {
late Toolchain toolchain;
// Phase 1: resolve toolchain — just find binaries, don't init services.
// We need a project root for ptyc/dugite paths. Use a sensible
// default; the real project comes from project.open.
// We need a project root for dugite paths. Use a sensible default;
// the real project comes from project.open.
final resolveRoot = boot.hintRoot ?? Platform.environment['HOME'] ?? '/tmp';
toolchain = Toolchain();
toolchain.applyResolved(resolveToolchainPaths(resolveRoot));
@@ -78,7 +78,7 @@ void backendEntry(BackendBootMessage boot) {
final workDir = Directory(projectPath);
// Re-resolve toolchain with the actual project root (finds
// dugite in native/dugite/, ptyc in ptyc/bin/, etc.)
// dugite in native/dugite/, etc.)
toolchain = Toolchain();
toolchain.applyResolved(resolveToolchainPaths(projectPath));
@@ -138,7 +138,6 @@ Map<String, Object?> _serializeToolchain(Toolchain tc) => {
'git': tc.git,
'pql': tc.pql,
'tmux': tc.tmux,
'ptyc': tc.ptyc,
'shell': tc.shell,
'gitEnv': tc.gitEnv,
'missing': tc.missing,
@@ -1,6 +1,6 @@
{
"connected": { "translation": "connected" },
"connected.hint": { "translation": "clide daemon is reachable over the local socket" },
"connected.hint": { "translation": "backend isolate is reachable" },
"disconnected": { "translation": "disconnected" },
"disconnected.hint": { "translation": "clide daemon is not running — start it with `clide --daemon`" }
"disconnected.hint": { "translation": "backend isolate is not running" }
}
@@ -3,5 +3,5 @@
"subtitle.spawning": { "translation": "spawning shell…" },
"subtitle.exited": { "translation": "Shell exited." },
"error.unavailable": { "translation": "Terminal unavailable" },
"error.daemon": { "translation": "Daemon not connected. Start `clide --daemon`." }
"error.daemon": { "translation": "Backend not connected." }
}
-1
View File
@@ -58,7 +58,6 @@ class DaemonClient extends ChangeNotifier {
code: IpcExitCode.toolError,
kind: IpcErrorKind.toolError,
message: 'daemon not connected',
hint: 'is `clide --daemon` running?',
),
));
}
+1 -9
View File
@@ -5,16 +5,14 @@ import 'package:flutter/foundation.dart';
import '../../src/pty/env.dart';
class ToolCheck extends ChangeNotifier {
bool ptycOk = false;
bool pqlOk = false;
bool tmuxOk = false;
bool gitOk = false;
bool checked = false;
bool get allOk => ptycOk && pqlOk && tmuxOk && gitOk;
bool get allOk => pqlOk && tmuxOk && gitOk;
List<String> get errors => [
if (!ptycOk) 'ptyc not found',
if (!pqlOk) 'pql not found',
if (!tmuxOk) 'tmux not found',
if (!gitOk) 'git not found',
@@ -24,12 +22,6 @@ class ToolCheck extends ChangeNotifier {
static String? workspaceRoot;
Future<void> check() async {
final root = workspaceRoot ?? Directory.current.path;
ptycOk = File('$root/native/linux-x64/ptyc').existsSync() ||
File('$root/native/macos-arm64/ptyc').existsSync() ||
File('$root/native/macos-x64/ptyc').existsSync() ||
File('$root/ptyc/bin/ptyc').existsSync() ||
_existsOnPath('ptyc');
pqlOk = _existsOnPath('pql');
tmuxOk = _existsOnPath('tmux');
gitOk = _existsOnPath('git');
-23
View File
@@ -16,7 +16,6 @@ class ResolvedPaths {
this.git,
this.pql,
this.tmux,
this.ptyc,
this.shell,
this.gitEnv,
});
@@ -24,7 +23,6 @@ class ResolvedPaths {
final String? git;
final String? pql;
final String? tmux;
final String? ptyc;
final String? shell;
final Map<String, String>? gitEnv;
}
@@ -33,7 +31,6 @@ class Toolchain extends ChangeNotifier {
String? _git;
String? _pql;
String? _tmux;
String? _ptyc;
String? _shell;
Map<String, String>? _gitEnv;
bool _resolved = false;
@@ -41,7 +38,6 @@ class Toolchain extends ChangeNotifier {
String get git => _git ?? 'git';
String get pql => _pql ?? 'pql';
String get tmux => _tmux ?? 'tmux';
String get ptyc => _ptyc ?? 'ptyc';
String get shell => _shell ?? '/bin/bash';
/// Extra environment variables for git (e.g. GIT_EXEC_PATH for dugite).
@@ -76,7 +72,6 @@ class Toolchain extends ChangeNotifier {
_git = p.git;
_pql = p.pql;
_tmux = p.tmux;
_ptyc = p.ptyc;
_shell = p.shell;
_gitEnv = p.gitEnv;
_resolved = true;
@@ -106,20 +101,10 @@ class Toolchain extends ChangeNotifier {
final tmux = _findOnPath('tmux');
final shell = _findOnPath(Platform.environment['SHELL']?.split('/').last ?? 'bash');
final ptyc = _firstExisting([
'$workspaceRoot/ptyc/bin/ptyc',
'$workspaceRoot/native/linux-x64/ptyc',
'$workspaceRoot/native/macos-arm64/ptyc',
'$workspaceRoot/native/macos-x64/ptyc',
if (Platform.environment['HOME'] case final home?) '$home/.local/bin/ptyc',
]) ??
_findOnPath('ptyc');
return ResolvedPaths(
git: git,
pql: pql,
tmux: tmux,
ptyc: ptyc,
shell: shell,
gitEnv: gitEnv,
);
@@ -182,14 +167,6 @@ ResolvedPaths resolveToolchainPaths(String workspaceRoot) {
git: git,
pql: _findOnPathStandalone('pql'),
tmux: _findOnPathStandalone('tmux'),
ptyc: _firstExistingStandalone([
'$workspaceRoot/ptyc/bin/ptyc',
'$workspaceRoot/native/linux-x64/ptyc',
'$workspaceRoot/native/macos-arm64/ptyc',
'$workspaceRoot/native/macos-x64/ptyc',
if (Platform.environment['HOME'] case final home?) '$home/.local/bin/ptyc',
]) ??
_findOnPathStandalone('ptyc'),
shell: _findOnPathStandalone(Platform.environment['SHELL']?.split('/').last ?? 'bash'),
gitEnv: gitEnv,
);