fix(uptime): fix TCP monitor UX — correct format guidance and add client-side validation#863
fix(uptime): fix TCP monitor UX — correct format guidance and add client-side validation#863Wikid82 merged 25 commits intodevelopmentfrom
Conversation
…n-major-updates chore(deps): update dependency anchore/grype to v0.110.0 (feature/beta-release)
…ent-side validation The TCP monitor creation form showed a placeholder that instructed users to enter a URL with the tcp:// scheme prefix (e.g., tcp://192.168.1.1:8080). Following this guidance caused a silent HTTP 500 error because Go's net.SplitHostPort rejects any input containing a scheme prefix, expecting bare host:port format only. - Corrected the urlPlaceholder translation key to remove the tcp:// prefix - Added per-type dynamic placeholder (urlPlaceholderHttp / urlPlaceholderTcp) so the URL input shows the correct example format as soon as the user selects a monitor type - Added per-type helper text below the URL input explaining the required format, updated in real time when the type selector changes - Added client-side validation: typing a scheme prefix (://) in TCP mode shows an inline error and blocks form submission before the request reaches the backend - Reordered the Create Monitor form so the type selector appears before the URL input, giving users the correct format context before they type - Type selector onChange now clears any stale urlError to prevent incorrect error messages persisting after switching from TCP back to HTTP - Added 5 new i18n keys across all 5 supported locales (en, de, fr, es, zh) - Added 10 RTL unit tests covering all new validation paths including the type-change error-clear scenario - Added 9 Playwright E2E tests covering placeholder variants, helper text, inline error lifecycle, submission blocking, and successful TCP creation Closes #issue-5 (TCP monitor UI cannot add monitor when following placeholder)
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
✅ Supply Chain Verification Results✅ PASSED 📦 SBOM Summary
🔍 Vulnerability Scan
📎 Artifacts
Generated by Supply Chain Verification workflow • View Details |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…and payload validation
…cates to v0.30.0
…n-major-updates chore(deps): update non-major-updates (feature/beta-release)
…ck-fields-retry-4.x chore(deps): update nick-fields/retry action to v4 (feature/beta-release)
There was a problem hiding this comment.
Pull request overview
This PR primarily fixes the TCP uptime monitor creation UX to prevent users from entering scheme-prefixed values (e.g., tcp://host:port) that the backend rejects, by improving guidance, validation, and form ordering. It also includes several supply-chain / tooling updates (Docker build dependency pinning, GitHub Actions tweaks, and npm dependency bumps) that go beyond the PR description’s stated scope.
Changes:
- Update the Create Monitor modal to use type-specific placeholders + helper text, reorder fields (type before URL), and add client-side validation blocking
://for TCP. - Add/adjust unit (Vitest/RTL) and Playwright E2E coverage for the new TCP UX behavior, and update an existing E2E test to use bare
host:port. - Apply dependency and CI/security maintenance: Dockerfile Go module pin, Grype version bump, and minor npm package bumps.
Reviewed changes
Copilot reviewed 21 out of 30 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/monitoring/uptime-monitoring.spec.ts | Update TCP creation test to use bare host:port and assert the same payload |
| tests/monitoring/create-monitor.spec.ts | New Playwright E2E coverage for TCP UX behavior in the create modal |
| package.json | Bump tar dev dependency |
| package-lock.json | Lockfile update for tar bump |
| frontend/src/pages/Uptime.tsx | Implement dynamic placeholder/helper, TCP scheme validation, inline error, and field reorder |
| frontend/src/pages/tests/Uptime.test.tsx | Update i18n mock keys to reflect new placeholders/helpers/error text |
| frontend/src/pages/tests/Uptime.tcp-ux.test.tsx | New RTL test suite validating TCP UX and submission blocking |
| frontend/src/locales/en/translation.json | Add TCP UX i18n keys and correct placeholder guidance |
| frontend/src/locales/de/translation.json | Add TCP UX i18n keys |
| frontend/src/locales/fr/translation.json | Add TCP UX i18n keys |
| frontend/src/locales/es/translation.json | Add TCP UX i18n keys |
| frontend/src/locales/zh/translation.json | Add TCP UX i18n keys |
| frontend/package.json | Bump jsdom dev dependency |
| frontend/package-lock.json | Lockfile updates for jsdom (and transitive deps like undici) |
| docs/reports/qa_report.md | Add QA/security audit report content for this PR |
| docs/plans/current_spec.md | Overwrite/extend plan content (now includes TCP UX + other unrelated investigation content) |
| docs/issues/pr5-tcp-monitor-ux-manual-test.md | New manual test plan doc for PR-5 |
| Dockerfile | Add smallstep/certificates version arg and pin via go get during Caddy build |
| CHANGELOG.md | Document TCP monitor UX fix and new i18n keys |
| .github/workflows/supply-chain-pr.yml | Bump Grype install version in PR supply-chain scan workflow |
| .github/workflows/docker-build.yml | Update nick-fields/retry action pin for build/push |
| .github/skills/security-scan-docker-image-scripts/run.sh | Keep local script guidance/defaults aligned with Grype version bump |
| .github/agents/Supervisor.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/QA_Security.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/Playwright_Dev.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/Planning.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/Frontend_Dev.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/Doc_Writer.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/DevOps.agent.md | YAML frontmatter formatting change (tools list line) |
| .github/agents/Backend_Dev.agent.md | YAML frontmatter formatting change (tools list line) |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
…ip-6.x chore(deps): update dependency knip to v6 (feature/beta-release)
…n-major-updates fix(deps): update non-major-updates (feature/beta-release)
…n-major-updates fix(deps): update non-major-updates (feature/beta-release)
… reflect critical CVE-2025-68121 and additional high-severity issues
…7 in package-lock.json
…put in CreateMonitorModal
Problem
The TCP monitor creation form displayed a placeholder instructing users to enter a URL with a
tcp://scheme prefix (e.g.,tcp://192.168.1.1:8080). Following this guidance caused a silent HTTP 500 error because Go'snet.SplitHostPortrejects scheme-prefixed input — it expects barehost:portformat only.Fixes (5 layered)
tcp://prefix from theurlPlaceholdertranslation key; TCP now shows192.168.1.1:8080.urlPlaceholderHttp/urlPlaceholderTcpswap in real time when the monitor type selector changes.://) in TCP mode shows an inline error and blocks form submission, preventing the 500 from ever reaching the backend.onChangeon the type selector also clears any staleurlError.Scope
Related
Closes #issue-5 (TCP monitor UI cannot add monitor when following placeholder)