Skip to content

fix: stop waiting on network idle after 5s when reading job pages - #911

Merged
queenellie873 merged 1 commit into
mainfrom
fix/opportunity-add-idle-timeout
Nov 3, 2026
Merged

queenellie873 merged 1 commit into
mainfrom
fix/opportunity-add-idle-timeout

Conversation

@queenellie873

@queenellie873 queenellie873 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adding an opportunity fails on job pages that never go network idle. getPageContent waits up to 30 seconds for idle, then throws, so the opportunity is never refined and does not show on the board.

  • Cap the network idle wait at 5 seconds, then read the page as it is.
  • Only TimeoutError is caught. Other errors still throw.
  • Add idleTimedOut to the "Page content found." log.

Tested locally: a page that never goes idle failed at 30s on main and returned its text in about 6s with this change. Text from Adobe and Amazon careers pages matched main.

Note: more pages now reach the EXPIRED_PHRASES check, so a live page with words like "closed" in a footer can be marked expired.

Type of Change

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

Some careers pages never go network idle, so waitForNetworkIdle timed out
at 30s and the opportunity was never refined. Cap the wait at 5s and read
whatever has rendered. Only TimeoutError is swallowed.
@queenellie873
queenellie873 merged commit 7b78061 into main Nov 3, 2026
2 checks passed
@queenellie873
queenellie873 deleted the fix/opportunity-add-idle-timeout branch November 3, 2026 14:50
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.

2 participants