Skip to content

Commit 5a97627

Browse files
committed
v2.40.0 — Tiger Studio in the browser (tigersystem.io/studio) with one sign-in, installable as an app, always on the desktop's version; low-stock alerts keep their photo on every device
1 parent 4c26a4f commit 5a97627

11 files changed

Lines changed: 272 additions & 26 deletions

File tree

‎.github/workflows/web-sync.yml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Web sync
2+
3+
# Tiger Studio Web (tigersystem.io/studio) and the desktop app must ALWAYS be on
4+
# the same version. Both follow the published "latest" GitHub Release: the
5+
# desktop auto-updater installs it, and the Hub builds it into /studio on every
6+
# deploy (TigerTag_Hub → scripts/fetch-studio-web.mjs). The moment a release is
7+
# PUBLISHED (drafts don't count — that is when desktops start updating), this
8+
# triggers a Hub production deploy, then waits until the live site serves that
9+
# exact version, and fails loudly if it doesn't — a red run here means desktop
10+
# and web are out of sync.
11+
#
12+
# Secret: HUB_DEPLOY_HOOK_URL — the Vercel deploy hook "studio-release" of the
13+
# tiger-tag-hub project (Settings → Git → Deploy Hooks, branch main).
14+
15+
on:
16+
release:
17+
types: [published]
18+
workflow_dispatch:
19+
20+
jobs:
21+
deploy-web:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
steps:
25+
- name: Trigger the Hub deploy (builds this release into /studio)
26+
env:
27+
HOOK: ${{ secrets.HUB_DEPLOY_HOOK_URL }}
28+
run: |
29+
test -n "$HOOK" || { echo "::error::HUB_DEPLOY_HOOK_URL secret is missing"; exit 1; }
30+
curl -fsS -X POST "$HOOK" > /dev/null
31+
echo "Hub deploy triggered"
32+
33+
- name: Wait until tigersystem.io/studio serves this version
34+
env:
35+
TAG: ${{ github.event.release.tag_name }}
36+
run: |
37+
if [ -z "$TAG" ]; then # manual run: the current latest release
38+
TAG=$(curl -fsSI "https://github.com/${{ github.repository }}/releases/latest" \
39+
| tr -d '\r' | sed -n 's#^[Ll]ocation: .*/releases/tag/##p')
40+
fi
41+
want="${TAG#v}"
42+
for i in $(seq 1 60); do
43+
live=$(curl -fsS "https://tigersystem.io/studio/version.json?t=$(date +%s)" 2>/dev/null \
44+
| sed -n 's/.*"version": *"\([^"]*\)".*/\1/p')
45+
echo "live=${live:-none} release=$want"
46+
[ "$live" = "$want" ] && { echo "Web and desktop are both on $want"; exit 0; }
47+
sleep 20
48+
done
49+
echo "::error::tigersystem.io/studio serves ${live:-nothing} but the release is $want — web and desktop are out of sync"
50+
exit 1

‎CHANGELOG.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ Versions follow [Semantic Versioning](https://semver.org/).
55

66
---
77

8+
## v2.40.0 — 2026-10-12
9+
10+
### Added
11+
- **Tiger Studio Web** — the renderer runs in a browser at `https://tigersystem.io/studio` (`studio.tigersystem.io` redirects there), from the same code as the desktop app. No bundler, no fork: `scripts/build-web.mjs` (`npm run web:build` / `web:serve`, `--out`, `--base`) copies `renderer/`, `data/` and a filtered `assets/` into a static folder whose `index.html` is `renderer/inventory.html` with an injected `<base href="<base>renderer/">`, so every relative URL resolves as on desktop. The Hub (TigerTag_Hub, Next.js on Vercel) builds the published latest Studio release into `public/studio/` at `prebuild` and serves it on its own origin. Docs: `docs/WEB_DEPLOYMENT.md`, `docs/STUDIO-WEB-PLAN.md`.
12+
- `renderer/web-bridge.js` — a browser `window.electronAPI` (`isWeb: true`) implementing what a browser can: `openExternal` (`window.open`), `getAppInfo` (`platform: "web"`), `lookupProduct` / `refreshApiData` / `fetchCatalogAll` (direct calls to `api.tigertag.io`, which answers CORS; one retry on the catalogue, whose upstream hiccups come back without CORS headers), `downloadImage` (anchor download). Inert in Electron (preload already defined `electronAPI`).
13+
- `HAS_NATIVE` (`!!electronAPI && !electronAPI.isWeb`) replaces every "electronAPI exists" desktop check (RFID encode/burn/update modals, chip banners, the toolbox chip block, the RFID listener block). Never test `!!window.electronAPI` for "desktop" any more.
14+
- `data-desktop-only` + `html.is-web` rule hide NFC readers bar and tester, TD1S, the updater (card, icon, banner), the printer views (`setViewMode` falls back to `grid` on web) and camera detach; `data-web-only` is the mirror rule.
15+
- **One sign-in with the Hub** — Studio and the Hub share the `tigersystem.io` origin and the same Firebase API key, so the DEFAULT app holds the Hub's session: with no Studio account yet, `_adoptSharedWebSession` copies that user (verified address or Google) into the account's named app. On the web the sign-in flows no longer sign the DEFAULT app out, and `fbSignOut` ends it only when it is the same account.
16+
- Friend link on the web: `?friend=XXX-YYY` pre-fills Add-friend (then dropped from the address), like `tigertag://friend/…` on desktop.
17+
- **Installable as an app (PWA)** — the web build writes `manifest.webmanifest` (scope and `start_url` = the served folder without trailing slash, standalone, `assets/favicon/icon-192/512.png`) and the iOS home-screen tags. `web-bridge.js` keeps Chrome's `beforeinstallprompt`; the sidebar **Install the app** button (`#sbInstallBtn`, `data-web-only`, hidden until installable or on iOS) replays it, or on iPhone/iPad unfolds the Share → Add to Home Screen hint; hidden once installed (`display-mode: standalone`). Deliberately no service worker.
18+
- **No version drift between desktop and web** — both follow the published "latest" GitHub Release. `.github/workflows/web-sync.yml` (on `release: published`) calls the Hub's `studio-release` Vercel deploy hook (`HUB_DEPLOY_HOOK_URL` secret) and waits until `tigersystem.io/studio/version.json` equals the release, failing the run otherwise. The Hub's `fetch-studio-web.mjs` resolves the latest release from github.com's `/releases/latest` redirect, asserts the built version equals the tag and fails the build on any mismatch (the live site keeps its version). An open web page or installed app compares `version.json` with its own version when it comes back into view (≤ every 10 min) and reloads onto the new release, unless a window is open or a field focused.
19+
20+
### Fixed
21+
- **Low-stock notifications** stored `cdnImg(resolvedImg(url))` — the desktop's local `/img-cache/<md5>` path — in `users/{uid}/notifications`, so the photo was a 404 on the account's other devices and on the web. They now store the public CDN URL; the web skips the old local paths.
22+
- FlashForge / Snapmaker / Creality background pings (`setInterval` 30 s at module load) threw `ctx.getState().printers is not iterable` while signed out.
23+
24+
### i18n
25+
- Added: `sbInstallBtn`, `installIosHint` — 11 locales.
26+
27+
---
28+
829
## v2.39.0 — 2026-10-12
930

1031
### Added

‎FEATURES.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tiger Studio Manager — Feature Catalogue
22

3-
Tiger Studio Manager is the Electron desktop companion to the TigerTag ecosystem: a filament-inventory manager built around RFID/NFC-tagged spools ("TigerTag" chips), a fully-digital "TigerData" tier (and its catalogue-identified "TigerData+" rung), live 3D-printer integration across seven brands, physical storage/rack management, a Firebase-backed social layer (friends, shareable wishlists, public profiles), and companion hardware (TD1S color sensor, TigerScale, TigerSpool printer reader, TigerPOD dual-reader stand). This document catalogues every **shipped** feature, grouped by domain, current as of **v2.39.0**. Per-version release detail lives in `CHANGELOG.md`; forward-looking / in-progress work lives in `ROADMAP.md`.
3+
Tiger Studio Manager is the Electron desktop companion to the TigerTag ecosystem: a filament-inventory manager built around RFID/NFC-tagged spools ("TigerTag" chips), a fully-digital "TigerData" tier (and its catalogue-identified "TigerData+" rung), live 3D-printer integration across seven brands, physical storage/rack management, a Firebase-backed social layer (friends, shareable wishlists, public profiles), and companion hardware (TD1S color sensor, TigerScale, TigerSpool printer reader, TigerPOD dual-reader stand). This document catalogues every **shipped** feature, grouped by domain, current as of **v2.40.0**. Per-version release detail lives in `CHANGELOG.md`; forward-looking / in-progress work lives in `ROADMAP.md`.
44

55
---
66

@@ -285,6 +285,14 @@ Live integrations across seven brands, each with real-time temperatures, per-slo
285285
- RFID Data debug surface in the Add Product panel, gated to debug-enabled accounts (v1.4.12).
286286
- Diagnostic report generator (last 50 errors + environment) (v1.4.1).
287287

288+
## Tiger Studio Web
289+
290+
- **Studio in the browser** at `tigersystem.io/studio` (`studio.tigersystem.io` redirects): inventory, racks, favourites, lists, catalogue, friends, notifications and settings from the same code as the desktop app; hardware features (NFC readers, TD1S, USB scale, printers, cameras, updater) stay desktop-only (v2.40.0).
291+
- **One sign-in with tigersystem.io** — signed in on the site means signed in in Studio Web (v2.40.0).
292+
- **Installable as an app (PWA)** — "Install the app" in the sidebar (Chrome / Edge / Android), Add-to-Home-Screen hint on iPhone / iPad (v2.40.0).
293+
- **Always the same version as the desktop app** — the web follows the published release and an open page reloads onto a new one (v2.40.0).
294+
- Friend links (`?friend=CODE`) pre-fill Add-friend on the web (v2.40.0).
295+
288296
## Distribution, auto-update & installers
289297

290298
- Auto-update via `electron-updater` / GitHub Releases, with a Settings toggle (enable/disable + "Check now") (v1.4.4).

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ A QR code to download the mobile app is always accessible in the sidebar.
255255
- **Read-only** and local: the assistant can look, never change; passwords and keys are never shared
256256
- **From the web and your phone too**: Claude.ai, ChatGPT and their mobile apps connect online with one address — no Studio running — and *My profile* lists them with a button to cut access
257257

258+
### 🌐 Tiger Studio Web
259+
- The same Studio **in your browser** at **[tigersystem.io/studio](https://tigersystem.io/studio)** — computer, tablet, nothing to install
260+
- Same account, same data; signed in on tigersystem.io means signed in here
261+
- **Install it as an app** from the sidebar (Chrome, Edge, Android) or *Add to Home Screen* on iPhone / iPad
262+
- Always on the same version as the desktop app; NFC readers, sensors and printers stay desktop-only for now
263+
258264
### 🌗 Dark & Light
259265
- **Dark by default**, Light one click away in *Edit profile → Theme*
260266
- Your choice follows your account onto every machine you sign in from

‎WORKLOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Tiger Studio Web — deployment guide (architecture, what works on the web, Hub/Vercel/DNS/Firebase setup) — `docs/WEB_DEPLOYMENT.md`
1010
- Tiger Studio Web — static build `npm run web:build` (`--out`, `--base /studio/`) → `dist-web/` with the app page at the root via `<base>`; `npm run web:serve` to try it locally — `scripts/build-web.mjs`, `package.json`, `.gitignore`
1111
- Tiger Studio Web — installable as an app (PWA): the web build ships a manifest (scope = the served folder, standalone, the app icons) and the home-screen tags iOS reads; an "Install the app" sidebar button appears only when the browser can install it (replays Chrome/Edge/Android's install prompt, unfolds the Share → Add to Home Screen hint on iPhone/iPad), hidden once installed; no service worker on purpose (no stale offline copy after a release) — `scripts/build-web.mjs`, `renderer/web-bridge.js`, `renderer/inventory.js`, `renderer/inventory.html`, `renderer/css/00-base.css` (`data-web-only`), `renderer/css/10-settings.css`
12+
- Tiger Studio Web — never drifts from the desktop app: `web-sync.yml` (release published → Hub deploy hook → waits for `tigersystem.io/studio/version.json` to match, red run otherwise); an open page or installed app reloads onto a new version when it comes back into view — `.github/workflows/web-sync.yml`, `renderer/web-bridge.js`, `docs/WEB_DEPLOYMENT.md`
1213

1314
## Changed
1415

‎data/release-notes/v2.40.0.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Tiger Studio now runs in your browser. Open **tigersystem.io/studio** on any computer or tablet, sign in with your usual account, and your whole stock is there — and you can install it like an app.
2+
3+
## Added
4+
5+
- Tiger Studio in the browser at tigersystem.io/studio (studio.tigersystem.io works too): inventory, storage, lists, catalogue, friends and settings, with the same account and data as the desktop app. Already signed in on tigersystem.io? Studio recognises you.
6+
- Install the browser version as an app: an "Install the app" button in the sidebar on Chrome, Edge and Android; on iPhone and iPad it shows how to add Studio to the Home Screen.
7+
- The browser version always matches the latest desktop release, and an open page switches to a new version by itself.
8+
- Friend links open the Add-friend window in the browser version too.
9+
10+
NFC readers, TD1S, USB scales, printer control and cameras stay in the desktop app for now.
11+
12+
## Fixed
13+
14+
- Fixed an issue where a low-stock alert showed no spool photo on any device other than the computer that created it.
15+
- Fixed an error that repeated in the background every 30 seconds while signed out.
16+
17+
---
18+
19+
📖 **[Full changelog](https://github.com/TigerTag-Project/TigerTag-Studio-Manager/blob/main/CHANGELOG.md)** · ⬇️ Grab the installer for your OS from the **Assets** below (macOS `.dmg`, Windows `Setup .exe` or `portable .exe`, Linux `.AppImage`).

0 commit comments

Comments
 (0)