Skip to content

fix: extract correct author name in content script#49

Open
tuliosousapro wants to merge 3 commits into
mainfrom
fix-author-extraction-6415276485350050814
Open

fix: extract correct author name in content script#49
tuliosousapro wants to merge 3 commits into
mainfrom
fix-author-extraction-6415276485350050814

Conversation

@tuliosousapro
Copy link
Copy Markdown
Owner

Updates the author extraction logic in source/chrome/contentScript.js to avoid incorrectly capturing the "Your Kindle Notes For:" prefix paragraph. This brings the logic in line with the fix already implemented in batchExport.js. A new test case is added under tests/ using jest and jsdom to verify the DOM querying logic works as expected.


PR created automatically by Jules for task 6415276485350050814 started by @tuliosousapro

Updates the author extraction logic in `source/chrome/contentScript.js` to correctly skip the 'Your Kindle Notes For:' paragraph and extract the actual author's name, mirroring the fix previously applied to `batchExport.js`. Adds a basic Jest test setup and verifies the logic.

Co-authored-by: tuliosousapro <40772981+tuliosousapro@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a testing suite using Jest and JSDOM, including a configuration file and a new test for author extraction. The core logic in contentScript.js is updated to improve author detection by targeting specific metadata elements. Review feedback highlights that the specified dependency versions in package.json are likely invalid and suggests a fallback for the author extraction logic to prevent empty strings when metadata is present but blank.

Comment thread package.json Outdated
Comment thread source/chrome/contentScript.js
tuliosousapro and others added 2 commits April 12, 2026 09:13
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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