TypeScriptFrontendMindloft

Rebranding 404 Files Without Breaking Legacy Backups, Offline Maps, or Mobile Headers (v0.8.0)

Renaming Brainlet to Mindloft touched 404 files in commit adc9bf34 while deliberately leaving bundle IDs, .ramilo, .brainlet-backup, and brinlet.app IndexedDB migration intact — followed by a 1,498-line zero-dependency CDP script that caught a leftover character and a 390px header overflow.

The hardest part of renaming a shipped cross-platform product is not find-and-replace. It is deciding upfront which strings must never change.

Overnight on November 25–26 (v0.8.0, commit adc9bf34), we upgraded 枝间 Brainlet to 蒲公英脑图 Mindloft. The commit touched 404 files (+1,615 / -1,125 lines) under one rule: replace everything humans read, and freeze every identifier that operating systems, disk formats, or browsers depend on.

Four Compatibility Lines We Refused to Cross

Early builds had used both brinlet.app (missing a letter) and ramilo.mahui.me before settling on mindloft.cc, leaving the desktop window, emails, and installers out of sync with the domain. Before editing a line, we locked four boundaries:

  1. Bundle IDs and deep links stay fixed: Tauri’s identifier, Android’s applicationId, iOS CFBundleIdentifier, and HarmonyOS bundleName remain me.mahui.app.ramilo, and the URL scheme stays ramilo://. Changing them would make OS upgrades treat Mindloft as a separate app and strand local unsynced maps inside the old sandbox.
  2. File formats and legacy encrypted backups stay intact: .ramilo, .ramilo.json, and @ramilo/* packages never moved. In apps/web/src/product/device-data-panel.tsx, accept=".brainlet-backup" still opens legacy PBKDF2-SHA256 / AES-256-GCM full-device backups verified by account-settings.test.tsx.
  3. No HTTP 301 on legacy domains (origin-move): Unauthenticated users store offline maps and blobs in browser IndexedDB (ramilo-documents and ramilo-asset-bytes) scoped to the old origin. A gateway 301 would lock users out of their own data forever. brinlet.app and ramilo.mahui.me continue serving apps/web/src/origin-move.ts: holdForOriginMove() inspects local storage before React mounts, prompts if unsynced maps exist, opens https://mindloft.cc/origin-import.html synchronously inside the click handler (avoiding popup blockers), streams chunks over postMessage, and never deletes the old copy. Placing the new site at mindloft.cc/ and the Vite app at mindloft.cc/app/ rather than app.mindloft.cc also keeps one shared origin for IndexedDB.
  4. Historical logs stay untouched: The 21 devlogs and 18 release notes written before 2026-11-25 keep their original naming.

Five Easy-to-Miss Corners Across 404 Files

Beyond UI copy, platform plumbing hid plenty of strings:

  • Desktop (25 files): Aside from productName, #FAF7EE window background, and .ramilo associations in tauri.conf.json, apps/desktop/src-tauri/src/updater.rs checked read-only .dmg launches against /Volumes/枝间/枝间.app — requiring a matching update to /Volumes/蒲公英脑图/蒲公英脑图.app.
  • Mobile (49 files): Android bumped to versionCode 1000800 / versionName "0.8.0"; iOS Info.plist updated CFBundleDisplayName and UTTypeDescription while keeping me.mahui.app.ramilo.document and .backup UTTypeIdentifiers.
  • Auth emails (4 files): registration-mail.ts and password-reset-mail.ts needed the new name so signup verification codes wouldn’t look like phishing.
  • Standalone Stage (3 files): packages/stage/src/standalone.ts and format.ts updated visible titles while keeping the parsed.format !== 'ramilo-stage' magic check.
  • Two asset directories: brands/Mindloft_brand_assets/ (131 files) carries mindloft.cc URLs for web/GitHub, while brands/Mindloft_social_no_url/ (26 files) strips domains and QR codes for social channels that throttle external links. prepare-media.mjs also runs rmSync up front to clear deleted brinlet-*.png assets.

A 1,498-Line Zero-Dep CDP Script Caught Two Real Bugs

The morning after v0.8.0 shipped, mindloft.cc had the new Mindloft header above 16 stale teal “Brainlet” screenshots.

Rather than adding Playwright, apps/site/scripts/capture-screens.mjs grew to 1,498 lines (5c0afd8f + 8f254847) using only local Chrome (--headless=new --remote-debugging-port=0), Node’s built-in WebSocket, and node:zlib. Serving apps/web/dist over HTTP across three CDP sessions (A, B, C), it captured 17 screenshots (15 at 1440×900 light/dark, 2 at 390×844), even building a dual-sheet 产品路线图-2026.xmind in memory with Node crc32 for feature-import-review and stubbing structured AI drafts via handleMockApiRequest.

Inspecting the 17 fresh screenshots side-by-side caught two bugs that repo-wide search missed:

  1. A stray 枝 glyph in Stage (5c0afd8f): apps/web/src/stage/stage-top-bar.tsx hardcoded <span className="stage-brand-mark" aria-hidden="true">枝</span>. Searching for 枝间 and Brainlet had skipped the single character; replacing it with <BrandLogo variant="icon" className="stage-brand-mark" /> fixed it.
  2. A 390px header overflow (4a094510): 蒲公英脑图 Mindloft is wider than the 11-character 枝间 Brainlet, pushing the search and menu buttons past the right edge at 390×844. Adding flex-shrink: 1; min-inline-size: 0; white-space: normal; overflow-wrap: anywhere; to .site-brand under @media (max-width: 599px) kept the header inside the viewport.

Finally, prepare-media.mjs switched the 6 1200×630 OG social cards from fit: 'cover' (which cropped off mindmap halves) to framed fit: 'contain' on #FAF7EE paper, while leaving 3 earlier redesign comparison shots untouched.

✦

Comments

  • Loading…

Comments are reviewed before publishing; email is visible only to me.