481 Commits

Author SHA1 Message Date
zhouxiao.shaw
5418ac23ad feat(cache): ensure cache directory exists before writing and improve illegal character handling in paths 2025-06-02 22:20:30 +08:00
zhouxiao.shaw
091ad4f564 feat(record): implement caching for element descriptions and screenshots to enhance performance 2025-06-01 21:28:08 +08:00
zhouxiao.shaw
4de7fd81f7 feat(record): improve session management and code quality
- Optimize session creation to use timestamp naming by default without requiring modal input
     - Improve UI layout to display titles and descriptions more effectively in both list and
     detail views
     - Apply code formatting improvements across the codebase for better readability
     - Fix linting issues in scripts and component files
2025-06-01 11:30:06 +08:00
zhouxiao.shaw
e20d18105d chore: delete unless config 2025-05-30 15:46:31 +08:00
zhouxiao.shaw
c3080a7504 chore: optimize select box logic 2025-05-30 15:45:39 +08:00
zhouxiao.shaw
3b8647f9ec feat(record): enhance event data with coordinates in event recorder
- Add x and y coordinates to the event data sent to the Chrome extension
- Update RecordTimeline component to utilize new coordinate properties for element positioning
- Ensure compatibility with existing event handling logic
2025-05-29 22:32:49 +08:00
zhouxiao.shaw
a0f798f6aa feat(chrome-extension): enhance event recording with new features and dependencies
- Add @rsbuild/plugin-node-polyfill to support Node.js polyfills in the project
- Update event recording logic to include viewport dimensions and element positioning
- Improve screenshot handling by integrating new properties in RecordedEvent interface
- Enhance RecordTimeline component to display element positioning and dimensions
- Optimize event handling and UI updates for better user experience
- Clean up and refactor code for improved readability and maintainability
2025-05-29 20:18:00 +08:00
zhouxiao.shaw
cfa45ac11d feat(chrome-extension): align React and TypeScript versions across the project
- Downgrade React and React DOM to 18.3.1 in all packages for consistency
- Update @types/react and @types/react-dom to 18.3.1
- Ensure TypeScript version is consistently set to ^5.8.3
- Adjust dependencies in package.json files for various apps and packages
- Enhance Chrome extension functionality with safe API wrappers for better error handling
- Implement checks for Chrome extension environment in recording components
2025-05-29 16:15:57 +08:00
zhouxiao.shaw
7bbbf403d9 feat(record): add screenshot capture for recorded events
- Add screenshot capture before and after each recorded event
- Implement screenshot capture in chrome extension service worker
- Add screenshot fields to RecordedEvent interface
- Create UI components for displaying screenshot thumbnails in timeline
- Add hover effects and popover for screenshot preview
- Remove unused AGENTS.md file
2025-05-29 15:21:38 +08:00
zhouxiao.shaw
84fb598233 fix(core): align dependency versions across workspace
- Update React to ^19.1.0 and React DOM to >=19.1.0 in all packages
- Update @types/react to ^19.1.4 and @types/react-dom to ^19.1.3
- Update TypeScript to ^5.8.3 across all packages
- Update dayjs to use caret version ^1.11.11
- Align all rsbuild and rslib plugin versions
- Fix dependency version inconsistencies to pass CI checks
2025-05-28 12:31:58 +08:00
zhouxiao.shaw
126b0ce8c2 feat(chrome-extension): add recording functionality
- Add new record UI components (record.tsx, record.less)
- Integrate recording capabilities into popup extension
- Update worker script to handle recording events
- Add content script wrapper for recording injection
- Remove EventRecorder from record-form app (moved to extension)
- Update manifest.json permissions for recording
- Update dependencies for recording functionality
- Enhance store with recording state management
2025-05-28 12:03:02 +08:00
zhouxiao.shaw
df96f7fe7d chore: modify comment 2025-05-27 16:34:23 +08:00
zhouxiao.shaw
5070fd7bb8 chore: delete unless config 2025-05-27 16:17:21 +08:00
zhouxiao.shaw
938153a3cc chore: optimize record iife logic 2025-05-27 16:15:32 +08:00
zhouxiao.shaw
725e0a40a6 chore: add record lib 2025-05-27 15:47:39 +08:00
yutao
fd6703c6d5 chore(core): add test cases 2025-05-22 07:31:55 +08:00
yutao
c308853c22 Merge branch 'main' of https://github.com/wangliang0304/midscene-joker into wangliang0304-main 2025-05-22 07:22:21 +08:00
Leyang
7b190ae4ee
fix(web-integration): sanitize content for reportHtmlContent (#745)
* fix(web-integration): sanitize content for reportHtmlContent

* fix(workflow): version

* fix(web-integration): recover after retrieve

* fix(web-integration): test

* chore(core): fix lint

* fix(report): remove ! for content

* chore(core): add test case

* chore(core): add test case

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-22 07:20:32 +08:00
yuyutaotao
08466cac1e
feat(core): add element describer (#750) 2025-05-21 21:05:47 +08:00
Anthony
58c232e395 fix(web-integration): 处理androi模式的yaml格式情况下,deviceId首位为0被去除的问题.数字格式自动转为字符串格式 - new 2025-05-21 20:57:07 +08:00
yuyutaotao
610e7979bf
fix(core): error in report file when planning failed (#747)
* fix(core): error in report file when planning failed

* chore(core): add testcase for aiQuery
2025-05-21 20:36:22 +08:00
yutao
211fbd37d8 feat(core): update aiExtraction prompt 2025-05-21 19:51:34 +08:00
yutao
a192429e08 Merge branch 'blade-dev' of https://github.com/HBLADEH/midscene into HBLADEH-blade-dev 2025-05-21 19:30:10 +08:00
Leyang
4c8d881614
fix(web-integration): handle undefined aiInput case in ScriptPlayer (#743)
* fix(web-integration): handle undefined aiInput case in ScriptPlayer

* fix(workflow): version

* fix(core): yaml player

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-21 19:18:29 +08:00
yuyutaotao
1589d10f35
docs(core): update blog (#735)
* docs(core): update blog

* docs(blog): update workflow blog

* docs(site): add details and pic

* docs(site): update pic

* docs(site): update pic 2

---------

Co-authored-by: quanruzhuoxiu <quanruzhuoxiu@gmail.com>
2025-05-21 16:49:26 +08:00
Leyang
5a1a3ba18a
feat(web-integration): support disable cache for a single api call (#740)
* feat(web-integration): support disable cache for a single api call

* feat(workflow): version mismatch

* feat(web-integration): cache rename to cacheable

* feat(web-integration): add cacheable option to multiple API methods and update caching documentation

* docs(site): update cacheable option descriptions to reference caching feature documentation

* docs(core): update caching doc

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-21 16:46:20 +08:00
github-actions[bot]
049d9f6565 release: v0.17.1 2025-05-20 09:11:17 +00:00
dependabot[bot]
9c3d0f7fe7
chore(deps): bump semver from 7.3.7 to 7.5.2 in /packages/web-integration (#738)
* chore(deps): bump semver in /packages/web-integration

Bumps [semver](https://github.com/npm/node-semver) from 7.3.7 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.7...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-version: 7.5.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: resolve lock file

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-05-20 15:58:34 +08:00
bac9051d2d
feat(evaluation): add screenspot v2 evaluation (#737)
* feat(evaluation): add screenspot v2 evaluation

* style(evaluation): format files array in package.json
2025-05-20 15:52:03 +08:00
yuyutaotao
5a041bcba3
fix(core): dump page context when locate fails (#736)
* fix(core): dump page context when locate fails

* fix(core): dump page context when locate fails

* fix(core): dump page context when locate fails
2025-05-20 15:08:14 +08:00
Leyang
fb2580616c
fix cache bugs(scroll instant, text node info, cache hit condition) (#732)
* fix(web-integration): cache hit when element.id exist and scroll element instantly

* fix(web-integration): use parent xpath for text node

* fix(web-integration): only scroll in to view when element is not completly visible

* fix(shared): distinct text node

* test(web-integration): getElementInfoByXpath

* test(web-integration): rename desc

* test(web-integration): fix

* test(web-integration): snapshot attributes only

* test(web-integration): fix test
2025-05-20 13:19:32 +08:00
HBLADEH
f51583caf8 feat(core): inspect.ts Enforce stricter data format 2025-05-19 19:31:10 +08:00
HBLADEH
6aa9f2bb3d feat(core): inspect.ts Enforce stricter data format 2025-05-19 19:14:03 +08:00
github-actions[bot]
39ddc57df3 release: v0.17.0 2025-05-16 14:32:01 +00:00
Leyang
b10a7751d4
fix(report): show highlight elment when cache hit (#723)
* fix(report): show highlight elment when cache hit

* fix(core): replay animation

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-16 22:28:29 +08:00
yuyutaotao
b261ed7f2a
feat(web): use xpath and yaml as cache (#711)
* feat(web-integration): use xpath for cache instead of id

* feat(web-integration): enhance TaskCache to support xpaths for cache matching and add new test cases

* feat(web-integration): add debug log for unknown page types in TaskCache

* feat(web-integration): update caching logic and cache hit conditions for Plan and Locate tasks

* chore(core): update debug log

* feat(web-integration): update rspress.config and enhance TaskCache structure with new properties

* feat(web-integration): recalculate id when hit cache

* fix(web-integration): update mock implementation in task-cache test to use evaluate method

* feat(web-integration): enhance element caching by adding XPath support and improving cache hit logic

* chore(core): lint

* feat(web-integration): improve XPath handling in web-extractor

* test(web-integration): fix tests

* feat(core, web-integration): add attributes to LocateResultElement and enhance element handling

* fix(core): lint

* feat(web-integration): add midsceneVersion to TaskCache and update cache validation logic

* fix(core): test

* fix(web-integration): update cache validation logic to prevent reading outdated midscene cache files

* feat(web-integration): enhance TaskCache to track used cache items and improve cache retrieval logic

* fix(core): xpath logic (#710)

* feat(core): resue context for locate

* feat(core): build yamlFlow from aiAction

* feat(core): refine task-cache

* feat(core): update cache

* feat(core): refine task-cache

* feat(core): refine task-cache

* feat(core): remove unused checkElementExistsByXPath

* feat(core): use yaml file as cache

* chore(core): fix lint

* chore(core): print warning for previous cache

* refactor(core): remove quickAnswer references and improve element matching logic

* fix(core): update import path for buildYamlFlowFromPlans

* chore(web-integration): update output image and skip task error test

* fix(web-integration): update test snapshots to handle beta versions

* fix(web-integration): adjust test snapshots for version consistency

* fix(web-integration): track original cache length and adjust matching logic in tests

* fix(web-integration): update test URLs to reflect new target site and enable previously skipped test

* chore(core): update cache docs

* fix(core): test

* feat(core): try to match element from plan

* fix(web-integration): cache id stable when retry in palywright

* fix(web-integration): typo

* style(web-integration): lint

* fix(web-integration): stable cacheid in tests

* fix(web-integration): cache id

---------

Co-authored-by: quanruzhuoxiu <quanruzhuoxiu@gmail.com>
2025-05-16 17:16:56 +08:00
yuyutaotao
fba2c00aec
chore(core): update bbox preprocessing of ui-tars (#716) 2025-05-16 13:22:57 +08:00
Leyang
b9ff80a0db
implement repeat function for scrolling until actions (#713)
* feat(android): implement repeat function for scrolling until actions

* fix(shared): fix potential error in getAIConfig by ensuring trim is called correctly

* feat(android): update scrolling behavior with adjustable duration and added sleep

* feat(android): refine scrolling durations with new constants for fast and normal scroll
2025-05-14 18:28:10 +08:00
Leyang
388bbb6a34
fix(android): update yadb (#714) 2025-05-14 18:26:54 +08:00
github-actions[bot]
571ec07829 release: v0.16.10 2025-05-09 09:00:22 +00:00
yuyutaotao
34e15c7247
fix(core): empty report issue (#702)
* fix(core): empty report issue

* fix(core): empty report issue
2025-05-09 16:51:30 +08:00
github-actions[bot]
7f982f7cb7 release: v0.16.9 2025-05-09 03:44:51 +00:00
yuyutaotao
73188fa43f
fix(core): bundle template content into core package (#699)
* fix(core): bundle template content into core package

* fix(core): lint

* docs: add bundler mode error msg

* fix(core): ci

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-05-09 11:41:16 +08:00
yutao
99b4bf4638 fix(core): lint 2025-05-09 11:05:04 +08:00
yutao
6224154bdc Merge branch 'main' of https://github.com/neewbee/midscene into neewbee-main 2025-05-09 10:55:12 +08:00
Leyang
57f1a7b7d2
feat(site): seo optimization (#693)
* feat(site): seo optimization

* feat(android, web-integration): update package descriptions and add keywords

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-05-08 10:54:52 +08:00
HBLADEH
7762e5d04e
feat(android): fix custom adb path no effect (#688)
* feat(android): fix custom adb path no effect

* feat(android): fix custom adb, removed redundant `this.adb =` assignment
2025-05-06 17:29:13 +08:00
github-actions[bot]
c5a88931f0 release: v0.16.8 2025-04-30 14:31:14 +00:00
yuyutaotao
c1bc73c78b
feat(android): customize adb path (#684)
* feat(shared): add custom adb path
feat(android): add custom adb path

* feat(android): add docs for custom adb path

---------

Co-authored-by: HBLADEH <1012582116@qq.com>
2025-04-30 17:16:38 +08:00
yuyutaotao
6a8ccbbde4
fix(core): id conflict in quick answer (#679)
* fix(core): id conflict in quick answer

* fix(core): lint

* docs(core): update docs for qwen

* fix(core): test case

* refactor(core): refactor elementById args

* refactor(core): refactor elementById args

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-04-30 16:51:31 +08:00