Skip to content

Libchat#20

Merged
adamshire123 merged 3 commits intomit-mainfrom
libchat
Jan 20, 2026
Merged

Libchat#20
adamshire123 merged 3 commits intomit-mainfrom
libchat

Conversation

@adamshire123
Copy link
Copy Markdown

@adamshire123 adamshire123 commented Jan 7, 2026

Why these changes are being introduced

We want to add our libchat widget to Primo NDE

How this addresses that need

Injects the libanswers script for libchat during bootstrapping.

For consistency I'm using the same injection-during-bootstrapping approach we used for #19 although in this case, adding the libchat JS script to src/assets/js/custom.js seemed to work just as well as adding it during bootstrapping.

Side effects of this change

none

@adamshire123 adamshire123 marked this pull request as ready for review January 8, 2026 14:22
- also added a note to the matomo injection script reminding devs that the error handling was added by us.
Copy link
Copy Markdown

@ghukill ghukill left a comment

Choose a reason for hiding this comment

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

Given that this builds on the former pattern, architecturally seems like a easy to follow, consistent update.

Left one comment for a code comment that may not be needed.

Bigger picture question: this appears to be a forked repository. Is it possible there is a desire to occassionally sync with the upstream repository? I'll be honest in saying this is not something I've done very often. If so, are there any concerns that these changes may conflict with a sync?

That question was actually inspired by a suggestion. I'm not sure if this is happening outside of this repository, but it might be helpful to document somewhere a) the kind of changes that are made to the forked base, and b) the specific changes. And/or, even just a single README.md that outlines our approach to making adjustments.

If this is all super normal Primo custom module stuff, please feel free to disregard. I was putting on my hat of knowing nothing (a hat I wear well and often), and realized it might not be obvious where our customizations like this start and the forked, "base" code ends.

All that said, in the scope of this change, looks good!

Comment thread src/app/utils/libchat.ts Outdated

export function injectLibchat() {
try {
var libchatHash = "1e8f3119e6cff530e0d23e2cb1f2b2a7"; // hash string goes inside quotation marks
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thinking maybe you don't need the comment, "// hash string goes inside quotation marks"? That feels implied by virtue of being a string variable.

@adamshire123
Copy link
Copy Markdown
Author

@ghukill - We may want to merge changes from the forked repo. The main branch is meant to track the forked repo's main branch. I'm not sure if this is the best approach.

@adamshire123 adamshire123 merged commit 9a82652 into mit-main Jan 20, 2026
@adamshire123 adamshire123 deleted the libchat branch January 20, 2026 15:48
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