Skip to content

feat(chat): show What's new on Chat Home and as cards under the answer (W4-21) - #2024

Merged
gkhngyk merged 17 commits into
ansvisor:mainfrom
cihan-gyk:feature/chat-whats-new-home
Nov 4, 2026
Merged

gkhngyk merged 17 commits into
ansvisor:mainfrom
cihan-gyk:feature/chat-whats-new-home

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

What's new, part 2: Chat Home's New line, the What's new chip and the cards under the answer, behind CHAT_AGENTIC (Chat Wave 4, W4-21; CHAT-11 §B–E, CHAT-08 v2). Stacked on #2023; the two (with W4-22's entries) ship together.

Chat Home

  • New line under the shortcuts, at most one: the New tag, the newest unread update's one sentence, and Show me, which puts "What's new: how can {feature} help me?" in the box and doesn't send. It stays until the update is read or 14 days after its day (owner decision 14).
  • What's new chip right after Ask anything (CHAT-08 v2's order): asks "What's new in Ansvisor and how can it help me?". A small dot while the person has unread updates; no count. It takes one of the six chip places.

The answer

  • Up to three cards under the answer (whats_new.ready, an added event; the thread reads them back after a reload): the feature, the team's lines as approved (never the model's words), Try it to its page with the brand open now (in the side panel, the page behind it). An update the plan doesn't include says "On Growth and Enterprise." with See plans.
  • An update counts as read once its card shows, or when Try it is opened (POST /api/chat/whats-new/read). Read state is per person, the same in the side panel and on the full page.
  • One line in engine.ts after get_whats_new's read; the work is in lib/chat/whats-new/run.ts.
  • Next moves "Try it on my brand" and "Show older updates" come from the tool's description. "Send me this every month" waits for the scheduled jobs (W3-02) and the monthly summary (W4-23).

Help: help/chat/whats-new.md (approved: false).

Related issue

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

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. With an approved entry (W4-22, approve one locally and yarn test -u src/lib/chat/whats-new): Chat Home shows the New line and the chip's dot.
  2. Click Show me: the box holds "What's new: how can {feature} help me?"; nothing is sent.
  3. Send it: the step reads "Read What's new · 1 update for your plan", the card shows under the answer, and after a reload Home has no line and no dot.
  4. Click Try it on a card: its page opens for the brand open now.
  5. Check at 1024px, light and dark.

For the screenshots on the dev database: preview-w4-ef-seed.sql adds one finished What's new chat for the demo account (no model call), cleanup-w4-ef-preview.sql removes it and puts the reads back.

No migration (00464 is in #2006). No new environment variable.

Screenshots

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

  • w4-21-home-new-line-and-chip-{light,dark}-1024.png: Chat Home with the What's new chip and its dot, and the New line with Show me.
  • w4-21-whats-new-cards-{light,dark}-1024.png: the answer's three cards with Try it (a chat seeded with preview-w4-ef-seed.sql).

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 (446aec4), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41490470393): 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 10 commits November 2, 2026 09:12
…3-DB, 00457–00459)

Chat's Wave 3 tables in one PR (one DB PR per wave), behind CHAT_AGENTIC:
nothing reads or writes them while the flag is off. Tables, types, tests
and the demo's coverage only; the code that uses them comes in W3-01,
W3-06 and W3-11. Every new table has row level security on; members only
ever read, anon gets nothing, and every write is the server's.

- 00457: chat_schedules (CHAT-12): once, recurring or a follow-up check;
  run at / ready by, due and next run, the RRULE and time zone; title,
  prompt or skill, the brand fixed at creation, the creator it acts as and
  its own chat; delivery to chat and/or email, recipients only people of
  the workspace (a trigger checks), change-only with the last fingerprint;
  mode, model, effort; on/off with the reason, failures in a row, the one
  retry; a follow-up check's target, metric and who set it (card or
  full_auto, the latter only for follow-up checks). A job whose brand or
  creator is deleted turns off (missing_source, owner_role) instead of
  running on without them. chat_schedule_runs: slot and attempt (unique,
  so a slot never runs twice), Run now, the Chat run and answer, status,
  parts done, fingerprint, usage as a share, email outcome.
  chat_conversations.schedule_id with origin 'schedule' (one live chat per
  job; it stays the creator's), prompt_improve_usage.schedule_id, and
  reserve_chat_ai_usage taking p_schedule_id (default null, old calls still
  match): the row is named by the chat's job, a job that isn't the chat's
  is refused. Creator and Admins read a job, within their brands.
- 00458: chat_skills (CHAT-13): name unique in the workspace in the
  format's rules, body up to 50 KB, licenses MIT, Apache-2.0,
  BSD-2-Clause, BSD-3-Clause, ISC (an import needs one), source user or
  import with the pinned commit and checksum, scan and removed parts,
  review status (only an approved skill can be on), private or workspace.
  Private or unapproved: creator and Admins; approved workspace skills:
  every member. chat_settings.disabled_skills for library skills.
- 00459: chat_memory_items (CHAT-14): Me, brand and workspace lines, 1–300
  characters, at most 4,000 a scope (a trigger under a lock per scope,
  deleted lines left out), one profile line a person, deleted_at for Undo;
  brand lines go with the brand, Me lines with the account and when the
  person leaves the workspace (trigger on profiles). Me: only its person;
  brand lines: brand access; workspace lines: every member.
  chat_settings.memory_enabled and chat_user_prefs.memory_enabled, both on.

web/src/types/supabase.ts carries the new tables and columns; schema.test.ts
checks the Wave 3 policies, limits, vocabularies, triggers and the hold's
signature from the SQL; brand-access-policies.test.js lists the new tables;
the demo coverage skips chat_schedules and chat_memory_items.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	server/src/lib/brand-access-policies.test.js
#	web/src/types/supabase.ts
…brary, agent calls and outside e-mails (W4-DB, 00462–00467)

- 00462: the price catalog's supported_parameters and context_length, and
  prompt_improve_usage.units for image rows.
- 00463: content_drafts.origin and conversation_id; drafts with an action
  become action_center without touching updated_at; a member may say editor
  or chat and name only a chat of their own.
- 00464: chat_whats_new_reads, a person's own rows.
- 00465: chat_skills source library, library_ref and update_checked_at;
  00458's unnamed pin rule named and widened.
- 00466: chat_agent_versions.can_call and agent-called runs, one level deep,
  at most 3 a run.
- 00467: chat_schedules.external_recipients and chat_outbound_emails, each
  sent only with a click.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hat's get_whats_new (W4-20)

What's new entries live in whats-new/{slug}.md, approved by Cihan in the
pull request, and the approved ones in entries.json, which a test keeps in
step with the folder. Every entry is checked: 3–4 lines of at most 120
characters, no model names, API terms, versions, internal codes, prices or
plan names. A person sees their plan's entries, the named one first, then
unread, then newest; read state is per person (00464). Adds
GET /api/chat/whats-new, POST /api/chat/whats-new/read and the
get_whats_new read, whose step says "N updates for your plan". Behind
CHAT_AGENTIC.

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

Chat Home's New line under the shortcuts (the newest unread update of the
last 14 days, with Show me filling the box unsent) and the What's new chip
after Ask anything, with a dot while something is unread. A get_whats_new
read shows its updates as cards under the answer (whats_new.ready, read
back after a reload): the approved words, Try it to the feature's page and
"On {plans}." with See plans. Cards shown or Try it opened count as read.
Help article added. Behind CHAT_AGENTIC.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its limit goes through the scope's ROW_LIMITS like every read that takes
one: 3 by default and at most, the input accepting more and the server
cutting it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
gkhngyk previously approved these changes Nov 2, 2026
get_whats_new took older_than (the oldest shown update's day) and kept
only updates published before it. Updates sharing that day could never
be reached, and since unread ones rank before read ones the oldest shown
update could be an unread one, cutting off newer read updates. older_updates
was also computed over every entry the plan shows, so it never went false.

The tool now takes shown, the features of the updates already shown;
pickWhatsNew leaves those out (by feature or slug) and keeps the same
ranking, so each "Show older updates" reads the next ones until none are
left. more is now whether the filtered, ranked list has entries past the
ones taken. A test keeps entry features unique, since paging relies on
them.
# Conflicts:
#	web/src/components/chat/chat-home.tsx
…s nothing

Home now reads What's new on mount, so the locked-start test only asserts
that no run is posted.
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: #2023 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.

…new-home

# Conflicts:
#	web/src/app/[locale]/(dashboard)/dashboard/chat/page.tsx
#	web/src/components/chat/chat-thread-view.tsx
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

Merged main in (58d5ea7, no rebase): #2023's squash is recorded as merged, and the one conflict, Chat Home's page, keeps both the ?compose= draft and What's new's Show me. 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 4382a46 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