forked from 1b-agent/opencadstudio-upstream
129 lines
9.9 KiB
Markdown
129 lines
9.9 KiB
Markdown
# OneCAD Draft rebrand — OneBSpace
|
||
|
||
This fork of OpenCADStudio (upstream: github.com/HakanSeven12/OpenCADStudio) is
|
||
rebranded as **OneCAD Draft** by **OneBSpace**. Brand wordmark in the UI is
|
||
"OneCAD Draft"; the company is OneBSpace. We are not HakanSeven12 and this build
|
||
must never contact the internet (air-gapped family law for embedded Odoo apps).
|
||
|
||
Build metadata is intentionally untouched: the crate, the binary
|
||
(`OpenCADStudio`, wasm artifacts `OpenCADStudio.js` / `OpenCADStudio_bg.wasm`),
|
||
and all module names keep their upstream identifiers — the Odoo dist assembler
|
||
and the wasm build chain depend on the bin name.
|
||
|
||
Rust-side brand/air-gap edits are marked with the comment tag
|
||
`// OneBSpace (OneCAD Draft):` (or `/* ... */` inline) so a future rebase onto
|
||
upstream can re-apply them mechanically.
|
||
|
||
## 1. Wordmark / titles
|
||
|
||
| File:line (approx) | Change |
|
||
|---|---|
|
||
| `src/app/mod.rs:5665` | native window title `"{}Open CAD Studio {} - {}"` → `"{}OneCAD Draft {} - {}"` (version suffix `{OCS_APP_VERSION}` kept) |
|
||
| `src/app/mod.rs:5671` | native fallback title `concat!("OneCAD Draft ", env!("OCS_APP_VERSION"))` |
|
||
| `src/app/mod.rs:5717` | web window title `concat!("OneCAD Draft ", env!("OCS_APP_VERSION"))` |
|
||
| `src/ui/window/about.rs:114` | About "Copy Info" report header → `OneCAD Draft v{...}` |
|
||
| `src/ui/window/about.rs:198` | About dialog 28 px heading → `OneCAD Draft` |
|
||
| `src/app/view/mod.rs:3672` | Start-page 40 px headline → `OneCAD Draft` |
|
||
| `src/sys.rs:1125` | crash report header → `OneCAD Draft {version} crash report` (+ matching test `src/sys.rs:1201`) |
|
||
| `src/sys.rs:1350` + `src/locale_catalog.rs:4990` | renderer-error banner literal → `OneCAD Draft renderer error — …` (ftl key `opencadstudio-renderer-error-…` unchanged) |
|
||
| `src/cli.rs:31` + `src/locale_catalog.rs:4513` | CLI `--help` about → `OneCAD Draft — 2D/3D CAD editor` |
|
||
| `web-app.html:8` | `<title>OneCAD Draft</title>` |
|
||
| `web-app.html:53` | splash title → `One<span>CAD</span> Draft` (keeps the blue "CAD" accent) |
|
||
| `web/locale-labels.json` | all 22 per-locale splash/window titles → `OneCAD Draft …` (suffixes per language kept) |
|
||
| `web/videos.json` | tutorial titles → `… in OneCAD Draft` |
|
||
| `src/input/spacemouse/navlib.rs:351,496` | SpaceMouse SDK client name → `OneCAD Draft` |
|
||
| `src/io/step.rs:214,232,242` | STEP export product names → `OneCAD_Draft_Solid` / `OneCAD_Draft_Shape` / `OneCAD Draft STEP export` |
|
||
| `src/patreon.rs` | (dead code) — see §3 |
|
||
| 22 × `locales/<tag>/opencadstudio.ftl` | every user-visible `Open CAD Studio` / `OpenCADStudio` value → `OneCAD Draft` (locale-appropriate wording kept; **note: the repo has 22 locales, not 23**) |
|
||
|
||
Message **keys** and English-literal keys in `src/locale_catalog.rs` keep their
|
||
upstream ftl ids (e.g. `open-cad-studio-2d-3d-cad-editor`); only display values
|
||
and the English fallback literals changed. File names stay `opencadstudio.ftl`
|
||
(`i18n.toml` fluent domain = code contract).
|
||
|
||
## 2. Service worker / web manifest strip (web shell)
|
||
|
||
* `web-app.html`: `<link rel="manifest" href="app.webmanifest">` removed; the
|
||
sw.js + app.webmanifest trunk copy-file tags removed; the entire
|
||
service-worker registration `<script>` block removed (the locale-labels
|
||
splash script and the splash-dismiss MutationObserver script are kept).
|
||
* `web/sw.js` — **deleted** (never shipped; upstream offline app-shell cache).
|
||
* `web/app.webmanifest` — **deleted** (PWA manifest).
|
||
* No other `sw.js` / `serviceWorker` / `app.webmanifest` references remain in
|
||
`web-app.html`, `web/`, `scripts/`, or `src/`.
|
||
|
||
## 3. Air-gap: phone-home / external links removed
|
||
|
||
| Item | File:line (approx) | Neutralization |
|
||
|---|---|---|
|
||
| Donation prompt modal | `src/app/startup.rs:11-13` (`queue_startup_prompts`) | never queued anymore; `ModalKind::DonationPrompt` machinery kept (dead) so the settings field and modal code stay compile-compatible; `Message::DonationPromptDonate` (`src/app/update/mod.rs:11005`) is an inert `Task::none()` |
|
||
| Donate CTA on Start page | `src/app/view/mod.rs` (~3698) | `donate_btn` deleted from the welcome column |
|
||
| "Support on Patreon" button | `src/app/view/mod.rs` (~3996) | deleted; supporters rail kept as a local-only shell |
|
||
| Patreon fetches | `src/app/mod.rs` (native boot ~5472, web boot ~5540) | both boot tasks → `Task::none()`; `MANUAL_SUPPORTERS` emptied (`src/patreon.rs:26`); `src/patreon.rs` code kept, never called |
|
||
| Update check | `src/io/update_check.rs:28-32` | `check_for_update()` earliest-returns `None` on **all** platforms (`// OneBSpace (OneCAD Draft): update check disabled — air-gapped build`); the GitHub probe is kept behind `#[allow(dead_code)]`; startup task call site unchanged (now always yields `None`, so the UpdateNotice modal can never appear) |
|
||
| Tutorial videos network | `src/app/mod.rs` (native boot) | playlist fetch thread removed → `load_cached()` only; web boot keeps the **local same-origin** `videos.json` fetch; YouTube image-CDN thumbnail fallback removed (`src/videos.rs:213-219`) |
|
||
| Video/discussion cards | `src/app/view/mod.rs` (~3856, ~3936) | cards are informational only — no `OpenUrl` click-through; "open playlist" / "open discussions" buttons deleted |
|
||
| Discussions refresh | `src/app/mod.rs` (native boot ~5487) | atom-feed fetch removed → `load_cached()` (bundled `web/discussions.json`) only; web boot keeps the local same-origin `discussions.json` fetch |
|
||
| Help/feedback/changelog commands | `src/app/commands/view.rs:72-80, 302-316` | `DONATE`, `WEBVERSION`, `HELP`, `REPORT`, `CHANGELOG` → `Some(Task::none())` no-ops (all opened patreon/github pages upstream) |
|
||
| OCS Web / OCS Desktop buttons | `src/app/view/mod.rs` (~3733) | both cross-promotion buttons removed (github.io / github releases links) |
|
||
| Reddit + Open-AEC sponsor blocks | `src/app/view/mod.rs` (~3739) | reddit button and `open-aec.com` sponsor card removed from the welcome column |
|
||
| XREF help link | `src/ui/window/xref_help.rs` | `XREF_ISSUES_URL`, the "Report an issue" button and the GitHub-issues hint removed; help text kept (test asserting the URL removed) |
|
||
| Plugin marketplace registry | `src/plugin/marketplace.rs:22-33` | `fetch_registry()` returns an empty list without network (`fetch_registry_github` kept behind `#[allow(dead_code)]`); user-added repos and local plugin installs still work |
|
||
| Community font repo | `src/io/font_repo.rs:140-152` | `fetch_repo_fonts()` returns `Err` without network (`fetch_repo_fonts_github` kept behind `#[allow(dead_code)]`); custom user-configured font folders still work |
|
||
| Plugin web notice | `src/ui/window/plugin_manager.rs:913-920` | "Download desktop app" button + `DESKTOP_DOWNLOAD_URL` removed; notice text kept |
|
||
| Startup prompt tests | `src/app/startup.rs:195-276` | rewritten for the removed donation prompt (`donation_prompt_is_no_longer_queued`, `automation_sessions_drop_queued_startup_prompts`, trimmed `startup_dialogs_wait_their_turn…`) |
|
||
|
||
Kept-inert upstream URLs (documented, unreachable at runtime):
|
||
`RELEASES_API` / `RELEASES_PAGE` (`src/io/update_check.rs`, dead-gated),
|
||
`DISCUSSIONS_URL` / `FEED_URL` (`src/discussions.rs`, no caller),
|
||
`REGISTRY_URL` (`src/plugin/marketplace.rs`, dead-gated),
|
||
`REPO_API_URL` (`src/io/font_repo.rs`, dead-gated),
|
||
`PLAYLIST_URL` / `watch_url` (`src/videos.rs`, no UI caller),
|
||
Patreon API URLs (`src/patreon.rs`, module never called), and github URLs inside
|
||
`#[cfg(test)]` fixtures (`src/ui/window/plugin_manager.rs`,
|
||
`src/plugin/external.rs`). HTTP `User-Agent` strings (`OpenCADStudio/<ver>`) and
|
||
the Windows single-instance/pipe names are invisible plumbing and were kept.
|
||
|
||
## 4. Functional keys intentionally kept (do not rename)
|
||
|
||
Invisible plumbing shared by persistence/automation code — upstream-compatible
|
||
on purpose:
|
||
|
||
* `opencadstudio.settings` — `src/app/config.rs` (localStorage settings)
|
||
* `opencadstudio.session` — `src/io/web_session.rs` (localStorage web session)
|
||
* `opencadstudio.automation` — `src/app/mod.rs` / control channel
|
||
* `opencadstudio-recent` — `src/io/web_recent.rs` (OPFS recent files)
|
||
* `opencadstudio-autosave` — `src/io/web_autosave.rs` (OPFS crash snapshots)
|
||
* fluent domain `opencadstudio` (`i18n.toml`) + `locales/*/opencadstudio.ftl`
|
||
* SpaceMouse window classes `OpenCADStudio.SpaceMouse.*` (`src/input/spacemouse/`),
|
||
`APP_REGISTRY_NAME` "Open CAD Studio" (`src/io/file_association.rs:189` — must
|
||
match `packaging/windows/main.wxs`, which is out of scope/not shipped),
|
||
`OpenCADStudio` REST/pipe log prefixes (`src/rest.rs`, `src/app/commands/display.rs`).
|
||
|
||
## 5. Logo TODO
|
||
|
||
`assets/logo.svg` is still the distinctive upstream OpenCADStudio mark; it is
|
||
included by the About dialog and used as favicon/splash. Per rebrand rules the
|
||
graphic was **not** touched and no new artwork was invented.
|
||
**TODO (design):** replace `assets/logo.svg` (and the splash accent colors if
|
||
wanted) with a OneCAD Draft mark; the wordmark text around it is already
|
||
rebranded.
|
||
|
||
## 6. Sync instructions (re-applying onto upstream)
|
||
|
||
One paragraph: this fork lives on branch `main` of
|
||
`1b-agent/OneCAD-Draft` (Gitea); upstream is `HakanSeven12/OpenCADStudio`. To
|
||
sync, add upstream as a remote and `git fetch upstream`, then
|
||
`git rebase upstream/main` (or rebase upstream into a fresh integration branch)
|
||
and re-apply this rebrand: every Rust-side edit carries the
|
||
`OneBSpace (OneCAD Draft)` comment tag, so `git rebase` conflicts are resolved
|
||
by re-inserting the tagged lines (brand literals, the `check_for_update` gate,
|
||
the command no-ops, the removed buttons, the SW/manifest strip in
|
||
`web-app.html`, and the deletions of `web/sw.js` / `web/app.webmanifest`);
|
||
locale rebrands are a mechanical
|
||
`sed 's/Open CAD Studio/OneCAD Draft/g; s/OpenCADStudio/OneCAD Draft/g'` over
|
||
`locales/*/opencadstudio.ftl` plus `web/locale-labels.json` / `web/videos.json`
|
||
— re-run it after taking upstream locale changes, then re-verify with:
|
||
`rg -n "Open CAD Studio|OpenCADStudio|patreon|HakanSeven12|reddit|open-aec" src/ui src/app/view src/app/commands src/io locales web`
|
||
expecting only the documented kept-inert hits above.
|