Skip to content

Commit ce3da49

Browse files
committed
fix(webapp): blank-state polish (TRI-12870)
Ask AI -> Ask Trigger; send/stop centered in the docked composer; Watch button wears the chat's eye glyph; a delayed history reload picks up the generated chat name after the first answer; dashboard agent temporarily open to everyone for V1 rollout testing.
1 parent 124b911 commit ce3da49

7 files changed

Lines changed: 30 additions & 11 deletions

File tree

apps/webapp/app/components/dashboard-agent/DashboardAgentComposer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function DashboardAgentComposer({
101101
isHero ? "rounded-lg p-2" : "rounded-md p-1"
102102
)}
103103
>
104-
<div className={isHero ? "flex flex-col gap-1.5" : "flex items-end gap-1"}>
104+
<div className={isHero ? "flex flex-col gap-1.5" : "flex items-center gap-1"}>
105105
{/* Docked: one text line tall at rest (matches the button height),
106106
growing with content up to the cap. Hero: three lines at rest, the
107107
same growth. rows + field-sizing-content do the work. */}

apps/webapp/app/components/dashboard-agent/DashboardAgentHero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function DashboardAgentHero({
4040
<div className="flex flex-col items-center gap-1.5 text-center">
4141
<Header1 className="flex items-center gap-2">
4242
<AgentMonoLogo size={22} decorative />
43-
Ask AI
43+
Ask Trigger
4444
<BetaBadge />
4545
</Header1>
4646
<Paragraph variant="small" className="text-text-dimmed">

apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ export function DashboardAgentPanel({
208208
return request;
209209
}, [actionPath, toast]);
210210

211+
// The generated chat name lands a few seconds AFTER the first answer (the
212+
// agent defers it so it never blocks the response), so the reload a settled
213+
// turn triggers still reads "New chat". One delayed follow-up reload picks the
214+
// name up without the user having to reopen the panel.
215+
const titleRefreshTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
216+
useEffect(() => () => clearTimeout(titleRefreshTimer.current), []);
217+
const handleTurnSettled = useCallback(() => {
218+
void loadHistory();
219+
clearTimeout(titleRefreshTimer.current);
220+
titleRefreshTimer.current = setTimeout(() => void loadHistory(), 5000);
221+
}, [loadHistory]);
222+
211223
// Bumped on each open so a slower earlier open can't overwrite a newer one
212224
// when chats are switched rapidly.
213225
const openChatRequestSeq = useRef(0);
@@ -647,7 +659,7 @@ export function DashboardAgentPanel({
647659
appendedMessage={appendedMessage}
648660
onWatchIntent={openWatchCard}
649661
onCancelWatch={cancelWatch}
650-
onTurnSettled={loadHistory}
662+
onTurnSettled={handleTurnSettled}
651663
onActivityChange={handleActivityChange}
652664
/>
653665
) : (

apps/webapp/app/components/dashboard-agent/WatchButton.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { EyeIcon } from "@heroicons/react/20/solid";
12
import type { WatchSpec } from "@internal/dashboard-agent-contracts";
23
import { Button } from "~/components/primitives/Buttons";
3-
import { AGENT_ICON_ACCENT_CLASS, AgentIcon } from "./agent-identity";
44
import { useDashboardAgent } from "./dashboardAgentLauncher";
55

66
/**
@@ -17,8 +17,8 @@ import { useDashboardAgent } from "./dashboardAgentLauncher";
1717
* pre-filled, and an abandoned card leaves no trace in the transcript.
1818
*
1919
* Self-hiding, like every agent entry point: no provider (or the agent gated off)
20-
* renders nothing, so callers need no gate of their own. Icon and accent come from
21-
* `agent-identity`, so it reads as one family with Investigate.
20+
* renders nothing, so callers need no gate of their own. The eye glyph matches
21+
* the chat's Watch block — the watch is the object, not the agent.
2222
*/
2323
export function WatchButton({
2424
spec,
@@ -47,8 +47,10 @@ export function WatchButton({
4747
<Button
4848
type="button"
4949
variant={`${variant}/${size}`}
50-
LeadingIcon={AgentIcon}
51-
leadingIconClassName={variant === "primary" ? undefined : AGENT_ICON_ACCENT_CLASS}
50+
// The same eye the chat's Watch block wears — a watch is the object here,
51+
// not the agent, so the button doesn't carry the agent's glyph.
52+
LeadingIcon={EyeIcon}
53+
leadingIconClassName={variant === "primary" ? undefined : "text-text-dimmed"}
5254
fullWidth={fullWidth}
5355
textAlignLeft={fullWidth}
5456
className={className}

apps/webapp/app/components/dashboard-agent/dashboardAgentLauncher.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ export function DashboardAgentLauncher() {
8080
<span className="relative inline-flex shrink-0">
8181
<Button
8282
variant="ask-ai/small"
83-
aria-label={hasUnread ? "Ask AI, unread updates" : "Ask AI"}
83+
aria-label={hasUnread ? "Ask Trigger, unread updates" : "Ask Trigger"}
8484
onClick={() => setOpen(true)}
8585
>
86-
Ask AI
86+
Ask Trigger
8787
</Button>
8888
{hasUnread && (
8989
<span

apps/webapp/app/components/primitives/Buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const theme = {
116116
"border-text-dimmed/40 text-text-dimmed group-hover/button:text-text-bright group-hover/button:border-text-dimmed",
117117
icon: "text-blue-500",
118118
},
119-
// Reserved for the AI agent's "Ask AI" affordance: secondary styling with a
119+
// Reserved for the AI agent's "Ask Trigger" affordance: secondary styling with a
120120
// softened trigger-green border.
121121
"ask-ai": {
122122
// Light hover fills with a pale brand-green tint and the ink flips DARK —

apps/webapp/app/v3/canAccessDashboardAgent.server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export async function canAccessDashboardAgent(options: {
2020
// extra org lookup. Omit it and we query the org ourselves.
2121
orgFeatureFlags?: Record<string, unknown> | null;
2222
}): Promise<boolean> {
23+
// TEMPORARY (V1 rollout testing, TRI-12870): open to everyone. Flip back to
24+
// false to restore the flag gate below.
25+
const OPEN_TO_EVERYONE: boolean = true;
26+
if (OPEN_TO_EVERYONE) return true;
27+
2328
const { userId, isAdmin, isImpersonating, organizationSlug, orgFeatureFlags } = options;
2429

2530
if ((isAdmin || isImpersonating) && env.DASHBOARD_AGENT_ADMIN_PREVIEW === "1") {

0 commit comments

Comments
 (0)