ui chat bot design changes

This commit is contained in:
2026-09-10 19:28:34 +05:30
parent fd366f7e4a
commit a917c5cefb
5 changed files with 842 additions and 182 deletions

View File

@@ -33,6 +33,7 @@ import { ASSISTANT_CONTEXTS } from './contexts';
const PLACEMENT = { const PLACEMENT = {
employer: { employer: {
'/admin': 'admin.controlCenter', '/admin': 'admin.controlCenter',
'/admin/home': 'admin.controlCenter',
'/admin/positions': 'admin.positions', '/admin/positions': 'admin.positions',
/* The authoring form. Owliver belongs here for the same reason it belongs /* The authoring form. Owliver belongs here for the same reason it belongs
on Positions: the questions asked while specifying a role — what do these on Positions: the questions asked while specifying a role — what do these

View File

@@ -424,8 +424,8 @@ async function describeFailure(response) {
* possibilities and the hardest to diagnose. * possibilities and the hardest to diagnose.
*/ */
export function createAssistantProvider() { export function createAssistantProvider() {
const base = import.meta.env?.VITE_AGENT_API; const base = import.meta.env?.VITE_AGENT_API || '/api/v1';
return base ? createAgentProvider({ baseUrl: base }) : createUnconfiguredProvider(); return createAgentProvider({ baseUrl: base });
} }
/** /**

View File

@@ -224,7 +224,17 @@ export function constrainedAgentAnswer(agent, context, suggestion) {
/* ── Workforce ──────────────────────────────────────────────────────────── */ /* ── Workforce ──────────────────────────────────────────────────────────── */
/** The pages that carry enough context to answer a workforce question. */ /** The pages that carry enough context to answer a workforce question. */
const WORKFORCE_CONTEXTS = new Set(['admin.positions']); const WORKFORCE_CONTEXTS = new Set([
'admin.positions',
'admin.controlCenter',
'admin.candidates',
'admin.candidatesList',
'admin.talentPool',
'admin.analytics',
'employer.overview',
'employer.candidates',
'employer.analytics',
]);
/** /**
* A workforce question, resolved against the engine. * A workforce question, resolved against the engine.
@@ -996,8 +1006,14 @@ export function preferAgent(intent, { modelBacked = false } = {}) {
return intent; return intent;
} }
/* If a rich doc was already computed from ground-truth database rows (e.g. matching candidates,
talent pool insights, position review, etc.), return the intent directly so the rich document is rendered. */
if (intent.doc?.blocks?.length) {
return intent;
}
switch (intent.kind) { switch (intent.kind) {
/* Pure text. The agent reads the same rows and can be asked a follow-up. */ /* Pure text without doc. The agent reads the same rows and can be asked a follow-up. */
case 'answer-doc': case 'answer-doc':
case 'skill': case 'skill':
case 'workforce': case 'workforce':

File diff suppressed because it is too large Load Diff

View File

@@ -407,9 +407,8 @@ function PositionsTable({ rows, onOpen }) {
className="cursor-pointer border-b border-border last:border-0 transition-colors hover:bg-surface-subtle" className="cursor-pointer border-b border-border last:border-0 transition-colors hover:bg-surface-subtle"
> >
<td className="px-3 py-2.5"> <td className="px-3 py-2.5">
{p.company && ( {/* Company/client intentionally NOT shown — this surface is
<p className="text-[10px] font-semibold uppercase tracking-wide text-krow-blue">{p.company}</p> employee-facing; the job title is the opportunity's identity. */}
)}
<p className="font-medium text-ink-1">{p.title}</p> <p className="font-medium text-ink-1">{p.title}</p>
<p className="text-caption text-ink-4"> <p className="text-caption text-ink-4">
{p.role_category} {p.role_category}
@@ -461,9 +460,7 @@ function PositionsTable({ rows, onOpen }) {
> >
<div className="flex items-start justify-between gap-3"> <div className="flex items-start justify-between gap-3">
<div className="min-w-0"> <div className="min-w-0">
{p.company && ( {/* Company/client intentionally NOT shown — employee-facing. */}
<p className="truncate text-[10px] font-semibold uppercase tracking-wide text-krow-blue">{p.company}</p>
)}
<p className="truncate font-medium text-ink-1">{p.title}</p> <p className="truncate font-medium text-ink-1">{p.title}</p>
<p className="truncate text-caption text-ink-4"> <p className="truncate text-caption text-ink-4">
{p.role_category} {p.role_category}
@@ -544,16 +541,9 @@ function PositionCard({ position, onOpen, isRecent = false }) {
<div className="flex items-start gap-3"> <div className="flex items-start gap-3">
<RoleGlyph category={p.role_category} title={p.title} aiGenerated={p.ai_generated} /> <RoleGlyph category={p.role_category} title={p.title} aiGenerated={p.ai_generated} />
{/* Client above title: on a staffing console the company a role is being {/* Company/client intentionally NOT shown on this employee-facing card —
filled for is part of its identity, and it is read from the position the job title is the opportunity's identity. Do not render p.company. */}
record — a position with no client stated simply leads with its
title, as it always did. */}
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
{p.company && (
<p className="truncate text-[11px] font-semibold uppercase tracking-wide text-krow-blue">
{p.company}
</p>
)}
<h3 className="truncate font-heading text-body font-semibold leading-snug text-ink-1"> <h3 className="truncate font-heading text-body font-semibold leading-snug text-ink-1">
{p.title} {p.title}
</h3> </h3>