Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

refactor: remove isHarnessV2 flag to enable desktop updates unconditionally

0xken15cdb876ec602c
diff --git a/desktop/lib/core/build_identity.dart b/desktop/lib/core/build_identity.dart
index 724da5c8c..f73f90e23 100644
--- a/desktop/lib/core/build_identity.dart
+++ b/desktop/lib/core/build_identity.dart
@@ -1,4 +1 @@
-/// V2 is an internal distinction only: the app ships as Harness, under the
-/// release bundle identifier, with updates enabled. CLI identity stays shared.
-const isHarnessV2 = false;
const desktopAppName = 'Harness';
diff --git a/desktop/lib/main.dart b/desktop/lib/main.dart
index 4c465a658..c892ef36e 100644
--- a/desktop/lib/main.dart
+++ b/desktop/lib/main.dart
@@ -195,7 +195,6 @@ class _RootShellState extends ConsumerState<RootShell>
switch (call.method) {
case 'checkForUpdates':
final app = ref.read(appStateProvider);
- if (!app.desktopUpdatesEnabled) return;
await _menuDialog(() async {
final result = await app.checkForUpdates();
if (!mounted) return;
diff --git a/desktop/lib/settings/sections/about_section.dart b/desktop/lib/settings/sections/about_section.dart
index ce2acf601..b2576807c 100644
--- a/desktop/lib/settings/sections/about_section.dart
+++ b/desktop/lib/settings/sections/about_section.dart
@@ -84,10 +84,8 @@ class _AboutSectionState extends State<AboutSection> {
),
const SizedBox(height: 12),
Text(
- widget.notifier.desktopUpdatesEnabled
- ? 'Harness checks for a newer build when it starts, and every '
- 'six hours after that.'
- : 'Automatic and manual updates are disabled for this V2 preview.',
+ 'Harness checks for a newer build when it starts, and every '
+ 'six hours after that.',
style: TextStyle(
color: grid.AppPalette.textFaint,
fontSize: 11.5,
@@ -139,10 +137,8 @@ class _AboutCard extends StatelessWidget {
const SizedBox(height: 18),
Container(height: 1, color: grid.AppPalette.divider),
const SizedBox(height: 14),
- if (notifier.desktopUpdatesEnabled) ...[
- _CheckRow(checking: checking, onCheck: onCheck),
- const SizedBox(height: 12),
- ],
+ _CheckRow(checking: checking, onCheck: onCheck),
+ const SizedBox(height: 12),
const _FlashRow(),
],
),
@@ -314,12 +310,6 @@ class _PillState {
final bool wash;
static _PillState of(AppNotifier notifier, {required bool checking}) {
- if (!notifier.desktopUpdatesEnabled) {
- return _PillState(
- 'Preview · updates disabled',
- grid.AppPalette.textSecondary,
- );
- }
if (notifier.isInstallingUpdate) {
return _PillState(
'Installing…',
diff --git a/desktop/lib/state/app_state.dart b/desktop/lib/state/app_state.dart
index fa49500be..d3b8fba5a 100644
--- a/desktop/lib/state/app_state.dart
+++ b/desktop/lib/state/app_state.dart
@@ -14,7 +14,6 @@ import '../auth/cli_login.dart';
import '../bootstrap/environment_provisioner.dart';
import '../core/config.dart';
import '../core/agent_preference.dart';
-import '../core/build_identity.dart';
import '../core/engine_availability.dart';
import '../core/local_hostname.dart';
import '../core/local_git_projects.dart';
@@ -1975,14 +1974,11 @@ class AppNotifier extends ChangeNotifier {
}
void _startUpdateChecking() {
- if (isHarnessV2 && desktopUpdater == null) return;
_updateCheckTimer ??= (desktopUpdater ?? DesktopUpdater()).startChecking(
onUpdateAvailable: _handleBackgroundUpdate,
);
}
- bool get desktopUpdatesEnabled => !isHarnessV2 || desktopUpdater != null;
-
void _handleBackgroundUpdate(UpdateInfo info) {
if (_disposed) return;
if (_skippedDesktopUpdateVersion == info.version) return;
@@ -1995,7 +1991,6 @@ class AppNotifier extends ChangeNotifier {
/// A manual check deliberately returns a skipped version too, so the user
/// can choose to install it from the account menu after changing their mind.
Future<ManualUpdateCheck> checkForUpdates() async {
- if (isHarnessV2 && desktopUpdater == null) return const ManualUpdateCheck();
if (isCheckingForUpdate) {
return ManualUpdateCheck(update: availableUpdate);
}
@@ -2038,7 +2033,6 @@ class AppNotifier extends ChangeNotifier {
/// Downloads, verifies, and installs only after an explicit user action.
/// A failed operation leaves the running app untouched and retryable.
Future<bool> installAvailableUpdate() async {
- if (isHarnessV2 && desktopUpdater == null) return false;
final info = availableUpdate;
if (info == null || isInstallingUpdate) return false;
isInstallingUpdate = true;
diff --git a/desktop/lib/update/desktop_updater.dart b/desktop/lib/update/desktop_updater.dart
index b4b58da60..f46fd1938 100644
--- a/desktop/lib/update/desktop_updater.dart
+++ b/desktop/lib/update/desktop_updater.dart
@@ -7,7 +7,6 @@ import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import '../core/app_version.dart';
-import '../core/build_identity.dart';
/// Published by `scripts/upload-desktop.sh` (`make upload-desktop`) — see
/// `RELEASE.md` for the full publish-side design this mirrors.
@@ -151,7 +150,7 @@ class DesktopUpdater {
final String _architecture;
DesktopUpdater({
- this._enabled = !isHarnessV2,
+ this._enabled = true,
Dio? dio,
Future<void> Function(String command)? launchDetached,
// Defaults to the real manifest (or the --dart-define build-time override — see RELEASE.md's