Landing page text and chat assistant sync: architecture

The text of the SkillPixel landing page moves from code files into the database. An admin edits it on a new screen. Each save updates the knowledge of the chat bubble, so its answers follow the page.

SP-894 · 26 Nov 2026 · For review by Toàn before merge

Status as of 26 Nov 2026

Stage
In review. The chatbot change is merged and live. The LMS change is an open PR. It is not on beta and not in a production tag.
LMS PR
lms-platform #796 open. Database table, admin text editor, sync to the chatbot. One frontend test fails in CI and is under investigation.
Chatbot PR
lms-ragflow #12 merged and deployed. Keeps beta and production documents apart.
Ticket
SP-894
Screenshots
None yet. Screenshots from beta come after the LMS PR merges.

Why this exists

The chat bubble answers questions about SkillPixel from a knowledge base that someone wrote by hand. When the landing page changes, the chat bubble does not know. It can give an old answer that disagrees with the page.

The landing text also lives in code files. A text change needs a developer and a deploy. With this work, an admin changes the text on a screen, and the chat assistant learns the new text in the same step.

The three parts

Part 1

Admin text editor

New tab "Text" under Admin, Homepage. One text box for each string, grouped by page section, for Vietnamese and English.

Part 2

LMS backend and database

A new table stores one row for each tenant and language. After a save, the backend builds one document and sends it to the chatbot.

Part 3

Chatbot service

Stores the document as knowledge. A document can now belong to one environment, so beta text and production text stay apart.

What happens on a save

  1. The admin presses Save

    The editor sends the full text of one language to the LMS backend.

  2. The backend stores the text

    It writes the text to the database and adds an audit entry with the user. The admin sees "Saved" at once. The save does not wait for the chatbot.

  3. The backend builds the knowledge document

    This runs in the background after the save is final. It turns the text into one document with section headings.

  4. The backend sends the document to the chatbot

    The document replaces the earlier one for the same environment and language. If the text did not change, nothing is sent.

  5. The editor shows the result

    The status near the language tabs reads "up to date", "updating", or shows the error text.

  6. Visitors see the new text

    The landing page asks the backend for the saved text and shows it in place of the built-in text. Signed-in users who ask the chat bubble get answers from the new text.

Self-repair. A daily job at 06:30 Vietnam time sends again any language that is not in sync. A failed upload repairs itself by the next morning without action from anyone.

Where the text lives

ItemWhereWho changes it
Landing text, 282 strings for each languageLMS databaseAdmin, on the Text tab
Built-in textCodeDeveloper. It is the default and the fallback.
Layout, images, section orderCodeDeveloper
Hand-written chatbot knowledgeChatbot service, as beforeNot changed by this work

Beta and production stay apart

The beta LMS and the production LMS use the same chatbot service and the same chatbot database. Without a separation, an edit on beta would change the answers on production.

Beta

The beta LMS marks each request as beta. It stores one landing document for Vietnamese and one for English. Only chat on beta can read them.

Production

The production LMS marks each request as production. It has its own two landing documents. Only chat on production can read them.

What the chat assistant receives

Why it can be trusted

ConcernHow it is handled
Who can editTenant admins only. The backend checks this. A hidden menu is not the only guard.
Tenant separationThe new table uses the same row-level security as the other tenant tables.
Bad inputText only. Each string has a limit of 5,000 characters and the full payload a limit of 300 KB.
HistoryEach save writes an audit entry with the user.
Chatbot not availableThe backend tries two more times. Then the error shows in the editor, and the daily job tries again.
Other tenantsThe Text tab shows only for the SkillPixel landing design. Partner landing pages do not use this text.
Page speedThe landing page makes one more small request. The built-in text shows first, so the page does not wait.

Tests so far. Chatbot: 35 tests pass against a real database, including one that proves a beta document is not visible from production. LMS backend: unit tests pass, and the full database test tier passed once on this branch (2,914 tests). LMS frontend: 581 of 582 test files pass. The one failure is a time limit on an existing landing test, and the cause is not yet known.

Known limits

Decisions taken

DecisionChoice
Who can use the chat bubbleSigned-in users only. No guest chat.
Where the landing text is editedIn the database, through the admin screen. The code files stay as the default.
Which environments syncBeta and production, each with its own documents.
PricingNot sent to the chat assistant until prices are approved.
Hand-written knowledgeIt stays. The landing document wins when the two disagree.

Questions for Toàn

  1. Is text-only editing enough?

    Images, layout and section order stay in code. To change them you still need a developer.

  2. Can you work with the technical names in the editor?

    If not, friendly labels are possible but need more work for 282 strings.

  3. Is it correct to keep pricing away from the chat assistant?

    You can still edit the pricing text for the page. The assistant does not learn it.

  4. Should the landing text win over the hand-written knowledge?

    Today the document tells the assistant that the landing text is newer.

  5. Is the scope correct?

    Only the SkillPixel home page. See "Known limits" for the pages that are not covered.

  6. Who does the first save on production?

    Someone must save both languages once before the production release.

Rollout checklist

  1. The chatbot change is live already (lms-ragflow #12). It must stay ahead of the LMS change.
  2. Merge lms-platform #796. Beta deploys, and the migration creates the new empty table.
  3. On beta, open Admin, Homepage, Text. Press Save once for Vietnamese and once for English. Check that the status reads "up to date".
  4. Change one fact, save, and ask the chat bubble about it.
  5. Before the production release, do step 3 on production.
  6. Move SP-894 to Testing after beta, and to Done once it is in a production tag.