Fix escapeAttr, ExtensionAuth double fetch, and candidate page title bugs#246
Closed
Fix escapeAttr, ExtensionAuth double fetch, and candidate page title bugs#246
Conversation
…didate page title - #244: Escape `&` to `&` before other replacements in escapeAttr() - #243: Remove `error` from useEffect dependency array to prevent double POST on token fetch failure - #242: Use stored tab title from chrome.tabs.query instead of popup's document.title for candidate "Track this" button Closes #242, closes #243, closes #244 https://claude.ai/code/session_01AmZyEy5PWRPk34fqgyyUQ9
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
📝 WalkthroughWalkthroughRemoves Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Move pure utility functions from popup.ts into popup/utils.ts for testability. Add comprehensive test coverage for escapeAttr (including ampersand escaping) and sanitizeTier. Move import to top of file following codebase conventions. https://claude.ai/code/session_01AmZyEy5PWRPk34fqgyyUQ9
- Add error check to useEffect guard to prevent implicit retries when user object reference changes after a failed token fetch - Add comment documenting KNOWN_TIERS sync dependency on shared/models/auth.ts TIER_LIMITS https://claude.ai/code/session_01AmZyEy5PWRPk34fqgyyUQ9
Version bump for popup bug fixes: escapeAttr ampersand encoding, candidate page title source, and utils module extraction. https://claude.ai/code/session_01AmZyEy5PWRPk34fqgyyUQ9
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
escapeAttrnow escapes&to&before other entity replacements, preventing malformed HTML attribute values when page titles contain ampersandserrorfrom theuseEffectdependency array inExtensionAuth, preventing a redundant second POST to/api/extension/tokenon fetch failurechrome.tabs.queryinstead of the popup'sdocument.title, so the default monitor name matches the target webpageCloses #242, closes #243, closes #244
Test plan
npm run checkpassesnpm run testpasses (1707 tests)https://claude.ai/code/session_01AmZyEy5PWRPk34fqgyyUQ9
Summary by CodeRabbit
Bug Fixes
Improvements
Tests
Chores