microsoft / microsoft/vscode

Refactor Playwright chat input helper to use centralized configuration for timeouts and retries

Open
#334,640 0 comments 0 reactions 1 assignee Claimed by @hediet View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Overview
The Playwright chat input locator script currently relies on hardcoded magic numbers for polling intervals, visibility check attempts, and command palette timeouts. This makes test adjustments rigid when dealing with environment latency or runner differences.

## Proposed Solution
Introduce a centralized `CONFIG` object at the beginning of the script to cleanly manage all timing and retry parameters:
- `pollIntervalMs`
- `maxVisibleAttempts`
- `paletteTimeoutMs`
- `maxPaletteWaitAttempts`

## Benefits
- Improves code readability and eliminates magic numbers.
- Allows flexible tuning of test stability parameters from a single configuration block.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.