Skip to content

feat(report): add agent markdown export view#2711

Open
quanru wants to merge 2 commits into
mainfrom
feat/report-agent-markdown-export
Open

feat(report): add agent markdown export view#2711
quanru wants to merge 2 commits into
mainfrom
feat/report-agent-markdown-export

Conversation

@quanru

@quanru quanru commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a report-level Markdown View for agent analysis with syntax-highlighted markdown in the left sidebar and a screenshot timeline on the right.
  • Add icon-only copy/download actions for report markdown and a ZIP containing report.md plus referenced screenshots.
  • Include model and token usage context in markdown/HTML agent metadata, preserve file-backed screenshot refs, and keep markdown screenshot links aligned with exported image names.

Validation

  • pnpm --dir apps/report test src/utils/markdown-export.test.ts
  • pnpm --dir packages/core test tests/unit-test/report-markdown.test.ts tests/unit-test/html-utils.test.ts tests/unit-test/report-generator.test.ts tests/unit-test/report-cli.test.ts
  • pnpm run lint
  • pnpm exec nx build @midscene/report
  • pnpm --dir apps/report generate-demo
  • Browser DOM validation for Markdown View switching, icon-only download button, screenshot rendering, markdown image jump-to-screenshot behavior, and restored sidebar header layout

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

Copy link
Copy Markdown

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: b22f4ad539

ℹ️ 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".

Comment thread apps/report/src/App.tsx
if (reportViewMode !== 'markdown') {
return null;
}
return getReportMarkdownView(dump, reportToMarkdown);

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 Include every dump in report markdown export

When a report HTML contains multiple PlaywrightTasks groups, such as a merged Playwright report, dump is only the currently selected case from the store (initially the first case). The new Markdown View builds copy/download content from that single value, while the case selector is replaced by the markdown source in this mode, so exporting report.md silently omits all other cases in the same report. Build the markdown from dumps or preserve a way to select/aggregate cases in Markdown View.

Useful? React with 👍 / 👎.

@quanru quanru force-pushed the feat/report-agent-markdown-export branch from b22f4ad to f2dab8b Compare June 24, 2026 09:17
@quanru quanru force-pushed the feat/report-agent-markdown-export branch from 629a619 to 39ef9fb Compare June 29, 2026 11:42
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.

1 participant