oh-my-muse/muse-studio
lili d1917b4f77 test(studio-e2e): 收窄 agent-slot-bind 断言到槽位面板容器,根治 strict mode 歧义 flaky
agent-slot-bind:94 之前 flaky(~64% 失败):getByText(当前:xxx v1)全局 strict 命中 2 元素(AgentPage 沙盒试用区 selectedAgent 回显 + SlotBindingPanel 槽位 boundAgentName、选中 agent==已绑时同文案),与槽位异步读时机竞速。收窄到 div.rounded-2xl filter 作品槽位绑定 槽位面板容器内断言(仿套件其他 spec 的 locator().filter() scope、不改产品)。

验证:10 次独立 playwright test 循环(每轮重跑 globalSetup 复位 revision=1、非 --repeat-each 避 fixture 漂移伪红)10/10 全绿、无 strict mode violation。预存 flaky(commit 1fbe7ae 引入、非本轮回归);至此 studio e2e 56/56。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 20:16:07 -07:00
..

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])