You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,22 @@ All notable changes are documented here. The project uses [Semantic Versioning](
8
8
-**0.0.2** - Quote flow, public messaging, and theming release
9
9
-**0.0.3** - Pricing controls, reusable policies, and UX polish release
10
10
-**0.0.4** - Startup stability hotfix release
11
+
-**0.0.5** - In-app updater and extension fallback import release
12
+
13
+
---
14
+
15
+
## [0.0.5] - 2026-03-23
16
+
17
+
### Added
18
+
-**Packaged in-app updater endpoints** - New authenticated routes `GET /api/updates`, `GET /api/updates/releases`, and `POST /api/updates/apply` provide current-version status, GitHub release listing, and package-aware release installation.
19
+
-**Settings update console** - Settings now includes an Updates card with version status, release picker, "What's New" body preview, install trigger, and restart health polling.
20
+
-**Extension JSON fallback import** - Import page adds an **Extension JSON** tab so scraped extension payloads can be pasted and imported directly.
21
+
-**Bulk item ingestion route** - `POST /api/items/bulk-upsert` now supports extension fallback import with create/update counts in one request.
22
+
23
+
### Changed
24
+
-**Extension connectivity model** - Extension popup now stores a configurable server URL, and extension sync requests use that stored target instead of a hardcoded localhost API endpoint.
25
+
-**Extension recovery behavior** - Background sync now always saves the last scraped payload so the popup can export JSON even when network sync fails.
26
+
-**Extension download URL resolution** - ExtensionPage download action now respects `VITE_API_BASE` instead of relying on a hardcoded absolute localhost URL.
@@ -21,10 +21,12 @@ BadShuffle is a self-hosted event rental software platform for quoting, inventor
21
21
-**Domain complexity** — Availability conflicts, per-line pricing overrides, reusable rental/payment policies, and public quote signing target actual event-rental workflows.
22
22
-**Deployment pragmatism** — Run it locally, on a LAN, in Docker, or as packaged Windows executables.
23
23
24
-
## What’s New In v0.0.4
24
+
## What’s New In v0.0.5
25
25
26
-
-**Fresh-start inventory stability** — Fixed a blank-page crash when no items exist by removing an undefined empty-state reference in `ItemGrid`.
27
-
-**Startup fetch resilience** — `InventoryPage` now safely handles transient `getItems` failures during sql.js initialization and falls back to an empty list.
26
+
-**In-app updater (packaged builds)** — Settings now has an Updates panel that checks GitHub releases, shows release notes, and installs a selected version with restart detection.
27
+
-**Authenticated update API** — Added `/api/updates`, `/api/updates/releases`, and `/api/updates/apply` for release status/list/install flows.
28
+
-**Extension recovery workflow** — Chrome extension now supports custom server URL configuration, keeps the last scraped items, and can export them as JSON if direct sync fails.
29
+
-**Manual extension JSON import** — Import page adds an Extension JSON tab, backed by `POST /api/items/bulk-upsert` for fast create/update ingestion.
28
30
29
31
## Core Features
30
32
@@ -33,7 +35,7 @@ BadShuffle is a self-hosted event rental software platform for quoting, inventor
Copy file name to clipboardExpand all lines: ai/ARCHITECTURE.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
-**Monolith:** Single Node.js server (Express) and single React SPA. No microservices.
6
6
-**Database:** SQLite via **sql.js** (WASM). Synchronous API; DB persisted to `badshuffle.db` after every write (see `db.js``_save()`). Path is pkg-aware (next to exe when packaged).
7
7
-**Auth:** JWT (Bearer). Role stored in DB and fetched via `GET /api/auth/me`; not embedded in JWT so role changes take effect on next page load.
8
-
-**Optional services:** IMAP polling (emailPoller) for inbound replies; startup update check (GitHub releases API). Both are optional and fail gracefully.
8
+
-**Optional services:** IMAP polling (emailPoller) for inbound replies; startup update check (GitHub releases API). In packaged builds, authenticated update-install routes are also available. All update behavior is designed to fail gracefully.
Copy file name to clipboardExpand all lines: ai/CURSOR_BRIEFING.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,22 @@
1
-
# Cursor Briefing — BadShuffle (as of 2026-03-19)
1
+
# Cursor Briefing — BadShuffle (as of 2026-03-23)
2
2
3
3
## What this project is
4
4
5
5
BadShuffle is a self-hosted inventory and quoting tool for event rental businesses. It runs as two local Windows executables (server + client), or via Docker. Stack: Node/Express + sql.js SQLite on the back end, React + Vite on the front end.
6
6
7
-
## Current state: v0.0.4 (latest release)
7
+
## Current state: v0.0.5 (latest release)
8
8
9
9
Latest release:
10
10
11
11
```
12
-
release: v0.0.4 — startup stability hotfix for fresh installs and slow-device initialization paths
-**In-app packaged updater** — Added authenticated update routes (`/api/updates`, `/api/updates/releases`, `/api/updates/apply`) and a Settings UI to check releases, inspect notes, install a chosen tag, and auto-reload after restart.
17
+
-**Extension sync resilience** — Extension now supports configurable server URL, stores the last scraped payload in local storage, and exposes a one-click JSON export fallback in the popup.
18
+
-**Manual fallback import path** — Import page now has an Extension JSON tab that parses extension payloads and bulk upserts via `POST /api/items/bulk-upsert`.
19
+
15
20
### What shipped in v0.0.4
16
21
-**Inventory empty-state crash fix** — Removed an undefined `search` reference in `ItemGrid` that could throw when the inventory list was empty.
17
22
-**Startup rejection handling** — `InventoryPage` now catches failed `getItems` calls during sql.js startup and degrades gracefully.
Copy file name to clipboardExpand all lines: ai/FEATURES.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ All features below are implemented unless marked as stub or partial.
16
16
## Quote Item Management
17
17
18
18
- Add/update/remove line items (inventory items) on a quote: quantity, label, sort_order. PATCH for hidden_from_quote.
19
+
-**Bulk upsert ingestion:**`POST /api/items/bulk-upsert` accepts `{ items: [...] }` and create/updates by case-insensitive title (used by Extension JSON fallback import).
19
20
-**Hide from quote:**`quote_items.hidden_from_quote` — item stays on quote for internal/operations but excluded from client-facing totals and public view. Toggle in QuoteBuilder.
20
21
-**Zero-quantity removal behavior:** Updating a quote item or custom item with `quantity = 0` removes the line and logs activity.
21
22
-**Logic location:**`server/routes/quotes.js` (POST/PUT/DELETE quote items and custom items), `client/src/components/QuoteBuilder.jsx`.
@@ -108,6 +109,14 @@ All features below are implemented unless marked as stub or partial.
108
109
-**Public message thread:** GET/POST `/api/quotes/public/:token/messages` for client-visible conversation history and message posting from the public quote page.
109
110
-**Logic location:**`server/index.js` and `server/api/v1.js` (public route), `client/src/pages/PublicQuotePage.jsx`.
110
111
112
+
## In-App Updates (Packaged Builds)
113
+
114
+
-**Status/list/apply API:** Authenticated routes `GET /api/updates`, `GET /api/updates/releases`, and `POST /api/updates/apply` expose current version, GitHub release data, and packaged install workflow.
115
+
-**Asset swap/restart flow:** Applying an update downloads release assets (`badshuffle-server.exe`, `badshuffle-client.exe`, `www.zip`), writes `_update.bat`, exits current process, and relaunches server after swap/extract.
116
+
-**Dev-mode guardrail:** Update install route returns an explicit error in non-packaged/dev mode.
117
+
-**Settings UI:** Settings page includes update status badge, release picker, release notes preview, install action, and health polling until restart completes.
-**Not implemented.** No pull_sheets table, no routes, no UI. Operations workflow (order → pull sheet → warehouse → load → delivery) is not in the codebase.
@@ -162,10 +171,10 @@ All features below are implemented unless marked as stub or partial.
162
171
-**Dashboard:** GET `/api/quotes/summary` (byStatus, revenueByStatus, upcoming, byMonth). DashboardPage. Also Conflicts and Subrental Needs panels (see Availability & Conflict Detection).
163
172
-**Presence:** PUT/GET `/api/presence` — in-memory “who’s online” and path. Client reports path on route change; Sidebar can show team online.
164
173
-**AI suggest:** POST `/api/ai/suggest` (OpenAI) for item suggestions; AISuggestModal on quote.
165
-
-**Extension:** Download extension ZIP (public); extension tokens for API (admin). ExtensionPage.
166
-
-**Import:** Inventory from CSV/XLSX/Sheets (sheets.js); leads from CSV/XLSX/Sheets with column mapping (leads preview/import). ImportPage.
174
+
-**Extension:** Download extension ZIP (public); extension tokens for API (admin); configurable server URL in popup; JSON export fallback from cached scraped payload when sync fails.
175
+
-**Import:** Inventory from CSV/XLSX/Sheets (sheets.js); leads from CSV/XLSX/Sheets with column mapping (leads preview/import); Extension JSON import tab for pasted payloads.
-**Settings:** Company, tax, currency, SMTP/IMAP; `count_oos_oversold`; AI provider keys (Claude, OpenAI, Gemini) and per-feature enable/model settings; `ui_theme`, `google_places_api_key`, `map_default_style`; `ui_scale` (75–150%, applied as root font-size). SettingsPage (operator).
177
+
-**Settings:** Company, tax, currency, SMTP/IMAP; `count_oos_oversold`; AI provider keys (Claude, OpenAI, Gemini) and per-feature enable/model settings; `ui_theme`, `google_places_api_key`, `map_default_style`; `ui_scale` (75–150%, applied as root font-size); updates panel for packaged install flow. SettingsPage (operator).
169
178
-**UI Scale:** Range slider 75–150% (step 5) in SettingsPage. Applies immediately via `document.documentElement.style.fontSize = (scale/100)*14 + 'px'`. Persisted to `localStorage` (`bs_ui_scale`) and loaded by `main.jsx` before first render.
170
179
-**Quote tile borders:**`QuoteCard.jsx` shows colored left border by status — draft=yellow, sent=blue, approved/confirmed/closed=green, conflict or unsigned changes=red.
171
180
-**Conflict stop sign:** SVG uses `<line>` + `<circle>` for a visible white ! on the red octagon. Present in QuoteCard, QuoteBuilder, QuotePage.
0 commit comments