* feat(auth): sync an existing OpenDesign session into hosted Studio
Hosted Studio signs in through the OpenDesign account service, but a visitor
already signed in to OpenDesign still had to sign in again (and was offered
Google One Tap) when opening Studio.
On the first signed-out account read of a page load, Studio now keeps the
page visible, shows a syncing avatar, holds Google One Tap and runs one
`prompt=none` sign-in in a hidden same-origin frame:
- With an OpenDesign session the callback sets the Studio session cookie,
the account is read again and the avatar appears without navigation.
First-time visitors get their Studio account created by the callback.
- Without one, or after 5 seconds, Studio shows its normal signed-out state
and Google One Tap may prompt as before.
- The frame lands on a tiny `/auth/silent-complete` page. A state-bound
HttpOnly cookie marks the silent attempt so the callback returns quietly
(`od_sso=miss`) instead of `auth_cancelled=1` or an error response, and a
concurrent interactive sign-in keeps its normal behaviour.
- The sync never runs mid-session, in local Studio, the desktop shell,
embedded frames or for automated agents.
Signing out of Studio stays product-local: it opts the browser out of the
sync and of Google One Tap until the user signs in again, and the header now
publishes the signed-out account before private caches are cleared so the
page switches in one render instead of flashing.
Sign-in tracking reports these attempts with `source_detail=silent_sync`
(success with sync duration, cancelled when there is no OpenDesign session,
failure otherwise).
* fix(auth): isolate silent sign-in from interactive OIDC transactions
A background prompt=none attempt shared the om_oidc_tx / om_auth_attr
cookies with interactive sign-in, so an ordinary Studio visit in one tab
could overwrite or clear the transaction of a sign-in in flight in
another tab and leave that tab on a 401 error page.
- Silent attempts carry an `s.` state prefix, so the callback classifies
them from the query alone, even after their cookie expired.
- Their transaction secret, return path and attribution live in a
state-named cookie (om_oidc_silent_<hash>, 120s); the silent login and
callback never write or clear the shared interactive cookies, and the
interactive callback never clears a pending silent cookie.
- Cover both two-tab orderings, interactive cancel during a pending
silent attempt, an expired silent cookie and a forged return path.
* fix(auth): keep the OpenDesign session on a hosted Studio sign-out
OPEND-6189 REQ-03 (AC5): signing out of Studio signs out of Studio only;
the OpenDesign website stays signed in. /auth/logout called the IdP
end-session endpoint for every session with a cached id_token, which
deleted the upstream OpenDesign session by `sid`.
- Browser sessions no longer end the upstream session on logout; the
cached id_token is still dropped.
- Desktop-client sessions keep the OPEND-5726 behavior: the desktop
handoff exchange marks the session, and only marked sessions call
end-session (best effort, never exposed to the client).
- Tests: hosted logout makes no end-session call and still revokes the
local session; marked desktop sessions still end the upstream session
and tolerate upstream failures.
Antigravity now reads user MCP servers only from
~/.gemini/config/mcp_config.json; the legacy
~/.gemini/antigravity/mcp_config.json path is ignored after migration, so
desktop "connect Antigravity" wrote an entry the client never loaded.
- signed config (default, test, stable): antigravity_mcp now targets
.gemini/config/mcp_config.json
- local config atom: read Antigravity's legacy `serverUrl` key as the entry
URL so entries added by `agy mcp add` are not misreported as local stdio
conflicts, and normalise it to `url` when rewriting
- install.md: add an Antigravity row and authorization guidance. OAuth is
only started from the client UI (`/mcp` -> openmotion -> Authenticate or
IDE MCP Servers); headless `agy -p` silently omits unauthorized servers,
which led agents to loop on headless checks instead of asking the user to
authenticate
* fix(studio,auth): surgical dogfooding fixes for P1-21, P0-07, P1-13, and P1-17
* feat(game): restore OpenGame Studio landing hero, composer controls, and strategy genre
* feat(game): restore template market search, leaderboards, and community strategy games
* chore(game): sync 262 updated game template covers from opengame
* feat(game): add 27 missing community games for Fable 5.2 prerequisite
* feat(game): add Claude Fable 5.2 game hub and spotlight banner for Stage 1 cloud
* feat(studio,cloud): add Plus upgrade badge in media model pickers with server entitlement check
* feat(studio): adapt Black Friday launch modal to OpenGame flagship image offer
* fix(game,studio): consume requested game navigation, label official templates on leaderboards, and gate Fable hero video on viewport visibility
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* feat(studio): align Account settings hierarchy and account popover quota/balance
Reorganize the Settings Account and Subscription & usage views and port the top-right account menu balance/quota presentation from opengame/openmotion#981:
- Show plan tier under the user name, remaining Design Plan quota bar (or wallet balance fallback), and the round avatar quota ring in ApplicationAccountMenu, with focus/visibility billing refresh.
- Remove the duplicate Personal workspace and Personal access tokens entries from the top-right account popover.
- Place the upgrade banner and Connected to OpenDesign summary (with compact plan & available balance chips and a Subscription & usage jump button) at the top of Settings > Account, above Model gateway, multi-workspace switching, Connected applications, and PAT.
- Deduplicate Account vs Subscription & usage tabs so the full PlanUsagePanel lives only on Subscription & usage without a redundant Manage subscription link, and hide the Workspaces section for single-workspace accounts.
- Add a best-effort parallel billing/snapshot read in OpenDesignModelGateway.getBillingSummary to expose tightest 5h/7d Design Plan quota without degrading plan or balance when unavailable.
* fix(billing): derive OpenDesign console and pricing URLs from deployment origin
* fix(workspace): sync media model catalog and entitlement state on workspace switch
* fix(studio): polish boot copy, Super Agent placeholder, MCP hero badge, and parameter help
Port remaining launch-review UX fixes onto main:
- Localize the pre-i18n boot loading copy in studio/index.html to OpenDesign.
- Remove the green background override on .om-mcp-h1-od so the OpenDesign badge matches the client badge family.
- Simplify the static Super Agent coming-soon card to one plain sentence and two actions, updating RouteViewport, styles, 10-locale copy, and GameStage1 tests.
- Clarify the Advanced parameters JSON helper text and unify the OpenGame template count to 274+ on the MCP page.
- Tighten vertical spacing on the Skills section heading.
* fix(cloud,studio): gate billing snapshot quota fetch, move url test to cloud suite, deduplicate plan labels, and drop SuperAgent hunks
- Add includeQuota option (default false) to getBillingSummary and pass includeQuota: true only in /motion-api/account/summary so /motion-api/models/status skips /billing/snapshot.
- Bound /billing/snapshot requests to 1500ms and fall back silently to null on timeout or error, with unit and route tests covering both skipping and timeout fallback.
- Move tests/opendesign-urls.test.ts to tests/cloud/opendesign-urls.test.ts so it runs in test:cloud and typecheck:cloud and satisfies ci-scope.test.mjs.
- Extract isDisplayablePlan and extend planLabel in studio/src/motion/BalanceEntry.tsx for reuse in AccountSettings and ApplicationChrome.
- Strip SuperAgentPromptPage hunks from this PR so #1226 lands without conflicts while keeping the 274+ template label on McpConnectionPage.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
Scope the IP boundary in skills/openmotion-game/SKILL.md to external scraping and scratch third-party IP generation so official catalog starter archives are not refused or silently substituted during the 10-second local unpack fast path.
Update the Stage 1 official template remix prompt and MCP auto-routing preamble to:
- frame Step 1 explicitly as mechanical download, SHA-256 verification, and local extraction of the catalog-hosted starter ZIP for local study and baseline play
- forbid silently discarding the template or substituting a scratch-built game
- handle first-time MCP OAuth sessions where openmotion_* tools have not hot-reloaded yet via install.md Step 3.2 session handoff and the public read-only /motion-api/games/:id catalog fallback
- align the get_template localWorkflowHint response accordingly
* feat(mcp): expose OpenGame catalog as OpenDesign Kernel v2 opendesign_catalog
Replace the public openmotion_game_catalog and openmotion_game_asset_search
tools with opendesign_catalog (kind=templates|kits|models_2d|models_3d|workflows,
studio=game), aligned with the Kernel v2 catalog in the opengame repository.
- Keep both former names dispatchable as hidden compatibility aliases with
their original schemas; they no longer appear in tools/list.
- Publish game workflow guides as opendesign://workflow/game/*; openmotion://
and motion:// remain readable.
- Update remix/connect prompts, MCP handbook copy, Skills, install guide and
docs; registered phase-one names go from 24 to 23.
- Keep the catalog out of the in-page WebMCP surface as before.
* test(mcp): allow the Kernel v2 opendesign_catalog in public name discovery
* Revert "feat(studio): bring the OpenGame Explore refresh to OpenMotion (#1215)"
This reverts commit b6013a034d.
* Revert "feat(game): complete the community tower defense catalog (#1216)"
This reverts commit bf7655d3ae.
* Revert "feat(game): add the OpenGame Leaderboards tab to the Game Studio market (#1214)"
This reverts commit b580799767.
* Revert "feat(game): sync the Game Studio template market with OpenGame (#1213)"
This reverts commit 6db5886145.
* Revert "feat(game): add the strategy (tower defense) genre (#1212)"
This reverts commit 31ab369071.
* Revert "feat(game): port OpenGame composer option pickers (#1211)"
This reverts commit 6d7d3a9091.
* Revert "fix(opengame-ui): label the docked playable-ad switch like the landing switch (#1210)"
This reverts commit 0a0e36bd1b.
* Revert "feat(opengame-ui): port the OpenGame Game Studio landing hero (#1209)"
This reverts commit 41d3c6bfc3.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* Revert "feat(studio): after a paid-path sign-in, open the plans dialog directly (stacked on #1187 + #1194) (#1197)"
This reverts commit add7f1ef98.
* Revert "feat(studio): send signed-in upgrade clicks straight to the plans dialog (#1194)"
This reverts commit 69846729b9.
* Revert "feat(studio): resume the upgrade step after a guest signs in from an upgrade surface (#1187)"
This reverts commit 19ef57d637.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
Port OpenGame's Leaderboards (排行榜) tab into the Stage 1 Game Studio market,
placed after All games with the same label, featured style and bar-chart icon.
Selecting it replaces the masonry with the ranked boards; searching or
changing the sort from the tab returns to All games, as in OpenGame.
- Port GameLeaderboards, gameLeaderboardData, gameMarketTrends with the
bundled trend snapshot (no remote loader), the board styles and the
pointing-hand cue. Boards: regional gameplay trends, blue-ocean
opportunities, WeChat Mini Game earners, viral on social and new games.
The external H5 board only appears when a caller passes external games;
Stage 1 has no external feed, so it stays hidden.
- Stage 1 actions: a board entry opens the game's detail page (?game=),
Remix takes the existing Remix path (Agent launch modal), and an
opportunity opens the launch modal with its original-game brief.
No POST, no inline play.
- Tracking: the reportLeaderboard* reporters send two dedicated OpenGame
events, opengame_leaderboard_view and opengame_leaderboard_click,
registered in tracking/events.ts and the cloud allowlist (budget 49).
- Shared impressions hook gains OpenGame's standalone mode for board
headers; register the Remix Icon bar-chart glyphs in the sprite.
- Copy in game-studio-ui.json with OpenGame's translations for all locales.
Co-authored-by: heggria <bshengtao@gmail.com>
* feat(studio): resume the upgrade step after a guest signs in from an upgrade surface
A guest who meets an upgrade surface (blocked generation modal, Agent media
gate, header Pricing, Black Friday banner) must sign in first, and the
upgrade step was dropped once they came back signed in.
Save a short-lived upgrade intent (hook id + gate attribution, 30 min TTL)
when the guest starts signing in; when the account comes back on Free or
Go, EntitlementModalHost reopens the upgrade modal once for the same
surface with a fresh entry id. Plus and above drop it. One Tap's own
Free/Go Pricing redirect clears it to avoid a double prompt. Storage is
the source of truth across windows; the in-memory copy is used only when
the latest save could not reach storage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): resume the upgrade step only from upgrade surfaces
- Keep an upgrade intent only for upgrade surfaces (blocked generation and
plan gates, Agent media gate, header Pricing, Black Friday entries). A plain
guest sign-in (header/settings sign-in, template use, MCP, assets) now
replaces any saved intent instead of reopening an upgrade modal.
- Forget the intent when sign-in is cancelled (auth_cancelled), on sign-out,
and when the account is signed in but the plan cannot be known, so the modal
never appears later out of context.
- Report the resumed modal with gate_reason=resumed_after_signin instead of
plan_locked, so it is not counted as a real plan gate or a guest prompt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): keep the Agent media sign-in from model settings as an upgrade surface
The Agent media gate opens /settings/models?entry_from=agent_media_*; its sign-in
guide opened the settings_signin guest modal, which no longer keeps an upgrade
intent. Open it as agent_media_gate (guest_signin) instead, and save the intent on
the direct login path too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): forget the upgrade intent on a plain direct sign-in from model settings
The direct-login branch of the model-settings sign-in guide (desktop, or no
guest modal / account page) kept an earlier upgrade intent when the entry was
not an Agent media gate. Clear it there, as the other plain sign-ins do, and
cover the branch in the test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): send signed-in upgrade clicks straight to the plans dialog
A signed-in account that clicks header Pricing, the Black Friday banner, the
Explore Black Friday hero, the model hub promo or the upgrade modal now opens
the console plans dialog (/dashboard?billing=plan) instead of public Pricing,
where it had to pick a plan and press subscribe again before reaching the same
dialog. The link keeps the same od_entry_* and utm fields, so attribution is
unchanged. Browser cloud mode goes through /auth/upgrade-handoff bound to the
expected account; desktop and handoff-disabled builds open the console
directly. Guests, dev auth mode and an unknown account keep public Pricing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): open the plans dialog when a guest signs in from an upgrade surface
A guest who signs in from a paid path (blocked generation, Agent media gate,
header Pricing, Black Friday banner/hero/hub) and comes back on Free or Go
now goes straight to the OpenDesign plans dialog (/dashboard?billing=plan)
with the original od_entry_id, utm_source and interval=monthly, instead of
reopening the in-app upgrade modal. The modal stays as the fallback when the
dialog cannot open (popup blocked inside an iframe). Plain sign-ins and paid
plans still show nothing. New event upgrade_resume_open measures it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): report an unsupported plans dialog as unavailable, not popup_blocked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): fall back to the upgrade modal when the desktop browser cannot open; allow upgrade_resume_open in cloud tracking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): report whether an external page actually opened so the resume can fall back
openExternalUrl now resolves false when neither the desktop host nor the
browser opened the page, and openBillingAndRefreshOnFocus returns that as
opened; the sign-in resume shows the in-app upgrade modal in that case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): open the browser fallback without window features so a successful open is detected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): open the plans dialog from model hub View plans and report destination on upgrade clicks
- Model hub availability "View plans": a signed-in (non-dev) account now opens the
console plans dialog directly (utm_medium=model_hub_plans) instead of Settings ›
Subscription first. Guests still go to sign-in.
- Every upgrade click reports destination=amr_plans|landing_pricing, derived from the
address it opens: header Pricing, Black Friday banner/hero/hub pill, MAGI-2 modal,
upgrade modal, settings subscription links, empty-catalog Upgrade to Plus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): clear the upgrade intent on every plain sign-in and mark checkout only after the plans dialog opens
Plain sign-in starts (header menu, template use, assets, history, session recovery) now build the login
address with plainSignInUrl, which forgets an upgrade intent saved by an earlier upgrade click; a guard
test keeps buildLoginUrl to upgrade surfaces that save their intent. The resumed upgrade sets the
checkout-return marker only when the plans dialog actually opened, so a blocked or unavailable open no
longer reports a checkout refresh on the next focus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(studio): build every console plans address with one shared builder
campaignPlansHref, campaignPricingHref, buildSubscriptionUrl and the Magi2
modal now share consolePlansUrl / upgradeHandoffHref / consolePlansHref, so the
/auth/upgrade-handoff contract and the console path normalization live in one
place. A consoleUrl ending in /dashboard no longer becomes /dashboard/dashboard,
and a missing consoleUrl falls back to /cloud/dashboard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): keep configured console bases as given when building the plans address
Only the bare production host falls back to /cloud/dashboard; a configured
console such as https://console.example.test keeps /dashboard, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): mark the model hub checkout return only after the plans page opened
A blocked window no longer leaves a pending checkout that reports a false
entitlement_refresh_result on the next focus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cloud): raise the allowlist budget to 47 for upgrade_resume_open
main's OpenGame Stage 1 (#1198) filled the 46-event budget; this PR adds
upgrade_resume_open, so the budget moves to 47.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan>
* feat(game-static-play): add 274-template R2 zip packaging, cookieless static play deploy, and verification pipeline
* feat(game-skill): port 21-section OpenGame skill with dual-mode workflow and fast-play path
* feat(onboarding): upgrade Cloud MCP install guide and add shared OpenGame prompt builders
* feat(game-catalog): sync 274 official templates, 4 kits, downloads manifest, and game contract
* feat(cloud-mcp): add read-only game catalog, free asset search, guest catalog API, redirects, and Docker packaging
* feat(opengame): enable Stage 1 Game Studio routing, feature flags, and analytics
* feat(opengame): add Stage 1 market, multi-client modal, Cursor HTTP fix, SuperAgent prompt, and i18n
* fix(opengame): align nullable GameCardWithMeta fields and add opengame-catalog MCP capability
* test(mcp-onboarding): update registered public tool count from 22 to 24 for Stage 1 game tools
* chore(game-catalog): register 26 verified live R2 in-repo template bundles in game-downloads.json
* fix(opengame): address Stage 1 review feedback and failing CI lanes
- Send no play URL when GAME_PLAY_PUBLIC_ORIGIN is unset instead of a main-site
path that no route serves; Studio falls back to bundled in-repo templates
- Keep legacy-host 301 redirects on the configured origin for network-path inputs
- Correct the BlenderKit page host in the asset search allowlist
- Reuse the shared withdrawn list, TOP earning tag, curated order and comparator in Studio
- Remove the unused shared prompt module; the shipped builders stay covered by Studio tests
- Drop the blurred launch backdrop and the in-dialog copy notices in favour of Toasts
- Describe the shipped read-only Game Studio boundary and 24-tool MCP contract in the architecture
- Schedule the game skill and static play suites in CI and budget the three OpenGame events
* fix(game-static-play): retry stalled template bundle downloads before failing the run
* fix(game-asset-search): size the pagination cursor limit for every supported query
A 200-unit query with non-ASCII, control or lone-surrogate characters produced a
cursor longer than the 512-character limit, so nextCursor was rejected by both
the decoder and the public schema. Share one limit derived from the worst-case
JSON/base64url expansion and add a round-trip test for maximum-length queries.
* fix(game-asset-search): accept BlenderKit pages on www.blendkit.com and guide licence checks
www.blenderkit.com now redirects to www.blendkit.com and the upstream catalog
returns that host, so requiring www.blenderkit.com dropped every BlenderKit
result. Restore the live host, pin a real upstream row in tests, and tell
Agents to confirm the licence on the source page when a source omits it.
* fix(deploy): forward game play origin and legacy redirect hosts to the API
deploy/.env.example and deploy/k8s/configmap.yaml declared GAME_PLAY_PUBLIC_ORIGIN
and APP_REDIRECT_FROM_HOSTS, but neither the compose api service nor the reference
api Deployment passed them to the process. Wire both and assert that every
reference ConfigMap key is read by a workload.
* Address review: keep legacy-host writes, enforce play-origin isolation, share catalog constants
- Legacy-host redirects answer GET/HEAD with 301 and every other method with 308,
so MCP and API writes keep their method and body.
- parseConfig rejects a GAME_PLAY_PUBLIC_ORIGIN that is not https (loopback http
excepted), carries a path, or shares or sits under the APP_PUBLIC_ORIGIN host.
- The template id pattern, bundle key prefix, withdrawn set and TOP tag predicate
live in shared/game-contract.ts; static play, deploy/verify scripts and the
catalog service reuse them and the shared bundle URL builder.
- Remove unused game-contract and model-catalog exports.
- Update the MCP contract, AGENTS.md, README and docs to the 24-name phase-one
surface and document the read-only OpenGame tools and guest catalog routes.
* fix(game-static-play): make the full play-site upload resumable
Upload through the S3 SDK instead of one aws CLI process per file, skip
objects whose ETag already matches the local MD5, retry each request with
backoff, and write assets before entry pages and the manifest. Give large
bundle downloads time for a slow link. Record the provisioned bucket,
domain and remaining header rule in the runbook.
* feat(game-static-play): harden live play verification and add manual R2 publish workflow
* fix(opengame): raise prompt/remix maxLength for >4k OG-13 test and reset notes on target change
* fix(mcp): register resources/templates/list handler for Codex MCP compliance
* chore(game-catalog): register uploaded tidebreaker bundle for 274/274 R2 CDN parity
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* [OPEND-5723] fix(cloud): stop offering checks for settled Cloud audio tasks
A failed Cloud audio task never changes: the media API settles it once
and never resubmits it, including when the outcome is
audio_outcome_unknown. OpenMotion still treated that unknown outcome as
resumable, so "Check original task" re-polled the same failed task and
failed again, while the failure copy told users to inspect the task.
- Mark failed or cancelled Cloud audio poll results as remote-terminal
and persist that flag, so Studio hides the action and the resume API
rejects it.
- Explain that the original audio task cannot be checked again and that
generating again creates a new request.
- Replace the developer-facing resume refusal with a user-facing message
that Studio localizes instead of the generic retry toast.
- Document the resume boundary in the MCP descriptions and guides.
* [OPEND-5742] fix(studio): limit Eleven Music duration to five minutes
The Eleven Music v2 profile allowed 3-600 s because the ElevenLabs API
documents a 600 s maximum. The OpenDesign media gateway gives each music
request 360 s, so 599 s and 600 s requests ended with an unknown outcome
and no track.
- Cap music_length_ms at 300000 (five minutes, the length the ElevenLabs
Music overview documents). Studio, MCP and REST share this profile, so
longer values are corrected or rejected before any paid request.
- Show the allowed range in the Sound Studio custom duration field.
- Build on the OPEND-5721/5725 duration handling and update its tests.
* [OPEND-5743] fix(studio): hide speech speed for Eleven v3
Studio offered 0.7-1.2x speed for Eleven v3 and the adapter forwarded it
as voice_settings.speed, but ElevenLabs does not apply speed to Eleven
v3: QA generated the same text at 0.8x and 1.2x with matching durations
in three pairs (16/17 s, 45/45 s, 21/21 s).
- Remove the speed field from the Eleven v3 profile so Studio no longer
offers a control that has no effect. Kokoro keeps its speed control.
- Note in the generation-options guide and the media skill that Eleven
v3 ignores speed. A speed supplied in advanced parameters is still
sent as voice_settings.speed.
* [OPEND-5723] fix(cloud,studio): settle older audio failures and report check results
QA retested on the assets page: failed BytePlus TTS 2.0 cards saved before
this branch still offered "Check original task", and a check that ended in
the same failure left the card unchanged, so users could not tell whether
it had run.
- Treat stored audio_outcome_unknown failures as settled when serializing
and resuming jobs, and return the current message, so cards saved before
audio failures recorded remoteTerminal stop offering the check.
- Show "Checking original task…" while a check is queued, and report the
original task's latest state in a toast once the check settles,
including when nothing changed.
- Localize the new results in every interface language.
* [OPEND-5723] fix(cloud,studio): split resume errors, align mock gateway, handbook and i18n
- Return reason-specific 409 guidance from resumeJob for non-failed jobs, savePending (pointing at retry_save), terminal remote failures (keeping regenerate), and missing remoteId, with matching translations across all interface locales.
- Share buildGatewayPollError between OpenDesignModelGateway and MockModelGateway so mock audio failures mirror the remoteTerminal rule.
- Share CLOUD_RESUME_LIMITATION across MCP tool descriptions, integration guidance and the Studio MCP handbook (library capability and recovery FAQ) with translations in all interface languages.
- Translate Check original task and Checking original task... across all 10 non-English locales and extend locale regression tests.
* [OPEND-5723] fix(studio): keep mcp-ui.json under 1 MiB by storing new handbook i18n in mcp-tools-ui.json
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* refactor(cloud): remove hardcoded production Studio subdomain from runtime and install guide
Avoid tying the server, Studio frontend, WebMCP tools, and onboarding/install guides to a fixed production Studio subdomain so domain switches only require deployment configuration updates:
- Replace hardcoded Studio origin in docs/install.md with the {{ORIGIN}} placeholder rendered from APP_PUBLIC_ORIGIN, and require a non-empty publicOrigin in cloud-onboarding.ts instead of falling back to a hardcoded host.
- Use relative paths instead of a hardcoded production Studio origin fallback in campaignPricingHref and WebMCP cloud tool descriptors when no origin is available.
- Reference the active deployment <ORIGIN> in onboarding and entry Skill docs instead of hardcoding a specific Studio subdomain.
* docs(onboarding): add signed-config bootstrap origin discovery for GitHub readers
Keep the unrendered GitHub docs/install.md and Skill entry points self-contained without hardcoding a Studio subdomain:
- Document dynamic bootstrap discovery via https://releases.open-design.ai/open-motion/desktop/config/stable.json (payload.studioUrl) when reading unrendered GitHub docs with no user-supplied origin.
- Extend tests/cloud/onboarding.test.ts to assert bootstrap origin discovery in docs/install.md, skills/openmotion/SKILL.md, and .codex-plugin/onboarding/SKILL.md.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* Recover transient cloud login and export failures and guide client updates
* Run source update guidance regression in PR CI
* Verify renderer failure causes from worker to telemetry sink
---------
Co-authored-by: qindong <qindong@qindongs-MacBook-Pro.local>
* feat(auth): accept any public HTTPS redirect host in MCP OAuth DCR
Web-hosted MCP clients such as Doubao were rejected with 400
invalid_client_metadata because dynamic client registration only admitted
a fixed list of HTTPS redirect hosts, so every new platform needed a code
change and a release.
- DCR accepts any public DNS HTTPS redirect host. IP literals, single-label
and *.localhost hosts, fragments and userinfo stay rejected; loopback HTTP
and native app schemes are unchanged.
- OAUTH_DCR_ALLOWED_HTTPS_HOSTS now marks verified hosts. The consent page
shows a warning naming the host when the redirect host is not verified.
The same list still gates browser Origin headers on /mcp.
- New OAUTH_DCR_BLOCKED_HTTPS_HOSTS rejects registration and cuts off
already registered clients at authorize, code exchange and refresh.
- Each DCR registration and rejection is logged with its redirect hosts.
* fix(auth): reduce unverified redirect notice to one consent line
Replace the multi-sentence warning block with a warning badge and the
bold redirect host in the existing consent subtitle.
* fix(auth): canonicalize terminal-dot redirect hosts in DCR checks
URL.hostname keeps a terminal dot, so https://cb.phish.example./cb evaded
OAUTH_DCR_BLOCKED_HTTPS_HOSTS and https://localhost./cb passed the public
host check. Strip one terminal dot before verified, blocked and public-host
matching, reject hosts with empty labels, and derive the audit log's
unverified hosts from the parsed scheme so HTTPS:// spellings are counted.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* Remove the Character reference image scene
* Promote image editing features in the navigation menu
* Match the Explore footer background to MCP
---------
Co-authored-by: fengcao <fengcao@Mac.lan>
Co-authored-by: fengcao <fengcao@fengcaodeMacBook-Pro.local>
* feat(auth): integrate Google One Tap across cloud backend, Studio web, and desktop handoff (#1047)
* feat(auth): integrate Google One Tap across cloud backend, desktop handoff, and studio web
* fix(auth): address L1 review findings for One Tap S2S, desktop handoff, and cloud tracking
* fix(auth): resolve all round-2 L1 review blockers for Google One Tap
* fix(motion): harden One Tap K8s egress, atomic provenance, post-commit logout barrier, consent, tracking retry, and loopback CSP
* fix(motion): propagate AMR sessionProof across One Tap, OIDC, and desktop handoff-ticket flows
* fix(motion): close R4 L1 blockers (post-proof logout barrier, upgrade-handoff 503 fail-closed, atomic getdel, server consent cookie)
* fix(motion): enforce One Tap logout revocation inside resolveBrowserSession and block unbound Pricing redirect on active-session 401/403
* fix(motion): align One Tap binding revocation TTL to full 7-day session lifetime and keep upgrade-handoff 401 fail-closed on reload
* fix(motion): fail closed on Redis/DB errors in One Tap revocation check and never downgrade expired om_session on upgrade-handoff
* fix(motion): retain One Tap revocation binding for full session TTL and bind upgrade-handoff 503 retries to requireAuth/expectedAppUserId
* fix(motion): cryptographically bind upgrade-handoff 503 retries to originating session before DB/AMR enrichment
* fix(motion): bind signed-in PricingEntry and 503 reload cookie to originating session/account and guard readSessionProof errors
* fix(motion): redirect unbound upgrade-handoff 503 via same-origin 303 to session-bound URL so F5 reloads never lose binding
* fix(k8s): align AMR One Tap internal URL and NetworkPolicy with nexu namespace
* fix(ci): narrow desktop-handoff union types and remove false-positive secret/internal-link hits in One Tap files
* fix(studio): align One Tap 2s delay, SHOW-04 reload recovery, and ERR-06/07 failure CTA
* fix(studio): align One Tap banned account copy with standalone login page (OPEND-5763)
* fix(auth): address PR #1047 review findings (upgrade-handoff recovery, CSP, unified tracking privacy & rate limit, source scan)
* fix(auth): gate upgrade-handoff on isOneTapConfigured, decouple tracking toggle from deviceIdConsented, and bound logout-epoch map
* fix(ci): resolve backend typecheck, dock short-host floor, ci-scope, and source privacy scan
(cherry picked from commit 19a75ca0ec)
* test(mcp): expect the connected-environment line appended to server instructions
initialize instructions, but the registry discovery test still compared the
whole string against the registry-only guide.
* test(auth): isolate One Tap route tests from the runner's telemetry opt-out
CI exports OPENMOTION_TELEMETRY=0 for the cloud job, which disables the
PostHog dispatcher and locks tracking preferences, so the One Tap tracking
cases failed only in CI. Clear OPENMOTION_TELEMETRY and DO_NOT_TRACK for the
suite and restore them afterwards.
Ported onto main without #1066. Adaptations to main: logout keeps main's
server-side OIDC end-session and never returns endSessionUrl, so the
od_onetap_suppress post-logout redirect hint and OIDC_POST_LOGOUT_REDIRECT_URI
are dropped (client-side One Tap suppression still runs on confirmed sign-out)
and main's oidcIdTokenCacheKey replaces the separate id_token store. Browser
telemetry stays on main's createCloudTracking pipeline with deployment-locked
preferences; the separate PostHog dispatcher and per-user tracking toggle are
dropped, while attested app_user_id filtering, the tracking attestation cookie
and device-ID consent are added to main's /motion-api/tracking (createApiApp
accepts an optional cloudTracking handle for tests). The upgrade-handoff link
builder moves into main's buildSubscriptionUrl, and the desktop loopback
response deferral follows main's nullable-server attempt lifecycle.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
(cherry picked from commit 4616728e07)
* fix(studio): report the One Tap document CSP instead of enforcing it
main serves Studio documents without a CSP and still embeds third-party
frames that the One Tap allowlist does not cover (for example external
playable games such as littleprince.dev in the game catalog). Enforcing
frame-src would block them. GIS does not need a CSP, so ship the policy
as Content-Security-Policy-Report-Only and keep Permissions-Policy and
COOP enforced; enforce the CSP once every embedded frame source is listed.
* fix(auth): keep main's tracking identity and optional One Tap manifest refs
- /motion-api/tracking no longer stamps the session app_user_id onto
events that did not carry one; those events stay installation-scoped
exactly as on main. Attested One Tap attribution is unchanged.
- deploy/k8s: the One Tap internal URL/token refs are optional so
clusters without One Tap still start (the API already fails closed),
and the ingress no longer adds a configuration-snippet, which default
ingress-nginx admission rejects and which duplicated headers the API
already sets on Studio documents.
* fix(studio): create the browser tracker on first use
AccountSettings now imports googleOneTap, which imports the Studio
tracking module. That module created the browser tracker and attached
window/document listeners at import time, so node-environment suites
that reach AccountSettings (compositionStackExport, agentToolsExport,
PropertyPanel, AssetsTab and others) failed with 'window is not
defined'. Create the tracker and its flush listeners on first use;
nothing can be pending before then, so browser behavior is unchanged.
* refactor(tracking): drop the unused sender channel option
No caller sets the PostHog sender's channel since the cloud API hands
browser batches to the cloud tracking pipeline, so the option only
suggested a cloud path that does not exist. Sender events keep the
standalone channel.
* refactor(auth): share the metrics consent cookie contract
The device-ID consent cookie name and its granted/denied values were
spelled separately in the auth routes, the tracking API and the tests.
Export them from the session module next to the other auth cookies and
use the shared constants everywhere, so the One Tap attribution gate and
the consent writer cannot drift apart.
* fix(tracking): use the session app user id before AMR enrichment
Signed-in browser tracking batches looked up the AMR identity for every
request even though the session membership already carries the projected
AMR app user id. Attribute from the membership first and call
verifyAndEnrichAuthContext only for sessions without a projected app user
id. A failed fallback still treats the batch as guest telemetry.
* fix(auth): render upgrade notices with the design system
The billing handoff notice pages carried their own dark-only palette and
button styles. Load the shared /design-system/ui.css on a data-motion-ui
root instead, so the pages follow the system light/dark preference, and
render the actions as ui-button / ui-button--primary controls. Only page
layout stays local and it references design-system tokens.
The notice CSP now allows the same-origin stylesheet and the fonts its
@font-face rules load (style-src 'self' 'unsafe-inline'; font-src 'self')
and keeps default-src 'none' for everything else.
* fix(auth): honor One Tap session proof expiry
The One Tap exchange stored AMR's session proof for the full Motion
session lifetime and ignored sessionProofExpiresAt, so an expired proof
kept being sent to the handoff-ticket endpoint and every rejection showed
the retryable 503 page, which retrying can never fix.
Store the proof for at most the time AMR advertises, capped by the
session lifetime; an unparseable expiry falls back to the session
lifetime and an expiry in the past stores no proof. When the handoff
ticket is rejected terminally (401 SESSION_PROOF_INVALID for an invalid,
expired or mismatched proof, or 404 USER_NOT_FOUND), drop the stored
proof and return the existing REAUTH_REQUIRED fresh sign-in path. A
banned or frozen account (403 ACCOUNT_BANNED / ACCOUNT_FROZEN) gets the
403 account notice. Network failures, timeouts, 5xx responses and a 401
without a proof code (internal token rejected) keep the session-bound
retry page and the stored proof.
* refactor(auth): stop issuing the tracking attestation cookie
The signed om_track_att cookie let /motion-api/tracking accept a
browser-supplied app_user_id that the server had attested. Since the
merge with the cloud tracking overhaul the endpoint resolves the user
from the live session and rejects any packet that carries a user id, so
nothing reads the cookie any more. Stop setting it on OIDC callback, One
Tap sign-in, desktop handoff and /auth/me, and remove its signing
helpers. The derived secret stays: it still binds upgrade-handoff retry
URLs to the originating session.
* refactor(auth): share one OpenDesign handoff URL guard
The browser upgrade handoff and the desktop Pricing handoff each carried
a line-for-line copy of the check that decides whether an AMR-issued
handoff URL may be followed. Export isSafeOpenDesignHandoffUrl from the
desktop handoff module next to the other handoff helpers and use it from
both. The rules are unchanged: no control characters or credentials, an
origin from OPENDESIGN_API_URL, OPENDESIGN_CONSOLE_URL or
OPENDESIGN_PRICING_URL, and https unless one of those is configured as
http. Add unit coverage for the shared guard.
* refactor(auth): share the One Tap session proof cache key
Session revocation deleted the stored AMR session proof through a string
literal while the auth routes built the same key with a local helper.
Export oneTapSessionProofCacheKey from the session module beside the
other One Tap cache keys and use it for saving, reading and deleting the
proof and in the route tests.
* refactor(auth): drop the unwired One Tap telemetry hook
AuthRoutesDeps.onOneTapTelemetry was called from seven places in the One
Tap exchange, but no caller ever supplied it and the onetap_* events are
registered with the Studio as their only producer, which already reports
them from the browser. Remove the field and its call sites.
* refactor(auth): remove the dormant device-ID consent path
No product surface ever granted the metrics consent, so the consent
route, shared cookie constants and Studio consent reader only kept an
unreachable device-ID forwarding branch alive.
- Delete POST /motion-api/tracking/consent and shared/metrics-consent.ts;
the tracking route is back to main's shape.
- The One Tap attribution sanitizer now always drops odDeviceId and
odDeviceIdConsent, whatever the client claims.
- Studio no longer reads od_device_id from the URL, localStorage or the
od_attr cookie, never persists it and never sends it in odEntry;
ref, UTM and other od_* attribution are unchanged.
* refactor(studio): reuse the shared plan-tier normalizer
onetap_login_success normalized planTier with a local copy of the
tier list. Use normalizeDesktopHandoffPlanTier from
shared/desktop-auth-handoff.ts instead so Studio, the desktop shell and
the server share one tier list. Output is unchanged: the five tiers
map to themselves and anything else maps to 'unknown'.
---------
Co-authored-by: open-design-crew[bot] <299007234+open-design-crew[bot]@users.noreply.github.com>
Co-authored-by: heggria <bshengtao@gmail.com>
* [OPEND-5817] fix(studio,cloud): isolate video frame thumbnail cache keys and add recovery
Avoid HTTP disk-cache CORS poisoning between non-CORS <video> playback and CORS <canvas> frame extraction by signing ?frame=1 video requests with bare RFC 6266 Content-Disposition: inline (distinct from inline; filename=..., attachment; filename=..., and preview.ts which omits ResponseContentDisposition altogether).
Restrict ?frame=1 handling to video/* assets/exports, and allow explicit ?frame=1&retry=N requests to bypass the 1-hour signing window (cacheWindowSec: 0, Cache-Control: no-store) so recovery can escape stale cache entries.
Harden VideoFrameThumbnail with a shared loader (LRU frame cache, in-flight deduplication, bounded 4-way concurrency, offscreen IntersectionObserver cancellation, immediate stale-frame reset on version switch, safe zero/NaN duration handling) plus bounded backoff retries and automatic recovery on online, visibilitychange, and viewport re-entry.
* fix(studio,cloud): bound video thumbnail cache bytes and preserve export attachment precedence
Address PR #1147 review findings:
- Downscale captured video thumbnail canvases proportionally to at most 960px on the longest edge and evict cached JPEG data URLs by accumulated byte size (8 MiB cap alongside the 200-entry limit) in videoFrameThumbnailLoader.
- Gate ExportService.presignExportFile frame mode on explicit inline disposition so { disposition: 'attachment', frame: true } never overrides attachment downloads, and align /projects/:projectId/renders/file/:filename to pass disposition: 'inline' only for video ?frame=1 requests.
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* [OPEND-5831] fix(cloud,studio): align asset library import contract and post-undo version allocation
* refactor(cloud): share project version and history allocation helper
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* [OPEND-5648] fix(studio): retry the post-login resume when creation briefly fails
After a guest signs in from Open and edit or New project, Studio resumes the
saved intent once. On the shared test site the resume POST reached an API pod
that had just restarted and answered 503 "Motion template catalog is not ready
yet. Retry shortly." The one-shot resume gave up immediately, so no project was
created and the user was left on the original template.
Retry a failed automatic resume up to three times (1s, 3s, 6s) with the same
idempotency key before falling back to the manual Continue prompt. A sign-in
failure still stops the automatic resume because it clears autoResume.
Add end-to-end Studio tests for the template and blank-project branches: guest
click, login redirect, return signed in with a transient 503, and exactly one
project created with the saved idempotency key.
* [OPEND-5648] fix(cloud): wait for the first Prism catalog load before rejecting template lookups
A new API process loads the Prism catalog lazily. Until that first load
finished, getTemplates({ requirePublication: true }) threw 503 "Motion
template catalog is not ready yet", so the first template-based creation on
every new pod failed even though the load it had just started completed a
moment later.
When no snapshot exists yet and a load is in flight, exact lookups now await
that load and only reject with 503 if the catalog is still empty afterwards.
Listing and built-in templates keep answering immediately, and a failed load
still backs off and rejects.
* [OPEND-5648] fix(studio): release the auto-resume latch when a resume chain ends
The automatic resume kept its per-key latch marked as waiting after it
succeeded, gave up, or saw a different intent. saveAuthPendingDraft reuses the
key for the same intent, so a later sign-in that keeps Studio mounted
(desktop or bridge login) re-saved the intent with autoResume and then neither
resumed nor showed the Continue prompt until a reload. A re-issued intent also
inherited the exhausted retry count.
Release the latch on success, on the final fallback and when the stored intent
changed, so a re-saved intent starts a fresh chain.
* [OPEND-5648] fix(studio): close the template detail before showing the manual resume prompt
When the automatic resume gives up, Studio shows a Continue prompt in the
application chrome. The template detail is opened with showModal(), which makes
everything outside it inert, so on a template link the prompt could be seen but
not clicked.
On the final fallback, close an open template detail so the Continue prompt is
usable. The saved intent and its idempotency key are kept, so Continue still
creates at most one project.
* [OPEND-5648] fix(studio): treat dismissing the guest sign-in prompt as cancel
A guest click on Open and edit or New project saves an automatic login intent
and then shows the sign-in prompt. Closing that prompt left the intent with
autoResume, so a later, unrelated sign-in from the top bar within the intent
lifetime silently created the earlier project.
Closing the guest prompt now applies the same cancel rules as a cancelled OIDC
login: the intent is cleared, or kept without autoResume when it carries typed
input. Extract those rules into cancelAuthPendingIntent and reuse them for the
auth_cancelled return.
* [OPEND-5648] fix(cloud): bound the first-load wait for template lookups
If Prism is unreachable when a pod starts, exact template lookups would
otherwise wait for the full 90-second fetch timeout before answering 503.
Cap the wait at 15 seconds (configurable) and keep answering 503 after it.
---------
Co-authored-by: heggria <bshengtao@gmail.com>
* [OPEND-5496] feat(cloud-tracking): add cloud allowlist, cloud_web channel, and monetization attribution
* test(studio): assert resolution gate attribution payload in AssetComposer
* fix(cloud-tracking): address Looper review (restore tests, rotate entry_id, deploy env, docs)
* fix(studio): pass native job.model.modelId for failure-gate attribution
* feat(tracking): add Tracert v0.6.0 dual reporting, canonical user identity, and env-only PostHog config
Integrate @powerformer/tracert@0.6.0 alongside existing PostHog telemetry for both Studio browser and cloud API server reporting while keeping self-hosted deployments strictly opt-in with zero hardcoded tokens.
- Add shared runtime tracking config validation and CSP-safe HTML injection so Studio hydrates tracking config in 0 RTT when enabled and skips downloading the lazy Tracert chunk when OPENMOTION_TRACERT_SPM_A is unset.
- Dual-write closed-schema Studio events and server-side account_sign_in_result across PostHog and Tracert using identical event_id and occurred_at values, keeping auto-collection plugins disabled and registering graceful TracertNode shutdown.
- Align browser and server user identity on AMR appUserId (falling back to local user.id only when self-hosted), attach workspace_id/workspace_role/plan_tier as user context, preserve anonymous device_id across passive signed-out reloads, and rotate identity on explicit sign-out.
- Remove hardcoded PostHog credentials in shared/tracking-config.json so standalone tracking is strictly env-driven.
- Allowlist only the SHA-256 digest of the SDK's default public Collector endpoint in bundled Studio JS assets in .github/scripts/motion-scan.mjs.
* fix(tracking): preserve equivalent Tracert init loads, clear expired SDK identity, and drain PostHog queues on shutdown
* fix(tracking): propagate render telemetryOptOut, isolate browser queue across identity changes, and wire production identity sync
* fix(tracking): isolate identity sync module and guard non-browser tracking init
---------
Co-authored-by: qiqi <qiqi@qiqideMBP.lan>
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* Fix cloud Studio generation history, audio forms and workspace feedback
* Keep ordinary canvas history feedback unchanged
* Remove sentence separators with a leading sound prompt tag
* Align selection handles with isolated canvas history paints
* Keep the selection outline on the layer picked for the current drag
---------
Co-authored-by: lefarcen <935902669@qq.com>
* Fix cloud media save retry after CAS write failure
* Address review feedback on retry_save state transition, cancellation, requestId, and docs
- Transition retry_save rows atomically from failed to queued (stage=saving) before enqueuing so cancel before worker pickup marks the row cancelled and prevents worker claim.
- Require and propagate caller requestId for BullMQ jobId deduplication (clearing stale terminal BullMQ entries on explicit re-retry).
- Finalize cancelling rows cleanly to cancelled when CAS throws after a missed Redis cancel notification instead of stranding in cancelling or publishing a false failed event.
- Update skills/openmotion-media/references/jobs.md to document Cloud gateway recovery for retry_save.
* Harden cancel/retry_save concurrency, claim-epoch dedupe, and gateway docs
- Guard cancelJob transitions with optimistic state checks and check cancelled state in the worker commit transaction.
- Scope retry_save BullMQ jobId by claimToken epoch and record retrySaveRequestId so same-requestId retries recover cleanly after API restarts and Studio repeated retries never collide with a still-finishing BullMQ active job.
- Guard upstream failed poll transitions against overwriting cancelling rows.
- Update docs/model-gateway.md retry_save Cloud recovery guidance.
* Guard retry_save enqueue-failure rollback against racing replays
* fix(cloud): guard retry_save rollback by state/stage and clear failureStage on resume/completion
* fix(cloud): return 400 for retry_save missing requestId and align timeout hint
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* fix(studio): host remaining Skill covers and ModelHub showcase media on OpenMotion CDN
* fix(studio,release): trim curated Skill cover offsets and hydrate missing LFS previews on demand
* test(studio): pin Explore navigation suite clock before Black Friday hero takeover
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* feat(release): publish and verify Studio preview media before cloud test promotion
* fix(release): share archive fetches and identify invalid preview sources
---------
Co-authored-by: lefarcen <935902669@qq.com>
* fix(studio): distinguish the preview stage and report early media loads
* fix(studio): cap the preview loading message without releasing the first frame
* fix(studio): keep editor poster dependencies out of the player entry
* fix(studio): release editing work while a live first frame buffers
* fix(studio): retire the frame deadline once editing unlocks
* chore: ensure PR CI
---------
Co-authored-by: lefarcen <935902669@qq.com>
Co-authored-by: open-design-crew[bot] <4197780+open-design-crew[bot]@users.noreply.github.com>
* feat(tracking): add Black Friday hero, model hub impressions, and remix-to-generation tracking
Port the Cloud-compatible Black Friday and ModelHub analytics from #1067 onto main, wired directly to main's shared entitlement hook registry, global checkout-return refresh host, and template impression observer:
- Register bf_hero and bf_hub in shared/entitlement-hooks.ts (shared by tracking/events.ts, src/cloud-tracking.ts, and EntitlementModalHost), and extend the closed tracking schema for copy_prompt/copy_status/prompt_edited, hub_videos card surface_view, and hub_id/template_id/prompt_edited on asset_generation_submit_result.
- Split campaignPricingUrl mediums into openmotion_bf_hero (utm_medium=hero) and openmotion_bf_hub (utm_medium=model_hub) while keeping od_entry_source=openmotion_manage_subscription for AMR attribution.
- Add once-per-load bf_hero surface_view and bf_hero checkout-return tracking on ExploreBlackFridayHero, plus ModelHub showcase card impressions (via useTemplateImpressions), bf_hub promo pill attribution, category_select, open_detail, copy_prompt status, and start_use with template source handoff.
- Prevent impression spam and burst drops on Cloud: disable ModelHub's useTemplateImpressions observer while the lightbox dialog is open (avoiding idle timer loops and spurious close-time impressions), deduplicate showcase card impressions across remounts per page session, and raise the shared Cloud studioTracker queue capacity (maxQueue=1024, flushIntervalMs=500) in src/cloud-tracking.ts while keeping each PostHog /batch/ payload within 16 events / 64 KB.
- Attach campaign_id on AccountSettings view_plans clicks during the Black Friday window.
- Address review feedback from #1067: consume AssetDraft.source on successful submit, prompt reset, StudioIdeas prompt apply, or empty-prompt hub navigation (clearing both React state and in-memory studioDrafts without persisting) so later unrelated generations are not misattributed, and document all new hooks, mediums, and hub fields in tracking/README.md.
Backport-of: #1067 (partial, from commit 3fa762ae4)
* fix(tracking): re-subscribe ModelHub card impressions on masonry re-pack and wait for account state
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* feat(studio): explain preview loading and show pending media names
* refine studio preview loading feedback for light and dark themes
* fix(studio): indicate pending media beside playback controls
* Revert "fix(studio): indicate pending media beside playback controls"
This reverts commit 0ed7f4f38c.
* fix(studio): clarify media load failure in the retry action
---------
Co-authored-by: lefarcen <935902669@qq.com>
* feat(mcp,studio): unify cloud MCP onboarding, handoff prompts, and workspace-scoped OAuth access
- Point all cloud Agent handoff prompts (editor MCP button, templates, skills, platform export, review comments, transcript workflow, design handoff) to <ORIGIN>/install.md and <ORIGIN>/mcp instead of auth-gated /connect/guide or SPA /mcp-setup.
- Make GET /connect/guide public with browser 302 redirect to /mcp-setup and non-HTML 200 text/markdown serving /install.md; add public GET /connect/integration for guest cloud discovery on /mcp-setup and make GET /connect/config public.
- Remove per-project manual project_grants enforcement for OAuth 2.1 clients so authorized OAuth Agents have workspace-scoped access to the authenticated user's projects (matching PAT behavior while preserving ownerUserId isolation and preview_token single-project pinning), and remove the obsolete per-project Agent access menu entry.
- Add Mode A (pure setup) vs Mode B (task-driven handoff) guidance to docs/install.md and skills/openmotion/SKILL.md, plus structured 401 authGuidance and PROJECT_NOT_FOUND origin/workspace diagnostics.
- Refine /mcp-setup UX: hide DesktopConnectPanel in ordinary cloud browsers without a desktop or helper bridge, fix hero endpoint pill spacing, align Claude Desktop (Connectors UI), Cursor/MCP OAuth 2.1, and Claude Code (--scope user) manual instructions, and remove contradictory wait-for-brief text from task examples.
* test(studio): replace internal staging hostname fixture with motion.example.com
* test(mcp): include cloud server origin line in mcp-registry instructions check
* fix(mcp,studio): address review feedback and remove DesktopConnectPanel from /mcp-setup
- Send Vary: Accept on both branches of GET /connect/guide (plus Cache-Control: no-store on the 302 redirect) and assert both headers in cloud API tests.
- Restrict Step 3 onboarding mechanics and the Installation-success reply in docs/install.md explicitly to Mode A so Mode B task handoffs skip onboarding unambiguously.
- Remove the orphaned ProjectAgentGrantsDialog component and test, drop the unused onOpenMcpSetup parameter from useProjectArchives, stop writing inert project_grants rows in workspace-service and catalog-service, and document the retained /motion-api/projects/:id/grants routes as inert legacy compatibility endpoints.
- Remove DesktopConnectPanel and /motion-api/connections polling completely from /mcp-setup (McpConnectionPage) across both web and desktop hosts.
* chore(studio): remove orphaned DesktopConnectPanel, test, and architecture-map entry
---------
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
* Apply verified undo and redo changes locally while checking shared history
* Initialize history draft state in the isolated canvas drag fixture
---------
Co-authored-by: lefarcen <935902669@qq.com>