Skip to content

feat(chat): add Connections to the chat menu and its own page, per brand (W4-25) - #2019

Merged
gkhngyk merged 9 commits into
ansvisor:mainfrom
cihan-gyk:feature/chat-connections-page
Nov 4, 2026
Merged

gkhngyk merged 9 commits into
ansvisor:mainfrom
cihan-gyk:feature/chat-connections-page

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Connections in Chat: the chat menu's Connections row and the Connections page, behind CHAT_AGENTIC (Chat Wave 4, W4-25; agentic plan §6, CHAT-01 item 169; mockup #s-conns). Stacked on #2012, whose one read of a brand's connections both use. Connections are per brand (owner decision 15).

Menu row (under Agents; Skills, #2005, goes between them when it lands):

  • "Connections", Manage (the page) and an arrow-only ▾/▴. Closed by default; the menu keeps it as left, with its other sections.
  • Open, it lists the brand's tools: connected first (green dot, ✓), sign-in failed (amber dot, Reconnect), the ones to connect (grey dot, Connect), then Soon. About six rows tall, then it scrolls; over 20 tools a "Search connections" box shows. Read only while open.

/dashboard/chat/connections (built like Skills):

  • Tabs All · Connected · Not connected with counts, a search, and the groups Search & analytics · CMS · E-commerce · CRM & revenue · Team & data.
  • One card per tool: name, group, status (✓ Connected, Sign-in failed, Soon, Suggested on up to two). Connected: account · by {name} · {date} · access, and "Used by /publish · {agent}". Not connected: what it does and "Would unlock …".
  • Admins connect: Connect, Reconnect and Settings open the tool's card in Settings › Integrations (new anchors there: #webflow, #google-analytics, #product-catalog…). Disconnect (CMS sites, Search Console and Analytics for this brand) asks first, says what stops and names the agents that need it and would pause; catalog sources and webhooks are managed in Settings.
  • Everyone else gets "Ask your Admin to connect" (an access request, as elsewhere in Chat; "Ask" in the menu).
  • Soon cards (HubSpot, Slack…) have nothing to click. Request a connection opens Ansvisor's contact page.
  • The shell names the page (← Back to Chat · Chat › Connections) and Ctrl K lists it. list_connections now links this page.

Plan card: a missing optional tool's amber line says "{Tool} isn't connected. I can do everything else without it." with Connect and Skip.

Help: help/chat/connections.md (approved: false).

Related issue

None. Chat waves plan, Wave 4 (W4-25).

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Chat on, demo admin: open Chat, click ▾ beside Connections in the menu. The brand's connected tools come first with ✓, then Connect, then Soon.
  2. Click Manage: switch tabs and groups, search "web". On a connected CMS card, click Disconnect: the dialog names what stops (try it on a test brand only).
  3. Click Connect on a tool: Settings › Integrations opens at its card.
  4. As an Analyst: no Connect or Disconnect; "Ask your Admin to connect" sends a request (Roles & access › Requests).
  5. Check at 1024px, light and dark.

No migration. No new environment variable.

Screenshots

1024px, light and dark, from a local preview on the dev database (files in .claude/mockups/w4-ef/):

  • w4-25-menu-connections-open-{light,dark}-1024.png: the chat menu (a drawer below 1100px) with the Connections list open.
  • w4-25-connections-page-{light,dark}-1024.png: the Connections page for the demo brand.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes
  • yarn typecheck passes
  • yarn format:check passes
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change)

Screens: shown to the owner in a local preview (1024px, light and dark) and approved on 2026-11-02.

CI passed on this branch (31de7e4), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41489986146): schema is up to date; web format:check, lint, typecheck, all tests and yarn build pass; server lint, format:check and all tests pass.

🤖 Generated with Claude Code

cihan-gyk and others added 3 commits November 2, 2026 19:16
… Connections page (W4-24)

One read of a brand's connection rows (connection-rows.ts) that the
agents' checks, Chat's list_connections and the new
GET /api/chat/connections all use, and connections.ts building each tool's
record for a brand: status, account, who connected it and when, access,
what uses it, the agents that would stop on Disconnect, up to two
Suggested, and the tools coming soon. Per brand, behind CHAT_AGENTIC.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and (W4-25)

The chat menu's Connections row (Manage, and an arrow that opens the
brand's tools under it: connected first, then Connect, then Soon; a search
over 20) and /dashboard/chat/connections, built like Skills: tabs with
counts, groups, search, one card per tool with its status, account, access
and what uses it, up to two Suggested. Admins connect through the tool's
card in Settings › Integrations (new anchors there) and disconnect after a
dialog naming the agents that would stop; others ask their Admin. Soon
cards have nothing to click; Request a connection opens the contact page.
The plan card's missing-tool line gets Skip. Help article added. Behind
CHAT_AGENTIC.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
gkhngyk previously approved these changes Nov 2, 2026
@gkhngyk

gkhngyk commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Approved. Small note: with no active brand, use-connections.ts:51 returns early, and the state stays LOADING. The page shows "Pick a brand" over a skeleton grid that never resolves, and the menu list behaves the same. An empty ready / no_brand state would fix it.

Search Console and Analytics were read as connected from the brand's
picked property alone. Disconnecting Google in Settings deletes the
workspace's sign-in but keeps the brand's property, so the Connections
page, the chat menu and list_connections went on saying Connected.

A property now counts as connected only while its Google sign-in is
connected; with the property set and no connected sign-in it shows as
failing. connectedKinds takes the sign-ins too, so Suggested and the
agents' "would stop" list agree with the status. Called without
sign-ins (the agent-run check) it reads as before.

The comments no longer claim a record carries no id: Analytics' account
is its property id.
gkhngyk
gkhngyk previously approved these changes Nov 2, 2026
@gkhngyk

gkhngyk commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This PR now conflicts with main: #2012 was squash-merged, so its commits are on main under new hashes. Could you merge main into this branch (or rebase it onto main) and resolve the conflicts? Once CI is green I'll merge it.

cihan-gyk and others added 4 commits November 4, 2026 00:50
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

Merged main in (e5a784a, no rebase; #2012's squash recorded as merged), and moved the Connections row right under Skills now that Skills has its row; the Help article says so. Fork CI: server, schema and web pass except agent-eval.test.ts, which fails on main too and is fixed by #2108.

@gkhngyk gkhngyk closed this Nov 4, 2026
@gkhngyk gkhngyk reopened this Nov 4, 2026
@gkhngyk gkhngyk closed this Nov 4, 2026
@gkhngyk gkhngyk reopened this Nov 4, 2026
@gkhngyk
gkhngyk merged commit 9a47286 into ansvisor:main Nov 4, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants