Skip to content

Support LinkedIn Jobs search panel capture#6

Merged
JoseMelNet merged 6 commits into
mainfrom
extension/linkedin-search-panel-capture
Jun 8, 2026
Merged

Support LinkedIn Jobs search panel capture#6
JoseMelNet merged 6 commits into
mainfrom
extension/linkedin-search-panel-capture

Conversation

@JoseMelNet

Copy link
Copy Markdown
Owner

This PR adds safe support for capturing the active LinkedIn job from the Jobs Search Panel while preserving the existing /jobs/view flow.

Main changes:

  • Adds LinkedIn job helpers to detect job context and resolve stable job IDs.
  • Canonicalizes all LinkedIn vacancy links to https://www.linkedin.com/jobs/view/<job_id>.
  • Uses the canonical vacancy identity for side panel state, history, tasks, and async analysis.
  • Adds Search Panel support without changing backend/schema.
  • Prevents saving ambiguous Search Panel vacancies when no stable job_id can be resolved.
  • Adds stale-vacancy protection before saving.
  • Restores and reuses the legacy p/span longest-text description extraction strategy for both /jobs/view and Search Panel, scoped to the active Search container.
  • Normalizes extracted descriptions by removing LinkedIn UI prefixes/suffixes such as “Acerca del empleo” and “… más”.
  • Adds node:test coverage for LinkedIn helpers.

Backend/schema unchanged.

Validation:

  • node --test chrome-extension\tests\linkedin-job-helpers.test.js
  • node --check chrome-extension\linkedin-job-helpers.js
  • node --check chrome-extension\content.js
  • node --check chrome-extension\background.js
  • node --check chrome-extension\sidepanel.js
  • ..venv\Scripts\python.exe -m unittest discover -s tests -q
  • ..venv\Scripts\python.exe -m ruff check .
  • ..venv\Scripts\python.exe -m compileall app tests
  • git diff --check

Manual validation by user:

  • Capturing from /jobs/view/<job_id> works and extracts the real vacancy description.
  • Capturing from /jobs/search/?currentJobId=<job_id> works and extracts the active vacancy description.
  • Clicking a different job in Search updates the data loaded by the extension.
  • The final saved link is canonicalized to /jobs/view/<job_id>.
  • The implementation intentionally prioritizes reliable plain-text extraction over exact LinkedIn visual formatting.

Important design note:
A prior attempt to preserve richer Search Panel formatting was removed because it introduced a separate parsing path. The final implementation intentionally reuses the legacy p/span longest-text extraction strategy for both /jobs/view and Search Panel, scoped to the active Search container, prioritizing reliability over visual fidelity.

@JoseMelNet
JoseMelNet merged commit 7db1104 into main Jun 8, 2026
3 checks passed
@JoseMelNet
JoseMelNet deleted the extension/linkedin-search-panel-capture branch June 8, 2026 20:51
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.

1 participant