refactor(brand): rename F∆I -> Ch∆In + hub binary fai -> chain
Some checks failed
Security / Security check (push) Failing after 2s

Studio follows the platform rename: product branding F∆I -> Ch∆In in UI
strings, command examples fai -> chain, and — critically — the spawned
hub binary path ~/.fai/bin/fai -> ~/.fai/bin/chain so Studio launches
the renamed binary. The fai_* Dart identifiers (FaiLog, widget files,
the generated SDK) stay = vendor/internal namespace. flutter analyze:
no issues.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-06-15 16:22:22 +02:00
parent a0007b9178
commit 7ff4fda2a3
36 changed files with 141 additions and 141 deletions

View file

@ -24,7 +24,7 @@ import 'fai_log.dart';
///
/// [source] is a short tag (`flows.run`, `audit.clear`, )
/// used to group entries in the on-disk log so an operator or
/// `fai doctor` can scan recent failures by area without
/// `chain doctor` can scan recent failures by area without
/// reading the full free-text. Keep it stable; treat it like
/// a metric label, not free-form text.
///

View file

@ -1,12 +1,12 @@
// Central error log for Studio. Every error surfaced to the
// operator (SnackBar, error sheet, recoverable dialog) is also
// appended here so `fai doctor` and "Open log" can show what
// appended here so `chain doctor` and "Open log" can show what
// went wrong without the operator having to reproduce the
// failure.
//
// Path: `~/.fai/logs/studio-errors.log` (cross-platform via
// HOME / USERPROFILE). One line per event, JSON-shaped so
// `fai doctor` can parse it; humans can still read it because
// `chain doctor` can parse it; humans can still read it because
// the JSON is single-line and short.
//
// Best-effort by design: a failed write to the log file must
@ -76,7 +76,7 @@ class FaiLog {
return _append(entry);
}
/// Read the last [maxLines] lines back. Used by `fai doctor`
/// Read the last [maxLines] lines back. Used by `chain doctor`
/// + Settings "Recent errors" view. Returns oldest first so
/// the caller can render in chronological order.
Future<List<String>> tail({int maxLines = 50}) async {

View file

@ -11,7 +11,7 @@
// call for processes.
//
// The `fai` binary is resolved from PATH first; falls back to
// `~/.fai/bin/fai` (Unix) or `%USERPROFILE%\.fai\bin\fai.exe`
// `~/.fai/bin/chain` (Unix) or `%USERPROFILE%\.fai\bin\chain.exe`
// (Windows). The PowerShell installer puts both in PATH but
// some operators don't restart their shell after install — the
// fallback covers that case.
@ -26,7 +26,7 @@ import 'package:shared_preferences/shared_preferences.dart';
/// and render a localized, actionable message instead.
const String kFaiBinaryNotFound = 'fai-binary-not-found';
/// Getting-started / install guide for the FI platform. Opened
/// Getting-started / install guide for the ChIn platform. Opened
/// in the OS browser as the fallback affordance when no `fai`
/// binary can be located on the machine.
const String kFaiInstallDocsUrl =
@ -135,7 +135,7 @@ class SystemActions {
return revealInOs(path);
}
/// Run a `fai daemon ...` subcommand and surface the captured
/// Run a `chain daemon ...` subcommand and surface the captured
/// output. Used by Doctor's "Restart daemon" button.
static Future<({bool ok, String stdout, String stderr})> faiDaemon(
List<String> args,
@ -143,7 +143,7 @@ class SystemActions {
return _runFai(['daemon', ...args]);
}
/// Run `fai update apply --channel <c>`. Long-running on a slow
/// Run `chain update apply --channel <c>`. Long-running on a slow
/// network caller should show a spinner.
static Future<({bool ok, String stdout, String stderr})> faiUpdateApply(
String channel,
@ -177,7 +177,7 @@ class SystemActions {
return _runFai(['daemon', 'disable', '--channel', channel]);
}
/// Run `fai reset --yes`. Wipes operator state with the same
/// Run `chain reset --yes`. Wipes operator state with the same
/// safety net as the CLI: stops every daemon (including off-
/// channel orphans), atomically backs `~/.fai/` up, recreates
/// it with `bin/`, `channels/`, `config.yaml`, `current-channel`,
@ -249,7 +249,7 @@ class SystemActions {
if (home == null || home.isEmpty) return null;
final fallback = isWindows
? '$home\\.fai\\bin\\fai.exe'
: '$home/.fai/bin/fai';
: '$home/.fai/bin/chain';
return File(fallback).existsSync() ? fallback : null;
}