Update general tab copy and move custom domain setting.#9
Open
paulber33 wants to merge 6 commits into
Open
Conversation
## Summary This PR further improves E2E workflow reliability and speed. Fixes simpleanalytics#34 ### 1. Playwright browser caching E2E runs were repeatedly downloading Playwright browsers, which made CI slower and more prone to transient download failures. **Fix:** Added Playwright browser caching so repeated runs can reuse downloaded browsers. ### 2. Azure archive mirror timeouts Ubuntu package downloads from the Azure archive mirror sometimes time out during Playwright dependency installation. **Fix:** Switched CI package downloads to the main Ubuntu archive mirror. This is a bit hacky, but it appears to be much faster and more reliable. ### 3. WordPress readiness check `wp-env start` does not always mean WordPress is fully ready before tests continue. **Fix:** Added a WordPress login page check before installing Playwright and running tests. --- ## Security implications - [x] No meaningful security impact. The cache only stores Playwright browser binaries and is keyed by `pnpm-lock.yaml`. - [ ] Has security impact - described as: --- ## Testing - Verified workflow changes - Triggered GitHub Actions E2E tests --- ## Checklist - [x] Linked to an issue - [x] Tested - [x] Asked for a review
…mpleanalytics#32) Expose explicit script prefix and exclusion reasons in rendered output, and harden Playwright scenarios to avoid state leakage from excluded IP settings across tests. ## Summary Closes simpleanalytics#13 Clarifies script injection behavior by rendering explicit comments for active and inactive tracking states. The inactive output now includes the tracking rule that excluded the visitor, making the rendered page easier to inspect and debug. ```html <!-- Simple Analytics - 100% privacy-first analytics (official WordPress plugin) --> <script src="https://scripts.simpleanalyticscdn.com/latest.js"></script> <!-- Simple Analytics: Script not included because this visitor is excluded by tracking rule: Exclude User Role --> <script src=".../resources/js/inactive.js"></script> <!-- Simple Analytics: Script not included because this visitor is excluded by tracking rule: Exclude IP Address --> <script src=".../resources/js/inactive.js"></script> ``` Also stabilizes browser coverage by isolating excluded IP settings between Playwright scenarios. ## Security implications - [x] No security impact - [ ] Has security impact - described as: ## Testing Covered by updated Playwright browser scenarios for active script rendering, excluded user roles, and excluded IP addresses. ## Checklist - [x] Linked to an issue - [x] Tested - [x] Asked for a review
Prevent undefined array key warnings by safely defaulting to null. ## Summary Closes simpleanalytics#19 Updates the excluded IP tracking rule so `REMOTE_ADDR` safely falls back to `null` when neither `HTTP_X_FORWARDED_FOR` nor `REMOTE_ADDR` is available. This prevents PHP undefined array key warnings while preserving the existing behavior of returning `false` when no IP address is present. ## Security implications - [x] No security impact - [ ] Has security impact - described as: ## Testing Manually reviewed and confirmed the fallback now avoids reading an undefined `REMOTE_ADDR` key. ## Checklist - [x] Linked to an issue - [x] Tested - [ ] Asked for a review Co-authored-by: Cursor <cursoragent@cursor.com>
This reduces setup confusion by keeping custom domain under Advanced, adds clearer onboarding copy and dashboard links in General, hides Save Changes on that informational tab, and updates browser tests for the revised tab behavior.
87aff0f to
5834a3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This avoids confusion by keeping custom domain under Advanced, adds clearer onboarding content in General, and aligns browser tests with the updated tab behavior.