Skip to content

Commit 00764df

Browse files
authored
Merge pull request #40 from necyberteam/react-prep
feat: upgrade to react-chatbotify v2.2.0 with compatibility improvements and qa chat loop improvements
2 parents aeb06f1 + e3e70db commit 00764df

21 files changed

+332
-212
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@
1616
- **Community Interest Targeting**: Community involvement question now only shown to users who provide contact information
1717
- **Anonymous Feedback Improvements**: Community interest field hidden from summary for anonymous submissions
1818
- **Focus Management**: Fixed keyboard focus jumping to previous questions; now properly targets current question only
19+
- **Q&A Response System**: Replaced unreliable `streamMessage` with direct API calls using `injectMessage` for consistent response display
1920

2021
### Fixed
22+
- **Critical Q&A Display Issue**: Fixed problem where Q&A responses stopped displaying after 3-4 questions due to react-chatbotify's `streamMessage` accumulating state
23+
- **Query ID Generation**: Implemented UUID-based query ID generation directly in QA flow to ensure proper feedback tracking
24+
- **Response Reliability**: Q&A responses now display consistently regardless of conversation length
2125
- Resolved form state persistence issues where previous session data would interfere with new submissions
2226
- Fixed multiple checkbox selection display in feedback summary (was showing only one selection)
2327
- Corrected timing issues with form context updates using chatState.userInput pattern
2428
- Fixed anonymous feedback showing previous contact information in summary
2529
- Improved keyboard accessibility for checkboxes with proper focus management
30+
- Removed broken fallback loop flow that used deprecated `streamMessage` approach
2631

2732
## [2.0.0-rc.1] - 2025-05-28
2833

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ The bot supports several conversation flows:
5252
- Built-in feedback system with thumbs up/down options after each response
5353
- Automatic feedback tracking and analytics
5454
- Users can provide feedback or continue asking questions immediately
55-
- Negative feedback offers direct path to support ticket creation
5655
- Requires user to be logged in
5756

5857
### 🎫 Support Ticket Flows
@@ -238,7 +237,7 @@ REACT_APP_API_KEY=your-api-key-here
238237
239238
The bot integrates with the ACCESS Q&A API and JSM (Jira Service Management) for ticket creation. Configure your backend endpoints to handle:
240239
241-
- Q&A queries with streaming responses
240+
- Q&A queries with JSON responses
242241
- Support ticket creation with ProForma field mapping
243242
- File upload processing
244243
- User authentication and session management

build/static/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/static/css/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/static/js/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/static/js/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ <h3>Bot Configuration</h3>
2222
<label for="user-logged-in">User logged in</label>
2323
<i>(toggle to control the bots login state)</i>
2424
</div>
25-
25+
2626
<div class="form-group">
2727
<label for="user-email">User Email:</label>
2828
<input type="email" id="user-email" placeholder="[email protected]" />
2929
</div>
30-
30+
3131
<div class="form-group">
3232
<label for="user-name">User Name:</label>
3333
<input type="text" id="user-name" placeholder="John Doe" />
3434
</div>
35-
35+
3636
<div class="form-group">
3737
<label for="accessId">ACCESS ID:</label>
3838
<input type="text" id="accessId" placeholder="johndoe123" />
3939
</div>
40-
40+
4141
<button id="update-bot" class="update-button">Update Bot Configuration</button>
4242
<p class="help-text">Enter user information above and click "Update Bot Configuration" to test pre-populated ticket forms when logged in.</p>
4343
</div>

local-demo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ function recreateBots() {
9191
bot2Controller.destroy();
9292
bot2Controller = null;
9393
}
94-
94+
9595
// Clear containers
9696
document.getElementById('qa-bot').innerHTML = '';
9797
document.getElementById('custom-qa-bot').innerHTML = '';
98-
98+
9999
// Recreate with new user info
100100
initializeQABot();
101101
initializeEmbeddedBot();

package-lock.json

Lines changed: 28 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@snf/access-qa-bot",
3-
"version": "2.4.7",
3+
"version": "2.6.0-debug.3",
44
"private": false,
55
"homepage": ".",
66
"description": "ACCESS Q&A Bot React Component with support ticket creation, feedback collection, and ProForma integration",
@@ -24,7 +24,7 @@
2424
"@rcb-plugins/html-renderer": "^0.3.1",
2525
"@rcb-plugins/input-validator": "^0.3.0",
2626
"@rcb-plugins/markdown-renderer": "^0.3.1",
27-
"react-chatbotify": "^2.1.0",
27+
"react-chatbotify": "^2.2.0",
2828
"uuid": "^11.1.0"
2929
},
3030
"peerDependencies": {
@@ -45,6 +45,7 @@
4545
"@eslint/js": "^9.31.0",
4646
"@rollup/plugin-babel": "^6.0.4",
4747
"@rollup/plugin-commonjs": "^25.0.7",
48+
"@rollup/plugin-json": "^6.1.0",
4849
"@rollup/plugin-node-resolve": "^15.2.3",
4950
"@rollup/plugin-replace": "^5.0.7",
5051
"@rollup/plugin-terser": "^0.4.4",

0 commit comments

Comments
 (0)