Bento Spaces documentation
Open work
Status: 2026-12-03. This is the live backlog: if an item is not here, it is either built or not agreed. Update this file in the same change that closes an item.
The P0–P6 shelf, shell, widgets, sharing, registries, modules, connectors, automations, surfaces, Studio publishing, WidgetMarket, feedback, reports, notifications and the device-wide zoom are built and covered by node --test tests/*.test.js, scripts/api-smoke.mjs, scripts/billing-smoke.mjs and the 30 browser suites.
Intake and scope rules
- One batch, one scope. Finish the current vertical slice before opening another.
- Out-of-scope ideas are parked, not implemented. Add them under the matching scope below
- with one line of intent and acceptance; do not switch tasks without an explicit request.
- One canonical backlog. This file is the list. Scope docs link here instead of keeping a
- second list that drifts.
- A new scope doc is created only when a section outgrows this file or needs design detail.
- Link it from the index and from this file.
- A slice is done when the code, docs, tests and this backlog are updated in the same commit,
- and the real server is left healthy.
Scope map:
| Scope | Canonical doc |
|---|---|
| Access, tokens, sessions | Domains and surfaces · Security · API |
| Commercial, plans, push, analytics | Commercial · P7 in Roadmap |
| Connectors and bridge | Connectors |
| Studio and publishing | 18 — Studio |
| Widget catalogue | 14 — Widget catalogue |
| UI and interaction | UI |
Inbox (untriaged)
Raw ideas land here with a date and one line. Triage into a scope below before promoting one into the priority order; nothing here is a commitment to build it.
- None yet.
Priority order
- Live Paddle account and sandbox keys (P7)
- Connector and Bento Bridge gaps
- Widget catalogue
- Verification gaps
1. API tokens and the client gate ✅ done (2026-11-29)
Personal Bearer tokens with read/write scopes, optional expiry, hashed at rest and revoked from the account dialog. api-smoke covers create/list/use/read-only/revoke and the shell suite covers the UI. Device-specific rotation policy is still open, but clients can authenticate now.
2. Manage admin session ✅ done (2026-11-29)
The console signs in with an account listed in Manage:Operators; writes send X-Manage-Session: 1 as a CSRF guard. Manage:Token remains for automation. Sign-out uses the normal session, login keeps the account throttle, and api-smoke covers operator, non-operator and machine-token paths.
3. Billing, plans and the publisher plan (P7)
See Commercial and Roadmap.
3a. Plans and entitlements ✅ done (2026-11-29)
PlanCatalog owns Free/Plus/Publisher; /api/me returns entitlements, plan status and readOnly; space and wallpaper limits use it server-side, and a lapsed paid plan keeps its data but is read-only. An operator changes a plan with PUT /api/manage/accounts/{username}/plan. Covered by api-smoke.
3b. Provider adapter and fake checkout ✅ done (2026-11-29)
POST /api/billing/checkout creates a user-bound checkout, the disposable-storage fake provider activates the plan, and POST /api/billing/webhook applies normalized provider events idempotently by eventId. The account dialog offers upgrade/renew buttons when checkout is available. api-smoke and the shell suite cover it.
3c. Paddle adapter ✅ done (2026-11-30)
Paddle is the chosen merchant of record. Billing:Provider=paddle creates a hosted checkout with the API key, verifies Paddle-Signature (HMAC-SHA256 over {ts}:{raw body}, five-minute window) and normalizes subscription.* into the existing event contract. The provider subscription is persisted, so a renewal that carries only the subscription id still resolves the account. Renewals extend the period, past_due is read-only and a cancellation keeps access to the paid period end. scripts/billing-smoke.mjs runs the whole path against a local Paddle mock; api-smoke keeps covering the disposable fake.
3d. Live Paddle account — open
- Put sandbox keys and price ids on a real host, then live ones; point Paddle's notification
- destination at
/api/billing/webhookand give the keytransaction.write+ customer_portal_session.write.
Invoices, receipts, refunds and cancellation now stay in Paddle: the account dialog's Manage billing button asks the server for a short-lived customer-portal session for the account's own customer id. Grandfathering is a policy, not a migration: a new price id does not touch existing subscriptions, and the bought price id is recorded on the subscription.
The paid verified badge is done: /manage still decides verification, but the check only renders while the publisher is on the Publisher plan. A lapse hides the badge and keeps the record.
The go-live check is built: /manage has a Billing card with the provider, sandbox/live, key and webhook state, both price ids, subscription/event counts and a Verify prices call, so a bad price id fails in the console instead of at checkout. The operator steps for the sandbox are in Paddle sandbox runbook.
Acceptance
- A sandbox Paddle checkout activates Plus/Publisher on a real host
- A renewal, a failed payment and a cancellation each change access correctly on Paddle
- ✓Invoices, VAT and refunds stay with the merchant of record (portal link, mock)
- ✓Grandfathering: a new price id leaves existing subscriptions on their price
- ✓A provider checkout activates Plus/Publisher and webhooks renew or lapse it (mock)
- ✓Publisher-plan push only reaches that publisher's published widgets
- ✓Publisher-plan verification shows the badge; a lapse hides it and keeps the record
- ✓Upgrade/downgrade changes entitlements within one request (operator + checkout)
- ✓A lapsed subscription is read-only at 3 spaces and loses no data
4. Push notifications ✅ done (2026-11-29)
Self-hosted Web Push with no third-party SDK: VAPID keys are generated on the host, a browser subscription is stored per device, and release notifications are encrypted per RFC 8291 and sent to every subscribed browser. The bell gains a Browser notifications toggle and a Send test button; the service worker shows the OS notification and focuses Bento Spaces on click. Real delivery was verified in Firefox on macOS against Mozilla's push service.
Acceptance
- ✓A subscribed endpoint receives an encrypted release notification (
api-smokedecrypts it) - ✓A physical browser shows the OS notification (verified in Firefox/macOS against Mozilla's push service, 2026-12-03)
- ✓Unsubscribing stops delivery
- ✓Push is gated by the publisher's plan; a suspended publisher cannot publish, so nothing is sent
- ✓In-app notifications keep working when push is unavailable
5. Publisher analytics ✅ done (2026-11-29)
GET /api/studio/analytics and the Studio section show aggregate installs, version spread and last-install date per publisher widget. Counts come from installed libraries, expose no reader identity, and require the Publisher plan. api-smoke covers the aggregate and the 403 gate.
6. Connector and Bento Bridge gaps
From Connectors:
- ✓The bridge discovery wizard (add, health-check, list
/api/devicesor/api/state) - ✓Pairing codes, bridge self-registration and generated compose/devices/.env files
- ✓The generic HTTP card widget with Home Assistant, Gree and Pi-hole field templates
- ✓A one-image bridge that launches its children itself (
command/args/envper device) - ✓Declarative connector actions behind an explicit
permissions.connector - ✓Declarative connector reads (
data.mode: "connector") behind the same permission - ✓Home Assistant connector (kind,
/api/health and thehaentity widget) - ✓OAuth with PKCE and refresh tokens, provider-agnostic (verified against a local mock)
- ✓Connector health caching (on-demand checks, five-minute cache, dialog badges)
- ✓Home Assistant scenes, scripts, buttons and attributes on the entity widget
7. Studio gaps ✅ done (2026-11-29)
Verification evidence, decision history and module asset uploads are built. Up to five text assets (1–32 KB each, 96 KB total) ride inside the immutable release and reach the module as ctx.asset(name); the Studio editor bundles files into the draft and the validator runs on the client, the server and check-widgets/api-smoke. No Studio gaps remain.
8. Widget catalogue
- ✓Public transport departures (TfL and BVG adapters; a new city is one parser beside them)
- Tier B private widgets (calendar, todo, email, GitHub, Spotify) remain future catalogue work;
- see 14 — Widget catalogue.
9. Verification gaps
- ✓Refresh is configurable per placement (
Refresh…, Default naming the widget's interval, - Off, 30 s–1 h) and stored with the space; the shared timer is unit-tested and the override
- is browser-tested across a reload
- ✓All 30 browser suites pass against disposable storage
- ✓
api-smokeand 150 unit tests pass - ✓
billing-smokedrives a Paddle checkout and signed webhooks against a local mock - ✓Static
/docs(generated fromdocs/*.md), the/developerlanding page, the status - page, the
www301 artifact and HTTPS security configs are in the split release status.bentospaces.comandstaging.bentospaces.comhave their own IIS bindings and- valid certificates (they currently fall through to an expired
publish.releasefor.com - certificate)
- Staging runs its own API and a distinct
Auth:CookieName/Auth:CookieDomain, so it - cannot share the production
.bentospaces.comsession
Parked by request
- Module iframe selection reload. Module widgets are iframe-based, so a selection that
- rebuilds the block DOM still reloads the iframe. Built-in and declarative widgets keep their
- timers and data. The fix is a selection-only DOM patch that never detaches
.blocknodes. - Do not pick this up without an explicit request; it was parked on 2026-11-29.
- Google and Gmail. A Gmail unread card needs an operator-owned Google Cloud project, a
- restricted scope (
gmail.readonly), and either OAuth verification plus a security assessment or - a weekly re-consent because Testing-mode refresh tokens expire in seven days. That is product
- work behind a paid offering, not something a self-hosted Bento Spaces should default to. The OAuth seam
- and declarative connector reads stay and work for any provider; no Google provider ships.
- Parked on 2026-11-30 by request — do not pick it up without an explicit ask.
Recently done (do not reopen)
- Studio publishing, immutable releases, icons, test installs and the personal registry
- WidgetMarket store pages, version history, Suggested curation and live indexes
- Feedback threads, publisher replies, reader reports and the operator queue
- Notifications, the webtop bell and mute groups
- Permission-aware updates, Update all and one version per installed widget
- Device-wide zoom that scales widget contents, the HTML export and module frames
- Widget typography and spacing in em, so every built-in (AC, HTTP, HA, transit, …) scales with zoom
- Direct API + exact CORS:
config.js/apiFetch; the UI hosts no longer proxy/api - Account password change (revokes other sessions) and the operator reset script
- Coming-soon root with the app preview at
/preview, plus Manage tabs - Studio landing state, nav, “sign in and return” refresh, hidden-section fix and a direct
?signin=1handoff from the appAuth:CookieNameso staging can use a separate session cookie on the shared parent domain- Widget mount reuse across selection, zoom, orientation and mode changes
- Countdown timer/blank-state fix, clock minute alignment and the refresh policy
- API tokens with read/write scopes, optional expiry and account-dialog management
- Operator sessions for
/managewith a CSRF header and a machine-token path for automation - Plan entitlements, server-side limits, operator plan changes and lapsed read-only access
- Publisher install analytics with version spread, gated by the Publisher plan
- Provider-agnostic checkout/webhook adapter with a disposable-storage fake and account-dialog upgrades
- Paddle checkout, signed webhooks, subscription persistence and renewal/lapse handling
- A Paddle customer portal link for invoices, payment details and cancellation
- A
Billingcard in/managewith provider readiness and a Paddle price check - The paid publisher badge: operator verification, shown only while the Publisher plan is active
- OAuth connectors: PKCE, single-use state, encrypted access + refresh tokens, refresh before expiry
- A bridge that launches its own children, restarts them and stops them with the container
- Verification evidence, rejection reasons and audit history for publishers and Manage
- Bridge pairing codes with self-registration and generated compose/devices/.env onboarding
- The generic HTTP card widget with dotted-path fields and connector templates
- Cached connector health with refresh-on-open badges in the connectors dialog
- Home Assistant connector kind and the
haentity widget - Self-hosted Web Push: VAPID, subscription management, encrypted release delivery and the service worker
- Module assets bundled into a release and exposed to the sandbox as
ctx.asset(name) - Public transport departures: the
transitwidget with TfL and BVG adapters, mocked upstream tests - Per-placement refresh (
Refresh…): Default/Off/30 s–1 h, stored with the space, shared timer - Real Web Push delivery to Firefox/macOS: content-header fix, a Send test button and visible failures