Skip to content

Conversation

@celticr
Copy link
Contributor

@celticr celticr commented Jan 12, 2026

Release v2.0.0

This release includes all recent feature additions and improvements since v1.0.3.

New Features

Improvements

Test Plan

  • Verify chat bubble displays correctly
  • Test popup opens on click
  • Test fallback URL when popup blocked
  • Verify admin settings save correctly
  • Test keyboard navigation (Enter/Space)
  • Verify mobile responsive behavior
  • Check privacy policy appears in WordPress tools
./vendor/bin/phpunit
# Expected: 22 tests, 26 assertions - all passing

celticr and others added 2 commits January 12, 2026 17:47
Update code generator with license key input field (Step 2) that:
- Validates license format (SOPHIA-XXXX-XXXX-XXXX)
- Includes license in generated code as data attribute and URL parameter
- Shows visual feedback for valid/invalid formats

Update README with:
- Prerequisites section explaining license key requirement
- Updated WordPress installation steps with license key entry
- License Key added to WordPress Settings table
- Direct HTML code example with license placeholders
- Updated Code Generator section highlighting license support

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@celticr
Copy link
Contributor Author

celticr commented Jan 12, 2026

PR Review: Release v2.0.0

Summary

Version bump from 1.0.3 to 2.0.0, consolidating features from the release branch.


BLOCKER

JavaScript Runtime Error in assets/js/sophia-chat.js:25

var popup = window.open(
    chatUrl,
    'SophiaChat',
    'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',scrollbars=yes,resizable=yes'
);

Variables width, height, left, and top are undefined. Clicking the chat bubble will throw a ReferenceError.

Fix:

var width = 400;
var height = 600;
var left = (screen.width - width) / 2;
var top = (screen.height - height) / 2;
var popup = window.open(
    chatUrl,
    'SophiaChat',
    'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',scrollbars=yes,resizable=yes'
);

Medium

  1. Documentation mismatch - README.md shows "License Key" as a WordPress setting, but sophia-chat.php has no admin field for license keys. Either add the field or update docs.

  2. Docblock version inconsistency - sophia_chat_get_chat_url() (line 32) and sophia_chat_privacy_policy_content() (line 612) have @since 2.3.0 but this is release 2.0.0.


Low

  • No automated tests for generator.html license validation (client-side JS).

Recommendation: Request Changes

The JavaScript bug is a showstopper. After fixing, all tests pass (22 tests, 26 assertions).

- Add missing width/height/left/top variables in sophia-chat.js
- Update @SInCE 2.3.0 to 2.0.0 for sophia_chat_get_chat_url()
- Update @SInCE 2.3.0 to 2.0.0 for sophia_chat_privacy_policy_content()
- Remove License Key row from README WordPress Settings table
@celticr
Copy link
Contributor Author

celticr commented Jan 12, 2026

Addressed PR Feedback

What changed:

  • Added missing width, height, left, top variables in assets/js/sophia-chat.js (fixes BLOCKER)
  • Updated @since 2.3.0 to @since 2.0.0 for sophia_chat_get_chat_url() (line 32)
  • Updated @since 2.3.0 to @since 2.0.0 for sophia_chat_privacy_policy_content() (line 618)
  • Removed License Key row from README WordPress Settings table (docs didn't match code)

Why: Documentation showed a License Key setting that doesn't exist in the plugin; chose to fix docs rather than add feature outside PR scope.

How to test:

./vendor/bin/phpunit

Test results:

PHPUnit 10.5.60
OK (22 tests, 26 assertions)

@celticr celticr merged commit 1d6668e into main Jan 12, 2026
2 checks passed
@celticr celticr deleted the release/v2.0.0 branch January 12, 2026 20:04
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