Skip to content

fix: incorrect timeout handling in webServer configuration#2813

Merged
davydkov merged 1 commit into
likec4:mainfrom
zendy199x:fix/incorrect-timeout-handling-in-webserver-configurat
Apr 1, 2026
Merged

fix: incorrect timeout handling in webServer configuration#2813
davydkov merged 1 commit into
likec4:mainfrom
zendy199x:fix/incorrect-timeout-handling-in-webserver-configurat

Conversation

@zendy199x

@zendy199x zendy199x commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I've thoroughly read the latest contribution guidelines.
  • I've rebased my branch onto main before creating this PR.
  • My commit messages follow conventional spec
  • I've added tests to cover my changes (if applicable).
  • I've verified that all new and existing tests have passed locally for mobile, tablet, and desktop screen sizes.
  • My change requires documentation updates.
  • I've updated the documentation accordingly.

Copilot AI review requested due to automatic review settings March 28, 2026 14:24
@changeset-bot

changeset-bot Bot commented Mar 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1324d71

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4985b542-6bc9-40c8-9035-9a6fae01cc2c

📥 Commits

Reviewing files that changed from the base of the PR and between bd8e4f8 and 1324d71.

📒 Files selected for processing (3)
  • e2e/playwright.config.ts
  • e2e/playwright.playground.config.ts
  • tests/playwright.config.spec.ts
✅ Files skipped from review due to trivial changes (1)
  • e2e/playwright.playground.config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • e2e/playwright.config.ts
  • tests/playwright.config.spec.ts

📝 Walkthrough

Walkthrough

Added webServer.timeout: 60 * 1000 to two Playwright configs to increase server startup wait to 60s, and added a Vitest suite that validates Playwright config values including testDir, testIgnore, timeout, retries, reporter, and webServer shape/fields.

Changes

Cohort / File(s) Summary
Playwright Configuration Updates
e2e/playwright.config.ts, e2e/playwright.playground.config.ts
Added webServer.timeout: 60 * 1000 to both configs to extend the dev server startup wait time to 60 seconds.
Playwright Configuration Tests
tests/playwright.config.spec.ts
New Vitest test suite added to assert Playwright config properties: testDir, testIgnore, timeout, retries (CI-sensitive), reporter (CI vs non-CI), and webServer shape and fields (command, port, timeout).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding timeout configuration to webServer settings to fix incorrect timeout handling.
Description check ✅ Passed The pull request description includes all required checklist items, with all boxes appropriately checked, confirming tests were added and documentation was updated.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/playwright.config.spec.ts`:
- Around line 4-54: Tests currently construct configs with defineConfig and
assert the same literals, so they validate defineConfig instead of the real
exported Playwright configs; replace each test to import the actual exported
config object(s) from the Playwright config module (the module that currently
exports your Playwright configs) and assert their properties (testDir,
testIgnore, timeout, retries, reporter, webServer?.command/port/timeout) rather
than building a new config; keep using the same identifiers from the spec
(defineConfig, isCI, config.reporter, config.webServer) as references, adjust
test names to reflect they validate the exported config, and for CI-dependent
assertions ensure isCI is derived or mocked consistently with the production
config.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1be21d1b-45ec-456b-ad98-da15543b23ff

📥 Commits

Reviewing files that changed from the base of the PR and between 1a03286 and bd8e4f8.

📒 Files selected for processing (3)
  • e2e/playwright.config.ts
  • e2e/playwright.playground.config.ts
  • tests/playwright.config.spec.ts

Comment thread tests/playwright.config.spec.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to correct Playwright E2E webServer timeout handling by updating the Playwright configuration used to start local servers during E2E runs.

Changes:

  • Add an explicit timeout to webServer in the main E2E Playwright config.
  • Add an explicit timeout to webServer in the playground E2E Playwright config.
  • Add a new spec file intended to assert expected Playwright config values.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tests/playwright.config.spec.ts Adds tests intended to validate Playwright config values.
e2e/playwright.playground.config.ts Adds webServer.timeout for the playground server startup.
e2e/playwright.config.ts Adds webServer.timeout for the main E2E server startup.

Comment thread tests/playwright.config.spec.ts Outdated
Comment on lines +1 to +2
import { defineConfig } from '@playwright/test'
import { isCI } from 'std-env'

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

This spec file likely won't run in CI: the root Vitest config only executes the packages/*/vitest.config.ts projects, so tests/playwright.config.spec.ts is excluded. Also, the root workspace package doesn't declare @playwright/test as a dependency, so running this test from the root would fail module resolution unless you move it into the e2e/ workspace (or add the dependency and include this path in Vitest).

Copilot uses AI. Check for mistakes.
Comment thread tests/playwright.config.spec.ts Outdated
Comment on lines +4 to +8
test('playwright config has correct testDir', () => {
const config = defineConfig({
testDir: 'tests',
})
expect(config.testDir).toBe('tests')

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

test/expect are used throughout this file but never imported. If this is intended to be a Vitest spec, import them from vitest; if it's intended to be a Playwright test, import them from @playwright/test.

Copilot uses AI. Check for mistakes.
Comment thread tests/playwright.config.spec.ts Outdated
Comment thread e2e/playwright.config.ts
Comment on lines 60 to 64
command: 'pnpm likec4 start --verbose --no-react-hmr --no-build-webcomponent',
port: 5173,
stdout: 'pipe',
timeout: 60 * 1000,
env: {

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

webServer.timeout defaults to 60_000ms in Playwright Test (v1.56.x). Setting it to 60 * 1000 here does not change behavior, so it likely won't address “timeout handling” issues unless the intention is to increase it (or disable by setting 0).

Copilot uses AI. Check for mistakes.
Comment on lines 34 to 38
command: 'pnpm --filter @likec4/playground dev -- --port 5174',
port: 5174,
stdout: 'pipe',
timeout: 60 * 1000,
reuseExistingServer: !isCI,

Copilot AI Mar 28, 2026

Copy link

Choose a reason for hiding this comment

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

webServer.timeout defaults to 60_000ms in Playwright Test (v1.56.x). Making it explicit as 60 * 1000 is a no-op; if this PR is meant to fix server-start timeouts, consider increasing this value (or using 0 to disable the startup timeout).

Copilot uses AI. Check for mistakes.
- update tests/playwright.config.spec.ts
- address 1 review comment(s)

Signed-off-by: Zendy <50132805+zendy199x@users.noreply.github.com>
@zendy199x zendy199x force-pushed the fix/incorrect-timeout-handling-in-webserver-configurat branch from bd8e4f8 to 1324d71 Compare March 28, 2026 14:49
@davydkov davydkov enabled auto-merge (squash) April 1, 2026 10:22
@davydkov davydkov disabled auto-merge April 1, 2026 10:22
@davydkov davydkov merged commit d46d5ff into likec4:main Apr 1, 2026
14 checks passed
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.

3 participants