Repository navigation
fix(chat): show the demo brand the real Chat, locked, instead of a Soon preview - #1999
Merged
Merged
Conversation
With CHAT_AGENTIC on, Chat runs on the plan's AI limit and an own key is Enterprise only, so the sidebar's and mobile menu's "Set up" badge asked every customer without a key to set up something there is nothing to set up. The menus no longer ask /api/settings/ai-providers for the key status with the new Chat on, and dashboardNavBadge never shows Set up then. The words move to en.json (nav.chatSetUp). With the new Chat off, nothing changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on preview Owner decision for the Chat launch: on the demo brand, Chat is the real one, locked as the rest of the demo (useUpgradeGate's isLocked already opens the upgrade dialog on sending, so nothing runs and no AI is used). The "Soon (next week)" badge (chatSoon in the sidebar, the mobile menu and dashboardNavBadge), the old Agent Chat page's demo branch, the ChatSoonPreview component, the Chat v2 mockups it framed under web/public/demo/chat and the demo.chat words go. With the new Chat off, the demo brand gets the Agent Chat page as any brand does, locked as a read-only workspace. docs/guides/demo-brand.mdx says Chat opens locked. 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 |
# Conflicts: # web/src/components/layout/mobile-nav.test.tsx # web/src/components/layout/mobile-nav.tsx # web/src/components/layout/sidebar.test.tsx # web/src/components/layout/sidebar.tsx # web/src/lib/dashboard-navigation.test.ts # web/src/lib/dashboard-navigation.ts
Merged
8 of 13 tasks
gkhngyk
pushed a commit
that referenced
this pull request
Nov 3, 2026
… from the demo's data (#2098) * feat(demo): show sample chats in the demo brand's Chat The demo brand showed the real Chat, locked and empty (#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]> * fix(demo): mark the demo's sample chats read, so they list as chats, not Inbox news Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): name the sites Perplexity cites for the prompts it misses, from the demo's data Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): open the plans when a skill runs on the demo brand Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
gkhngyk
pushed a commit
that referenced
this pull request
Nov 5, 2026
…agents never count (#2102) * feat(demo): show sample chats in the demo brand's Chat The demo brand showed the real Chat, locked and empty (#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]> * feat(demo): show sample agents at work in the demo brand's Agent Center Stacked on the demo's sample chats. The demo brand's Agent Center now has four agents made from the ready-to-use ones (visibility watch, citation win-back, competitor watch and a paused weekly report), with their versions, triggers and run history, each run with its chat (Open run). Schedules run at their own slots, worded from the demo's own answers; one win-back run waits on its owner's OK to save a draft, so the Inbox has something under Needs you. An agent belongs to the workspace, not to a brand, so 00475 marks the demo's agents with the demo brand they show (chat_agents.demo_brand_id, on delete cascade, a partial index, and a trigger that only takes a demo brand of the agent's own workspace). Nothing runs, counts or pauses them: - agentForAct refuses every act on one with demo_brand (402: the plans); - the triggers' active agents, the sweep's failures, the own key's resume, the plan's active-agent counts and limit, and what may run (Run agent, an action's agents) leave them out; - settleAgentRun leaves a demo brand's runs as built (the waiting run has no Chat run state, so the engine's sweep never sees it either); - Approve, Skip and an answer on a demo brand's card answer the server's demo_brand 402 before anything resumes. Hiding the demo brand deletes its agents with its chats; showing it again rebuilds them (DEMO_VERSION 5). chat_agent_runs is now built by the demo. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): mark the demo's sample chats read, so they list as chats, not Inbox news Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): name the sites Perplexity cites for the prompts it misses, from the demo's data Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): give the demo agent's waiting run its run state, so its card shows, never expired The events route reads whose run it is from chat_run_state: without it the waiting run's card never showed (404). Its state has no waiting_since, so the engine's sweep, which stops a card a week after it was shown, never picks it up; Approve, Skip and an answer stay refused with demo_brand. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): hide Agent Center's active count on the demo brand, whose agents never count Beside the demo brand's four sample agents the count of active agents (the plan's, 00475 leaves them out) read 0. On the demo brand there is none; the plan's count and limit still leave the demo's agents out. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): open the plans when a skill runs on the demo brand Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): delete the sample agents' runs when the demo is hidden, and keep them out of the sweep's settle pass Review on #2102: a deleted agent's runs stay (agent_id set null), so the demo's waiting run outlived a hide as a permanent needs_you row, and the settle pass, reading the 500 oldest open runs, could fill up with them. - Both hide paths (server hideDemoAgents, web hideDemoBrandAfterPurchase) delete the demo brand's chat_agent_runs before its agents. - The settle pass reads open runs a page at a time and leaves out those on a demo brand, so a real run is settled however many demos wait. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(demo): keep the demo brand's sample agents out of Can call and run_agent Main's run_agent (#2052) read an agent's Can call without leaving out the demo brand's sample agents (00475), so a saved list naming one let another agent run it. Saving a Can call that names one is now refused (demo_agent, with its own words), and callableAgentsOf leaves them out, as Run agent's picker does, so a run never offers or runs one, even one stored before. Help: the agents article says other agents can't call them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMenyNyxsr2Doq4CaQ3 --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Stacked on #1998.
On the demo brand, Chat is now the real Chat, locked like the rest of the demo. The "Soon (next week)" preview is gone. This is the owner's decision for the Chat launch (2026-11-03): sending already opens the upgrade dialog there, so nothing runs and no AI is used.
Removed
chatSoonin the sidebar and the mobile menu, and its branch indashboardNavBadge.agent/page.tsx).components/demo/chat-soon-preview.tsxand its test.web/public/demo/chat/*.html.git grepfinds no other use of them in the repo: no link, doc or test.demo.chat.soon,demo.chat.noteanddemo.chat.frameTitleinen.json.On the demo brand now
CHAT_AGENTIC): Chat opens/dashboard/chatas on any brand. Sending is stopped byuseUpgradeGate(isLocked), which opens the upgrade dialog.Docs:
docs/guides/demo-brand.mdxnow says Chat opens as on any brand but locked, and sending a message opens the plans. No Help article mentioned the demo's Chat.Related issue
None. Chat launch (2026-11-03), owner decision on the demo brand's Chat.
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
Tests
sidebar.test.tsxandmobile-nav.test.tsx: on the demo brand, Chat is the item any brand has:/dashboard/agent, with "Set up" when there's no key on the cloud;/dashboard/chat;agent/page.test.tsx: on the demo brand, the old Agent Chat lists the conversations and shows no preview frame. New chat and sending open the upgrade dialog and send nothing.dashboard-navigation.test.ts: the badge cases withoutchatSoon, anddemo.chatis gone fromen.json.Run:
yarn vitest run src/lib/dashboard-navigation.test.ts src/components/layout src/app/[locale]/(dashboard)/dashboard/agent src/components/demo src/lib/help src/lib/subscription-guard-coverage.test.ts: 14 files, 124 tests pass.By hand (
NEXT_PUBLIC_IS_CLOUD=true, a workspace with the demo brand)CHAT_AGENTIC=true, switch to the demo brand.CHAT_AGENTICunset, restart the web server and switch to the demo brand./demo/chat/CHAT-mockup-v2.htmlnow answers 404.Checklist
yarn lintpasses (0 errors; 7 old warnings in files this PR doesn't touch)yarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)CI passed on this branch (a71ec45), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41414754898): 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