Skip to content

docs(web): document per-action progress callbacks - #2890

Open
yaodong-shen wants to merge 1 commit into
web-infra-dev:mainfrom
yaodong-shen:yaodong-shen/docs-2794-action-progress
Open

docs(web): document per-action progress callbacks#2890
yaodong-shen wants to merge 1 commit into
web-infra-dev:mainfrom
yaodong-shen:yaodong-shen/docs-2794-action-progress

Conversation

@yaodong-shen

Copy link
Copy Markdown

Summary

  • document how to observe each atomic aiAct action and capture a Playwright screenshot before execution continues
  • add AiActProgressEvent and isAiActProgressEvent() so consumers can narrow the generic progress stream without any or unsafe casts
  • re-export the progress types and guard from both @midscene/web and @midscene/web/playwright
  • keep the English and Chinese Playwright guides in sync, including failure-site capture and listener cleanup

Closes #2794.

Validation

  • pnpm exec nx test @midscene/core (123 files, 1350 passed, 8 skipped)
  • pnpm --filter @midscene/core exec vitest --run tests/unit-test/agent-progress-bus.test.ts (8 passed)
  • pnpm exec nx run-many --target=build --projects=@midscene/core,@midscene/web
  • pnpm exec nx build doc (including search metadata checks)
  • repository install/prepare full build (27 projects)
  • biome check . --diagnostic-level=info --no-errors-on-unmatched --fix (1386 files, clean)
  • repository pre-commit lint-staged and commitlint hooks

Notes

The progress listener is awaited by the existing progress bus. The documented callback therefore captures the page after action_done or at the action_failed failure site, before the next action begins or aiAct() rejects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hope to receive a callback after "each atomic action is executed" in order to take screenshots / push real-time progress.

1 participant