Skip to content

Commit 9965409

Browse files
fix(desktop): migrate app naming to Anarlog (#5286)
Rename legacy macOS bundle targets from Char to Anarlog and update remaining desktop chrome labels.
1 parent 004229b commit 9965409

6 files changed

Lines changed: 49 additions & 28 deletions

File tree

crates/detect/src/list/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const SELF_BUNDLE_IDS: &[&str] = &[
2323
];
2424

2525
const SELF_APP_NAMES: &[&str] = &[
26+
"anarlog",
27+
"anarlog staging",
28+
"anarlog nightly",
2629
"hyprnote",
2730
"hyprnote staging",
2831
"hyprnote nightly",
@@ -32,6 +35,9 @@ const SELF_APP_NAMES: &[&str] = &[
3235
];
3336

3437
const SELF_APP_PATH_SEGMENTS: &[&str] = &[
38+
"/anarlog.app/",
39+
"/anarlog staging.app/",
40+
"/anarlog nightly.app/",
3541
"/hyprnote.app/",
3642
"/hyprnote staging.app/",
3743
"/hyprnote nightly.app/",
@@ -90,21 +96,21 @@ mod tests {
9096

9197
#[test]
9298
fn test_is_self_app_matches_known_bundle_ids() {
93-
assert!(is_self_app(&app("com.hyprnote.stable", "Char")));
99+
assert!(is_self_app(&app("com.hyprnote.stable", "Anarlog")));
94100
assert!(is_self_app(&app("com.hyprnote.Hyprnote", "Hyprnote")));
95101
}
96102

97103
#[test]
98104
fn test_is_self_app_matches_renamed_app_names() {
99-
assert!(is_self_app(&app("pid:42", "Char")));
105+
assert!(is_self_app(&app("pid:42", "Anarlog")));
100106
assert!(is_self_app(&app("pid:43", "Char Nightly")));
101107
assert!(is_self_app(&app("pid:44", "Hyprnote Staging")));
102108
}
103109

104110
#[test]
105111
fn test_is_self_app_matches_path_fallbacks() {
106112
assert!(is_self_app(&app(
107-
"/Applications/Char.app/Contents/MacOS/Char",
113+
"/Applications/Anarlog.app/Contents/MacOS/anarlog",
108114
"Unknown",
109115
)));
110116
assert!(is_self_app(&app(

plugins/deeplink2/src/server/callback.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Char</title>
6+
<title>Anarlog</title>
77
<script src="https://cdn.twind.style" crossorigin></script>
88
</head>
99
<body class="min-h-screen bg-gradient-to-b from-white via-stone-50 to-white flex items-center justify-center p-6">
@@ -14,7 +14,7 @@ <h1 class="text-3xl font-serif tracking-tight text-stone-700">{{ title }}</h1>
1414
</div>
1515
{% if is_success %}
1616
<a href="{{ deeplink_url }}" class="w-full h-12 flex items-center justify-center text-base font-medium transition-all bg-gradient-to-t from-stone-600 to-stone-500 text-white rounded-full shadow-md hover:shadow-lg cursor-pointer">
17-
Open Char
17+
Open Anarlog
1818
</a>
1919
{% endif %}
2020
</div>

plugins/tray/src/menu_items/tray_open.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ impl MenuItemHandler for TrayOpen {
1111
const ID: &'static str = "hypr_tray_open";
1212

1313
fn build(app: &AppHandle<tauri::Wry>) -> Result<MenuItemKind<tauri::Wry>> {
14-
let item = MenuItem::with_id(app, Self::ID, "Open Char", true, None::<&str>)?;
14+
let item = MenuItem::with_id(
15+
app,
16+
Self::ID,
17+
format!("Open {}", app.package_info().name.as_str()),
18+
true,
19+
None::<&str>,
20+
)?;
1521
Ok(MenuItemKind::MenuItem(item))
1622
}
1723

plugins/tray/src/menu_items/tray_version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ pub struct TrayVersion;
1010
impl TrayVersion {
1111
fn get_channel(app_name: &str) -> &'static str {
1212
match app_name {
13-
"Char" | "Hyprnote" => "stable",
14-
"Char Staging" | "Hyprnote Staging" => "staging",
13+
"Anarlog" | "Char" | "Hyprnote" => "stable",
14+
"Anarlog Staging" | "Char Staging" | "Hyprnote Staging" => "staging",
1515
_ => "dev",
1616
}
1717
}

plugins/updater2/src/startup_migration.rs

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ fn should_skip_startup_migration(args: &[OsString]) -> bool {
7474

7575
fn legacy_target_app_path(current_app_path: &Path) -> Option<PathBuf> {
7676
let target_name = match current_app_path.file_name().and_then(|name| name.to_str()) {
77-
Some("Hyprnote.app") => "Char.app",
78-
Some("Hyprnote Nightly.app") => "Char Nightly.app",
79-
Some("Hyprnote Staging.app") => "Char Staging.app",
77+
Some("Hyprnote.app") | Some("Char.app") => "Anarlog.app",
78+
Some("Hyprnote Nightly.app") | Some("Char Nightly.app") => "Anarlog Nightly.app",
79+
Some("Hyprnote Staging.app") | Some("Char Staging.app") => "Anarlog Staging.app",
8080
_ => return None,
8181
};
8282

@@ -202,16 +202,25 @@ mod tests {
202202
use super::*;
203203

204204
#[test]
205-
fn maps_legacy_bundle_names_to_char_names() {
205+
fn maps_legacy_bundle_names_to_anarlog_names() {
206206
let cases = [
207-
("/Applications/Hyprnote.app", "/Applications/Char.app"),
207+
("/Applications/Hyprnote.app", "/Applications/Anarlog.app"),
208+
("/Applications/Char.app", "/Applications/Anarlog.app"),
208209
(
209210
"/Applications/Hyprnote Nightly.app",
211+
"/Applications/Anarlog Nightly.app",
212+
),
213+
(
210214
"/Applications/Char Nightly.app",
215+
"/Applications/Anarlog Nightly.app",
211216
),
212217
(
213218
"/Applications/Hyprnote Staging.app",
219+
"/Applications/Anarlog Staging.app",
220+
),
221+
(
214222
"/Applications/Char Staging.app",
223+
"/Applications/Anarlog Staging.app",
215224
),
216225
];
217226

@@ -226,9 +235,9 @@ mod tests {
226235
#[test]
227236
fn ignores_non_legacy_bundle_names() {
228237
for path in [
229-
"/Applications/Char.app",
230-
"/Applications/Char Nightly.app",
231-
"/Applications/Char Staging.app",
238+
"/Applications/Anarlog.app",
239+
"/Applications/Anarlog Nightly.app",
240+
"/Applications/Anarlog Staging.app",
232241
] {
233242
assert_eq!(legacy_target_app_path(Path::new(path)), None);
234243
}
@@ -271,15 +280,15 @@ mod tests {
271280
let command = build_bundle_rename_command(
272281
4242,
273282
Path::new("/Applications/Hyprnote Nightly.app"),
274-
Path::new("/Applications/Char Nightly.app"),
283+
Path::new("/Applications/Anarlog Nightly.app"),
275284
&relaunch_args,
276285
);
277286
let args = command
278287
.get_args()
279288
.map(|arg| arg.to_string_lossy().to_string())
280289
.collect::<Vec<_>>();
281290

282-
assert!(args[1].contains("if [ -e '/Applications/Char Nightly.app' ]; then"));
291+
assert!(args[1].contains("if [ -e '/Applications/Anarlog Nightly.app' ]; then"));
283292
assert!(args[1].contains("return 1"));
284293
}
285294

@@ -292,7 +301,7 @@ mod tests {
292301
let command = build_bundle_rename_command(
293302
4242,
294303
Path::new("/Applications/Hyprnote Nightly.app"),
295-
Path::new("/Applications/Char Nightly.app"),
304+
Path::new("/Applications/Anarlog Nightly.app"),
296305
&relaunch_args,
297306
);
298307
let args = command
@@ -309,11 +318,11 @@ mod tests {
309318

310319
#[test]
311320
fn current_bundle_path_from_executable_uses_bundle_root() {
312-
let executable = Path::new("/Applications/Char.app/Contents/MacOS/char");
321+
let executable = Path::new("/Applications/Anarlog.app/Contents/MacOS/anarlog");
313322

314323
let bundle = current_app_bundle_path_from_executable(executable).unwrap();
315324

316-
assert_eq!(bundle, PathBuf::from("/Applications/Char.app"));
325+
assert_eq!(bundle, PathBuf::from("/Applications/Anarlog.app"));
317326
}
318327

319328
#[test]
@@ -325,7 +334,7 @@ mod tests {
325334
let command = build_bundle_rename_command(
326335
4242,
327336
Path::new("/Applications/Hyprnote Nightly.app"),
328-
Path::new("/Applications/Char Nightly.app"),
337+
Path::new("/Applications/Anarlog Nightly.app"),
329338
&relaunch_args,
330339
);
331340
let args = command
@@ -337,10 +346,10 @@ mod tests {
337346
assert_eq!(args[0], "-c");
338347
assert!(args[1].contains(r#"while kill -0 "$1" 2>/dev/null; do sleep 0.1; done;"#));
339348
assert!(args[1].contains(
340-
"mv -f '/Applications/Hyprnote Nightly.app' '/Applications/Char Nightly.app'"
349+
"mv -f '/Applications/Hyprnote Nightly.app' '/Applications/Anarlog Nightly.app'"
341350
));
342351
assert!(args[1].contains(
343-
"open -n '/Applications/Char Nightly.app' --args '--onboarding=123' '--updater2-skip-startup-migration=1'"
352+
"open -n '/Applications/Anarlog Nightly.app' --args '--onboarding=123' '--updater2-skip-startup-migration=1'"
344353
));
345354
assert_eq!(&args[2..], ["sh", "4242"]);
346355
}
@@ -352,18 +361,18 @@ mod tests {
352361
)]);
353362
let command = build_bundle_rename_command(
354363
4242,
355-
Path::new("/Applications/Hyprnote.app"),
356364
Path::new("/Applications/Char.app"),
365+
Path::new("/Applications/Anarlog.app"),
357366
&relaunch_args,
358367
);
359368
let args = command
360369
.get_args()
361370
.map(|arg| arg.to_string_lossy().to_string())
362371
.collect::<Vec<_>>();
363372

364-
assert!(args[1].contains("mv -f '/Applications/Hyprnote.app' '/Applications/Char.app'"));
373+
assert!(args[1].contains("mv -f '/Applications/Char.app' '/Applications/Anarlog.app'"));
365374
assert!(args[1].contains(
366-
"open -n '/Applications/Char.app' --args '--updater2-skip-startup-migration=1'"
375+
"open -n '/Applications/Anarlog.app' --args '--updater2-skip-startup-migration=1'"
367376
));
368377
}
369378
}

plugins/windows/src/window/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl AppWindow {
9898
impl WindowImpl for AppWindow {
9999
fn title(&self) -> String {
100100
match self {
101-
Self::Main => "Char".into(),
101+
Self::Main => "Anarlog".into(),
102102
Self::Composer => "Composer".into(),
103103
}
104104
}

0 commit comments

Comments
 (0)