AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): unify expert display and sidebar chats (#14661)
Ubbeef2d42c798f4
diff --git a/autogpt_platform/backend/backend/api/features/experts/experts_db.py b/autogpt_platform/backend/backend/api/features/experts/experts_db.pyindex 1ccf97cf48..89cfbd7677 100644--- a/autogpt_platform/backend/backend/api/features/experts/experts_db.py+++ b/autogpt_platform/backend/backend/api/features/experts/experts_db.py@@ -248,6 +248,7 @@ def _to_model(avatar_url=row.avatarUrl,color=row.color,role=row.role,+ job_title=row.jobTitle,tagline=row.tagline,bio=row.bio,skills=row.skills or [],@@ -916,6 +917,7 @@ async def _hire_expert_impl("avatarUrl": template.avatarUrl,"color": template.color,"role": template.role,+ "jobTitle": template.jobTitle,"tagline": template.tagline,"bio": template.bio,# The bundled installs below record each name, so the row lists onlydiff --git a/autogpt_platform/backend/backend/api/features/experts/experts_db_test.py b/autogpt_platform/backend/backend/api/features/experts/experts_db_test.pyindex 4792810565..08ee63c046 100644--- a/autogpt_platform/backend/backend/api/features/experts/experts_db_test.py+++ b/autogpt_platform/backend/backend/api/features/experts/experts_db_test.py@@ -475,11 +475,15 @@ async def _seed_template(@pytest.mark.asyncio(loop_scope="session")async def test_hire_expert_is_idempotent(server: SpinTestServer, test_user):template = await _seed_template(name="Maria", preload_listings=[])+ await prisma.models.Expert.prisma().update(+ where={"id": template.id}, data={"jobTitle": "Marketing Manager"}+ )first = await experts_db.hire_expert(test_user.id, template.id, None)second = await experts_db.hire_expert(test_user.id, template.id, None)assert first.expert.id == second.expert.idassert not first.expert.is_templateassert first.expert.source_template_id == template.id+ assert first.expert.job_title == "Marketing Manager"@pytest.fixture@@ -1810,6 +1814,7 @@ async def test_hire_existing_team_expert_fails_closed():avatarUrl=None,color="",role="Marketing Specialist",+ jobTitle=None,tagline=None,bio=None,skills=[],@@ -1861,6 +1866,7 @@ async def test_hire_raced_org_expert_fails_closed():avatarUrl=None,color="",role="Marketing Specialist",+ jobTitle=None,tagline=None,bio=None,skills=[],@@ -3188,6 +3194,7 @@ async def test_seed_roster_round_trip(template = seeded[entry["name"]]assert template.is_templateassert template.role == entry["role"]+ assert template.job_title == entry["job_title"]assert template.identity == entry["identity"]second_ids = await seed.seed_roster()@@ -3829,6 +3836,7 @@ async def test_sync_preloads_updates_template_cadence(server: SpinTestServer):entry: seed.RosterEntry = {"name": template.name,"role": template.role,+ "job_title": "Marketing Manager","tagline": "","avatar_url": None,"bio": "",@@ -3877,6 +3885,7 @@ async def test_sync_preloads_drops_workflows_the_roster_reassigned(entry: seed.RosterEntry = {"name": template.name,"role": template.role,+ "job_title": "Marketing Manager","tagline": "","avatar_url": None,"bio": "",@@ -3924,6 +3933,7 @@ async def test_sync_preloads_keeps_rows_when_a_slug_does_not_resolve(entry: seed.RosterEntry = {"name": template.name,"role": template.role,+ "job_title": "Marketing Manager","tagline": "","avatar_url": None,"bio": "",@@ -4040,6 +4050,7 @@ async def test_seed_roster_rescopes_untouched_hires_and_spares_edited_ones(entry: seed.RosterEntry = {"name": f"Maria {uuid.uuid4().hex[:8]}","role": "Marketing",+ "job_title": "Marketing Generalist","tagline": "Does all of marketing.","avatar_url": "/experts/maria.svg","bio": "Maria is a generalist marketer.",@@ -4068,6 +4079,7 @@ async def test_seed_roster_rescopes_untouched_hires_and_spares_edited_ones({**entry,"role": "SEO & Content",+ "job_title": "SEO Content Writer","identity": "You are Maria, an SEO lead.","tagline": "Takes a keyword from brief to article.","bio": "Maria is an SEO and content strategist.",@@ -4138,6 +4150,7 @@ async def test_seed_backfills_presentation_fields_onto_hired_copies(entry: seed.RosterEntry = {"name": template.name,"role": template.role,+ "job_title": "Marketing Manager","tagline": "Refreshed tagline","avatar_url": "/experts/maria.svg","bio": "Maria is a senior marketing strategist.",@@ -4158,6 +4171,7 @@ async def test_seed_backfills_presentation_fields_onto_hired_copies(refreshed = await experts_db.get_expert(test_user.id, hired.expert.id)assert refreshed is not Noneassert refreshed.avatar_url == "/experts/maria.svg"+ assert refreshed.job_title == "Marketing Manager"assert refreshed.tagline == "Refreshed tagline"assert refreshed.bio == "Maria is a senior marketing strategist."assert refreshed.categories == ["marketing"]diff --git a/autogpt_platform/backend/backend/api/features/experts/models.py b/autogpt_platform/backend/backend/api/features/experts/models.pyindex d1a472cc8c..ce6942784c 100644--- a/autogpt_platform/backend/backend/api/features/experts/models.py+++ b/autogpt_platform/backend/backend/api/features/experts/models.py@@ -203,6 +203,7 @@ class Expert(BaseModel):# Accent color token chosen while raising; "" when unset.color: str = ""role: str+ job_title: str | None = Nonetagline: str | Nonebio: str | Noneskills: list[str]diff --git a/autogpt_platform/backend/backend/api/features/experts/seed.py b/autogpt_platform/backend/backend/api/features/experts/seed.pyindex ad26b64c49..952c19b99f 100644--- a/autogpt_platform/backend/backend/api/features/experts/seed.py+++ b/autogpt_platform/backend/backend/api/features/experts/seed.py@@ -8,7 +8,7 @@ workflows and bundled Skills Hub skills are resolved from listing slugs andall are validated before any template is mutated, so``backend.api.features.store.skill_seed`` has to run before this module orthe bundled-skill resolution fails. Each upsert also refreshes the-presentation fields (avatar, tagline, bio, categories) on experts already+presentation fields (avatar, job title, tagline, bio, categories) on experts alreadyhired from that template, so roster changes reach existing users and not justnew hires."""@@ -58,6 +58,7 @@ class PreloadSeed(TypedDict):class RosterEntry(TypedDict):name: strrole: str+ job_title: strtagline: stravatar_url: str | Nonebio: str@@ -83,6 +84,7 @@ ROSTER: list[RosterEntry] = [{"name": "Maria","role": "SEO & Content",+ "job_title": "SEO Content Writer","tagline": "Takes a keyword from brief to publish-ready article, and reworks page copy to rank.","avatar_url": "/experts/maria.svg","bio": """I'm an SEO and content strategist — fifteen years across B2B SaaS and consumer brands — and I start with search intent, not keywords: what the person typing that phrase actually wants, and what shape of page gives it to them. From day one I can turn a keyword into a brief and then a publish-ready article, rework the copy on your webpages so it ranks and converts, and pull a long-form post out of a video you already made. Everything ships in clear, confident prose with the jargon stripped out.""",@@ -130,6 +132,7 @@ You are direct about trade-offs. If a page is already ranking you look for the s{"name": "Jules","role": "Social & Content Repurposing",+ "job_title": "Social Media Manager","tagline": "Cuts one piece of work into posts that belong on each platform.","avatar_url": "/avatars/notion/12-5-13-13-3-9-2-11-0-0.fuchsia.svg","bio": """I run social for teams who already make good things and post them badly. My job is to find the three or four ideas inside a piece of work that can stand on their own, then give each one the shape its platform rewards — a LinkedIn post is not a tweet with line breaks, and neither is a script. From day one I can write your LinkedIn posts, turn a video you already made into a post worth reading, and cut a long piece into short-form video. I'll tell you when an idea isn't worth posting.""",@@ -165,6 +168,7 @@ You space posts out and change the angle each time — a result, a mistake, a qu{"name": "Nadia","role": "Market & Competitor Intelligence",+ "job_title": "Market Research Analyst","tagline": "Takes your competitors apart and tells you what to do about it.","avatar_url": "/avatars/notion/15-10-3-12-4-6-22-0-0-0.indigo.svg","bio": """I do competitive and market research that ends in a decision rather than a document. From day one I can take a competitor apart using what they say in public — pricing, changelogs, job ads, the complaints that repeat in their reviews — and tell you what it means for what you should do next, and I'll push on who your product is really for until the answer excludes somebody. Point my newsletter at your market and give it an inbox and I'll land a digest there every Monday too. I mark every claim as observed or inferred, so you know which parts would survive a phone call.""",@@ -206,6 +210,7 @@ You mark every claim as observed or inferred, and you name what you inferred it{"name": "Remy","role": "Email & Lifecycle",+ "job_title": "Email Marketing Manager","tagline": "Maps which emails should exist, then writes them.","avatar_url": "/avatars/notion/7-11-10-7-7-0-43-0-0-0.rose.svg","bio": """I build lifecycle email programmes, and I start by arguing about which emails should exist at all. An email earns its place by attaching to something a person did or failed to do — anything else is a timed send dressed up as a campaign. Ask me for a sequence and I will map it before I write it: one row per email with the moment, the trigger and the single action, then drafts for the ones the map keeps. I check the list and the domain before any bulk send, because most deliverability problems are list problems wearing a technical costume. Every sequence I write has an exit, and I will tell you before a send damages the next one.""",@@ -246,6 +251,7 @@ You treat deliverability as a list problem before a technical one. You will ask{"name": "Max","role": "Sales",+ "job_title": "Sales Development Rep","tagline": "Finds your leads, their decision-makers, and their contact details.","avatar_url": "/experts/max.svg","bio": """I'm a sales development expert who's built outbound pipelines for startups and mid-market teams, and I treat most pipeline problems as targeting problems in disguise — so I start by sharpening your ideal customer profile before I go hunting. From day one I can pull lists of businesses that fit that profile, surface the owner or decision-maker behind a company, and track down a contact's email address. Volume without fit is noise, and I say so plainly.""",@@ -278,6 +284,7 @@ You are rigorous about data quality. You flag when contact information looks sta{"name": "Frankie","role": "Ops",+ "job_title": "Executive Assistant","tagline": "Starts your day briefed: meeting prep, support email, and a morning digest.","avatar_url": "/experts/frankie.svg","bio": """I'm an operations specialist who's run the back office for fast-growing teams, and my job is to keep you ahead of the routine instead of buried in it. From day one I can brief you before your business meetings; after you connect the required inbox sources, I can draft support replies and land a personalized morning digest on your desk at 7:40 in your timezone. I'm conservative about commitments: I never promise a date, refund, or policy exception on your behalf — I draft it and flag it for you to approve.""",@@ -461,6 +468,7 @@ async def _delete_live_schedule(async def _upsert_template(entry: RosterEntry) -> prisma.models.Expert:fields = {"role": entry["role"],+ "jobTitle": entry["job_title"],"tagline": entry["tagline"],"avatarUrl": entry["avatar_url"],"identity": entry["identity"],@@ -494,7 +502,7 @@ async def _backfill_hired_copies(template: prisma.models.Expert) -> int:A hire copies the template row, so roster updates would otherwise onlyever reach new hires and everyone who hired earlier would keep a blank- avatar/tagline/bio/categories forever. ``name`` is deliberately excluded —+ avatar/job title/tagline/bio/categories forever. ``name`` is deliberately excluded —users may have renamed their hire — as are ``role``/``identity``, whichdrive live persona behaviour, and ``skills``, which the owner edits afterhire.@@ -513,6 +521,7 @@ async def _backfill_hired_copies(template: prisma.models.Expert) -> int:}data: prisma.types.ExpertUpdateManyMutationInput = {"avatarUrl": template.avatarUrl,+ "jobTitle": template.jobTitle,"tagline": template.tagline,"bio": template.bio,"categories": template.categories,diff --git a/autogpt_platform/backend/migrations/20260917160000_add_expert_job_title/migration.sql b/autogpt_platform/backend/migrations/20260917160000_add_expert_job_title/migration.sqlnew file mode 100644index 0000000000..b73fcc9d34--- /dev/null+++ b/autogpt_platform/backend/migrations/20260917160000_add_expert_job_title/migration.sql@@ -0,0 +1,2 @@+-- AlterTable+ALTER TABLE "Expert" ADD COLUMN "jobTitle" TEXT;diff --git a/autogpt_platform/backend/schema.prisma b/autogpt_platform/backend/schema.prismaindex 45057a5206..3c89f90e30 100644--- a/autogpt_platform/backend/schema.prisma+++ b/autogpt_platform/backend/schema.prisma@@ -1105,6 +1105,9 @@ model Expert {// Accent color token picked while raising (e.g. "sky-300"); "" = unset.color String @default("")role String+ // What the expert would be called on a team ("Social Media Manager"); the+ // `role` above names the area it covers. null on raised experts.+ jobTitle String?tagline String?identity Stringbio String?diff --git a/autogpt_platform/backend/snapshots/expert_pod_assign b/autogpt_platform/backend/snapshots/expert_pod_assignindex 4d675b71ab..9bccc3ea6d 100644--- a/autogpt_platform/backend/snapshots/expert_pod_assign+++ b/autogpt_platform/backend/snapshots/expert_pod_assign@@ -11,6 +11,7 @@"identity": "You are Maria, a pragmatic marketing specialist.","is_archived": false,"is_template": false,+ "job_title": null,"last_run_at": null,"last_run_status": null,"name": "Maria",diff --git a/autogpt_platform/backend/snapshots/expert_raise_attachment_installation_failure b/autogpt_platform/backend/snapshots/expert_raise_attachment_installation_failureindex 3e2455adc1..5a3c98922c 100644--- a/autogpt_platform/backend/snapshots/expert_raise_attachment_installation_failure+++ b/autogpt_platform/backend/snapshots/expert_raise_attachment_installation_failure@@ -12,6 +12,7 @@"identity": "I'm Nova, raised by you. I learn how you work and grow with you.","is_archived": false,"is_template": false,+ "job_title": null,"last_run_at": null,"last_run_status": null,"name": "Nova",diff --git a/autogpt_platform/backend/snapshots/expert_raise_attachments b/autogpt_platform/backend/snapshots/expert_raise_attachmentsindex e7eddaf3c6..686667231c 100644--- a/autogpt_platform/backend/snapshots/expert_raise_attachments+++ b/autogpt_platform/backend/snapshots/expert_raise_attachments@@ -12,6 +12,7 @@"identity": "I'm Nova, raised by you. I learn how you work and grow with you.","is_archived": false,"is_template": false,+ "job_title": null,"last_run_at": null,"last_run_status": null,"name": "Nova",diff --git a/autogpt_platform/backend/snapshots/expert_raise_default b/autogpt_platform/backend/snapshots/expert_raise_defaultindex 966dc04e69..dea66d382d 100644--- a/autogpt_platform/backend/snapshots/expert_raise_default+++ b/autogpt_platform/backend/snapshots/expert_raise_default@@ -12,6 +12,7 @@"identity": "I'm Otto, raised by you. I learn how you work and grow with you.","is_archived": false,"is_template": false,+ "job_title": null,"last_run_at": null,"last_run_status": null,"name": "Otto",diff --git a/autogpt_platform/backend/snapshots/expert_soul_update b/autogpt_platform/backend/snapshots/expert_soul_updateindex b4d63c17f0..fc22f18700 100644--- a/autogpt_platform/backend/snapshots/expert_soul_update+++ b/autogpt_platform/backend/snapshots/expert_soul_update@@ -11,6 +11,7 @@"identity": "You are Mara, a thoughtful strategist.","is_archived": false,"is_template": false,+ "job_title": null,"last_run_at": null,"last_run_status": null,"name": "Mara",diff --git a/autogpt_platform/backend/snapshots/expert_templates_list b/autogpt_platform/backend/snapshots/expert_templates_listindex 3dffc7c48e..f098e91666 100644--- a/autogpt_platform/backend/snapshots/expert_templates_list+++ b/autogpt_platform/backend/snapshots/expert_templates_list@@ -19,6 +19,7 @@"identity": "You are Maria, a pragmatic marketing specialist.","is_archived": false,"is_template": true,+ "job_title": null,"last_run_at": null,"last_run_status": null,"name": "Maria",diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-threads.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-threads.test.tsxindex 5ced4909a3..dbc362a8e3 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-threads.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-threads.test.tsx@@ -554,10 +554,13 @@ describe("ChatSidebar — expert groups", () => {const mariaHeader = await screen.findByTestId("expert-group-header-expert-maria",);- expect(mariaHeader.textContent).toBe("Maria");+ expect(within(mariaHeader).getByText("Maria")).toBeDefined();+ expect(within(mariaHeader).getByText(mariaExpert.role)).toBeDefined();expect(- screen.getByTestId("expert-group-header-autopilot").textContent,- ).toBe("Otto");+ within(screen.getByTestId("expert-group-header-autopilot")).getByText(+ "Otto",+ ),+ ).toBeDefined();expect(screen.getByText("Campaign ideas")).toBeDefined();});@@ -630,7 +633,7 @@ describe("ChatSidebar — expert groups", () => {expect(within(mariaGroup).queryByText("Pinned campaign")).toBeNull();});- it("shows the first 5 chats of an expert and reveals the rest via Load more", async () => {+ it("shows the first four chats of an expert and reveals the rest via Load more", async () => {server.use(getGetV2ListSessionsMockHandler200({sessions: [@@ -655,8 +658,8 @@ describe("ChatSidebar — expert groups", () => {);await screen.findByText("Maria chat 1");- expect(screen.getByText("Maria chat 5")).toBeDefined();- expect(screen.queryByText("Maria chat 6")).toBeNull();+ expect(screen.getByText("Maria chat 4")).toBeDefined();+ expect(screen.queryByText("Maria chat 5")).toBeNull();fireEvent.click(screen.getByTestId("expert-group-load-more-expert-maria"));expect(screen.getByText("Maria chat 6")).toBeDefined();@@ -750,6 +753,7 @@ describe("ChatMessagesContainer — expert identity", () => {name: "Maria",avatarUrl: mariaExpert.avatar_url,role: mariaExpert.role,+ jobTitle: "Marketing Manager",isArchived: false,readOnlyReason: null,};@@ -771,6 +775,8 @@ describe("ChatMessagesContainer — expert identity", () => {const header = screen.getByTestId("expert-thread-header");expect(within(header).getByText("Maria")).toBeDefined();+ expect(within(header).getByText(mariaExpert.role)).toBeDefined();+ expect(within(header).queryByText("Marketing Manager")).toBeNull();expect(within(header).getByRole("img", { name: "Maria" })).toBeDefined();expect(screen.queryByTestId("expert-assistant-identity")).toBeNull();});@@ -850,7 +856,7 @@ describe("ChatMessagesContainer — expert identity", () => {expect(screen.queryByTestId("expert-assistant-identity")).toBeNull();});- it("keeps the passive chip keyboard-reachable, since the role only exists in its tooltip", () => {+ it("keeps the passive chip keyboard-reachable with its area", () => {server.use(getGetExpertMockHandler(mariaExpert),getGetV1ListExecutionSchedulesForAUserMockHandler([]),@@ -866,7 +872,7 @@ describe("ChatMessagesContainer — expert identity", () => {);const header = screen.getByTestId("expert-thread-header");- const chip = within(header).getByLabelText("Maria — Marketing Strategist");+ const chip = within(header).getByLabelText(`Maria — ${mariaExpert.role}`);// A tooltip opens on focus as well as hover; an unfocusable trigger// hides the role from keyboard users entirely.diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsxindex c4cd7a0d5c..8d7471834b 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsx@@ -1,11 +1,5 @@-import {- Avatar,- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";+import { ExpertAvatar as SharedExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";import { AutopilotAvatar } from "@/components/molecules/AutopilotAvatar/AutopilotAvatar";-import { expertNotionConfig } from "@/components/molecules/NotionAvatar/helpers";-import { NotionAvatarImage } from "@/components/molecules/NotionAvatar/NotionAvatarImage";import { cn } from "@/lib/utils";interface Props {@@ -42,21 +36,12 @@ export function ExpertAvatar({return <AutopilotAvatar size={isSmall ? 24 : 36} />;}- const config = expertNotionConfig({ name, avatarUrl, color });- if (config) {- return (- <NotionAvatarImage- config={config}- size={isSmall ? 24 : 36}- title={name}- />- );- }-return (- <Avatar className={cn("border border-stone-500", sizeClass)}>- <AvatarImage src={avatarUrl ?? undefined} alt={name} />- <AvatarFallback className={sizeClass}>{name}</AvatarFallback>- </Avatar>+ <SharedExpertAvatar+ name={name}+ avatarUrl={avatarUrl}+ color={color}+ size={isSmall ? 24 : 36}+ />);}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsxindex f8258c9166..3a6069a179 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx@@ -2,6 +2,8 @@import { Icon } from "@/components/atoms/Icon/Icon";import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";+import { getExpertRoleLabel } from "@/services/experts/expert-role-label";import {Tooltip,TooltipContent,@@ -58,7 +60,9 @@ export function ThreadHeader({// Otto's identity, which would be wrong for an expert session.const isResolving = isResolvingExpertIdentity && !expertIdentity;const name = expertIdentity?.name ?? "Otto";- const role = expertIdentity?.role ?? DEFAULT_EXPERT_ROLE;+ const role = expertIdentity+ ? getExpertRoleLabel(expertIdentity.role ?? "")+ : DEFAULT_EXPERT_ROLE;// Assistive tech gets a loading identity too, not Otto's.const identityLabel = isResolving ? "Loading expert" : `${name}, ${role}`;const isArtifactsEnabled = useGetFlag(Flag.ARTIFACTS);@@ -106,8 +110,8 @@ export function ThreadHeader({{isResolving ? (<Skeleton className="h-3.5 w-16 rounded" />) : (- <span className="max-w-[10rem] truncate text-sm font-medium text-zinc-800">- {name}+ <span className="min-w-0 max-w-[10rem]">+ <ExpertIdentityDetails name={name} role={role} size="compact" /></span>)}{counters.map(({ icon, count, noun }) => (@@ -147,21 +151,17 @@ export function ThreadHeader({: `${identityLabel}. Open session activity`}onClick={() => toggleContextPanelTab("files")}- className="flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-3 transition-colors hover:bg-zinc-100/80"+ className="flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-5 transition-colors hover:bg-zinc-100/80">{chipContent}</button>) : (- // The role lives only in the tooltip, and a tooltip opens- // on focus as well as hover — so even this passive chip has- // to be reachable by keyboard, or read-only viewers never- // get the role at all.<divtabIndex={0}aria-label={isResolving ? identityLabel : `${name} — ${role}`}- className="flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-3"+ className="flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-5">{chipContent}</div>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsxindex 4bad1feec6..8de8ac6364 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx@@ -456,15 +456,16 @@ export function ChatSidebar() {)}{sessionSections.map((group) => {const groupKey = group.expertId ?? "autopilot";+ const expert = group.expertId+ ? expertsById.get(group.expertId)+ : null;return (<ExpertSessionGroupkey={groupKey}groupKey={groupKey}+ role={group.expertId ? expert?.role : "Head of AI"}label={- group.expertId- ? (expertsById.get(group.expertId)?.name ??- "Expert")- : "Otto"+ group.expertId ? (expert?.name ?? "Expert") : "Otto"}sessions={group.sessions}renderRow={renderSessionRow}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ExpertSessionGroup/ExpertSessionGroup.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ExpertSessionGroup/ExpertSessionGroup.tsxindex 166afeabb2..972d0f0451 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ExpertSessionGroup/ExpertSessionGroup.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/components/ExpertSessionGroup/ExpertSessionGroup.tsx@@ -8,13 +8,13 @@ import {} from "@/components/ui/collapsible";import { ArrowDown01Icon } from "@hugeicons/core-free-icons";import { useState, type ReactNode } from "react";--export const INITIAL_VISIBLE_SESSIONS = 5;-const LOAD_MORE_INCREMENT = 10;+import { EXPERT_CHAT_PAGE_SIZE } from "@/services/experts/expert-chat-pagination";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";interface Props {groupKey: string;label: string;+ role?: string | null;sessions: SessionSummaryResponse[];renderRow: (session: SessionSummaryResponse,@@ -26,10 +26,11 @@ interface Props {export function ExpertSessionGroup({groupKey,label,+ role,sessions,renderRow,}: Props) {- const [visibleCount, setVisibleCount] = useState(INITIAL_VISIBLE_SESSIONS);+ const [visibleCount, setVisibleCount] = useState(EXPERT_CHAT_PAGE_SIZE);const visible = sessions.slice(0, visibleCount);const hiddenCount = sessions.length - visible.length;const headerId = `session-group-${groupKey}`;@@ -44,9 +45,9 @@ export function ExpertSessionGroup({<CollapsibleTriggerid={headerId}data-testid={`expert-group-header-${groupKey}`}- className="flex items-center justify-between px-3 pb-1 pt-2 text-xs font-semibold uppercase tracking-wide text-zinc-500 hover:text-zinc-700"+ className="flex items-center justify-between gap-2 px-3 pb-1 pt-2 text-zinc-500 hover:text-zinc-700">- {label}+ <ExpertIdentityDetails name={label} role={role} size="compact" /><Iconicon={ArrowDown01Icon}className="size-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-180 motion-reduce:transition-none"@@ -60,7 +61,7 @@ export function ExpertSessionGroup({size="small"data-testid={`expert-group-load-more-${groupKey}`}onClick={() =>- setVisibleCount((count) => count + LOAD_MORE_INCREMENT)+ setVisibleCount((count) => count + EXPERT_CHAT_PAGE_SIZE)}>Load morediff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/helpers.test.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/helpers.test.tsindex 06d04a1187..a285b29841 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/helpers.test.ts+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/helpers.test.ts@@ -32,7 +32,7 @@ describe("getExpertRoleLabel", () => {test.each([["Marketing", "Marketing expert"],["Customer Success", "Customer Success expert"],- ["Social Media", "Social Media expert"],+ ["Social Media", "Social media expert"],["SEO", "SEO expert"],["Legal", "Legal expert"],])("calls the bare-domain custom role %s an expert", (role, expected) => {@@ -40,8 +40,8 @@ describe("getExpertRoleLabel", () => {});test.each([- ["Social & Content Repurposing", "Social Media expert"],- ["Market & Competitor Intelligence", "Market Intelligence expert"],+ ["Social & Content Repurposing", "Social media expert"],+ ["Market & Competitor Intelligence", "Market intelligence expert"],])("shortens the roster role %s to %s", (role, expected) => {expect(getExpertRoleLabel(role)).toBe(expected);});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsxindex 4b03073f32..b8c8dc7dff 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsx@@ -1,6 +1,7 @@"use client";import { Icon } from "@/components/atoms/Icon/Icon";+import { getExpertRoleLabel } from "@/services/experts/expert-role-label";import {ArrowLeft01Icon,ArrowRight01Icon,@@ -114,7 +115,7 @@ function OnboardingForm({ onboarding, isLive }: FormProps) {</span>{expert?.role && (<span className="truncate text-xs text-zinc-500">- {expert.role}+ {getExpertRoleLabel(expert.role)}</span>)}</span>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsxindex 87164e4dd7..d5dd8f5e64 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsx@@ -23,7 +23,7 @@ vi.mock("../../../useExpertMap", () => ({id: EXPERT_ID,name: "Ada",avatarUrl: null,- role: "Head of Marketing",+ role: "Social & Content Repurposing",isArchived: false,readOnlyReason: null,},@@ -87,11 +87,12 @@ function actionButton(label: string): HTMLButtonElement {}describe("ExpertOnboardingCard", () => {- it("greets the user under the expert's own identity", () => {+ it("greets the user under the expert's identity with the shared area label", () => {renderCard(onboardingPart());expect(screen.getByText("Ada")).toBeDefined();- expect(screen.getByText("Head of Marketing")).toBeDefined();+ expect(screen.getByText("Social media")).toBeDefined();+ expect(screen.queryByText("Social & Content Repurposing")).toBeNull();expect(screen.getByText("Hi, I'm Ada — good to be working with you."),).toBeDefined();diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/__tests__/experts-section.test.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/__tests__/experts-section.test.tsxindex 3a05995324..326ee93914 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/__tests__/experts-section.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/__tests__/experts-section.test.tsx@@ -260,7 +260,7 @@ describe("Marketplace ExpertsSection", () => {render(<MainMarkeplacePage />);expect(await screen.findByText("Meet the AI Experts")).toBeDefined();- expect(await screen.findByText("Hired")).toBeDefined();+ expect(await screen.findByText("On your team")).toBeDefined();});test("emits the section view event once the shelf has rendered", async () => {@@ -290,6 +290,6 @@ describe("Marketplace ExpertsSection", () => {expect(await screen.findByText("Meet the AI Experts")).toBeDefined();await screen.findByText("Maria");expect(screen.getByText("View")).toBeDefined();- expect(screen.queryByText("Hired")).toBeNull();+ expect(screen.queryByText("On your team")).toBeNull();});});diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsxindex 37107d03d0..4750ecaca3 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsx@@ -1,11 +1,8 @@import { ExpertTemplate } from "@/app/api/__generated__/models/expertTemplate";-import {- Avatar,- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";+import { ExpertTagline } from "@/components/molecules/ExpertIdentityDetails/components/ExpertTagline";import { cn } from "@/lib/utils";-import { getExpertRoleLabel } from "@/services/experts/expert-role-label";import Link from "next/link";import { getExpertAccent } from "../helpers";import {@@ -38,33 +35,15 @@ export function ExpertCard({ expert, isHired }: Props) {)}/><div className="relative flex flex-1 flex-col gap-4 p-6">- <div className="flex items-start justify-between gap-3">- <Avatar className="h-20 w-20 bg-white shadow-sm ring-1 ring-black/5">- {expert.avatar_url ? (- <AvatarImage src={expert.avatar_url} alt={expert.name} />- ) : null}- <AvatarFallback>{expert.name}</AvatarFallback>- </Avatar>- <span- className={cn(- "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1 text-sm font-medium",- accent.pill,- )}- >- <Icon icon={accent.roleIcon} size={14} className="shrink-0" />- {getExpertRoleLabel(expert.role)}- </span>- </div>+ <ExpertAvatar+ name={expert.name}+ avatarUrl={expert.avatar_url}+ size={88}+ /><div>- <div className="text-xl font-semibold tracking-[-0.01em] text-zinc-900">- {expert.name}- </div>- {expert.tagline ? (- <p className="mt-1.5 line-clamp-2 text-base leading-relaxed text-zinc-600">- {expert.tagline}- </p>- ) : null}+ <ExpertIdentityDetails name={expert.name} role={expert.role} />+ <ExpertTagline tagline={expert.tagline} compact /></div>{skills.length > 0 ? (@@ -101,7 +80,7 @@ export function ExpertCard({ expert, isHired }: Props) {{isHired ? (<span className="ml-auto flex items-center gap-1.5 text-base font-medium text-emerald-600"><Icon icon={CheckmarkCircle02Icon} size={18} />- Hired+ On your team</span>) : (<span className="ml-auto flex items-center gap-1.5 text-base font-medium text-zinc-400 transition-colors duration-200 group-hover:text-zinc-900">diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsxindex 49ac04df0c..2e28f2a58d 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsx@@ -128,7 +128,7 @@ export function ExpertPage() {return (<main className={MAIN_CLASS}><BackToMarketplaceLink />- <ExpertPageHeader expert={expert} accent={accent} actions={actions} />+ <ExpertPageHeader expert={expert} actions={actions} /><div className="mt-8 flex flex-col gap-10 border-t border-zinc-200 pt-8"><ExpertDayOnename={firstName}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsxindex 0eea4a33aa..161cfc6e3d 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsx@@ -1,52 +1,34 @@import { Expert } from "@/app/api/__generated__/models/expert";-import {- Avatar,- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";-import { Icon } from "@/components/atoms/Icon/Icon";-import { cn } from "@/lib/utils";-import { getExpertRoleLabel } from "@/services/experts/expert-role-label";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";+import { ExpertTagline } from "@/components/molecules/ExpertIdentityDetails/components/ExpertTagline";import { ReactNode } from "react";-import { type ExpertAccent } from "../../../components/ExpertsSection/helpers";interface Props {expert: Expert;- accent: ExpertAccent;actions: ReactNode;}-export function ExpertPageHeader({ expert, accent, actions }: Props) {+export function ExpertPageHeader({ expert, actions }: Props) {return (<header><div className="flex flex-wrap items-center gap-4 sm:gap-5">- <Avatar className="h-18 w-18 shrink-0 bg-white shadow-sm ring-1 ring-black/5">- {expert.avatar_url ? (- <AvatarImage src={expert.avatar_url} alt={expert.name} />- ) : null}- <AvatarFallback>{expert.name}</AvatarFallback>- </Avatar>+ <ExpertAvatar+ name={expert.name}+ avatarUrl={expert.avatar_url}+ color={expert.color}+ size={96}+ /><div className="min-w-0 flex-1">- <h1 className="text-[28px] font-semibold leading-8 tracking-[-0.02em] text-zinc-900">- {expert.name}- </h1>- <span- className={cn(- "mt-2 inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium",- accent.pill,- )}- >- <Icon icon={accent.roleIcon} size={12} />- {getExpertRoleLabel(expert.role)}- </span>+ <ExpertIdentityDetails+ name={expert.name}+ role={expert.role}+ size="page"+ /></div><div className="w-full sm:w-auto">{actions}</div></div>- {expert.tagline ? (- <p className="mt-5 max-w-[60ch] text-[17px] leading-7 text-zinc-600">- {expert.tagline}- </p>- ) : null}+ <ExpertTagline tagline={expert.tagline} /></header>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsxindex d76edcf218..7385de2226 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsx@@ -145,6 +145,7 @@ const maria: Expert = {bio: "Maria is a senior marketing strategist.",skills: ["Content strategy"],tagline: "Grows your brand while you sleep",+ job_title: "Marketing Manager",identity: "You are Maria, a senior marketing strategist.",voice_preferences: "Warm, concise, and direct.",boundaries: "Never invent customer evidence.",@@ -325,6 +326,8 @@ describe("ExpertDetailPage", () => {expect(await screen.findByRole("heading", { name: "Maria" })).toBeDefined();expect(screen.getByText("Marketing Strategist")).toBeDefined();+ expect(screen.queryByText("Marketing Manager")).toBeNull();+ expect(screen.getAllByText(maria.tagline!)).toHaveLength(1);expect(screen.getByText("Maria is a senior marketing strategist."),).toBeDefined();@@ -351,7 +354,7 @@ describe("ExpertDetailPage", () => {expect(within(workflowRows[1]).getByText("Needs setup")).toBeDefined();});- test("shows the expert's integrations as logos after the role pill", async () => {+ test("shows the expert's integrations beside the name", async () => {server.use(getGetExpertMockHandler(() => ({...maria,@@ -371,9 +374,9 @@ describe("ExpertDetailPage", () => {.getAllByRole("img").map((logo) => logo.getAttribute("alt")),).toEqual(["GitHub", "OpenAI"]);- const pill = within(header).getByText("Marketing Strategist");+ const name = within(header).getByRole("heading", { name: "Maria" });expect(- pill.compareDocumentPosition(integrations) &+ name.compareDocumentPosition(integrations) &Node.DOCUMENT_POSITION_FOLLOWING,).toBeTruthy();});diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsxindex 9bd2bc263a..1a63508158 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsx@@ -1,14 +1,8 @@"use client";import { Expert } from "@/app/api/__generated__/models/expert";-import {- Avatar,- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";import { Icon } from "@/components/atoms/Icon/Icon";-import { expertNotionConfig } from "@/components/molecules/NotionAvatar/helpers";-import { NotionAvatarImage } from "@/components/molecules/NotionAvatar/NotionAvatarImage";import { Camera01Icon, Loading03Icon } from "@hugeicons/core-free-icons";import { ChangeEvent, useRef } from "react";import { useExpertAvatarButton } from "./useExpertAvatarButton";@@ -20,11 +14,6 @@ interface Props {export function ExpertAvatarButton({ expert }: Props) {const fileRef = useRef<HTMLInputElement>(null);const { uploadAvatar, isUploading } = useExpertAvatarButton(expert.id);- const avatarConfig = expertNotionConfig({- name: expert.name,- avatarUrl: expert.avatar_url,- color: expert.color,- });function openFilePicker() {if (isUploading) return;@@ -46,25 +35,13 @@ export function ExpertAvatarButton({ expert }: Props) {aria-label={`Change ${expert.name}'s photo`}className="group relative size-24 shrink-0 cursor-pointer rounded-full outline-none transition-transform duration-150 ease-out focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:scale-[0.97] disabled:cursor-wait">- {avatarConfig ? (- <span className="flex size-24 items-center justify-center overflow-hidden rounded-full border border-stone-500 bg-background ring-4 ring-background">- <NotionAvatarImage- config={avatarConfig}- size={96}- title={expert.name}- />- </span>- ) : (- <Avatar className="size-24 border border-stone-500 bg-background ring-4 ring-background">- <AvatarImage- src={expert.avatar_url ?? undefined}- alt={expert.name}- width={192}- height={192}- />- <AvatarFallback>{expert.name}</AvatarFallback>- </Avatar>- )}+ <ExpertAvatar+ name={expert.name}+ avatarUrl={expert.avatar_url}+ color={expert.color}+ size={96}+ className="ring-4 ring-background"+ /><spanaria-hiddendiff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsxindex 00db6592b7..361d3f51fd 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsx@@ -2,12 +2,8 @@import { Expert } from "@/app/api/__generated__/models/expert";import { Button } from "@/components/atoms/Button/Button";-import { Icon } from "@/components/atoms/Icon/Icon";-import { Text } from "@/components/atoms/Text/Text";-import { cn } from "@/lib/utils";-import { getExpertRoleLabel } from "@/services/experts/expert-role-label";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";import { BubbleChatIcon, PencilEdit02Icon } from "@hugeicons/core-free-icons";-import { getRaisedExpertAccent } from "@/app/(platform)/marketplace/components/ExpertsSection/helpers";import { getExpertCover } from "../../helpers";import { ExpertCover } from "../../components/ExpertTeamCard/components/ExpertCover";import { IntegrationIcons } from "../../components/ExpertTeamCard/components/IntegrationIcons";@@ -20,7 +16,6 @@ interface Props {}export function ExpertDetailHeader({ expert, onEditSoul, onChat }: Props) {- const accent = getRaisedExpertAccent(expert.role, expert.color);const cover = getExpertCover(expert);return (@@ -32,27 +27,17 @@ export function ExpertDetailHeader({ expert, onEditSoul, onChat }: Props) {<ExpertAvatarButton expert={expert} /></span><div className="min-w-0 flex-1">- <div className="flex flex-wrap items-center gap-3">- <h1 className="text-2xl font-semibold tracking-[-0.02em] text-zinc-900">- {expert.name}- </h1>- {/* Same pill as the marketplace expert card. */}- <Text- variant="small-medium"- as="span"- className={cn(- "inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5",- accent.pill,- )}- >- <Icon icon={accent.roleIcon} size={12} />- {getExpertRoleLabel(expert.role)}- </Text>- <IntegrationIcons- expertName={expert.name}- providers={expert.credential_providers ?? []}- />- </div>+ <ExpertIdentityDetails+ name={expert.name}+ role={expert.role}+ size="page"+ nameAccessory={+ <IntegrationIcons+ expertName={expert.name}+ providers={expert.credential_providers ?? []}+ />+ }+ /></div><div className="flex shrink-0 items-center gap-2"><Buttondiff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsxindex 42034f05f5..83fd9c8095 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsx@@ -154,7 +154,7 @@ export default function ExpertDetailPage() {than floating between the label and the bar. */}<div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between md:gap-8">{expert.tagline ? (- <Text variant="large" className="min-w-0 flex-1 text-zinc-800">+ <Text variant="body" tone="secondary" className="min-w-0 flex-1">{expert.tagline}</Text>) : null}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsxindex 1d3776423f..54791e24b6 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsx@@ -1,13 +1,9 @@import { Expert } from "@/app/api/__generated__/models/expert";-import { getRaisedExpertAccent } from "@/app/(platform)/marketplace/components/ExpertsSection/helpers";import { GraphExecutionJobInfo } from "@/app/api/__generated__/models/graphExecutionJobInfo";-import {- Avatar,- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";+import { ExpertTagline } from "@/components/molecules/ExpertIdentityDetails/components/ExpertTagline";import { Button } from "@/components/atoms/Button/Button";-import { Icon } from "@/components/atoms/Icon/Icon";import { Text } from "@/components/atoms/Text/Text";import {BubbleChatIcon,@@ -18,19 +14,14 @@ import {SparklesIcon,} from "@hugeicons/core-free-icons";import { creditsToUsdLabel } from "@/lib/credits";-import { cn } from "@/lib/utils";-import { getExpertRoleLabel } from "@/services/experts/expert-role-label";import Link from "next/link";import { MouseEvent } from "react";import { ExpertCover } from "./components/ExpertCover";import { IntegrationIcons } from "./components/IntegrationIcons";-import { NotionAvatarImage } from "@/components/molecules/NotionAvatar/NotionAvatarImage";-import { expertNotionConfig } from "@/components/molecules/NotionAvatar/helpers";import { SpendMeter } from "./components/SpendMeter";import {- getExpertBlurb,getExpertCover,getExpertRosterStatus,getWeeklySpend,@@ -55,16 +46,9 @@ export function ExpertTeamCard({onEditSoul,onChat,}: Props) {- const blurb = getExpertBlurb(expert);- const accent = getRaisedExpertAccent(expert.role, expert.color);const rosterStatus = getExpertRosterStatus(expert);const weeklySpend = getWeeklySpend(expert);const cover = getExpertCover(expert);- const avatarConfig = expertNotionConfig({- name: expert.name,- avatarUrl: expert.avatar_url,- color: expert.color,- });const { handleResume, isResuming, isFireOpen, openFire, closeFire } =useExpertTeamCard(expert.id);const isPaused = Boolean(expert.schedules_paused_at);@@ -109,28 +93,13 @@ export function ExpertTeamCard({<div className="flex w-full items-start gap-3 px-2"><span className="relative z-10 -mt-12 ml-1 block shrink-0">- {avatarConfig ? (- <span className="flex size-[5.5rem] items-center justify-center overflow-hidden rounded-full border border-stone-500 bg-white ring-4 ring-white">- <NotionAvatarImage- config={avatarConfig}- size={88}- title={expert.name}- />- </span>- ) : (- <Avatar className="size-[5.5rem] rounded-full border border-stone-500 ring-4 ring-white">- <AvatarImage- src={expert.avatar_url ?? undefined}- alt={expert.name}- width={88}- height={88}- className="bg-white"- />- <AvatarFallback className="grain-overlay">- {expert.name}- </AvatarFallback>- </Avatar>- )}+ <ExpertAvatar+ name={expert.name}+ avatarUrl={expert.avatar_url}+ color={expert.color}+ size={88}+ className="ring-4 ring-background"+ /></span><div className="mt-2 flex min-w-0 flex-1 flex-col gap-1">@@ -158,41 +127,17 @@ export function ExpertTeamCard({</div><div className="mt-2 flex w-full flex-col items-start gap-1 px-2 pl-5 text-left">- <div className="flex w-full items-center gap-2">- {/* `truncate` clips at the padding box, so descenders in a name like- "Fiona Gray" need a little room below the line box; the negative- margin hands that room back so the logos centre on the text. */}- <Text- variant="lead-medium"- tone="primary"- className="-mb-1 min-w-0 truncate pb-1"- >- {expert.name}- </Text>- <IntegrationIcons- expertName={expert.name}- providers={expert.credential_providers ?? []}- />- </div>- {/* Same pill as the expert page header and the marketplace card. */}- <Text- variant="small-medium"- as="span"- className={cn(- "inline-flex max-w-full items-center gap-1.5 self-start rounded-full px-2.5 py-0.5",- accent.pill,- )}- >- <Icon icon={accent.roleIcon} size={12} className="shrink-0" />- <span className="truncate">{getExpertRoleLabel(expert.role)}</span>- </Text>- <Text- variant="body"- tone="muted"- className="mt-1 line-clamp-2 min-h-[2lh]"- >- {blurb}- </Text>+ <ExpertIdentityDetails+ name={expert.name}+ role={expert.role}+ nameAccessory={+ <IntegrationIcons+ expertName={expert.name}+ providers={expert.credential_providers ?? []}+ />+ }+ />+ <ExpertTagline tagline={expert.tagline} compact /></div><div className="mt-3 flex w-full flex-wrap items-center gap-x-3 gap-y-1 px-2 pl-5">diff --git a/autogpt_platform/frontend/src/app/(platform)/team/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/team/helpers.tsindex 8e20a67f49..3e081e43f5 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/helpers.ts+++ b/autogpt_platform/frontend/src/app/(platform)/team/helpers.ts@@ -178,17 +178,6 @@ export function getLastRunLabel(expert: Expert) {return `Last run ${when}`;}-/** The line under an expert's name on their card: their tagline, falling back- * to the opening of their identity when they have none. */-export function getExpertBlurb(expert: Expert) {- if (expert.tagline?.trim()) return expert.tagline;- const lines = expert.identity- .split("\n")- .map((line) => line.trim())- .filter(Boolean);- return lines.slice(0, 2).join(" ") || null;-}-export function getWeeklySpend(expert: Expert) {if (expert.weekly_budget == null || expert.weekly_budget <= 0) return null;return { spent: expert.weekly_spend ?? 0, budget: expert.weekly_budget };diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.jsonindex 10769a78dd..ad1f3b80fb 100644--- a/autogpt_platform/frontend/src/app/api/openapi.json+++ b/autogpt_platform/frontend/src/app/api/openapi.json@@ -21409,6 +21409,10 @@},"color": { "type": "string", "title": "Color", "default": "" },"role": { "type": "string", "title": "Role" },+ "job_title": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Job Title"+ },"tagline": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Tagline"@@ -21965,6 +21969,10 @@},"color": { "type": "string", "title": "Color", "default": "" },"role": { "type": "string", "title": "Role" },+ "job_title": {+ "anyOf": [{ "type": "string" }, { "type": "null" }],+ "title": "Job Title"+ },"tagline": {"anyOf": [{ "type": "string" }, { "type": "null" }],"title": "Tagline"diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsxindex 6917e1451f..efd576874c 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx@@ -113,6 +113,7 @@ export function RecentChats() {<ExpertChatGroupkey={group.expertId ?? "autopilot"}label={group.expertId ? (expert?.name ?? "Expert") : "Otto"}+ role={group.expertId ? expert?.role : "Head of AI"}avatarUrl={expert?.avatarUrl ?? null}color={expert?.color ?? null}newChatHref={getNewChatHref(group.expertId, activeExpertIds)}diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsxindex d1fd55d12b..37213ac94f 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsx@@ -31,6 +31,7 @@ const mariaExpert: Expert = {name: "Maria",avatar_url: "https://example.com/maria.png",role: "Marketing Strategist",+ job_title: "Marketing Manager",bio: null,skills: [],tagline: "Grows your brand while you sleep",@@ -136,26 +137,26 @@ describe("RecentChats — expert groups", () => {expect(screen.queryByText("autopilot chat 1")).toBeNull();});- it("shows only the first 10 chats and reveals more via Load more", async () => {- const sessions = makeSessions(22);+ it("shows four chats and reveals four more at a time", async () => {+ const sessions = makeSessions(10);server.use(getGetV2ListSessionsMockHandler200({ sessions, total: sessions.length }),getListExpertIdentitiesMockHandler([]),);renderRecentChats();- expect(await screen.findByText("autopilot chat 10")).toBeDefined();- expect(screen.queryByText("autopilot chat 11")).toBeNull();+ expect(await screen.findByText("autopilot chat 4")).toBeDefined();+ expect(screen.queryByText("autopilot chat 5")).toBeNull();const loadMore = () =>screen.getByRole("button", { name: "Load more Otto chats" });fireEvent.click(loadMore());- expect(await screen.findByText("autopilot chat 20")).toBeDefined();- expect(screen.queryByText("autopilot chat 21")).toBeNull();+ expect(await screen.findByText("autopilot chat 8")).toBeDefined();+ expect(screen.queryByText("autopilot chat 9")).toBeNull();fireEvent.click(loadMore());- expect(await screen.findByText("autopilot chat 22")).toBeDefined();+ expect(await screen.findByText("autopilot chat 10")).toBeDefined();expect(screen.queryByRole("button", { name: "Load more Otto chats" }),).toBeNull();@@ -169,15 +170,21 @@ describe("RecentChats — expert groups", () => {);renderRecentChats();- expect(await screen.findByText("expert-maria chat 10")).toBeDefined();- expect(screen.queryByText("expert-maria chat 11")).toBeNull();- expect(screen.queryByText("autopilot chat 11")).toBeNull();+ expect(await screen.findByText("expert-maria chat 4")).toBeDefined();+ expect(await screen.findByText(mariaExpert.role)).toBeDefined();+ expect(+ screen.getByText(mariaExpert.role).classList.contains("opacity-70"),+ ).toBe(true);+ expect(screen.queryByText("Marketing Manager")).toBeNull();+ expect(screen.queryByText("expert-maria chat 5")).toBeNull();+ expect(screen.queryByText("autopilot chat 5")).toBeNull();fireEvent.click(screen.getByRole("button", { name: "Load more Maria chats" }),);- expect(await screen.findByText("expert-maria chat 11")).toBeDefined();- expect(screen.queryByText("autopilot chat 11")).toBeNull();+ expect(await screen.findByText("expert-maria chat 8")).toBeDefined();+ expect(screen.queryByText("expert-maria chat 9")).toBeNull();+ expect(screen.queryByText("autopilot chat 5")).toBeNull();});it("falls back to a generic Expert label when the expert is unknown", async () => {@@ -218,6 +225,10 @@ describe("RecentChats — expert groups", () => {const avatar = expertGroup.querySelector('img[data-testid="notion-avatar-image"]',);+ expect(avatar?.getAttribute("width")).toBe("32");+ expect(avatar?.getAttribute("height")).toBe("32");+ expect(avatar?.classList.contains("border")).toBe(true);+ expect(avatar?.classList.contains("border-zinc-400")).toBe(true);expect(avatar?.getAttribute("data-avatar")).toMatch(/\.violet\.svg\?v=\d+$/,);@@ -256,13 +267,13 @@ describe("RecentChats — expert groups", () => {fireEvent.click(await screen.findByRole("button", { name: "Load more Otto chats" }),);- expect(await screen.findByText("autopilot chat 11")).toBeDefined();+ expect(await screen.findByText("autopilot chat 8")).toBeDefined();const callsBefore = listCalls;vi.advanceTimersByTime(SESSION_LIST_REFETCH_INTERVAL_MS);await waitFor(() => expect(listCalls).toBeGreaterThan(callsBefore));- expect(screen.getByText("autopilot chat 11")).toBeDefined();+ expect(screen.getByText("autopilot chat 8")).toBeDefined();expect(screen.queryByText("expert-maria chat 1")).toBeNull();});diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsxindex d2d38f7bd8..f42de2d363 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsx@@ -1,11 +1,7 @@"use client";import type { SessionSummaryResponse } from "@/app/api/__generated__/models/sessionSummaryResponse";-import {- Avatar,- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";import { Icon } from "@/components/atoms/Icon/Icon";import { LoadingSpinner } from "@/components/atoms/LoadingSpinner/LoadingSpinner";import {@@ -15,8 +11,7 @@ import {TooltipTrigger,} from "@/components/atoms/Tooltip/BaseTooltip";import { AutopilotAvatar } from "@/components/molecules/AutopilotAvatar/AutopilotAvatar";-import { NotionAvatarImage } from "@/components/molecules/NotionAvatar/NotionAvatarImage";-import { expertNotionConfig } from "@/components/molecules/NotionAvatar/helpers";+import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";import {Collapsible,CollapsibleContent,@@ -27,8 +22,7 @@ import { cn } from "@/lib/utils";import { ArrowDown01Icon, PlusSignIcon } from "@hugeicons/core-free-icons";import Link, { useLinkStatus } from "next/link";import { ReactNode, useState } from "react";--export const EXPERT_GROUP_PREVIEW_COUNT = 10;+import { EXPERT_CHAT_PAGE_SIZE } from "@/services/experts/expert-chat-pagination";// The chevron, the slot the header reserves next to it, and the new-chat link// that floats over that slot are all one size.@@ -40,6 +34,7 @@ const NEW_CHAT_LINK_OFFSET_CLASS = "right-9";interface Props {label: string;+ role?: string | null;avatarUrl: string | null;newChatHref: string | null;color?: string | null;@@ -50,6 +45,7 @@ interface Props {export function ExpertChatGroup({label,+ role,avatarUrl,newChatHref,color,@@ -58,9 +54,8 @@ export function ExpertChatGroup({renderItem,}: Props) {const [isOpen, setIsOpen] = useState(true);- const [visibleCount, setVisibleCount] = useState(EXPERT_GROUP_PREVIEW_COUNT);+ const [visibleCount, setVisibleCount] = useState(EXPERT_CHAT_PAGE_SIZE);const visibleSessions = sessions.slice(0, visibleCount);- const avatarConfig = expertNotionConfig({ name: label, avatarUrl, color });const hasHiddenSessions = sessions.length > visibleSessions.length;const runningSessions = sessions.filter((session) => session.is_processing);@@ -76,24 +71,25 @@ export function ExpertChatGroup({<div className="group/expert-header relative mb-1 flex items-center rounded-md hover:bg-zinc-100"><CollapsibleTriggeraria-label={`${label} chats`}- className="flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-0.5 text-left text-sm font-medium text-zinc-900"+ className="flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1 text-left text-sm font-medium text-zinc-900">{isAutopilot ? (- <AutopilotAvatar size={24} />- ) : avatarConfig ? (- <NotionAvatarImage config={avatarConfig} size={24} title={label} />+ <AutopilotAvatar size={32} />) : (- <Avatar className="h-6 w-6 border border-stone-500">- <AvatarImage- src={avatarUrl ?? undefined}- alt={label}- width={48}- height={48}- />- <AvatarFallback>{label}</AvatarFallback>- </Avatar>+ <ExpertAvatar+ name={label}+ avatarUrl={avatarUrl}+ color={color}+ size={32}+ className="border border-zinc-400"+ />)}- <span className="truncate">{label}</span>+ <ExpertIdentityDetails+ name={label}+ role={role}+ size="compact"+ areaClassName="opacity-70"+ />{newChatHref && (<spanaria-hidden@@ -126,7 +122,7 @@ export function ExpertChatGroup({type="button"aria-label={`Load more ${label} chats`}onClick={() =>- setVisibleCount((count) => count + EXPERT_GROUP_PREVIEW_COUNT)+ setVisibleCount((count) => count + EXPERT_CHAT_PAGE_SIZE)}className="mt-0.5 w-full rounded-md px-2 py-1 text-left text-xs font-medium text-zinc-500 hover:bg-zinc-100 hover:text-zinc-800">@@ -176,7 +172,7 @@ function NewChatIcon() {function GroupBody({ children }: { children: ReactNode }) {return (- <div className="relative ml-[17px] pl-1.5 before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-gradient-to-b before:from-zinc-200/70 before:to-transparent">+ <div className="relative ml-[24px] pl-1.5 before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-gradient-to-b before:from-zinc-200/70 before:to-transparent">{children}</div>);diff --git a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.stories.tsx b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.stories.tsxnew file mode 100644index 0000000000..7ab6874d21--- /dev/null+++ b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.stories.tsx@@ -0,0 +1,34 @@+import type { Meta, StoryObj } from "@storybook/nextjs";+import { ExpertIdentityDetails } from "./ExpertIdentityDetails";++const meta = {+ title: "Molecules/ExpertIdentityDetails",+ component: ExpertIdentityDetails,+ args: {+ name: "Jules",+ role: "Social & Content Repurposing",+ },+} satisfies Meta<typeof ExpertIdentityDetails>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Card: Story = {};+export const Page: Story = { args: { size: "page" } };+export const Compact: Story = { args: { size: "compact" } };+export const WithoutArea: Story = {+ args: { role: null, size: "compact" },+};+export const LongArea: Story = {+ args: {+ role: "Social media and content marketing",+ size: "compact",+ },+ decorators: [+ (Story) => (+ <div className="w-48">+ <Story />+ </div>+ ),+ ],+};diff --git a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.test.tsx b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.test.tsxnew file mode 100644index 0000000000..4a27228c7c--- /dev/null+++ b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.test.tsx@@ -0,0 +1,40 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, test } from "vitest";+import { ExpertIdentityDetails } from "./ExpertIdentityDetails";++describe("ExpertIdentityDetails", () => {+ test.each(["card", "page"] as const)(+ "uses one neutral area chip in %s size",+ (size) => {+ render(+ <ExpertIdentityDetails+ name="Jules"+ role="Social & Content Repurposing"+ size={size}+ />,+ );++ const area = screen.getByText("Social media");+ const chip = area.parentElement;+ expect(screen.getAllByText("Social media")).toHaveLength(1);+ expect(chip?.classList.contains("bg-zinc-50")).toBe(true);+ expect(chip?.classList.contains("rounded-full")).toBe(true);+ expect(chip?.querySelector("svg")).not.toBeNull();+ expect(screen.queryByText("Social Media Manager")).toBeNull();+ },+ );++ test("keeps the compact area as small plain text", () => {+ const { container } = render(+ <ExpertIdentityDetails+ name="Jules"+ role="Social & Content Repurposing"+ size="compact"+ />,+ );+ expect(+ screen.getByText("Social media").classList.contains("leading-4"),+ ).toBe(true);+ expect(container.querySelector("svg")).toBeNull();+ });+});diff --git a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsx b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsxnew file mode 100644index 0000000000..3f29d6d079--- /dev/null+++ b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsx@@ -0,0 +1,65 @@+import { Text } from "@/components/atoms/Text/Text";+import { getExpertRoleLabel } from "@/services/experts/expert-role-label";+import { cn } from "@/lib/utils";+import type { ReactNode } from "react";+import { ExpertAreaChip } from "./components/ExpertAreaChip";++interface Props {+ name: string;+ role?: string | null;+ size?: "compact" | "card" | "page";+ nameAccessory?: ReactNode;+ areaClassName?: string;+}++export function ExpertIdentityDetails({+ name,+ role,+ size = "card",+ nameAccessory,+ areaClassName,+}: Props) {+ const compact = size === "compact";+ const Container = compact ? "span" : "div";+ const area = role ? getExpertRoleLabel(role) : null;++ return (+ <Container+ className={cn(+ "flex min-w-0 flex-col text-left",+ compact ? "gap-0" : "gap-1",+ )}+ >+ <Container className="flex min-w-0 items-center gap-2">+ <Text+ as={size === "page" ? "h1" : "span"}+ variant={compact ? "body-medium" : "lead-semibold"}+ tone="primary"+ unmask={false}+ className={cn(+ "min-w-0 truncate",+ compact && "leading-[1.125rem]",+ size === "page" && "text-2xl leading-8",+ )}+ >+ {name}+ </Text>+ {nameAccessory}+ </Container>+ {!compact && role ? (+ <ExpertAreaChip role={role} />+ ) : area ? (+ <Text+ as="span"+ variant="small"+ tone="secondary"+ unmask={false}+ className={cn("truncate", compact && "leading-4", areaClassName)}+ title={area}+ >+ {area}+ </Text>+ ) : null}+ </Container>+ );+}diff --git a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/components/ExpertAreaChip.tsx b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/components/ExpertAreaChip.tsxnew file mode 100644index 0000000000..502cca6e03--- /dev/null+++ b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/components/ExpertAreaChip.tsx@@ -0,0 +1,25 @@+import { getExpertAccent } from "@/app/(platform)/marketplace/components/ExpertsSection/helpers";+import { Badge } from "@/components/atoms/Badge/Badge";+import { Icon } from "@/components/atoms/Icon/Icon";+import { getExpertRoleLabel } from "@/services/experts/expert-role-label";++interface Props {+ role: string;+}++export function ExpertAreaChip({ role }: Props) {+ return (+ <Badge+ variant="info"+ className="max-w-full self-start rounded-full px-2.5 leading-[1.125rem]"+ >+ <Icon+ icon={getExpertAccent(role).roleIcon}+ size={12}+ className="shrink-0"+ aria-hidden+ />+ <span className="truncate">{getExpertRoleLabel(role)}</span>+ </Badge>+ );+}diff --git a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/components/ExpertTagline.tsx b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/components/ExpertTagline.tsxnew file mode 100644index 0000000000..0b9cac4c40--- /dev/null+++ b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/components/ExpertTagline.tsx@@ -0,0 +1,22 @@+import { Text } from "@/components/atoms/Text/Text";+import { cn } from "@/lib/utils";++interface Props {+ tagline?: string | null;+ compact?: boolean;+}++export function ExpertTagline({ tagline, compact }: Props) {+ if (!tagline?.trim()) return null;++ return (+ <Text+ variant="body"+ tone="secondary"+ unmask={false}+ className={cn("mt-2", compact && "line-clamp-2 min-h-[2lh]")}+ >+ {tagline}+ </Text>+ );+}diff --git a/autogpt_platform/frontend/src/services/experts/expert-chat-pagination.ts b/autogpt_platform/frontend/src/services/experts/expert-chat-pagination.tsnew file mode 100644index 0000000000..8358a41e4c--- /dev/null+++ b/autogpt_platform/frontend/src/services/experts/expert-chat-pagination.ts@@ -0,0 +1 @@+export const EXPERT_CHAT_PAGE_SIZE = 4;diff --git a/autogpt_platform/frontend/src/services/experts/expert-role-label.test.ts b/autogpt_platform/frontend/src/services/experts/expert-role-label.test.tsindex e87cb7410c..3ca64b1285 100644--- a/autogpt_platform/frontend/src/services/experts/expert-role-label.test.ts+++ b/autogpt_platform/frontend/src/services/experts/expert-role-label.test.ts@@ -4,10 +4,10 @@ import { getExpertRoleLabel } from "./expert-role-label";describe("getExpertRoleLabel", () => {test("shortens long roster roles", () => {expect(getExpertRoleLabel("Social & Content Repurposing")).toBe(- "Social Media",+ "Social media",);expect(getExpertRoleLabel("Market & Competitor Intelligence")).toBe(- "Market Intelligence",+ "Market intelligence",);});diff --git a/autogpt_platform/frontend/src/services/experts/expert-role-label.ts b/autogpt_platform/frontend/src/services/experts/expert-role-label.tsindex 9c9c407c5b..d80a7a6c08 100644--- a/autogpt_platform/frontend/src/services/experts/expert-role-label.ts+++ b/autogpt_platform/frontend/src/services/experts/expert-role-label.ts@@ -1,6 +1,7 @@const ROLE_LABELS: Record<string, string> = {- "Social & Content Repurposing": "Social Media",- "Market & Competitor Intelligence": "Market Intelligence",+ "Social & Content Repurposing": "Social media",+ "Social Media": "Social media",+ "Market & Competitor Intelligence": "Market intelligence",};export function getExpertRoleLabel(role: string): string {