Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 9713864

Browse files
committed
refactor(cpu_dialog): more mentions of rosetta
1 parent c6c59c6 commit 9713864

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

apps/client/src/components/startup_checks.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ export class StartupChecks extends Component {
1010

1111
constructor() {
1212
super();
13-
this.checkRosetta2Warning();
13+
this.checkCpuArchMismatch();
1414
}
1515

16-
async checkRosetta2Warning() {
16+
async checkCpuArchMismatch() {
1717
try {
18-
// Check if running under Rosetta 2 by calling the server
1918
const response = await server.get("system-checks") as CpuArchResponse;
2019
if (response.isCpuArchMismatch) {
21-
// Trigger the Rosetta 2 warning dialog
2220
this.triggerCommand("showCpuArchWarning", {});
2321
}
2422
} catch (error) {
25-
console.warn("Could not check Rosetta 2 status:", error);
23+
console.warn("Could not check CPU arch status:", error);
2624
}
2725
}
2826
}

apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const TPL = /*html*/`
2828
</div>
2929
</div>`;
3030

31-
export default class RosettaWarningDialog extends BasicWidget {
31+
export default class IncorrectCpuArchDialog extends BasicWidget {
3232
private modal!: Modal;
3333
private $downloadButton!: JQuery<HTMLElement>;
3434

apps/server/src/routes/api/system_info.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ function systemChecks() {
99
}
1010

1111
/**
12-
* Detects if the application is running under Rosetta 2 translation on Apple Silicon.
13-
* This happens when an x64 version of the app is run on an M1/M2/M3 Mac.
14-
* Uses the macOS sysctl.proc_translated to properly detect translation.
15-
* @returns true if running under Rosetta 2, false otherwise
12+
* Detects if the application is running under emulation on Apple Silicon or Windows on ARM.
13+
* This happens when an x64 version of the app is run on an M1/M2/M3 Mac or on a Windows Snapdragon chip.
14+
* @returns true if running on x86 emulation on ARM, false otherwise.
1615
*/
1716
export const isCpuArchMismatch = () => {
1817
if (isMac) {

0 commit comments

Comments
 (0)