Skip to content

[codex] Document Reborn WebUI legacy E2E coverage - #5376

Closed
ilblackdragon wants to merge 10 commits into
mainfrom
codex/reborn-webui-v2-e2e-docs-ci
Closed

ilblackdragon wants to merge 10 commits into
mainfrom
codex/reborn-webui-v2-e2e-docs-ci

Conversation

@ilblackdragon

Copy link
Copy Markdown
Member

Summary

  • Adds the Reborn E2E/Playwright port audit document.
  • Adds remaining legacy coverage-only scenarios for automations and CSP.
  • Expands the Reborn WebUI v2 workflow to run the migrated legacy browser suite.

Validation

  • tests/e2e/.venv/bin/python -m py_compile tests/e2e/scenarios/test_reborn_webui_v2_legacy_automations.py tests/e2e/scenarios/test_reborn_webui_v2_legacy_csp.py
  • tests/e2e/.venv/bin/pytest tests/e2e/scenarios/test_reborn_webui_v2_legacy_*.py -q (159 passed in 152.24s)
  • cargo build -p ironclaw_reborn_cli --features webui-v2-beta

Stacked after #5375.

@github-actions github-actions Bot added scope: ci CI/CD workflows scope: docs Documentation labels Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • staging
  • reborn-integration

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a8f1c319-06ba-440f-9035-b80d4d53b965

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added size: S 10-49 changed lines risk: medium Business logic, config, or moderate-risk modules contributor: core 20+ merged PRs labels Jun 27, 2026

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request ports legacy automation management and CSP/browser-safety checks to Reborn WebUI v2. The feedback suggests improving the CSP violation test by using a fresh page context instead of reloading an existing one to ensure initial load violations are captured, and replacing wait_for_timeout with page.wait_for_function to make the test more robust.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +34 to +47
async def test_reborn_legacy_csp_no_violations_on_load(reborn_v2_page):
"""Port of legacy CSP console violation check to the Reborn shell."""
violations = []
_record_csp_console_errors(reborn_v2_page, violations)

await reborn_v2_page.reload(wait_until="load")
await expect(reborn_v2_page.locator(SEL_V2["chat_composer"])).to_be_visible(
timeout=15000
)
await reborn_v2_page.wait_for_timeout(2000)

assert violations == [], (
"CSP violations detected on Reborn page load:\n" + "\n".join(violations)
)

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.

medium

Using reborn_v2_page (which has already loaded the page once during fixture setup) and then calling reload() is inefficient and can miss CSP violations or console errors that only occur on the very first page load (e.g., due to initial state, redirection, or caching).

Instead, we should create a fresh page context, register the console listener, and then perform the initial navigation, similar to how test_reborn_legacy_csp_no_js_errors_on_page_load is implemented.

Additionally, avoid using wait_for_timeout in tests. Prefer page.wait_for_function to poll for a specific condition (such as the document load state) to make the test more robust.

async def test_reborn_legacy_csp_no_violations_on_load(
    reborn_v2_server, reborn_v2_browser
):
    """Port of legacy CSP console violation check to the Reborn shell."""
    violations = []
    context = await reborn_v2_browser.new_context(viewport={'width': 1280, 'height': 720})
    page = await context.new_page()
    _record_csp_console_errors(page, violations)

    try:
        await page.goto(f'{reborn_v2_server}/v2/?token={REBORN_V2_AUTH_TOKEN}')
        await expect(page.locator(SEL_V2['chat_composer'])).to_be_visible(timeout=15000)
        await page.wait_for_function("() => document.readyState === 'complete'")
    finally:
        await context.close()

    assert violations == [], (
        'CSP violations detected on Reborn page load:\n' + '\n'.join(violations)
    )
References
  1. In tests, prefer page.wait_for_function to poll for a specific condition instead of using a fixed wait_for_timeout. This creates more robust tests by waiting for an expected state change rather than an arbitrary duration.

@serrrfirat

Copy link
Copy Markdown
Collaborator

/canary all

@github-actions

Copy link
Copy Markdown
Contributor

Started Reborn WebUI v2 live canary for 51202a2c79 with cases all: https://github.com/nearai/ironclaw/actions/runs/28402000515

@serrrfirat
serrrfirat force-pushed the codex/reborn-webui-v2-projects-settings branch from c7cbcfc to 7250adb Compare June 30, 2026 10:39
Base automatically changed from codex/reborn-webui-v2-projects-settings to main June 30, 2026 11:25
@ilblackdragon

Copy link
Copy Markdown
Member Author

Superseded. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: ci CI/CD workflows scope: docs Documentation size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants