SP-894 · Request for comments
How should the chat bubble learn what changed on the landing page?
Toan, you own the SkillPixel landing page under SP-697 and SP-696. Which of these workflows fits the way you ship copy? Please reply by Friday, 4 December 2026, 17:00 Vietnam time. Reply by question ID with a choice and a sentence of context. For example, “T2 B for beta, C for production.”
Context and scope
Toan ships changes to the SkillPixel homepage in frontend releases. A flag controls which version visitors see. The repository also contains a beta knowledge document dated 25 July 2026. In November, the beta bubble gave a different headline from the one on the page. How should an approved wording change reach both the page and the bubble? Beta knowledge document
On 30 November, I asked the beta bubble for the exact homepage headline. It answered “Nền Tảng Học Tập Đột Phá.” The visible hero said “Học thật, thi thật, đạt giải thật.” The answer is out of step with the hero. The test did not identify the retrieved document or establish why the model chose that wording.
Goals. Keep selected, approved copy for the SkillPixel individuals homepage in sync with the intended bubble and environment. Skip uploads when the approved text is unchanged. Track the last successful upload and provide a way to retry and roll back.
Non-goals. Layout redesign, general FAQ rewriting, partner tenant pages, business landing, private course content, guest chat rollout, and automated publication of placeholder pricing.
Today
The first row follows a frontend release to the page. The second shows the documented upload path into pgvector. The latest manual upload and the document retrieved for the beta answer are unverified. Document upload API · Release docs · Landing strategy · Vector store
What the checks found
Git history and copy
The first-parent git log --stat sample on origin/main at 077f31de contains 17 Toan-authored SP-696/SP-697 PR commits, 27 September to 9 November. Six touched the Vietnamese landing-v2.json and the same six touched the English file. Six touched the old-path AchievementsSection.tsx, including the move in #688. #664 was portrait-only. #691 split roadmap code. These are file touches, so a touch can represent a move, layout, behavior, or a copy edit. Initial rollout #611 · Content round #660 · Portrait #664 · Section move #688 · Roadmap split #691
The current path is apps/frontend/src/features/landing/platform/sections/, after #745. The Vietnamese and English bundles hold most prose. The TSX scan found literal display fragments such as the x prefix on award counts in AchievementsSection.tsx and the ₫ rendering literal in the unmounted PricingSection.tsx. I found no substantial hard-coded prose in those section components. Visible text can still bypass the bundle. Achievements renders contest.label from the contest data, and the shared contact section uses site identity for direct contact details. A JSON-only export would omit those facts and could include hidden strings such as pricing. Path move #745 · Vietnamese bundle · Achievements · Pricing · Contact · Mounted sections
Flag and beta bubble
On 30 November 2026, the checked beta session rendered the platform landing, consistent with sp-696-landing-v2 effectively on. The checked production session rendered the classic page, consistent with it effectively off. These are session observations. PostHog targeting rules, other cohorts and deploy overrides were unavailable. Flag key · Variant selection
Five completed Vietnamese replies in one existing beta chat session. The phone prompt was skipped while the previous reply was in progress and is excluded. Results describe that session and do not establish how often the mismatches occur.
Can the API replace a document by stable ID?
Yes. On lms-ragflow origin/main at 568c1c6, the authenticated documents POST accepts multipart file and optional document_id. With the same ID in the same tenant, pgvector updates the document and replaces its chunks in one transaction. An omitted ID generates a UUID. With environment_scoped=true, the service uses X-LMS-Environment to scope retrieval. The replacement key is tenant plus document ID, so beta and prod need distinct IDs even when scoped. Keep locale and page variant in the ID or explicitly decide how to combine them. No live write was performed. Upload endpoint · Ingestion service · Transactional replacement
Three ways to make one copy change
Each option feeds the same proposed upload path. Hash the approved document bytes and compare them with the last successful hash for that tenant, environment, variant and language. Write the success record only after indexing succeeds. On failure, keep the previous success record and retry. Reject superseded work so a slow beta deploy or late retry cannot put older copy back. A rollback should run the same check against the restored version.
A matching hash stops before upload. The ledger records the source revision, hash, document ID, scope, outcome and time. An unresolved flag or approval leaves the last good document in place. The upload happens off the page request path.
A. Extract after a successful deploy
Read approved text from a controlled render of the released homepage. This catches visible text from components and configured data. Defined selectors and locale and flag inputs are needed. Runtime content or flaky rendering could create spurious changes. This adds a render per locale to the release job, with no extra visitor request.
B. Export an approved manifest at frontend build time
Keep an allowlist of translation keys and explicit adapters for approved non-JSON facts. CI can validate it and generate a small, versioned artifact. The release job uploads after success. This is deterministic, adds a small build step, and needs a named owner when new sections or data sources appear. If Toan wants a separate prose manifest, ask how duplicate copy would be checked.
C. Store homepage copy in Postgres and publish it from Admin
An editor could change one headline in Admin and publish it for one language and environment. The homepage would read the published text from Postgres through the LMS API. A background job would send the approved text from that same revision to the bubble. Product could correct wording between frontend releases, while Toan could keep shipping layout changes in React.
This option needs an editor, a public read path for published text, and a way to restore an earlier revision. If the page caches text, publishing must also refresh that cache. Which fields would Toan and Product want to publish through Admin?
Questions to answer in writing
Toan · frontend
- T1 · Copy ownership. Where should editable copy live? A. Locale JSON with exceptions for data-driven facts. B. An explicit manifest of approved text or keys. C. Published text in Postgres, edited through Admin. Which visible facts must stay in code or come from runtime data?
- T2 · Release trigger. When should a one-line copy change reach the bubble? A. After the beta deploy and again after the production deploy. B. Only after the production release or explicit approval. C. When an editor publishes approved text for that environment. Please share one recent example of how you shipped a copy fix and any hotfix path we should cover.
- T3 · Build and CI. Which cost can your team own? A. Post-deploy render with selectors. B. A build export plus CI validation and a convention for new copy. C. A sync job triggered by publishing in Admin. If validation fails, should it block the release or alert the owner?
- T4 · Flag plan. Which is closest? A. Beta on and production classic for now. B. Production staged rollout. C. Full rollout followed by classic removal. What date or event should change which copy the bubble uses? During a staged rollout, which page should answers describe?
SP-894 owner or Product
- P1 · Pricing. A. Exclude pricing. B. Include only approved and publicly visible pricing. C. Link to the approved pricing source. Who owns sign-off and withdrawal?
- P2 · Which bubble? A. Signed-in SkillPixel support bubble only. B. Also a future guest bubble after separate approval. C. Another named bubble. Should rollout begin with beta only?
- P3 · Knowledge precedence. When sources conflict, should A. current approved landing copy win for landing questions, B. Product-approved policy and catalog win with landing copy used only for page descriptions, or C. the bubble ask for context or link to the source? Which legacy sections can we remove without losing unrelated support facts?
- P4 · Failure ownership. Should a sync failure A. keep the last good copy and alert the owner or B. disable landing-specific answers until fixed? Who owns the retry queue and stale-answer checks?
Decision log
On reply, record the date, decision, owner, reason and follow-up link here.
Verification gaps
Jira required sign-in, so the original SP-894 description and acceptance criteria could not be read. The scope above is proposed for Toan and Product to confirm. PostHog audience rules, the deployed chatbot revision and the latest manual upload history are unverified. The bubble checks compare visible answers with the page and do not identify retrieval sources.