This PR adds a reload-safe onboarding Help Center generation status path. Previously, generation progress was pushed through ActionCable, which meant the onboarding UI could lose context after a page reload or missed websocket event. The new endpoint exposes the current generation id, raw Redis generation state, and Help Center article/category counts so clients can recover state by fetching from the backend. **What changed** - Added an onboarding Help Center generation status endpoint. - Persisted `help_center_generation_id` when generation is enqueued. - Removed Help Center generation ActionCable broadcasts completely. - Kept generation progress in Redis as the backend source of truth. - Kept Help Center generation out of the onboarding hot path; the existing onboarding controller does not start generation yet. **How to test** 1. Start Help Center generation for an account. 2. Fetch the onboarding generation status endpoint and verify it returns the generation id, Redis state, and article/category counts. 3. Reload the onboarding UI or client state and fetch again to confirm progress can be recovered without relying on websocket events. 4. Verify skipped/completed generation states are reflected from Redis. ## Related PRs - https://github.com/chatwoot/chatwoot/pull/14569 - https://github.com/chatwoot/chatwoot/pull/14568 - https://github.com/chatwoot/chatwoot/pull/14567 - https://github.com/chatwoot/chatwoot/pull/14619 - https://github.com/chatwoot/chatwoot/pull/14565 (Primary onboarding PR)
19 lines
365 B
JavaScript
19 lines
365 B
JavaScript
/* global axios */
|
|
import ApiClient from './ApiClient';
|
|
|
|
class OnboardingAPI extends ApiClient {
|
|
constructor() {
|
|
super('onboarding', { accountScoped: true });
|
|
}
|
|
|
|
update(data) {
|
|
return axios.patch(this.url, data);
|
|
}
|
|
|
|
getHelpCenterGeneration() {
|
|
return axios.get(`${this.url}/help_center_generation`);
|
|
}
|
|
}
|
|
|
|
export default new OnboardingAPI();
|