Skip to content

Conversation

@authentifydan
Copy link

This patch updates the photo POST response handler in background.js to properly await response.text() before parsing and logs network errors via the existing callback. This prevents crashes and invalid JSON issues when copying data into Geni.

Tested locally on Ancestry.com and Geni.com with SmartCopy 4.11.3.1.

- Fixed issues with copying photos during profile sync
- Improved auto-select menu logic for relationship handling
- Added error handling for fetch() in background.js and popup.js
- Fixed date validation and ensured History IDs are stored as strings
- Converted uploaded photos to base64 before posting
- Tightened offscreen message handling for eval calls
- Disabled verbose logging
- Fixed date validation and ensured History IDs are stored as strings
- Converted uploaded photos to base64 before posting
- Tightened offscreen message handling for eval calls
- Disabled verbose logging
- Updated getProfileName to support both `display_name` and `displayName`
- Ensured the main profile is added to history even if parsing data is missing
- Added unit tests for getProfileName logic
- Exposed getProfileName via test-utils.js for test coverage
- Refactored helper utilities using modern JavaScript (via ChatGPT Codex)
- Added JSDoc comments to utility functions for clarity and maintainability
- Documented and cleaned up gender detection helper logic
- Improved README with clearer installation, testing, and contribution steps
- Added a build script to package.json for packaging the extension
- Expanded test coverage to include URL serialization helpers
@authentifydan
Copy link
Author

🚀 SmartCopy v4.12.0.0 – First Codex-Assisted Release

Release Date: [Replace with actual date]
Author: @stbodie
Powered by: ChatGPT Codex ✨


🧠 Overview

This release marks a major milestone: SmartCopy v4.12.0.0 is the first version built and refactored with assistance from ChatGPT Codex, OpenAI’s AI-powered coding assistant. Over the course of a single collaborative session, we modernized utility functions, expanded test coverage, tightened code quality, and dramatically improved documentation.


🧱 Key Changes

💡 Code Refactor and Improvements

  • Refactored helper utilities using modern JavaScript (via ChatGPT Codex)
  • Added JSDoc comments to utility functions for clarity and maintainability
  • Documented and modularized gender detection helper logic
  • Improved README with clearer installation, testing, and contribution steps
  • Added a build script to package.json for packaging the extension

🧪 Test Coverage & Utilities

  • Expanded unit tests for URL serialization helpers
  • Added test-utils.js and moved test scaffolding into tests/ (now Chrome-compliant)
  • New script: scripts/build.js

🤖 Using ChatGPT Codex

Want to contribute using Codex? Here's how to get started:

  1. Open the Codex panel inside GitHub or your editor
  2. Select or describe the code you want help with
  3. Click “Ask Codex” or “Code” to generate suggestions
  4. Apply and commit changes iteratively

Codex helped restore gender detection, optimize logic, and standardize the codebase.


🛠 How to Build

git pull origin main
npm install
npm test
npm run build

@authentifydan authentifydan changed the title Fix: Await response.text and prevent POST parsing errors in SmartCopy v4.12.0.0 – Codex-Assisted Refactor, UX Fixes, Gender Parsing, and Test Expansion Jun 7, 2025
@GuyKh
Copy link
Collaborator

GuyKh commented Jun 8, 2025

@authentifydan
I'd actually think to use Codex to restructure the project.
It's a full blown mess.
Tried to do it with Cline, and after spending about 100$ in tokens and getting nowhere I quit.

We need to think about some strategy

@mamsterla
Copy link
Contributor

@GuyKh this refactor pretty focused. It does fix a real bug with the promises for XHTTP requests. I do agree that a larger refactor needs to be done and a strategy to do so. Let's approve this pull request and then move to the bigger issues. We should set up a stakeholder meeting and discuss.

@eljeffeg eljeffeg mentioned this pull request Jun 13, 2025
@eljeffeg
Copy link
Owner

Due to the amount of changes between this and master, I figured it best to just create a new branch for now.

@eljeffeg
Copy link
Owner

It's included as a separate PR #164 - not sure if the issue is still and issue in the current version though after merging a lot of Pierre's code.

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