Skip to content

Conversation

@own-boldsbrain
Copy link
Member

Summary

  • instrument client with OpenTelemetry and structured logging
  • persist scenarios in IndexedDB and add performance budgets
  • wire telemetry provider into app layout and expand CI scripts

Testing

  • pnpm lint
  • pnpm typecheck (fails: Cannot find module 'ai/react', etc.)
  • pnpm test (terminated: long-running e2e tests)
  • pnpm build (fails: POSTGRES_URL is not defined)

https://chatgpt.com/codex/tasks/task_e_68ba49c053608332a984f0568e045c95

Copilot AI review requested due to automatic review settings September 5, 2025 02:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds client-side telemetry instrumentation and scenario persistence functionality to improve monitoring and data persistence capabilities.

  • Adds OpenTelemetry client instrumentation with structured logging
  • Implements IndexedDB-based scenario persistence with CRUD operations
  • Integrates Lighthouse CI for performance monitoring and budgets

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Adds OpenTelemetry dependencies, IndexedDB library, Lighthouse CI tooling, and new npm scripts
lighthouserc.json Configures Lighthouse CI settings for performance monitoring
lighthouse-budgets.json Sets performance budgets for script size and interactivity metrics
lib/telemetry.ts Implements OpenTelemetry client-side instrumentation setup
lib/log.ts Creates structured logging utility with email sanitization
components/telemetry-provider.tsx React component to initialize telemetry on client mount
apps/web/lib/scenarios/db.ts IndexedDB wrapper for scenario persistence operations
apps/web/lib/chat/parsers.ts Refactors regex execution to avoid infinite loop potential
apps/web/components/chat/TaskFeed.tsx Changes React key from array index to log content
app/layout.tsx Integrates TelemetryProvider into app layout

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +2 to +3
// eslint-disable-next-line import/no-unresolved
import { SimpleSpanProcessor, ConsoleSpanExporter } from '@opentelemetry/sdk-trace-base';
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

[nitpick] The eslint-disable comment suggests an import resolution issue. Consider fixing the underlying import problem rather than suppressing the linting rule.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +33
{step.logs?.map((log) => (
<div key={log}>{log}</div>
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Using log content as React key can cause issues if logs contain duplicate content or non-string values. Consider using array index with a stable prefix or generate unique IDs for logs.

Suggested change
{step.logs?.map((log) => (
<div key={log}>{log}</div>
{step.logs?.map((log, idx) => (
<div key={`log-${idx}`}>{log}</div>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants