Conversation
…rministic sort Cherry-picks incremental fixes from PR #42 review: - use-monitors.ts: Use typeof check for selectorWarning instead of bare `as` cast to prevent runtime type mismatch - MonitorDetails.tsx: Add role="alert" to error detail div for accessibility (screen readers) - routes.ts: Use static import of extractValueFromHtml instead of dynamic await import() to avoid circular dependency risk - scraper.ts: Add localeCompare tiebreaker to auto-heal sort for deterministic selector selection - scraper.ts: Fix auto-heal value truncation — re-extract full value from page HTML instead of using sampleText (truncated to 80 chars), which could cause false change notifications for long values - scraper.test.ts: Add tests for discoverSelectors and validateCssSelector edge cases https://claude.ai/code/session_017srEmUs7Xo11UjBtrszmvn
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis PR refines selector discovery and auto-healing logic in the scraper service, adds type-safety guardrails in the client hook, improves accessibility in the monitor details page, optimizes imports, and adds comprehensive test coverage for CSS selector validation and browserless token handling. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
This was referenced Mar 6, 2026
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.
Summary
typeofcheck instead of bareascast inuse-monitors.tsto prevent runtime type mismatchrole="alert"to error detail div inMonitorDetails.tsxfor screen readersawait import()with static import ofextractValueFromHtmlinroutes.tsto avoid circular dependency risklocaleComparetiebreaker to auto-heal selector sort inscraper.tssampleText(truncated to 80 chars), which could cause false change notifications for monitors with long valuesdiscoverSelectorsandvalidateCssSelectoredge casesSupersedes PR #42 (which had merge conflicts with main after PR #40 landed).
Test plan
https://claude.ai/code/session_017srEmUs7Xo11UjBtrszmvn
Summary by CodeRabbit
Bug Fixes
Accessibility
Tests