Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* OpenTrust admin styles.
* Open Trust Center admin styles.
*/

/* Server-rendered visibility toggle. jQuery .show()/.hide() override via inline style. */
Expand Down Expand Up @@ -898,15 +898,15 @@
.ettic-otc-tools-action--update { color: #854d0e; font-weight: 600; }

/* Active-model dropdown — provider-deprecated id marker. */
.opentrust-ai-model-unavailable {
.ettic-otc-ai-model-unavailable {
display: inline-flex;
align-items: center;
gap: 6px;
margin-left: 8px;
vertical-align: middle;
}

.opentrust-ai-model-unavailable .description {
.ettic-otc-ai-model-unavailable .description {
margin: 0;
color: #b91c1c;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/chat.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* OpenTrust AI chat page styles.
* Open Trust Center AI chat page styles.
* Inlined into /trust-center/ask/ via template_redirect.
* Layered into @layer ettic-otc to avoid theme bleed.
*
Expand Down
22 changes: 11 additions & 11 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* OpenTrust admin scripts.
* Open Trust Center admin scripts.
*
* Handles the colour picker and media uploader on the settings page,
* plus any CPT meta-box interactions.
Expand All @@ -8,7 +8,7 @@
'use strict';

// ── Accent contrast helpers ─────────────────
// Mirrors OpenTrust::accent_safe_lightness() — clamps HSL lightness just
// Mirrors Ettic_OTC::accent_safe_lightness() — clamps HSL lightness just
// far enough to hit WCAG 4.5:1 contrast against white, preserving hue and
// saturation so the adjusted colour stays on-brand.
var ACCENT_TARGET_CONTRAST = 4.5;
Expand Down Expand Up @@ -122,7 +122,7 @@
}

function updateAccentWarning(hex) {
var $warning = $('#opentrust-accent-warning');
var $warning = $('#ettic-otc-accent-warning');
if (!$warning.length) return;

var result = accentSafe(hex);
Expand All @@ -146,9 +146,9 @@

$(function () {
// ── Colour picker ──────────────────────────
var $accentInput = $('#opentrust_accent_color');
var $forceExact = $('#opentrust_accent_force_exact');
var $accentWarning = $('#opentrust-accent-warning');
var $accentInput = $('#ettic_otc_accent_color');
var $forceExact = $('#ettic_otc_accent_force_exact');
var $accentWarning = $('#ettic-otc-accent-warning');

$('.ettic-otc-color-picker').wpColorPicker({
change: function (event, ui) {
Expand Down Expand Up @@ -445,9 +445,9 @@
if (!titleInput) return;

// Meta keys (with leading underscore) map to DOM ids by stripping the
// leading underscore: `_opentrust_cert_type` → `opentrust_cert_type`.
// leading underscore: `_ettic_otc_cert_type` → `ettic_otc_cert_type`.
var metaKeyToDomId = function (metaKey) {
return metaKey.replace(/^_opentrust_/, 'opentrust_');
return metaKey.replace(/^_ettic_otc_/, 'ettic_otc_');
};

var normalize = function (value) {
Expand Down Expand Up @@ -801,7 +801,7 @@
* Certification type toggle.
*
* Shows or hides the "certified only" fields (issuing body, status, dates)
* based on the `_opentrust_cert_type` select. A compliant certification has no
* based on the `_ettic_otc_cert_type` select. A compliant certification has no
* audit and therefore no auditor, no issue date, no expiry, and no status
* state machine, so those fields are hidden from the form entirely.
* Hidden inputs still submit their values, which matches the "keep data
Expand Down Expand Up @@ -836,7 +836,7 @@
(function () {
'use strict';

var toggle = document.getElementById('opentrust_publish_new_version');
var toggle = document.getElementById('ettic_otc_publish_new_version');
if (!toggle) return;

toggle.addEventListener('change', function () {
Expand All @@ -845,7 +845,7 @@
wrap.style.display = this.checked ? 'block' : 'none';
}
if (this.checked) {
var summary = document.getElementById('opentrust_version_summary');
var summary = document.getElementById('ettic_otc_version_summary');
if (summary) summary.focus();
}
});
Expand Down
6 changes: 3 additions & 3 deletions assets/js/chat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* OpenTrust AI chat page controller.
* Open Trust Center AI chat page controller.
*
* - Streams SSE events from /wp-json/opentrust/v1/chat.
* - Streams SSE events from /wp-json/ettic-otc/v1/chat.
* - Renders tokens, citations, and done events into message bubbles.
* - Maintains conversation history in sessionStorage.
* - Handles refuse-to-answer, stop, retry, copy, share, print.
Expand All @@ -22,7 +22,7 @@
}

var strings = config.strings || {};
var STORAGE_KEY = 'opentrust.chat.history';
var STORAGE_KEY = 'ettic-otc.chat.history';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Note: sessionStorage key change will clear existing chat history.

The sessionStorage key has been renamed from opentrust.chat.history to ettic-otc.chat.history. This means users with existing chat history will lose their conversation history after this update, as the code will no longer read from the old key.

This is likely intentional as part of the rebranding, but it's worth noting that the impact is:

  • Existing chat sessions will appear empty on first load after the update
  • Users will need to start fresh conversations

If preserving history is important, you could add a one-time migration in the loadHistory() function that checks the old key and copies data to the new key.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/js/chat.js` at line 25, The sessionStorage key var STORAGE_KEY =
'ettic-otc.chat.history' will drop existing history stored under
'opentrust.chat.history'; update loadHistory() to perform a one-time migration:
if nothing exists under STORAGE_KEY but data exists under the old key
'opentrust.chat.history', copy/parse that value into STORAGE_KEY (and optionally
remove the old key) so existing conversations are preserved; reference the
STORAGE_KEY constant and the loadHistory() function when making this change.


// Honor the visitor's reduced-motion preference. When set, we skip the
// rAF-paced typewriter and render whatever's in the buffer the moment a
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* OpenTrust frontend interactions.
* Open Trust Center frontend interactions.
*
* - Smooth scroll for anchor links
* - Scroll-spy for sticky navigation
Expand Down
4 changes: 2 additions & 2 deletions wpml-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
Translation configuration for WPML and Polylang. Both plugins read this
file from the plugin root at activation time and use it to:

1. Register OpenTrust's four custom post types as translatable content,
1. Register Open Trust Center's four custom post types as translatable content,
so multilingual editors can create per-language variants of policies,
certifications, subprocessors, and data practices.
2. Tell the translation plugin which custom meta fields carry
human-readable text that should be translated, versus slugs, dates,
IDs, or booleans that should be copied verbatim across languages.

The custom taxonomies list is empty because OpenTrust does not register
The custom taxonomies list is empty because Open Trust Center does not register
any taxonomies — policy category, certification status, and data-practice
legal basis are enum slugs stored in post meta, not WordPress taxonomies.
-->
Expand Down
Loading