Conversation
…le. They are not, at least not currently.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR modernizes and expands the TouchPoint-WP plugin by refactoring core interfaces/APIs, adding admin/dashboard and block-editor features, and improving data syncing (reports/meetings/partners) while bumping the project version to 0.0.97.
Changes:
- Refactors API/auth/error handling (new
Apiclass, updated interfaces/namespaces, improved exception/WP_Error integration). - Adds new features: dashboard Status widget, telemetry Stats submission, block editor blocks + block preview styling, calendar grid styling.
- Enhances syncing and display for Reports/Partners/Meetings (new endpoints, caching, updated rendering, rewrite/maintenance endpoints).
Reviewed changes
Copilot reviewed 59 out of 117 changed files in this pull request and generated 34 comments.
Show a summary per file
| File | Description |
|---|---|
| src/TouchPoint-WP/TouchPointWP_Exception.php | Extends exception handling, admin error display, adds toWpError() |
| src/TouchPoint-WP/TouchPointWP_AdminAPI.php | Adds admin API endpoints (divisions, involvement search), migration/flush/phpinfo endpoints |
| src/TouchPoint-WP/StatusWidget.php | Adds admin dashboard status widget for synced object counts/timestamps |
| src/TouchPoint-WP/Stats.php | Adds telemetry/statistics collection, persistence, and submission endpoints |
| src/TouchPoint-WP/Rsvp.php | Adds deprecation notes and TODOs around RSVP/Meeting consolidation |
| src/TouchPoint-WP/Report.php | Expands reporting (python + assets), caching/cleanup, post storage interface, inline rendering |
| src/TouchPoint-WP/RegistrationType.php | Adds registration type constants (future enum) |
| src/TouchPoint-WP/PostTypeCapable.php | Adds base class for post-backed domain objects |
| src/TouchPoint-WP/Partner.php | Refactors Partner to post-backed model; improves taxonomy handling, templates, map/filter JS integration |
| src/TouchPoint-WP/MeetingArray.php | Adds grouped meeting collection type implementing meeting API interface |
| src/TouchPoint-WP/Lookup.php | Adds cached lookup endpoint wrapper via WordPress transients |
| src/TouchPoint-WP/Location.php | Moves geo interface usage to hasGeo, adds helpers and Geo distance usage |
| src/TouchPoint-WP/Involvement_PostTypeSettings.php | Adds meeting/import settings, filter hooks, and helper methods |
| src/TouchPoint-WP/Interfaces/updatesViaCron.php | Moves interface into Interfaces namespace + typed methods |
| src/TouchPoint-WP/Interfaces/storedAsPost.php | Adds interface for post-backed modules |
| src/TouchPoint-WP/Interfaces/scheduled.php | Adds interface for schedule string generation |
| src/TouchPoint-WP/Interfaces/module.php | Moves interface, adds template overwrite constants |
| src/TouchPoint-WP/Interfaces/involvementMeetingCommon.php | Adds shared interface for involvement/meeting capabilities |
| src/TouchPoint-WP/Interfaces/hierarchical.php | Adds interface for parent/child relationships |
| src/TouchPoint-WP/Interfaces/hasGeo.php | Renames geo interface & standardizes Geo return type |
| src/TouchPoint-WP/Interfaces/apiMeeting.php | Adds interface for meeting(-like) API payloads |
| src/TouchPoint-WP/Interfaces/api.php | Moves API handler interface and clarifies semantics |
| src/TouchPoint-WP/Interfaces/actionButtons.php | Adds interface for standardized action button rendering |
| src/TouchPoint-WP/Geo.php | Moves/expands Geo into core namespace with standardized fields |
| src/TouchPoint-WP/ExtraValueHandler.php | Updates documentation/comments for EV handling |
| src/TouchPoint-WP/EventsCalendar.php | Deprecates legacy events calendar integration; adds meetings-based path |
| src/TouchPoint-WP/CalendarGrid.php | Adds calendar grid renderer and style enqueueing |
| src/TouchPoint-WP/Blocks/BlocksController.php | Registers/enqueues block assets via blocks manifest + provides editor CSS endpoint |
| src/TouchPoint-WP/Auth.php | Refactors auth flow (one-time login validation) and admin/profile redirect behavior |
| src/TouchPoint-WP/Api.php | Adds centralized TouchPoint API client (PAT + python endpoints, rate limiting, PAT cycling) |
| phpdoc.dist.xml | Updates phpDocumentor configuration and output settings |
| package.json | Bumps version and adds WordPress block build tooling deps/scripts |
| generateI18n_2forPublish.ps1 | Adds make-php i18n generation |
| generateI18n_1forTranslation.ps1 | Updates WP-CLI args ordering for POT generation |
| generateDocs.ps1 | Removes old PowerShell phpDocumentor generator |
| generateDocs.php | Adds PHP-based doc generation pipeline and hook/docs publishing |
| docs | Updates docs submodule pointer |
| composer.json | Bumps version, raises PHP requirement, adds Interfaces autoload + docs dev deps |
| buildPipeline/versionUpdate.js | Adds script to sync version across composer/package/blocks assets |
| build.sh | Adds npm install/build blocks/version sync + build timing output |
| blocks/people-list/index.js | Adds People List block with live preview + inspector controls |
| blocks/people-list/block.json | Adds block metadata for People List |
| blocks/inv-list/index.js | Adds Involvement List block with live preview + filtering |
| blocks/inv-list/block.json | Adds block metadata for Involvement List |
| blocks/common.js | Adds shared unique-id generator for blocks |
| assets/template/partials-template-style.css | Updates list/map/action button styles and adds marker highlight animation |
| assets/template/calendar-grid-style.css | Adds calendar grid styling |
| assets/template/block-preview-style.css | Adds block preview overlay styling for editor |
| assets/template/actions-style.css | Adds icon mask styles for inline icons |
| assets/js/partner-defer.js | Refactors Partner JS into tpvm namespace + updates marker/map behavior |
| assets/js/meeting-defer.js | Updates Meeting JS to use tpvm.* classes and adds RSVP button disabling on missing meetings |
| assets/js/base-defer.js | Refactors base JS into IIFE + updates map markers to AdvancedMarker/Pins and hover/action wiring |
| README.md | Updates docs for new features (event calendar, embedded reports, telemetry note) and re-labels deprecated sections |
| .github/workflows/releases.yml | Adds docs generation job and adjusts release workflow structure |
| .github/workflows/push.yml | Adds CI build workflow on branch pushes |
Files not reviewed (13)
- .idea/.gitignore: Language not supported
- .idea/TouchPoint-WP.iml: Language not supported
- .idea/inspectionProfiles/Project_Default.xml: Language not supported
- .idea/libraries/Generated_files.xml: Language not supported
- .idea/misc.xml: Language not supported
- .idea/php.xml: Language not supported
- .idea/phpunit.xml: Language not supported
- .idea/runConfigurations/Build__WSL_.xml: Language not supported
- .idea/runConfigurations/i18n__1_for_Translation.xml: Language not supported
- .idea/runConfigurations/i18n__2_for_Publish.xml: Language not supported
- .idea/sqldialects.xml: Language not supported
- .idea/vcs.xml: Language not supported
- .idea/watcherTasks.xml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 59 out of 117 changed files in this pull request and generated 9 comments.
Files not reviewed (13)
- .idea/.gitignore: Language not supported
- .idea/TouchPoint-WP.iml: Language not supported
- .idea/inspectionProfiles/Project_Default.xml: Language not supported
- .idea/libraries/Generated_files.xml: Language not supported
- .idea/misc.xml: Language not supported
- .idea/php.xml: Language not supported
- .idea/phpunit.xml: Language not supported
- .idea/runConfigurations/Build__WSL_.xml: Language not supported
- .idea/runConfigurations/i18n__1_for_Translation.xml: Language not supported
- .idea/runConfigurations/i18n__2_for_Publish.xml: Language not supported
- .idea/sqldialects.xml: Language not supported
- .idea/vcs.xml: Language not supported
- .idea/watcherTasks.xml: Language not supported
Comments suppressed due to low confidence (1)
src/TouchPoint-WP/Taxonomies.php:1
$typesis an array, but it is compared directly to an integer ($types > 0). This can produce incorrect behavior or runtime warnings/errors depending on PHP version/config. Usecount($types) > 0(consistent with the rest of the file).
<?php
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/TouchPoint-WP/Partner.php
Outdated
| // Delete terms that are no longer used | ||
| if (TouchPointWP::instance()->settings->global_primary_tax !== "") { | ||
| $terms = get_terms( | ||
| ['taxonomy' => Taxonomies::TAX_GP_CATEGORY, 'hide_empty' => false, 'exclude' => $termsToKeep] | ||
| ); | ||
| if (!is_wp_error($terms)) { | ||
| foreach ($terms as $term) { | ||
| wp_delete_term($term->term_id, Taxonomies::TAX_GP_CATEGORY); |
There was a problem hiding this comment.
If $termsToKeep is empty (e.g., category EV not configured, no categories returned, or term creation failed), this deletes all terms in the taxonomy, including ones that may still be assigned to posts. Consider scoping deletion to unused terms only (e.g., hide_empty => true + delete those), and/or only running this cleanup when the category EV is configured and a non-empty keep set is known to be complete.
| // Delete terms that are no longer used | |
| if (TouchPointWP::instance()->settings->global_primary_tax !== "") { | |
| $terms = get_terms( | |
| ['taxonomy' => Taxonomies::TAX_GP_CATEGORY, 'hide_empty' => false, 'exclude' => $termsToKeep] | |
| ); | |
| if (!is_wp_error($terms)) { | |
| foreach ($terms as $term) { | |
| wp_delete_term($term->term_id, Taxonomies::TAX_GP_CATEGORY); | |
| // Delete terms that are no longer used. | |
| // Only run this cleanup when the category setting is configured and we have | |
| // a non-empty authoritative keep set from the current sync. | |
| if (TouchPointWP::instance()->settings->global_primary_tax !== "" && !empty($termsToKeep)) { | |
| $terms = get_terms( | |
| ['taxonomy' => Taxonomies::TAX_GP_CATEGORY, 'hide_empty' => false, 'exclude' => $termsToKeep] | |
| ); | |
| if (!is_wp_error($terms)) { | |
| foreach ($terms as $term) { | |
| // Preserve any terms that are still assigned to posts. | |
| if ((int) $term->count === 0) { | |
| wp_delete_term($term->term_id, Taxonomies::TAX_GP_CATEGORY); | |
| } |
There was a problem hiding this comment.
I think I disagree. If there is no field configured for use as this taxonomy, it should delete the terms and remove them from the posts. That said, if there is one configured, I do see the value in validating that the list is not empty.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 59 out of 117 changed files in this pull request and generated 4 comments.
Files not reviewed (13)
- .idea/.gitignore: Language not supported
- .idea/TouchPoint-WP.iml: Language not supported
- .idea/inspectionProfiles/Project_Default.xml: Language not supported
- .idea/libraries/Generated_files.xml: Language not supported
- .idea/misc.xml: Language not supported
- .idea/php.xml: Language not supported
- .idea/phpunit.xml: Language not supported
- .idea/runConfigurations/Build__WSL_.xml: Language not supported
- .idea/runConfigurations/i18n__1_for_Translation.xml: Language not supported
- .idea/runConfigurations/i18n__2_for_Publish.xml: Language not supported
- .idea/sqldialects.xml: Language not supported
- .idea/vcs.xml: Language not supported
- .idea/watcherTasks.xml: Language not supported
Comments suppressed due to low confidence (1)
src/TouchPoint-WP/Report.php:1
- If the SQL report output doesn’t contain
</tr>or<tr,strrpos()returnsfalseand the substr offsets will be wrong, producing corrupted output (or warnings depending on PHP settings). Guard for missing markers (return original content, or apply cleanup only when both markers are found).
<?php
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // upsert the data into the database into the stats table without destructive replace function | ||
| global $wpdb; | ||
| $r = $wpdb->update($wpdb->prefix . TouchPointWP::TABLE_STATS, $data, ['installId' => $data['installId']]); | ||
| if ($r < 1) { | ||
| $r = $wpdb->insert($wpdb->prefix . TouchPointWP::TABLE_STATS, $data); |
There was a problem hiding this comment.
$wpdb->update() returns 0 when the row exists but no fields changed, which makes this code attempt an insert and can create duplicates / fail on unique constraints. Treat 0 as success when a row exists (e.g., check for existence first) or use a true upsert pattern (single SQL INSERT ... ON DUPLICATE KEY UPDATE ...) to avoid duplicate insert attempts.
| // upsert the data into the database into the stats table without destructive replace function | |
| global $wpdb; | |
| $r = $wpdb->update($wpdb->prefix . TouchPointWP::TABLE_STATS, $data, ['installId' => $data['installId']]); | |
| if ($r < 1) { | |
| $r = $wpdb->insert($wpdb->prefix . TouchPointWP::TABLE_STATS, $data); | |
| // Upsert the data into the stats table without treating a no-op update as a failed write. | |
| global $wpdb; | |
| $table = $wpdb->prefix . TouchPointWP::TABLE_STATS; | |
| $existingInstallId = $wpdb->get_var($wpdb->prepare( | |
| "SELECT installId FROM {$table} WHERE installId = %s LIMIT 1", | |
| $data['installId'] | |
| )); | |
| if ($existingInstallId !== null) { | |
| $r = $wpdb->update($table, $data, ['installId' => $data['installId']]); | |
| } else { | |
| $r = $wpdb->insert($table, $data); |
No description provided.