Skip to content

feat(chat): show a new member the agents for them on their Chat Home (Onboarding & Help, 00483) - #2216

Merged
gkhngyk merged 12 commits into
ansvisor:mainfrom
cihan-gyk:feature/onboarding-member-home
Nov 7, 2026
Merged

gkhngyk merged 12 commits into
ansvisor:mainfrom
cihan-gyk:feature/onboarding-member-home

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

The new-member half of AGENTS plan #11 (Onboarding & Help), with the owner's decision: no agent run and no AI use. Chat Home gets an Agents for you section that suggests ready-to-use agents to a person new to the workspace.

When it shows

What it shows

  • 3 to 5 ready-to-use agents from recommendedPresets() for the open brand's site type and the person's work areas, each with what it does and why it fits.
  • Admins and Managers click an agent to open its card in Agent Center › Ready to use (#preset-{id}).
  • Everyone else (CHAT-21 §K item 51) sees the same cards with Ask your Admin, which asks the Admins to turn one on.
  • Showing them runs nothing and uses none of the AI limit.

Hide

  • × (Hide Agents for you) keeps chat_user_prefs.agents_for_you_dismissed_at (00483), saved as home_seen_at is, so it stays hidden on every device.
  • It writes only the person's own row, so it still works while the workspace is read-only (listed in the read-only coverage test).

The Default view (owner, 2026-11-06)

  • The owner decided that Agents for you also shows on the Default view, but only for a new member as defined above, and only until they hide it or their 14 days end.
  • The Chat page reads whether the person is that new member (readAgentsForYouOpen: their profile, their prefs row and their accepted invitation, with no brand and no agents), alongside its other reads, and hands ChatHome newMember.
  • On the Default view, the agents themselves are read only for that person. A focused Home reads them as before. Nothing changes on anyone else's Default view.

One card at a time (owner, 2026-11-06): Chat Home's welcome card (00486) and the product tour landed on main. In the free trial and the demo, a new member would have had both cards at once, pushing the box to the bottom of the screen. Now the welcome card comes first: Agents for you waits, unread, while it shows, and follows once Not now or the tour's end takes it away. Everyone else is unchanged.

Help: help/chat/chat.md ("Agents for you"), help/chat/focus.md and help/settings/work-areas.md.

Related issue

None. AGENTS plan #11, the new-member half (the brand-added trigger was #2150).

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

With CHAT_AGENTIC=true:

  1. Apply 00483 (schema.sql already includes it), then reload the PostgREST schema.
  2. Sign in as a person who joined the workspace in the last 14 days and answered or skipped Your work areas.
  3. Open Chat. On the Default view, Agents for you shows under the greeting: 3 to 5 agents, each with what it does and why it fits.
  4. Select Edit under the greeting, pick an area and select Continue. Agents for you shows with Home's other sections.
  5. As an Admin or Manager, click an agent. Agent Center › Ready to use opens on its card.
  6. As an Analyst, the same agents show with Ask your Admin; selecting it sends the request.
  7. Select ×. The section goes. Open Chat Home in another browser: it stays hidden, on both views.
  8. Sign in as someone who joined more than 14 days ago. The Default view shows only the greeting, one line, the pill and the box, and Home makes no Agents for you read for the agents.
  9. Check dark mode and 1024 px.

Screenshots

Checked locally at 1440 px on 2026-11-06, with the demo account set up as each case and put back afterwards:

  • a new member on a paid plan: the Default view with Agents for you (three agents and ×);
  • a new member in the no-card demo: the welcome card alone, then Agents for you after Not now;
  • anyone else: the calm Default view, with no card.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change) — see help/README.md

Deploy order: migration 00483 first, then web. It adds chat_user_prefs.agents_for_you_dismissed_at (add column if not exists). It is numbered below main's latest (00491) because the number was reserved earlier; 00485 and 00486 add other columns to the same table, so the order doesn't matter.

CI passed on this branch (0a92c88), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/42276594222): 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

claude and others added 10 commits November 5, 2026 16:04
…(Onboarding & Help, 00483)

"Agents for you" on Chat Home, the new member half of AGENTS plan #11
(owner decision: no agent run, no AI use). Once the person answered or
skipped Your work areas, in their first 14 days in the workspace (the
invitation they accepted, else the workspace maker's account), and until
they hide it, Home lists 3 to 5 ready-to-use agents from
recommendedPresets() for the open brand's site type and their work areas,
each with what it does and why it fits. Admins and Managers open its card
in Agent Center > Ready to use (#preset-{id}); everyone else (CHAT-21 §K
item 51) sees the cards with Ask your Admin.

Hide keeps chat_user_prefs.agents_for_you_dismissed_at (00483), saved as
home_seen_at is, so it stays hidden on every device. Help updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…read-only coverage

dismissAgentsForYou writes only the person's own chat_user_prefs row, as
saveHomeSeen does, so it stays open while the workspace is read-only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…member-home

Conflicts: help/chat/chat.md (keywords: main's audit card words and this
branch's Agents for you words, both kept) and approved-articles.json
(regenerated with yarn test -u src/lib/help).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…member-home

Conflicts: help/chat/chat.md keywords (main's governance words and this
branch's Agents for you words, both kept); web/src/lib/chat/schema.test.ts
(main's 00482 block and this branch's 00483 block, both kept); supabase/schema.sql
(main's, rebuilt with build-schema.sh).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…member-home

Conflicts: web/src/components/chat/chat-home.tsx (main's Default view and this
branch's Agents for you, which now sits with the other Home blocks, off the
Default view); web/src/lib/actions/chat-prefs.test.ts (this branch's
dismissAgentsForYou tests and main's saveDefaultHome header, both kept);
supabase/schema.sql (main's, rebuilt with build-schema.sh).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s other blocks

ansvisor#2183 (00485) starts everyone's Chat Home on a Default view that shows only
the greeting, one line and the box, and skips the reads it no longer shows.
Agents for you now sits with For you now and New for you: it shows where
Home has a focus, and isn't read on the Default view. Help (Use Chat, Choose
what Chat focuses on, Pick your work areas) says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…a new member only

Owner, 2026-11-06: a person new to the workspace, as Agents for you counts
one (Your work areas answered or skipped, in their first 14 days, until
they hide it), gets the section on the Default view as well, under the
greeting. Everyone else's Default view stays the greeting, one line, the
pill and the box.

- readAgentsForYouOpen: whether the section is open for the person, with
  no brand and no agents, shares readAgentsForYou's reads. The Chat page
  reads it with its other reads and hands ChatHome newMember.
- ChatHome reads the agents on the Default view only for that person; a
  focused Home reads them as before.
- Help (Use Chat, Choose what Chat focuses on, Pick your work areas) says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…gone, one card at a time

Owner decision 2026-11-06: in the free trial and the demo, a new member
gets the tour's welcome card first; Agents for you waits, unread, until
Not now or the tour's end takes the card away.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the needs-migration Adds or edits a migration — apply it to the hosted database label Nov 6, 2026
gkhngyk
gkhngyk previously approved these changes Nov 6, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

…member-home

# Conflicts:
#	help/chat/chat.md
#	supabase/schema.sql
gkhngyk
gkhngyk previously approved these changes Nov 6, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

…member-home

# Conflicts:
#	help/chat/chat.md
#	web/src/lib/help/approved-articles.json

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@gkhngyk
gkhngyk merged commit b592749 into ansvisor:main Nov 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-migration Adds or edits a migration — apply it to the hosted database

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants