mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-02 05:19:28 +08:00
* Add scenario workflows foundation, Design asset import and Wave 1 contracts
Implement the Wave 1 scenario workflow contracts, shared domain service,
Design Studio binary asset import, ZIP bundle exporter and Studio boundary
files while preserving the 22 public MCP tools:
- Shared browser-safe contracts in shared/scenarios.ts, shared/scenario-runs.ts
and shared/scenario-content.ts covering all five scenarios, 21 scenario
commands, starter HTML recipes, idempotent HTML image embedding, localized
social drafting and Agent handoff builders.
- Design Studio binary asset import via DesignProjects.importBinaryFile(),
openmotion_design_edit action=import_asset, POST /api/design/projects/:id/import-asset
and designClient.importAsset().
- Domain service (gateway/scenario-runs.ts), ZIP bundle builder
(gateway/scenario-bundle.ts) and HTTP download route (gateway/scenario-http.ts),
wired under openmotion_assets_use action=scenario with tracking schema parity.
- Studio scenario client, scenarioCovers.ts, stepContract.ts and ODUI-compliant
boundary stubs for parallel Wave 2 UI implementation.
- Node test coverage in tests/scenario-content.test.ts, tests/scenario-runs.test.ts,
tests/scenario-bundle.test.ts and tests/design-import-asset.test.ts registered
in .github/workflows/ci.yml.
* Implement scenario workflow step workbenches and unit tests
- Add reusable BindingSlot with pool picker, chip removal and drag-and-drop
- Implement BriefStep with dynamic brief fields, debounced autosave, revisions, downstream prompt seeding, AI influencer script editor, Gemini 4 Neon rail/availability and Black Friday discount badge
- Implement WebPageStep with starter/template/existing project creation, live viewport preview, live HTML slot targeting, single and chained Embed all, and design version previews
- Implement MediaStep (image, video, audio) and MotionPanel with scene/audio tabs, catalog model picker, offscreen-pausing video, offline provider-setup recovery with upload/workspace import, and Motion project creation/linking
- Implement SocialPackStep with offline drafting, regeneration variants, character/title limit counters, hashtags, media reordering and token-only live card previews
- Implement ExportHubStep with step overview, pool readiness checks, ZIP bundle export with persistent download card and Agent handoff actions
- Wire StepRouter with token-only opaque steps.css and add Vitest suites for all five step workbenches
* Implement scenario workflow shell, shared asset pool, and run state
Add useScenarioRun state hook with auto-resume, lazy run creation, optimistic revision conflict recovery, visibility-aware job polling, and window focus refresh. Implement ScenarioCard, ScenarioHub, ScenarioHeader, ScenarioStepper, PoolItemPreview, AssetPoolPanel, IterationHistory, StepExportMenu, ScenarioWorkspace, opaque token-only scenario.css, and Studio unit tests.
* Wire scenario workflow navigation, routing, MCP handbook, 10-locale i18n and docs
Implements Worker D integration for end-to-end scenario workflows:
- Routing & URLs: scenario/scenarios pages with category, run UUID, and step validation plus breadcrumb labels
- Top nav & Explore: Workflows split tab with 3-column mega menu, ExploreSpotlight primary workflow CTAs + 5th AI Influencer slide, ScenarioHighlights rail, CapabilityIndex Workflows column, landing cross-links, and WorkspaceFrame host wiring
- MCP handbook: scenario-workflows capability (preserving exact 22 phase-1 tool union), scenario-black-friday and design-embed-assets recipes, and setup-prefixed Black Friday handoff
- 10-locale i18n: scenario-ui.json (526 keys x 10 locales covering shared/scenarios.ts plus all scenario-shell and scenario-steps UI keys), studio-navigation-ui.json, and mcp-ui.json updates
- Docs & tests: mcp-phase1-tools.md, product architecture, scenario-workflows.md guide, openmotion-design SKILL note, and full Vitest + Node MCP test coverage
* Register scenario stylesheets in tokenGate and complete 10-locale i18n coverage
- Register scenarioNavigation.css, scenario.css and steps.css in
studio/src/styles/tokenGate.test.ts and define the four remaining
token-only scenario CSS classes (.om-scenario-host,
.om-scenario-header-category, .om-scenario-step-tab-title,
.om-scenario-history--empty).
- Add the missing 'Download started' translation across all 10 non-English
locales in studio/src/i18n/scenario-ui.json for 100% 10-locale coverage.
* Fix Scenario Workflows Wave 3 E2E and visual findings
- Treat full content-step selection as an unfiltered export bundle so README.md and unattached uploaded pool files are included
- Auto-activate newly saved iterations in ScenarioRuns.addIteration while preserving promote for older versions
- Suppress duplicate raw error toasts on SCENARIO_CONFLICT after useScenarioRun displays the localized conflict notice
- Map raw step statuses, pool kinds, job states, and copy tone/promo code labels through localized UI keys across all 10 locales
- Restore light/dark Explore hero CTA contrast hierarchy and make the Workflows mega menu compact so the footer is visible without clipping at 1440x900
- Stack the scenario step header vertically below 767px to avoid squeezing the step title on mobile viewports
* fix(scenario): replace alarming export-hub step warning stack with calm readiness hint
* feat(scenario): replace intimidating brief form with guided fill-in-the-blanks prompt composer
* polish(scenario): auto-size inline blank pills snugly to text content
* feat(scenario): add guided page composer, filter layouts, and codify workflow UX rules
* Enhance scenario workflows with semantic step colors, icons, and unified composers
Add consistent semantic color-coding and richer icons across the scenario
workflow shell and every step workbench without removing any capability:
- ScenarioStepper & ScenarioWorkspace: add step-type color accents (brief,
image, web-page, video, audio, social-pack, export-hub), flow connectors,
live progress bar, tinted step header badge, Step N / M pill, and next-step
icon cues.
- ScenarioHeader, ScenarioCard & AssetPoolPanel: color-code category pills,
step preview chips, shared asset pool header/filter chips, and asset kind
badges using existing packages/design-system tokens.
- MediaStep, SocialPackStep, WebPageStep, BriefStep, MotionPanel, BindingSlot
& ExportHubStep: unify Media and Social steps into single composer cards
matching Brief and WebPage, render official PlatformIcon glyphs for social
channels, add colored section/slot/stat icons, and remove redundant orphan
toolbars while preserving all generation, upload, embed, edit, compare,
MCP handoff, and ZIP export actions.
- Update studio/src/i18n/scenario-ui.json across all 10 non-English locales.
* Refine scenario workflows layout, controls, and dual-track MCP write-back
- Refine input and Select dropdown borders across design-system adapter/application CSS and workflow steps, eliminating thick stacked outlines and clipped option borders
- Flatten nested wireframes and unify top chrome, stepper, step composers, and open canvas sections with plain consumer-product terminology and 10-locale translations
- Add desktop drag-resizer, keyboard/double-click reset, persistence, and collapse/reopen toggle with auto-expand on pick for the right Shared assets sidebar
- Add StepCapabilityBar for in-step direct image/video generation alongside run-bound MCP write-back prompts and window focus/visibility sync across creation steps
- Consolidate workflow export actions into the header and Shared assets sidebar and fix backend text-ref type narrowing in scenario bundle generation
* feat(scenario): add dual-mode Agent mode, preview stage, draft history, and polish UX
Add Step-by-step and Agent mode workspace views with grouped Skills pipeline, concise MCP prompt generation, visual preview stage, draft history dialog, selective Assets import/export, 10-locale i18n coverage, and tokenGate CSS fixes.
* fix(i18n): remove duplicate base-dictionary overrides from scenario-ui.json
Drop duplicate '{count} selected' and 'Copied. Paste into your Agent.' entries from scenario-ui.json so ProjectArchives and TemplateLibraryDialog retain their canonical translations.
* feat(scenario): add stage preview artwork, refine Agent Teams UX and disclosure styling
* fix(scenario): address PR #781 review feedback across steps, templates, HTML embed and side-effect mutations
---------
Co-authored-by: pftom <pftom@pftomdeMacBook-Pro.local>
104 lines
4.7 KiB
CSS
104 lines
4.7 KiB
CSS
.motion-error-notice { flex-shrink: 0; min-width: 0; max-width: 100%; padding: 10px 16px; color: var(--color-danger-ink); background: var(--motion-danger-soft, var(--color-bg-2)); border-bottom: 1px solid var(--color-border); font-size: 12px; line-height: 1.6; }
|
|
.motion-error-notice-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
|
|
.motion-error-notice-summary { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
|
|
.motion-error-notice button { font: inherit; color: inherit; cursor: pointer; }
|
|
.motion-error-notice-close { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; margin-top: -2px; padding: 0; border: 0; border-radius: 4px; background: transparent; }
|
|
.motion-error-notice-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; }
|
|
.motion-error-notice-actions button, .motion-error-notice-details button { min-width: 0; padding: 2px 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; text-align: left; }
|
|
.motion-error-notice-actions .motion-error-notice-action { padding: 3px 9px; border: 1px solid currentColor; border-radius: 5px; text-decoration: none; }
|
|
.motion-error-notice button:disabled { opacity: .5; cursor: wait; }
|
|
.motion-error-notice-close:hover { background: var(--color-hover); }
|
|
.motion-error-notice-details { min-width: 0; margin-top: 8px; }
|
|
.motion-error-notice-details pre { box-sizing: border-box; width: 100%; max-height: min(160px, 30dvh); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 6px; padding: 8px; background: var(--color-bg-2); color: var(--color-text-2); border-radius: 5px; font: 11px/1.6 var(--font-mono); user-select: text; }
|
|
.motion-error-notice-details [role=status] { display: block; font-size: 11px; overflow-wrap: anywhere; }
|
|
.motion-error-notice-compact { padding: 0; border: 0; background: transparent; font-size: 11px; }
|
|
|
|
.hf-toast-viewport,
|
|
[data-motion-ui] .motion-inline-toast {
|
|
--toast-top: calc(var(--motion-topbar, 48px) + var(--motion-space-12));
|
|
}
|
|
|
|
.hf-toast-viewport {
|
|
position: absolute;
|
|
top: calc(var(--toast-top) - var(--motion-space-16));
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: var(--motion-space-8);
|
|
box-sizing: border-box;
|
|
width: min(calc(420px + 2 * var(--motion-space-32)), 100%);
|
|
padding: var(--motion-space-16) var(--motion-space-32) var(--motion-space-40);
|
|
max-height: calc(100dvh - var(--toast-top) + var(--motion-space-16));
|
|
overflow-y: auto;
|
|
overscroll-behavior-y: contain;
|
|
pointer-events: none;
|
|
}
|
|
.hf-toast-viewport:empty { display: none; }
|
|
.hf-toast-viewport > * { flex-shrink: 0; max-width: 100%; pointer-events: auto; }
|
|
.hf-toast-viewport > :is([role="status"], [role="alert"]):not(:has(button)) { pointer-events: none; }
|
|
|
|
.hf-toast-action {
|
|
pointer-events: auto;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
gap: var(--motion-space-4);
|
|
padding: var(--motion-space-4) var(--motion-space-6);
|
|
border-radius: var(--motion-radius-sm);
|
|
color: inherit;
|
|
cursor: pointer;
|
|
transition:
|
|
background-color var(--motion-duration-fast) var(--motion-ease-out),
|
|
transform var(--motion-duration-control) var(--motion-ease-out);
|
|
}
|
|
.hf-toast-action:hover { background: var(--motion-hover); }
|
|
.hf-toast-action:active { transform: scale(0.96); }
|
|
.hf-toast-action:focus-visible { outline: 1px solid var(--motion-focus); outline-offset: 1px; }
|
|
.hf-toast-action:disabled { opacity: .5; cursor: default; }
|
|
|
|
.hf-toast-surface,
|
|
[data-motion-ui] .motion-inline-toast {
|
|
padding: var(--motion-space-8) var(--motion-space-14);
|
|
border: 1px solid var(--motion-border);
|
|
border-radius: var(--motion-radius-step-14);
|
|
background: var(--motion-raised);
|
|
color: var(--motion-strong);
|
|
box-shadow: var(--motion-shadow-md);
|
|
font: var(--motion-weight-medium) var(--motion-text-sm)/var(--motion-space-20) var(--motion-font-sans);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.hf-toast-row {
|
|
display: flex;
|
|
min-width: 0;
|
|
align-items: center;
|
|
gap: var(--motion-space-8);
|
|
}
|
|
|
|
.hf-toast-icon {
|
|
flex-shrink: 0;
|
|
color: var(--motion-accent);
|
|
}
|
|
|
|
[data-toast-tone="error"] .hf-toast-surface {
|
|
border-color: color-mix(in srgb, var(--motion-danger) 40%, var(--motion-border));
|
|
}
|
|
|
|
[data-toast-tone="error"] .hf-toast-icon {
|
|
color: var(--motion-danger);
|
|
}
|
|
|
|
[data-motion-ui] .motion-inline-toast {
|
|
position: fixed;
|
|
inset: var(--toast-top) var(--motion-space-24) auto;
|
|
z-index: 1000;
|
|
box-sizing: border-box;
|
|
width: fit-content;
|
|
max-width: min(420px, calc(100% - 2 * var(--motion-space-24)));
|
|
margin: 0 auto;
|
|
pointer-events: none;
|
|
}
|
|
[data-motion-ui] .motion-inline-toast[hidden] { display: none; }
|