Skip to content

feat(core): merge reports in cli#2402

Merged
yuyutaotao merged 4 commits intomainfrom
feat/merge-reports-in-cli
Apr 27, 2026
Merged

feat(core): merge reports in cli#2402
yuyutaotao merged 4 commits intomainfrom
feat/merge-reports-in-cli

Conversation

@yuyutaotao
Copy link
Copy Markdown
Collaborator

No description provided.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 25, 2026

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: b07ccb9
Status: ✅  Deploy successful!
Preview URL: https://c31302e8.midscene.pages.dev
Branch Preview URL: https://feat-merge-reports-in-cli.midscene.pages.dev

View logs

@yuyutaotao yuyutaotao marked this pull request as ready for review April 27, 2026 02:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc76da3fa9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!sessionName) {
return undefined;
}
return readCliReportSession(sessionName)?.reportFileName;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent stale report session reuse across CLI runs

readCliReportFileName() always reuses the last persisted session when cli-report-session/<name>.json exists, so a later lazy command (for example after *_disconnect or from a fresh shell) can keep appending to an old report until another *_connect overwrites that file. This can silently merge unrelated devices/pages/runs into one artifact, which makes CLI report output misleading in stateless command workflows.

Useful? React with 👍 / 👎.

Comment on lines +127 to +128
} catch {
return undefined;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Throw on corrupted CLI report session data

The parser currently swallows JSON read/parse failures and returns undefined, so truncated or malformed session files fail open with no user-visible error. In that case report merging silently degrades (commands start using new default report names), which is hard to diagnose and violates the repository rule to throw when something goes wrong.

Useful? React with 👍 / 👎.

@yuyutaotao yuyutaotao merged commit b6e4a1f into main Apr 27, 2026
13 of 15 checks passed
@yuyutaotao yuyutaotao deleted the feat/merge-reports-in-cli branch April 27, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants