Skip to content

Conversation

@erseco
Copy link

@erseco erseco commented Oct 8, 2025

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +127 to +143
// Test-env override: when running E2E with Panther, the page origin
// is the internal PHP server (exelearning:908X), which doesn't host Mercure.
// Force the hub to the Nginx/Caddy endpoint in the exelearning container.
if (window.eXeLearning?.symfony?.environment === 'test') {
// Only override if not already explicitly set to a non-908X host
try {
const current = window.eXeLearning.mercure?.url || '';
const url = new URL(current || 'http://exelearning');
const isPantherPort = /^90\d{2}$/.test(
String(urlRequest.port || '')
);
const isCurrentOk = current.includes('exelearning:8080');
if (!isCurrentOk && isPantherPort) {
window.eXeLearning.mercure = {
...(window.eXeLearning.mercure || {}),
url: 'http://exelearning:8080/.well-known/mercure',
};

Choose a reason for hiding this comment

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

P1 Badge Avoid overriding custom Mercure hub in test mode

The test‑mode fallback always rewrites window.eXeLearning.mercure.url whenever the page is loaded from a 908x port, regardless of what the current hub is set to. This means a caller who intentionally configured window.eXeLearning.mercure.url to an external hub (e.g. https://mercure.example.com) will still be forced back to http://exelearning:8080/.well-known/mercure in every test run. The conditional only checks the page origin’s port via urlRequest.port rather than the parsed current hub, so any environment served from 908x gets clobbered. Consider basing isPantherPort on the parsed current URL (or skipping the override when the existing hub host already differs from 908x) so custom hubs survive.

Useful? React with 👍 / 👎.

erseco added 23 commits October 8, 2025 14:27
…m:exelearning/exelearning into feature/add-e2e-factories
Removed the PRAGMA foreign_keys setting to allow default behavior. There are many errors on Symfony when using them
Removed assertions for foreign keys and deleted a test for concurrent writers.
…m:exelearning/exelearning into feature/add-e2e-factories
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.

2 participants