Correct UI Styles so the title bar shows - #108
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Robots Handler admin UI styling so the title/header area displays correctly, and adds an end-to-end Playwright UI test suite for robots/llms routing, environment overrides, and Opal token/tool endpoints. It also aligns robots.txt/llms.txt responses and unit tests to explicitly include UTF-8 in the Content-Type.
Changes:
- Fix admin SPA container styling by renaming the container class and adding layout/scroll CSS.
- Return
text/plain; charset=utf-8forrobots.txtandllms.txt, with corresponding unit test updates. - Add a new
ui-tests/Playwright + TypeScript test harness (page objects, specs, config, docs, env examples).
Reviewed changes
Copilot reviewed 34 out of 40 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ui-tests/tsconfig.json | Adds TypeScript compiler settings for the Playwright UI test project. |
| ui-tests/tests/robots-routing.spec.ts | E2E coverage for robots.txt host routing/isolation across sample domains. |
| ui-tests/tests/robots-priority.spec.ts | E2E coverage for robots.txt default vs host-specific precedence. |
| ui-tests/tests/opal.spec.ts | E2E coverage for Opal discovery + get-robots auth behaviors. |
| ui-tests/tests/opal-save.spec.ts | E2E coverage for Opal save-robots write/auth/validation behaviors. |
| ui-tests/tests/opal-llms.spec.ts | E2E coverage for Opal get-llms auth behaviors. |
| ui-tests/tests/opal-llms-save.spec.ts | E2E coverage for Opal save-llms write/auth/validation behaviors. |
| ui-tests/tests/llms-routing.spec.ts | E2E coverage for llms.txt host routing/isolation and 404 behavior. |
| ui-tests/tests/llms-priority.spec.ts | E2E coverage for llms.txt default vs host-specific precedence. |
| ui-tests/tests/environment-robots.spec.ts | E2E coverage for environment-level robots directives in header/meta tag. |
| ui-tests/tests/content-type.spec.ts | E2E validation of text/plain; charset=utf-8 for robots.txt and llms.txt. |
| ui-tests/tests/admin-smoke.spec.ts | Smoke test ensuring the admin SPA loads and lists sample sites. |
| ui-tests/src/textFile.ts | Adds a request helper that disables caching for deterministic assertions. |
| ui-tests/src/RobotsAdminPage.ts | Adds a page object for configuring robots.txt via the admin UI. |
| ui-tests/src/OpalTokenAdminPage.ts | Adds a page object for creating/deleting Opal bearer tokens via the UI. |
| ui-tests/src/opal.ts | Adds Playwright-request helpers for Opal discovery and tool endpoints. |
| ui-tests/src/LlmsAdminPage.ts | Adds a page object for configuring llms.txt via the admin UI. |
| ui-tests/src/EnvironmentAdminPage.ts | Adds a page object for environment robots override toggles. |
| ui-tests/src/domains.ts | Centralizes sample domain/host constants and unique content markers. |
| ui-tests/README.md | Documents setup/running and the intended coverage of the UI test suite. |
| ui-tests/playwright.config.ts | Configures Playwright (global setup, webServer, storageState, single worker). |
| ui-tests/package.json | Adds UI test npm scripts and devDependencies. |
| ui-tests/package-lock.json | Locks UI test npm dependencies. |
| ui-tests/global-setup.ts | Adds global authenticated login/session capture for Playwright tests. |
| ui-tests/.gitignore | Ignores Playwright artifacts, node_modules, auth state, and local env file. |
| ui-tests/.env.example | Adds template for admin credentials and environment name used by tests. |
| src/Stott.Optimizely.RobotsHandler/Robots/RobotsTextController.cs | Sets robots.txt Content-Type to include charset=utf-8. |
| src/Stott.Optimizely.RobotsHandler/Llms/LlmsTextController.cs | Sets llms.txt Content-Type to include charset=utf-8. |
| src/Stott.Optimizely.RobotsHandler.Ui/src/NavigationContainer.jsx | Updates container class name used for layout/styling. |
| src/Stott.Optimizely.RobotsHandler.Ui/src/index.css | Adds styles to position the UI and keep the content area scrollable. |
| src/Stott.Optimizely.RobotsHandler.Ui/package.json | Pins UI dependency versions and adds Volta node version. |
| src/Stott.Optimizely.RobotsHandler.Ui/package-lock.json | Updates UI lockfile to match pinned dependency versions. |
| src/Stott.Optimizely.RobotsHandler.Test/Robots/RobotsTextControllerTests.cs | Updates unit test expectation for robots.txt content type. |
| src/Stott.Optimizely.RobotsHandler.Test/Llms/LlmsTextControllerTests.cs | Updates unit test expectation for llms.txt content type. |
| Sample/OptimizelyTwelveTest/appsettings.Development.json | Adds Optimizely ContentGraph configuration values. |
| .claude/settings.json | Adds tool permission settings for a Claude-based workflow. |
Files not reviewed (2)
- src/Stott.Optimizely.RobotsHandler.Ui/package-lock.json: Generated file
- ui-tests/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes 107