cicy-desktop 2.1.62 → 2.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.62",
3
+ "version": "2.1.64",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -1,27 +1,19 @@
1
1
  // Homepage window — primary CiCy Desktop window. Singleton; closing it
2
2
  // does NOT quit the app.
3
3
  //
4
- // URL selection (HARDCODED — no env/dev-URL switch, no Vite):
5
- // - Windows: the remote Cloudflare worker https://desktop.cicy-ai.comkeeps
6
- // Win shipping without rebuilding (Win release cadence is slower than
7
- // render's). Falls back to the local file:// SPA if unreachable.
8
- // - Mac/Linux: the bundled local SPA file:// — works offline, fast, no remote
9
- // dependency, no mixed-content concerns when embedding the team-assistant
10
- // webview (the cicy-desktop preload's IPC bridge still attaches).
4
+ // URL selection (HARDCODED — no env/dev-URL switch, no Vite, no remote): ALL
5
+ // platforms load the bundled local file:// SPA works offline, fast, no
6
+ // remote dependency, no mixed-content concerns when embedding the
7
+ // team-assistant webview (the cicy-desktop preload's IPC bridge still
8
+ // attaches).
11
9
 
12
10
  const path = require("path");
13
11
  const { BrowserWindow } = require("electron");
14
12
  const log = require("electron-log");
15
13
 
16
- // Hardcoded homepage source — no Vite / CICY_HOMEPAGE_URL dev-URL switch.
17
- // - mac/linux: the bundled file:// SPA (offline, fast, no remote dependency).
18
- // - Windows: the remote Cloudflare worker (Win release cadence is slower
19
- // than render's, so it loads the homepage remotely).
20
- const REMOTE_URL = "https://desktop.cicy-ai.com/"; // Cloudflare worker (remote homepage)
21
14
  const LOCAL_INDEX = path.join(__dirname, "homepage-react", "index.html");
22
15
 
23
16
  function pickHomepageURL() {
24
- if (process.platform === "win32") return REMOTE_URL;
25
17
  return `file://${LOCAL_INDEX}`;
26
18
  }
27
19
 
@@ -83,17 +75,10 @@ async function openHomepage() {
83
75
  homepage.webContents.on("console-message", (_e, level, msg, line, source) => {
84
76
  if (level >= 1) console.log(`[homepage:console L${line}] ${msg} (${source})`);
85
77
  });
86
- // If the dev URL (Vite / SSH tunnel) is unreachable, fall back to the
87
- // local bundled file:// SPA so the window never stays blank.
78
+ // Log load failures (corrupt/missing install) no remote fallback by
79
+ // design: the homepage is the bundled SPA, full stop.
88
80
  homepage.webContents.on("did-fail-load", (_e, code, desc, url) => {
89
81
  console.error(`[homepage] did-fail-load ${code} ${desc} ${url}`);
90
- const fallback = `file://${LOCAL_INDEX}`;
91
- // If the remote (Windows) Cloudflare homepage is unreachable, fall back to
92
- // the bundled local SPA so the window never stays blank.
93
- if (url && url.startsWith(REMOTE_URL.replace(/\/$/, "")) && url !== fallback) {
94
- log.warn(`[homepage] remote homepage unreachable, falling back to ${fallback}`);
95
- homepage.loadURL(fallback);
96
- }
97
82
  });
98
83
  homepage.on("closed", () => { homepage = null; });
99
84
  return homepage;
package/src/main.js CHANGED
@@ -729,9 +729,9 @@ electronApp.whenReady().then(async () => {
729
729
  // Persist the cloud login durably in the MAIN process (global.json),
730
730
  // independent of the homepage renderer's origin. The renderer keeps the
731
731
  // token in localStorage, which Chromium scopes to the homepage window's
732
- // origin — and that origin drifts (file:// on mac, https://desktop.cicy-ai.com
733
- // on Windows, http://<ip>:port or the team domain when CICY_HOMEPAGE_URL is
734
- // set). A token saved under one origin is invisible after the URL changes,
732
+ // origin — and that origin has drifted historically (file:// today; the
733
+ // remote worker / dev URLs in the past). A token saved under one origin
734
+ // is invisible after the URL changes,
735
735
  // which forced the user to log in again and again. Storing it here and
736
736
  // restoring it on every homepage load makes "logged in once" survive origin
737
737
  // changes, restarts and public-URL switches. ONLY explicit logout clears it.