Skip to content

AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).

fix(ui): make the getting-started Ask button open a chat, and drop "overnight" (#522)

Rufus95f98efbdaf1
diff --git a/packages/core/openexecutive/guide/prebuilt/audit.json b/packages/core/openexecutive/guide/prebuilt/audit.json
index 6f23f28e..fa257440 100644
--- a/packages/core/openexecutive/guide/prebuilt/audit.json
+++ b/packages/core/openexecutive/guide/prebuilt/audit.json
@@ -1,7 +1,7 @@
{
"section_id": "audit",
"title": "Audit Log",
- "markdown": "**What it is:** A searchable record of what the Executive did: each chat turn, each question it passed to a specialist, each tool it used, each alert, each scheduled job and each message that came in from a channel. Newest first.\n\n**What it does:**\n\n- Shows activity grouped by conversation (**Sessions**) or as a plain list (**Events**).\n- Filters by text, event type, session id and date range.\n- Opens any event's full payload: the message, the tool input and the result.\n- Draws a flow chart of one session, step by step, with its token counts and cost signals.\n\n**How to use:**\n\n1. Open **Settings → Advanced → Audit log**. It opens on **Sessions**: one card per conversation, showing the channel, the session id, how long ago it ran, how long it took, and a count of each kind of event (for example \"1 inbound · 4 specialists · 6 tools\").\n2. Each card shows its three latest events. Click one to see its details and full payload. **+ N earlier events** shows the rest of that session, and **▴ Collapse** hides them again. Events with no session are gathered in one **unattributed** card at the end.\n3. Click a session id to filter to that session. The page switches to **Events**.\n4. Click **Open flow chart →** on a card to open **Session flow**. Each node is one step (Inbound, Memory, Knowledge, Specialist, Tool, Cache, Committee, Response, Alert, Scheduled). The strip at the top shows the number of events, the channel, model calls, input and output tokens, the share served from cache, and any steps that ran in a reduced way (**degraded**). Click a node to see what the agent saw, then **View full payload →** to open the drawer. **Copy** copies the payload. **← Audit log** goes back.\n5. Switch to **Events** for a table of Time, Type, Actor, Summary and Session. Click a row to see its full payload.\n6. Narrow things down with **Search summary…**, **All event types**, **Session id**, and **From / Until**. **Clear filters** resets them. Results come 100 per page; use **← Prev** and **Next →**.\n7. **Token usage** at the top opens the cost page.\n\nLinks from other pages, such as an item under \"Handled overnight\" in the brief, open the log with the type and search already filled in.\n\n**Who sees what:**\n\n- The owner of the Executive sees every event. A team member's own conversations show as actions only, such as \"Message (Dana's conversation, details private)\". What they said is not shown, and a text search leaves those rows out.\n- Once an owner is on the People list, anyone else sees only their own events.\n- The page has no way to edit or delete events.\n\n**Example:** *\"Why did the Executive message our vendor on Tuesday?\"* Search for the vendor's name, set **From / Until** to Tuesday, then open that session's flow chart and follow it from the inbound message to the outbound send.",
+ "markdown": "**What it is:** A searchable record of what the Executive did: each chat turn, each question it passed to a specialist, each tool it used, each alert, each scheduled job and each message that came in from a channel. Newest first.\n\n**What it does:**\n\n- Shows activity grouped by conversation (**Sessions**) or as a plain list (**Events**).\n- Filters by text, event type, session id and date range.\n- Opens any event's full payload: the message, the tool input and the result.\n- Draws a flow chart of one session, step by step, with its token counts and cost signals.\n\n**How to use:**\n\n1. Open **Settings → Advanced → Audit log**. It opens on **Sessions**: one card per conversation, showing the channel, the session id, how long ago it ran, how long it took, and a count of each kind of event (for example \"1 inbound · 4 specialists · 6 tools\").\n2. Each card shows its three latest events. Click one to see its details and full payload. **+ N earlier events** shows the rest of that session, and **▴ Collapse** hides them again. Events with no session are gathered in one **unattributed** card at the end.\n3. Click a session id to filter to that session. The page switches to **Events**.\n4. Click **Open flow chart →** on a card to open **Session flow**. Each node is one step (Inbound, Memory, Knowledge, Specialist, Tool, Cache, Committee, Response, Alert, Scheduled). The strip at the top shows the number of events, the channel, model calls, input and output tokens, the share served from cache, and any steps that ran in a reduced way (**degraded**). Click a node to see what the agent saw, then **View full payload →** to open the drawer. **Copy** copies the payload. **← Audit log** goes back.\n5. Switch to **Events** for a table of Time, Type, Actor, Summary and Session. Click a row to see its full payload.\n6. Narrow things down with **Search summary…**, **All event types**, **Session id**, and **From / Until**. **Clear filters** resets them. Results come 100 per page; use **← Prev** and **Next →**.\n7. **Token usage** at the top opens the cost page.\n\nLinks from other pages, such as an item under \"Handled\" on Home, open the log with the type and search already filled in.\n\n**Who sees what:**\n\n- The owner of the Executive sees every event. A team member's own conversations show as actions only, such as \"Message (Dana's conversation, details private)\". What they said is not shown, and a text search leaves those rows out.\n- Once an owner is on the People list, anyone else sees only their own events.\n- The page has no way to edit or delete events.\n\n**Example:** *\"Why did the Executive message our vendor on Tuesday?\"* Search for the vendor's name, set **From / Until** to Tuesday, then open that session's flow chart and follow it from the inbound message to the outbound send.",
"mermaid": null,
"generated_at": "2026-10-15T21:00:00Z"
}
diff --git a/packages/core/openexecutive/guide/prebuilt/today.json b/packages/core/openexecutive/guide/prebuilt/today.json
index a31c5af4..889d8d25 100644
--- a/packages/core/openexecutive/guide/prebuilt/today.json
+++ b/packages/core/openexecutive/guide/prebuilt/today.json
@@ -1,7 +1,7 @@
{
"section_id": "today",
"title": "Today / Morning Brief",
- "markdown": "**What it is:** A single screen of *what needs you right now* — the proactive digest the Executive prepares so you're not the one chasing status. In the app it's **Home**, the screen the app opens on.\n\n**What it does:**\n\n- Opens with a greeting, one line summing up the day (click a part of it — *2 awaiting reply*, *1 department at risk* — to open that list), and an **Ask your Executive anything…** box that starts a chat. On a quiet day the line names one **Move today:** instead.\n- Puts what's waiting on your call up front under **Needs you**: the first card large, the next two below it, and **Show N more** for the rest.\n- Gathers everything else under **Everything else** as a row of count tiles — **Departments**, **People**, **Across the team** (waiting on someone else), **Under way**, **Handled overnight**, **Monitoring**, and **Across your clients** when you look after client companies — shown only when they have something in them. Click a tile to open its full list in a side panel.\n- The **Departments** tile shows each department's goal health — on-track, at-risk, or off-track — with the at-risk goals called out.\n- The **People** tile lists people with open items, their reply counts, SLA status, and whether they're on leave.\n- **Read today's brief** (next to **Needs you**) opens the written brief — what's going on across the company — in a side panel.\n- If your latest morning brief, end-of-day digest or weekly review couldn't be sent to you, a line at the top says why and what to connect. It goes away once that's fixed.\n- When your morning brief or end-of-day digest left out lines that named people or figures the Executive couldn't match to your data, **Left out of your brief** under **Needs you** lists them for a day. **Hide** clears it.\n- With **Delegate → Act as me → What it writes as you** at **Draft replies automatically**, the replies the Executive wrote as you for mail that needs you come first in **Needs you**, marked **Reply waiting** (or **Follow-up waiting** when nobody answered an email you sent). Only you see them.\n- Actions the Executive suggested from your email (a meeting, a message to someone, a new contact) appear as cards in **Needs you**, each spelled out with a box to untick. **Approve** does the ticked ones (**Approve N** when you untick some), **Approve + allow** also lets it do that kind of action on its own from now on (shown while it is still learning), and **Dismiss** drops the card. Only you see them.\n- A send or edit a team member asked for in chat that their department held waits as a card marked **Waiting on you**, with the reason and the exact details. **Approve** carries it out as shown; **Decline** drops it.\n- An item a team member asked the Executive to raise starts with **Raised by** and their name. It goes to a person or a department, never to the whole company. Team members can dismiss only items assigned to them; the owner can dismiss any item.\n- Under **Take the lead**, something the Executive wanted to do on its own that you haven't allowed yet comes as a card: **Approve** does it once, **Approve + allow** also lets it do the same thing with the same person from now on, **Edit** changes it first (tick **Do it like this next time** to keep your edit as an example and allow it), and **Decline** drops it.\n- Surfaces proposals and alerts you can click to open a chat thread with full context.\n\n**How to use:**\n\n1. Click **Home** in the sidebar (or the Open Executive logo). On a phone, **Home** is the first button in the bar at the bottom.\n2. Work **Needs you** from the top. Each card has one main button and **Discuss**; everything else is in the card's **⋯** menu:\n - **Approve** — accept the recommendation; the Executive carries it out right away. A line at the top of **Needs you** shows it working and then done, with a link to the chat where it did the work. If it didn't work, **Try again** is on that line. Usually the main button.\n - **Discuss** — open a chat with the context already filled in.\n - **Edit & approve** (in **⋯**) — reword the action first, then **Send approval**; your text is used exactly as written.\n - **Dismiss** (in **⋯**) — drop it and stay on Home. When the Executive thinks a card is stale, **Dismiss** is the main button instead.\n - **Snooze until …** (in **⋯**) — three hours from now (while that is still today), **tomorrow 9:00**, or **Monday 9:00** (not offered on a Sunday). The card leaves Home and comes back on its own then; *Snoozed until …* with **Undo** under **Needs you** brings it back now.\n - **Nudge *name*** — the main button when the best move is chasing someone for a reply; **Run *workflow*** when the best move is a workflow.\n - **Open *name*'s page** (in **⋯**) — the person the item is waiting on.\n - A **Monitoring** signal leads with **Discuss**; its **⋯** has **Dismiss signal**.\n3. Some cards are simpler: when a scheduled run didn't finish (a department check-in, or a workflow you set to run on a schedule), its card's main button is **Run again**, which runs it now and sends the result where it normally goes (**Open the run** in **⋯** shows what went wrong); a document card's main button is **Open document** (**Mark reviewed** is in its **⋯**, and **Open in app** when the document lives in another app), and a calendar-booking card books (or declines) the meeting directly when you click Approve or Dismiss. Only the person a booking was sent to for approval, or the owner, can approve or decline it.\n4. Keep it tidy from the **⋯** next to **Needs you**: **Dismiss N older than 7 days** clears stale items, and **Re-check relevance** asks the Executive to review every open item now.\n5. Open the **Departments** tile and click a department to ask for its status in chat.\n6. Work the replies waiting to be sent (they come first in **Needs you**). Each card shows who wrote (and *Address not verified* when the address couldn't be confirmed), **What they wrote** (click to open), **Your draft** with who it goes to, *Why it waited for you* when Handle it for me left it for you, **Decide before sending** (what the draft leaves for you to answer) and any warnings. The buttons:\n - **Send** asks once, naming who the reply goes to, then **Send now** sends it from your own mailbox (Gmail or Outlook). If the recipients changed or they wrote again since, it asks again, says what changed, and offers **Send anyway**.\n - **Send + allow** (shown while replies are still being learned) sends it and lets replies to that person go on their own from now on while Handle it for me is on.\n - **Edit** changes the words right on the card; **Save** keeps them (and updates the draft in your mailbox when it is kept there too). When it is learning how you write, **Do it like this next time (if you changed it)** appears as you send.\n - **Open in Gmail** (or Outlook) opens the draft there, when it is kept in your Drafts.\n - **Dismiss** drops the card, and deletes the draft from your Drafts unless you changed it there.\n On a server, Send needs signed sign-ins; until they're set up, send from your mailbox. A card goes away on its own once you send or delete the draft in your mailbox, or reply yourself, and after 7 days.\n\n**Example:** in a Discuss thread, just say *\"go ahead\"* to approve the proposal or *\"drop it\"* to dismiss it — no need to go back to the card. (Calendar bookings still need the Approve button. When you asked for the meeting in a chat, its card is under that reply too.)\n\n**Just for yourself?** If you use Open Executive just for yourself (**Settings → Workspace → Personal**), Home leaves out the team parts: there are no Departments, People or Across the team tiles — everything that needs a decision is in **Needs you**. When a goal is slipping, the summary line at the top says how many goals are at risk; click it to open **Goals**. Instead, the tiles are **Due soon**, **Your projects** and **This week's review**, each opening its list in a side panel. **Your projects** lists the projects the Executive is tracking for you. Click **Done** when one is finished, or **Drop** to stop tracking it (it asks first, and removes the project from Pulse). **Due soon** lists what you've promised by a date and what others have asked of you, due in the next week — say *\"I'll send Northwind the proposal by Friday\"* in the web chat or your own Slack or Discord and it shows up here, and the Executive reminds you when it's due. Click **Done** once it's handled; **All open items** opens the full list. **Top three today**, right under **Needs you**, shows the three things to focus on today — the same three your morning brief opens with — each with a free slot in today's working hours when the Executive can read your calendar. **This week's review** shows your latest weekly review: when it ran and next week's top three. Click **Read the review** to see all of it.\n\nYour morning brief also opens with a **top three for today**, picked from what's overdue or due, goals that are slipping and the projects you're driving. When Google Workspace is connected and the Executive can read your calendar (it is your own account, or you shared your calendar with it), each of the three gets a free slot in today's working hours and the brief lists today's meetings; otherwise the three come without times. Every Friday afternoon (in your time zone) a **weekly review** arrives the same way: your goals graded by area, what's due or overdue, projects that went quiet, the week's decisions, a few older decisions to look back on, and next week's top three. Both also show up on Home (see above), so you see them even when no chat app or email is connected. When it asks how an older decision turned out, just tell the Executive in the web chat or your own Slack or Discord and it records the outcome against that decision.\n\n*Note: proposals are routed to the right person automatically based on who has authority over them.*",
+ "markdown": "**What it is:** A single screen of *what needs you right now* — the proactive digest the Executive prepares so you're not the one chasing status. In the app it's **Home**, the screen the app opens on.\n\n**What it does:**\n\n- Opens with a greeting, one line summing up the day (click a part of it — *2 awaiting reply*, *1 department at risk* — to open that list), and an **Ask your Executive anything…** box that starts a chat. On a quiet day the line names one **Move today:** instead.\n- Puts what's waiting on your call up front under **Needs you**: the first card large, the next two below it, and **Show N more** for the rest.\n- Gathers everything else under **Everything else** as a row of count tiles — **Departments**, **People**, **Across the team** (waiting on someone else), **Under way**, **Handled**, **Monitoring**, and **Across your clients** when you look after client companies — shown only when they have something in them. Click a tile to open its full list in a side panel.\n- The **Departments** tile shows each department's goal health — on-track, at-risk, or off-track — with the at-risk goals called out.\n- The **People** tile lists people with open items, their reply counts, SLA status, and whether they're on leave.\n- **Read today's brief** (next to **Needs you**) opens the written brief — what's going on across the company — in a side panel.\n- If your latest morning brief, end-of-day digest or weekly review couldn't be sent to you, a line at the top says why and what to connect. It goes away once that's fixed.\n- When your morning brief or end-of-day digest left out lines that named people or figures the Executive couldn't match to your data, **Left out of your brief** under **Needs you** lists them for a day. **Hide** clears it.\n- With **Delegate → Act as me → What it writes as you** at **Draft replies automatically**, the replies the Executive wrote as you for mail that needs you come first in **Needs you**, marked **Reply waiting** (or **Follow-up waiting** when nobody answered an email you sent). Only you see them.\n- Actions the Executive suggested from your email (a meeting, a message to someone, a new contact) appear as cards in **Needs you**, each spelled out with a box to untick. **Approve** does the ticked ones (**Approve N** when you untick some), **Approve + allow** also lets it do that kind of action on its own from now on (shown while it is still learning), and **Dismiss** drops the card. Only you see them.\n- A send or edit a team member asked for in chat that their department held waits as a card marked **Waiting on you**, with the reason and the exact details. **Approve** carries it out as shown; **Decline** drops it.\n- An item a team member asked the Executive to raise starts with **Raised by** and their name. It goes to a person or a department, never to the whole company. Team members can dismiss only items assigned to them; the owner can dismiss any item.\n- Under **Take the lead**, something the Executive wanted to do on its own that you haven't allowed yet comes as a card: **Approve** does it once, **Approve + allow** also lets it do the same thing with the same person from now on, **Edit** changes it first (tick **Do it like this next time** to keep your edit as an example and allow it), and **Decline** drops it.\n- Surfaces proposals and alerts you can click to open a chat thread with full context.\n\n**How to use:**\n\n1. Click **Home** in the sidebar (or the Open Executive logo). On a phone, **Home** is the first button in the bar at the bottom.\n2. Work **Needs you** from the top. Each card has one main button and **Discuss**; everything else is in the card's **⋯** menu:\n - **Approve** — accept the recommendation; the Executive carries it out right away. A line at the top of **Needs you** shows it working and then done, with a link to the chat where it did the work. If it didn't work, **Try again** is on that line. Usually the main button.\n - **Discuss** — open a chat with the context already filled in.\n - **Edit & approve** (in **⋯**) — reword the action first, then **Send approval**; your text is used exactly as written.\n - **Dismiss** (in **⋯**) — drop it and stay on Home. When the Executive thinks a card is stale, **Dismiss** is the main button instead.\n - **Snooze until …** (in **⋯**) — three hours from now (while that is still today), **tomorrow 9:00**, or **Monday 9:00** (not offered on a Sunday). The card leaves Home and comes back on its own then; *Snoozed until …* with **Undo** under **Needs you** brings it back now.\n - **Nudge *name*** — the main button when the best move is chasing someone for a reply; **Run *workflow*** when the best move is a workflow.\n - **Open *name*'s page** (in **⋯**) — the person the item is waiting on.\n - A **Monitoring** signal leads with **Discuss**; its **⋯** has **Dismiss signal**.\n3. Some cards are simpler: when a scheduled run didn't finish (a department check-in, or a workflow you set to run on a schedule), its card's main button is **Run again**, which runs it now and sends the result where it normally goes (**Open the run** in **⋯** shows what went wrong); a document card's main button is **Open document** (**Mark reviewed** is in its **⋯**, and **Open in app** when the document lives in another app), and a calendar-booking card books (or declines) the meeting directly when you click Approve or Dismiss. Only the person a booking was sent to for approval, or the owner, can approve or decline it.\n4. Keep it tidy from the **⋯** next to **Needs you**: **Dismiss N older than 7 days** clears stale items, and **Re-check relevance** asks the Executive to review every open item now.\n5. Open the **Departments** tile and click a department to ask for its status in chat.\n6. Work the replies waiting to be sent (they come first in **Needs you**). Each card shows who wrote (and *Address not verified* when the address couldn't be confirmed), **What they wrote** (click to open), **Your draft** with who it goes to, *Why it waited for you* when Handle it for me left it for you, **Decide before sending** (what the draft leaves for you to answer) and any warnings. The buttons:\n - **Send** asks once, naming who the reply goes to, then **Send now** sends it from your own mailbox (Gmail or Outlook). If the recipients changed or they wrote again since, it asks again, says what changed, and offers **Send anyway**.\n - **Send + allow** (shown while replies are still being learned) sends it and lets replies to that person go on their own from now on while Handle it for me is on.\n - **Edit** changes the words right on the card; **Save** keeps them (and updates the draft in your mailbox when it is kept there too). When it is learning how you write, **Do it like this next time (if you changed it)** appears as you send.\n - **Open in Gmail** (or Outlook) opens the draft there, when it is kept in your Drafts.\n - **Dismiss** drops the card, and deletes the draft from your Drafts unless you changed it there.\n On a server, Send needs signed sign-ins; until they're set up, send from your mailbox. A card goes away on its own once you send or delete the draft in your mailbox, or reply yourself, and after 7 days.\n\n**Example:** in a Discuss thread, just say *\"go ahead\"* to approve the proposal or *\"drop it\"* to dismiss it — no need to go back to the card. (Calendar bookings still need the Approve button. When you asked for the meeting in a chat, its card is under that reply too.)\n\n**Just for yourself?** If you use Open Executive just for yourself (**Settings → Workspace → Personal**), Home leaves out the team parts: there are no Departments, People or Across the team tiles — everything that needs a decision is in **Needs you**. When a goal is slipping, the summary line at the top says how many goals are at risk; click it to open **Goals**. Instead, the tiles are **Due soon**, **Your projects** and **This week's review**, each opening its list in a side panel. **Your projects** lists the projects the Executive is tracking for you. Click **Done** when one is finished, or **Drop** to stop tracking it (it asks first, and removes the project from Pulse). **Due soon** lists what you've promised by a date and what others have asked of you, due in the next week — say *\"I'll send Northwind the proposal by Friday\"* in the web chat or your own Slack or Discord and it shows up here, and the Executive reminds you when it's due. Click **Done** once it's handled; **All open items** opens the full list. **Top three today**, right under **Needs you**, shows the three things to focus on today — the same three your morning brief opens with — each with a free slot in today's working hours when the Executive can read your calendar. **This week's review** shows your latest weekly review: when it ran and next week's top three. Click **Read the review** to see all of it.\n\nYour morning brief also opens with a **top three for today**, picked from what's overdue or due, goals that are slipping and the projects you're driving. When Google Workspace is connected and the Executive can read your calendar (it is your own account, or you shared your calendar with it), each of the three gets a free slot in today's working hours and the brief lists today's meetings; otherwise the three come without times. Every Friday afternoon (in your time zone) a **weekly review** arrives the same way: your goals graded by area, what's due or overdue, projects that went quiet, the week's decisions, a few older decisions to look back on, and next week's top three. Both also show up on Home (see above), so you see them even when no chat app or email is connected. When it asks how an older decision turned out, just tell the Executive in the web chat or your own Slack or Discord and it records the outcome against that decision.\n\n*Note: proposals are routed to the right person automatically based on who has authority over them.*",
"mermaid": null,
"generated_at": "2026-10-16T16:18:07.481101+00:00"
}
diff --git a/packages/ui/scripts/briefingSummary.test.mjs b/packages/ui/scripts/briefingSummary.test.mjs
index 46498efb..ccf6ce1d 100644
--- a/packages/ui/scripts/briefingSummary.test.mjs
+++ b/packages/ui/scripts/briefingSummary.test.mjs
@@ -37,7 +37,7 @@ test("the summary leads with what needs you, then what was handled", () => {
const parts = briefingSummary({ ...zero, needsYou: 3, handledOvernight: 12, inFlight: 7, deptAtRisk: 1 });
assert.deepEqual(
parts.map((p) => p.text),
- ["3 things need you", "The Executive handled 12 overnight", "1 department at risk", "7 under way"],
+ ["3 things need you", "The Executive handled 12 on its own", "1 department at risk", "7 under way"],
);
assert.deepEqual(parts[0].target, { kind: "needsYou" });
assert.deepEqual(parts[1].target, { kind: "panel", panel: "handled" });
diff --git a/packages/ui/scripts/firstRun.test.mjs b/packages/ui/scripts/firstRun.test.mjs
index 6176c7d1..58d72753 100644
--- a/packages/ui/scripts/firstRun.test.mjs
+++ b/packages/ui/scripts/firstRun.test.mjs
@@ -1,12 +1,14 @@
import assert from "node:assert/strict";
import test from "node:test";
import {
+ ASK_SUGGESTION,
checklistComplete,
checklistProgress,
checklistVisible,
firstQuestion,
gettingStartedItems,
OWN_MAILBOX_SENDS,
+ opensInPlace,
shouldRedirectToOnboard,
} from "../src/lib/firstRun.ts";
@@ -104,3 +106,16 @@ test("the checklist waits for every answer, so it never flashes", () => {
const done = open.map((i) => ({ ...i, done: true }));
assert.equal(checklistVisible({ hidden: false, loaded: true, items: done }), false);
});
+
+test("the Ask row suggests the question its button types in", () => {
+ const ask = gettingStartedItems(base).find((i) => i.id === "ask");
+ assert.equal(ask.detail, `Try “${ASK_SUGGESTION}”`);
+});
+
+test("only an open Ask row runs the page's handler, and only when there is one", () => {
+ const [profile, ask] = gettingStartedItems(base);
+ assert.equal(opensInPlace(ask, true), true);
+ assert.equal(opensInPlace(ask, false), false);
+ assert.equal(opensInPlace({ ...ask, done: true }, true), false);
+ assert.equal(opensInPlace(profile, true), false);
+});
diff --git a/packages/ui/src/app/page.tsx b/packages/ui/src/app/page.tsx
index 5d3a1115..938d7e6a 100644
--- a/packages/ui/src/app/page.tsx
+++ b/packages/ui/src/app/page.tsx
@@ -20,7 +20,7 @@ import PausedBanner from "@/components/executive/PausedBanner";
import OverflowMenu from "@/components/ui/OverflowMenu";
import { ChatMessage, DebugEvent, getSessionMessages, updateSession } from "@/lib/api";
import { downloadChat } from "@/lib/downloadChat";
-import { recall, remember, STORAGE_KEYS } from "@/lib/firstRun";
+import { ASK_SUGGESTION, recall, remember, STORAGE_KEYS } from "@/lib/firstRun";
import { sessionTitle } from "@/lib/sessionChannel";
import Link from "next/link";
import { useRouter } from "next/navigation";
@@ -110,6 +110,14 @@ export default function HomePage() {
setPendingMemoryText(undefined);
}, []);
+ // The getting-started checklist's Ask: a new chat with its suggested
+ // question typed in, to edit or send.
+ const handleAskFromChecklist = useCallback(() => {
+ handleNewChat();
+ setPendingPrompt(ASK_SUGGESTION);
+ setAutoSubmitPending(false);
+ }, [handleNewChat]);
+
// Continue a briefing thread in chat — invoked when the user clicks a
// Department card, proposal, or activity row. Switches mode to "chat"
// and seeds the input with the briefing context. The user can edit
@@ -248,7 +256,7 @@ export default function HomePage() {
<PausedBanner />
</div>
) : gettingStarted.visible ? (
- <GettingStartedCard {...gettingStarted} />
+ <GettingStartedCard {...gettingStarted} onAsk={handleAskFromChecklist} />
) : !isOnboarded && health ? (
<div className="flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-accent/25 bg-accent/5 px-4 py-3">
<p className="text-[15px] text-fg-muted">{profileCopy.missingBanner}</p>
diff --git a/packages/ui/src/components/Briefing.tsx b/packages/ui/src/components/Briefing.tsx
index 9a2134d4..6012b7fa 100644
--- a/packages/ui/src/components/Briefing.tsx
+++ b/packages/ui/src/components/Briefing.tsx
@@ -579,7 +579,7 @@ export default function Briefing({ onContinue, showHeader = false, firstName, ba
tiles.push({
key: "handled",
value: String(handledRows.length),
- label: "Handled overnight",
+ label: "Handled",
sub: "by the Executive",
subTone: "emerald",
});
@@ -1005,7 +1005,7 @@ export default function Briefing({ onContinue, showHeader = false, firstName, ba
<SidePanel open={openPanel === "inFlight"} onClose={() => setOpenPanel(null)} title="Under way">
<InFlightPanelBody inFlight={inFlight} />
</SidePanel>
- <SidePanel open={openPanel === "handled"} onClose={() => setOpenPanel(null)} title="Handled overnight">
+ <SidePanel open={openPanel === "handled"} onClose={() => setOpenPanel(null)} title="Handled">
<HandledPanelBody
items={handledOvernight}
onReopen={handleReopen}
diff --git a/packages/ui/src/components/briefing/AwarenessPanels.tsx b/packages/ui/src/components/briefing/AwarenessPanels.tsx
index ff39a19a..88006324 100644
--- a/packages/ui/src/components/briefing/AwarenessPanels.tsx
+++ b/packages/ui/src/components/briefing/AwarenessPanels.tsx
@@ -31,7 +31,7 @@ import {
} from "./shared";
// The side panels behind Home's awareness tiles: In flight, Across your
-// clients, Monitoring and Handled overnight. Each holds the section's full
+// clients, Monitoring and Handled. Each holds the section's full
// list and every button it had on the page.
// In flight — what the Executive is about to do (scheduled follow-ups &
@@ -312,7 +312,7 @@ function HandledRowView({
);
}
-// Handled overnight — moves the Executive completed on its own since the
+// Handled — moves the Executive completed on its own since the
// last delivered brief. The rail is rebuilt from the audit log on every
// fetch, so a close the principal already undid still has its row:
// `status === "open"` (server truth after a reload) or the in-session set
diff --git a/packages/ui/src/components/onboard/GettingStarted.tsx b/packages/ui/src/components/onboard/GettingStarted.tsx
index fba420fb..b820a3ab 100644
--- a/packages/ui/src/components/onboard/GettingStarted.tsx
+++ b/packages/ui/src/components/onboard/GettingStarted.tsx
@@ -10,6 +10,7 @@ import {
checklistVisible,
checklistProgress,
gettingStartedItems,
+ opensInPlace,
recall,
remember,
STORAGE_KEYS,
@@ -78,7 +79,14 @@ export function useGettingStarted(
return { items, visible, hide };
}
-export function GettingStartedCard({ items, hide }: GettingStartedState) {
+// `onAsk` starts the chat in place: Home is the page the Ask row links to,
+// and a link to the page already open does not remount it, so the link
+// alone did nothing there.
+export function GettingStartedCard({
+ items,
+ hide,
+ onAsk,
+}: GettingStartedState & { onAsk?: () => void }) {
const progress = checklistProgress(items);
return (
<section
@@ -118,7 +126,15 @@ export function GettingStartedCard({ items, hide }: GettingStartedState) {
</p>
<p className="text-[13px] text-fg-muted leading-snug">{item.detail}</p>
</div>
- {!item.done && (
+ {opensInPlace(item, Boolean(onAsk)) ? (
+ <button
+ type="button"
+ onClick={() => onAsk?.()}
+ className={buttonClass(item.optional ? "secondary" : "primary", "sm", "flex-shrink-0")}
+ >
+ {item.action}
+ </button>
+ ) : !item.done && (
<Link
href={item.href}
className={buttonClass(item.optional ? "secondary" : "primary", "sm", "flex-shrink-0")}
diff --git a/packages/ui/src/lib/briefingSummary.ts b/packages/ui/src/lib/briefingSummary.ts
index 2bcdf57b..a8b008fd 100644
--- a/packages/ui/src/lib/briefingSummary.ts
+++ b/packages/ui/src/lib/briefingSummary.ts
@@ -51,7 +51,7 @@ export function briefingSummary(c: SummaryCounts): SummaryPart[] {
});
if (c.handledOvernight > 0)
parts.push({
- text: `The Executive handled ${c.handledOvernight} overnight`,
+ text: `The Executive handled ${c.handledOvernight} on its own`,
target: { kind: "panel", panel: "handled" },
});
if (c.peopleOverdue > 0)
diff --git a/packages/ui/src/lib/firstRun.ts b/packages/ui/src/lib/firstRun.ts
index d4830921..7bf62fc0 100644
--- a/packages/ui/src/lib/firstRun.ts
+++ b/packages/ui/src/lib/firstRun.ts
@@ -72,6 +72,17 @@ export const OWN_MAILBOX_SENDS = "Drafts replies as you. Sends only if you turn
const FIRST_QUESTION_MAX = 160;
+/** The question the getting-started checklist suggests; its Ask button
+ * starts a chat with it typed in. */
+export const ASK_SUGGESTION = "What should I focus on this week?";
+
+/** True when a row's button runs the page's own handler instead of following
+ * its link: the Ask row on Home, where the link points at the page already
+ * open and so does nothing. */
+export function opensInPlace(item: Pick<ChecklistItem, "id" | "done">, hasAskHandler: boolean): boolean {
+ return !item.done && item.id === "ask" && hasAskHandler;
+}
+
/**
* The first question the last setup screen offers, built from what setup
* just saved: the first of this year's priorities, else the north star,
@@ -166,7 +177,7 @@ export function gettingStartedItems(input: ChecklistInput): ChecklistItem[] {
{
id: "ask",
title: "Ask your Executive something",
- detail: input.hasAsked ? "First conversation saved" : "Try “What should I focus on this week?”",
+ detail: input.hasAsked ? "First conversation saved" : `Try “${ASK_SUGGESTION}”`,
done: input.hasAsked,
optional: false,
href: "/?new=1",