cicy-desktop 2.1.63 → 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.63",
3
+ "version": "2.1.64",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -1,17 +1,16 @@
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): ALL platforms
5
- // load the bundled local file:// SPA — works offline, fast, no remote
6
- // dependency, no mixed-content concerns when embedding the team-assistant
7
- // webview (the cicy-desktop preload's IPC bridge still attaches). The remote
8
- // Cloudflare worker is only a fallback if the bundled SPA fails to load.
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).
9
9
 
10
10
  const path = require("path");
11
11
  const { BrowserWindow } = require("electron");
12
12
  const log = require("electron-log");
13
13
 
14
- const REMOTE_URL = "https://desktop.cicy-ai.com/"; // Cloudflare worker (fallback only)
15
14
  const LOCAL_INDEX = path.join(__dirname, "homepage-react", "index.html");
16
15
 
17
16
  function pickHomepageURL() {
@@ -76,14 +75,10 @@ async function openHomepage() {
76
75
  homepage.webContents.on("console-message", (_e, level, msg, line, source) => {
77
76
  if (level >= 1) console.log(`[homepage:console L${line}] ${msg} (${source})`);
78
77
  });
79
- // If the bundled file:// SPA fails to load (corrupt/missing install), fall
80
- // back to the remote Cloudflare homepage 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.
81
80
  homepage.webContents.on("did-fail-load", (_e, code, desc, url) => {
82
81
  console.error(`[homepage] did-fail-load ${code} ${desc} ${url}`);
83
- if (url && url.startsWith("file://")) {
84
- log.warn(`[homepage] bundled homepage failed, falling back to ${REMOTE_URL}`);
85
- homepage.loadURL(REMOTE_URL);
86
- }
87
82
  });
88
83
  homepage.on("closed", () => { homepage = null; });
89
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.