AI summarize: end-to-end Playwright coverage

Open
#2,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
playwright, typescript
Domain
frontend, testing

Research direction

Start with packages/app/tests/e2e/features/ai-summarize.spec.ts and the existing mockGenerateText pattern in aiSummarize.test.ts. Wait for PR C to create the event-panel entry point and page object, then cover disabled, successful, provider-error, and rate-limit responses while mocking POST /ai/summarize. Done means the E2E coverage is green in CI and this issue links its PR.

Written by the indexing model from the issue text.

Description

ai-generated app

Summary

Track follow-up E2E test coverage for the AI summarize feature being introduced by the HDX-3992 stack.

Why

The backend endpoint (POST /ai/summarize, PR #2206) lands with 26 unit / integration tests. The user-facing flow (open log/trace event panel, click Summarize, see panel render with model output) does not have its own Playwright test yet because it has no UI consumer until PR C wires the summarize button onto the event panel.

When PR C ships, an E2E test should land alongside it covering:

  • AI-disabled path: button is hidden (or shows the disabled-state hint, depending on what PR C does).
  • AI-enabled happy path: click summarize on a log row → loading state → panel renders the returned summary text.
  • AI-enabled error path: provider returns a non-200 → panel surfaces an actionable error, not "this errored out".
  • Rate-limit path: 31st request in a window receives a 429 surfaced as a friendly retry-after message.

The test should mock the POST /ai/summarize response so it does not depend on a live model provider in CI; the existing mockGenerateText pattern in aiSummarize.test.ts is fine to mirror at the network layer.

Where it lives

  • New spec: packages/app/tests/e2e/features/ai-summarize.spec.ts.
  • Page object lives near the event-panel page object once PR C creates the entry point.

Done when

  • E2E coverage above is in CI green.
  • This issue links the PR that adds it.

Refs

  • HDX-3992 (parent ticket)
  • #2188 (redactSecrets utility)
  • #2206 (POST /ai/summarize endpoint, this issue is its E2E follow-up)
Dominant language
TypeScript
Stars
9.9k
Forks
471
Avg merge
2d 4h
Merged PRs (30d)
117

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperdxio/hyperdx

All issues in hyperdxio/hyperdx

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.