Skip to content

Commit 8f6a3e5

Browse files
authored
feat(studio): integrate android playground into shell (#2343)
* feat(electron-playground): scaffold native shell app * refactor(midscene-studio): rename from electron-playground and address review feedback Rename the shell app apps/electron-playground -> apps/midscene-studio (package name, HTML title, dev env var, docs/plan path) and apply the review follow-ups: - wait-for-electron-build: drop the freshnessWindowMs bypass so only strictly newer mtimes count as a fresh build - main: remove the process.cwd() fallback in getAppIconPath and cache the nativeImage - renderer: point the Playground component at the single app-level midscene-icon.png and delete the duplicate renderer copy - electron-contract: add JSDoc to ElectronShellApi and IPC_CHANNELS - sync-static-assets: rm the target dir before cp so stale files are not left behind Validated with pnpm --filter midscene-studio build and pnpm run lint. * refactor(studio): rename to studio and flatten component layout Rename the shell app apps/midscene-studio -> apps/studio (package name, docs/plan filename and contents) and flatten the renderer component tree by removing the incut-area-all-in-one directory layer so every shell component lives directly under src/renderer/components. - Move IncutAreaAllInOne, MainContent, Playground, Sidebar, globals.css up into src/renderer/components and drop the redundant barrel index.ts - Rename the asset helper to asset-urls.ts to avoid a file-vs-directory collision with the sibling assets/ folder - Update App.tsx and IncutAreaAllInOne.tsx imports to the new sibling paths, and tighten the midscene-icon.png relative path in asset-urls - Refresh docs/plan to reference apps/studio and pnpm --filter studio Validated with pnpm --filter studio build and pnpm run lint. * feat(studio): add shell tests and reorganize renderer * refactor(studio): rename IncutAreaAllInOne to ShellLayout Strip the incut-export naming from the shell app so the component and asset map names reflect their actual role instead of the design-tool provenance. - Rename the root layout component IncutAreaAllInOne -> ShellLayout (directory, default export, barrel re-export, App.tsx usage) - Rename the asset URL map incutAssetUrls -> assetUrls and update all three importers (MainContent, Playground, Sidebar) - Drop the data-incut-root attribute left behind by the design export Validated with pnpm --filter studio build, pnpm --filter studio test, and pnpm run lint. * feat(studio): integrate android playground into shell Wire the Android playground runtime into the Studio Electron shell and expose it through a reusable playground panel, with supporting changes to android-playground, playground-app, and visualizer. * feat(studio): redesign shell UI with new device icons and welcome playground - Replace device overview card icons with 40x40 SVGs; centralize under assetUrls.device to keep platform lookups uniform. - Simplify DisconnectedPreview to icon + title only; drop unused adbId/ onConnect props and sync the state preview test. - Remove Platform count from the sidebar header. - Redesign SessionSetupPanel in @midscene/playground-app with the new welcome layout (logo + title + description + ADB select + primary button); keep copy driven by sessionSetup.title/description so the component stays platform-neutral. - Drop the obsolete onRefreshTargets prop and its call site in PlaygroundConversationPanel. - Update android-playground session setup copy to match the welcome design. * fix(chrome-extension): alias node-only image libs to skip bundling Aliasing sharp and @silvia-odwyer/photon-node to false prevents the bundler from walking their native/optional deps (@img/sharp-wasm32, @img/sharp-libvips-dev, __dirname usage), silencing spurious build warnings. The extension only ever runs the browser path at runtime. * chore(workflow): finalize rebased studio tree * fix(studio): resolve playground package entry failures * fix(studio): harden env config parsing * fix(android): download scrcpy server directly * chore(chrome-extension): clarify photon browser bundling * fix(studio): align env config and sidebar settings
1 parent 47ccdde commit 8f6a3e5

File tree

112 files changed

+7186
-1057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+7186
-1057
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,9 @@ packages/playground/static/
138138
tsconfig.build.tsbuildinfo
139139
.webx
140140
.mcp.json
141-
docs/
142141
package-lock.json
143142
packages/all-in-one-playground/static/*
144143

145144
# rslib
146145
.rslib
147-
**/.rslib
146+
**/.rslib

apps/chrome-extension/rsbuild.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ export default defineConfig({
107107
),
108108
react: path.resolve(__dirname, 'node_modules/react'),
109109
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
110+
// Keep the browser-side Photon WASM path intact for the extension.
111+
// Only stub the node-only image dependencies so rspack does not walk
112+
// native/optional modules from shared image helpers.
113+
sharp: false,
114+
'@silvia-odwyer/photon-node': false,
110115
},
111116
},
112117
plugins: [

apps/studio/assets/android.svg

Lines changed: 10 additions & 0 deletions
Loading

apps/studio/assets/computer.svg

Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading

apps/studio/assets/devices.svg

Lines changed: 62 additions & 0 deletions
Loading

apps/studio/assets/harmony.svg

Lines changed: 10 additions & 0 deletions
Loading

apps/studio/assets/iphone.svg

Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)