Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(license): accept the google source and explain a Play-bridged Pro
reviewced59afe7a07
diff --git a/src/core/license.test.ts b/src/core/license.test.tsindex fff60bd89..11bb8302c 100644--- a/src/core/license.test.ts+++ b/src/core/license.test.ts@@ -617,6 +617,20 @@ describe('license detail + release', () => {})})+ it('carries a google source the same way (a Play purchase bridged from a paired Android phone)', async () => {+ storeToken()+ await boot(vi.fn(async () => jsonResponse({ key: null, used: 0, seats: 0, source: 'google' })))++ expect(await detail()).toEqual({ key: null, used: 0, seats: 0, source: 'google', error: null })+ })++ it('still degrades an unknown source word to null', async () => {+ storeToken()+ await boot(vi.fn(async () => jsonResponse({ key: null, used: 0, seats: 0, source: 'huawei' })))++ expect((await detail()).source).toBeNull()+ })+it('a 200 with key null is a success, not the 402 inactive story', async () => {// A keygen policy may hide keys, and licenses predating the `key` column have none stored.// Reporting that as a failure would tell a paying subscriber their license is inactive.diff --git a/src/core/license.ts b/src/core/license.tsindex 50dae440f..fe299b1ea 100644--- a/src/core/license.ts+++ b/src/core/license.ts@@ -115,7 +115,7 @@ function seatsFrom(p: Payload | null): number {* different facts, and rendering the first as the second is the bug this whole route exists for. */const EMPTY_DETAIL: LicenseDetail = { key: null, used: 0, seats: 0, source: null, error: null }-const LICENSE_SOURCES: readonly string[] = ['keygen', 'apple', 'free']+const LICENSE_SOURCES: readonly string[] = ['keygen', 'apple', 'google', 'free']/** The source decides whether the UI offers "release other devices" at all, so an unrecognized* word degrades to "none stated" (action hidden) rather than reaching the renderer as data. */diff --git a/src/renderer/lib/licenseCopy.test.ts b/src/renderer/lib/licenseCopy.test.tsindex 74e31a55b..dee8db69c 100644--- a/src/renderer/lib/licenseCopy.test.ts+++ b/src/renderer/lib/licenseCopy.test.ts@@ -79,6 +79,16 @@ describe('licenseSentence — sources that have no key and no device count', ()expect(s).not.toContain('get in touch')})+ it('says a Google Play subscription bridged Pro here, mirroring the App Store sentence', () => {+ const s = licenseSentence({ key: null, used: 0, seats: 0, source: 'google', error: null })+ expect(s).toBe(+ 'Pro on this computer comes from the Google Play subscription on your paired phone, so there is no license key or device count to show here. That subscription is managed by Google, not by nodeterm: to see when it renews or to cancel it, open the Play Store on that phone and go to Payments & subscriptions → Subscriptions.'+ )+ expect(s).not.toContain('0')+ expect(s).not.toContain('get in touch')+ expect(s).not.toContain('App Store')+ })+it('says plainly that a `free` source is not backed by a key, inventing no origin story', () => {const s = licenseSentence({ key: null, used: 0, seats: 0, source: 'free', error: null })expect(s).toBe('Pro on this device is not backed by a license key.')@@ -203,6 +213,9 @@ describe('canReleaseDevices', () => {expect(canReleaseDevices({ key: null, used: 0, seats: 0, source: 'free', error: null })).toBe(false)+ expect(canReleaseDevices({ key: null, used: 0, seats: 0, source: 'google', error: null })).toBe(+ false+ )})it('is false when no source was stated — an unknown source HIDES the action', () => {diff --git a/src/renderer/lib/licenseCopy.ts b/src/renderer/lib/licenseCopy.tsindex c28f4e064..102052bf0 100644--- a/src/renderer/lib/licenseCopy.ts+++ b/src/renderer/lib/licenseCopy.ts@@ -80,6 +80,11 @@ export function licenseSentence(detail: LicenseDetail | null): string {// subscription, and a user who wants to know when it renews has only one place to look.return `Pro on ${thisMachine()} comes from the App Store subscription on your paired phone, so there is no license key or device count to show here. That subscription is managed by Apple, not by nodeterm: to see when it renews or to cancel it, open the App Store on that phone and go to Subscriptions in your account.`}+ if (detail.source === 'google') {+ // The Play twin of the App Store branch above, for the same reasons: the zeros are "not+ // applicable", and the term is managed by Google — we cannot renew, extend or cancel it.+ return `Pro on ${thisMachine()} comes from the Google Play subscription on your paired phone, so there is no license key or device count to show here. That subscription is managed by Google, not by nodeterm: to see when it renews or to cancel it, open the Play Store on that phone and go to Payments & subscriptions → Subscriptions.`+ }if (detail.source === 'free') {// A defensive value. Say only what is certain — where it came from is not.return 'Pro on this device is not backed by a license key.'diff --git a/src/shared/types.ts b/src/shared/types.tsindex 7023157cf..dbb4520fa 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -3775,12 +3775,13 @@ export interface LicenseStatus {/*** Where the entitlement behind this install came from. A verified entitlement's licenseId is NOT- * always a keygen license id: an App Store purchase on a paired phone bridges Pro to the desktop- * and mints `apple:<txn>`, and `free:` exists too. For those the server makes zero keygen calls- * and answers `key: null, used: 0, seats: 0` — genuinely "device counting does not apply here",- * which is a different fact from a failed read and from a keygen license with no devices yet.+ * always a keygen license id: a store purchase on a paired phone bridges Pro to the desktop and+ * mints `apple:<txn>` (App Store) or `google:<orderId>` (Google Play), and `free:` exists too. For+ * those the server makes zero keygen calls and answers `key: null, used: 0, seats: 0` — genuinely+ * "device counting does not apply here", which is a different fact from a failed read and from a+ * keygen license with no devices yet.*/-export type LicenseSource = 'keygen' | 'apple' | 'free'+export type LicenseSource = 'keygen' | 'apple' | 'google' | 'free'/** What Settings → License shows: the key to copy and how much of the device cap is in use.* A failed read is an ERROR, never "0 devices" — the two are different facts. */