Skip to content

Conversation

jonathanKingston
Copy link
Contributor

@jonathanKingston jonathanKingston commented Oct 8, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1199237043598868/task/1211551437155181?focus=true

Description

  • Schedules a recheck of the content after a fixed timer.
  • Removes hidden content from collection.

Testing Steps

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Filters out hidden elements during content collection and schedules a delayed recheck after navigation events with cache invalidation.

  • Page content collection:
    • Excludes hidden elements via checkNodeIsVisible in domToMarkdown.
    • Adds extra logging of collected markdown content.
  • Navigation recheck:
    • Introduces delayed recheck timer (#delayedRecheckTimer) triggered on load, hashchange, and urlChanged.
    • scheduleDelayedRecheck() invalidates cache, recollects content, and sends response after a configurable delay (navigationRecheckDelayMs, default 1500ms).
    • Adds clearTimers() to cancel pending timers.
  • Caching/observation:
    • Cache invalidation now paired with stopping observers; recheck path resets timers and observers appropriately.

Written by Cursor Bugbot for commit 7191585. This will update automatically on new commits. Configure here.

Copy link

netlify bot commented Oct 8, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 7191585
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/68e67608172cdc0008214698
😎 Deploy Preview https://deploy-preview-1997--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

github-actions bot commented Oct 8, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

Copy link

github-actions bot commented Oct 8, 2025

[Beta] Generated file diff

Time updated: Wed, 08 Oct 2025 14:33:31 GMT

Apple
    - apple/contentScope.js

File has changed

Integration
    - integration/contentScope.js

File has changed

Windows
    - windows/contentScope.js

File has changed

@jonathanKingston jonathanKingston marked this pull request as ready for review October 8, 2025 14:32
@jonathanKingston jonathanKingston requested a review from a team as a code owner October 8, 2025 14:32
} catch (e) {
return false;
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Styling Checks Fail on Detached Nodes

The checkNodeIsVisible() function uses getComputedStyle() on cloned, disconnected DOM nodes. Since getComputedStyle() returns default values for disconnected elements, the visibility checks are unreliable, potentially filtering out visible content or including hidden content.

Fix in Cursor Fix in Web

@jonathanKingston jonathanKingston marked this pull request as draft October 8, 2025 15:00
auto-merge was automatically disabled October 8, 2025 15:00

Pull request was converted to draft

@jonathanKingston
Copy link
Contributor Author

Going to split apart the PR into #1970 again. Then recheck the hidden part over coming back here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants