Repository navigation
fix(demo): name the sites Perplexity cites for the prompts it misses, from the demo's data - #2098
Merged
Merged
Conversation
The demo brand showed the real Chat, locked and empty (ansvisor#1999). A new demo module (lib/demo/chat.js, DEMO_VERSION 4) now gives each person of the organization five chats on the demo brand, as if they had asked them: the questions, the reads Chat made as steps, the "Data used" chips, next moves under the latest answer, and answers whose figures are counted from the demo's own answers (stats.js) and link to its Action Center actions and Content Editor drafts. A chat is its author's, so each person gets their own copy; someone who joins later gets theirs at the next rebuild. Sending in one, or starting a chat on the demo brand, is refused with the server's demo_brand 402 before anything is kept or run (POST /api/chat/runs), and the page opens the plans, as for a read-only workspace: an answer on the demo brand would still use the workspace's AI. Hiding the demo brand (the brand menu, or the purchase) deletes its chats, since Chat's menu lists a person's chats of every brand; showing it again marks it stale, so the next visit rebuilds it with them. chat_conversations is now built by the demo; agent_conversations (the old Agent chat) is skipped with its reason. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…not Inbox news Co-Authored-By: Claude Opus 5.5 <[email protected]>
… from the demo's data Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Merged
8 of 13 tasks
gkhngyk
previously approved these changes
Nov 3, 2026
Contributor
|
Conflicts with main. Please merge main in; #2102 needs the same after it. |
# Conflicts: # web/src/components/chat/chat-home.tsx
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Merged main in (one conflict in chat-home.tsx, now on the shared startChatRun) and a skill's Run on the demo brand opens the plans too. |
gkhngyk
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The demo brand's Chat has sample chats, instead of the real Chat locked and empty (#1999). This is part 1 of "demo shows Chat and Agent Center one-to-one" (priority 4 after launch); Agent Center is the PR stacked on this one. No migration.
What the demo builds (
server/src/lib/demo/chat.js,DEMO_VERSION4):stats.js), so it matches the pages the chat links to: the Action Center's actions (with their Priority Score) and the Content Editor's drafts. A test checks every link points at a demo action or draft, and that every site named is a.exampledomain.last_read_at), so they list as chats in the menu, not as news in the Inbox.Nothing runs on them:
POST /api/chat/runsrefuses a message in a chat on the demo brand, or a new chat on it, with the server'sdemo_brand402 before anything is kept or run.Hiding the demo brand deletes its chats, since Chat's menu lists a person's chats of every brand:
setDemoHidden);hideDemoBrandAfterPurchase).Showing it again marks it stale, so the next visit rebuilds it with them.
Coverage:
chat_conversationsis now built by the demo.agent_conversations(the old Agent chat, 00009) is skipped with its reason.Not in this PR:
chat_schedules,chat_skills,chat_memory_items): their pages are in open PRs (the W3 chain), so a later demo PR adds them as they merge.Related issue
None. Priority queue item 4 (demo shows Chat and Agent Center one-to-one).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Unit tests:
lib/demo/chat.test.js:.exampledomains only;MAX_PEOPLEsets;hideDemoChats.index.test.js: hiding deletes the chats; showing again marks the demo stale.coverage.test.js:chat_conversationsbuilt,agent_conversationsskipped.app/api/chat/runs/route.test.ts: a message in a demo brand's chat, or a new chat on it, is a 402demo_brandand the engine isn't called; another brand's goes on.chat-thread-view.test.tsx: ademo_brand402 opens the plans, not a toast.lib/demo/hide-after-purchase.test.ts: the purchase hides the demo brand and deletes its chats.Manually:
Screenshots:
.claude/mockups/demo-chat/, at 1024 px:Checklist
yarn lintpassesyarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)CI passed on this branch (acf29d6), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41680854166): schema is up to date; web
format:check, lint, typecheck, all tests andyarn buildpass; server lint,format:checkand all tests pass.🤖 Generated with Claude Code