Skip to content

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

feat(ui): group the Settings pages under headings (#530)

Rufus86f73e567589
diff --git a/packages/core/openexecutive/guide/prebuilt/settings.json b/packages/core/openexecutive/guide/prebuilt/settings.json
index e1c72cb4..915a633c 100644
--- a/packages/core/openexecutive/guide/prebuilt/settings.json
+++ b/packages/core/openexecutive/guide/prebuilt/settings.json
@@ -1,7 +1,7 @@
{
"section_id": "settings",
"title": "Settings & Advanced",
- "markdown": "**What it is:** The settings that live outside the day-to-day menu: whether the Executive is running and how it sounds, your notifications, what it knows about you, who Open Executive is for, the version, and the admin and power-user tools under **Advanced**. What the Executive may do as you or on its own is not here: it is under **Delegate** in the main menu (see the Delegate section of this guide).\n\n**What it does:**\n\n- Opens on a page of tiles, one per settings page: **Your Executive**, **Notifications**, **About you**, **Workspace**, **Advanced** and **About**. Each tile says what's on its page and, where it can, how things stand now: running or paused and the voice, your quiet hours, whether notes are on and how long they last, Personal or Team and the time zone, how many tools are under Advanced, the version and whether an update is available.\n- **Notifications** and **About you** have tiles only for someone on the People list.\n- Click a tile to open its page. The **Settings** link at the top of each page takes you back.\n\n**How to use:**\n\n1. Click **Settings** at the bottom of the sidebar. (On a phone, open the menu with the button at the top left; Settings is at its bottom.)\n2. Click a tile to open that page.\n3. On **Advanced**, click a row to open that tool.\n\n**Your Executive:**\n\n- **Pause everything**: shows **Running** or **Paused**. Click **Pause…**, add a reason if you like (up to 200 characters), and click **Pause Executive**. **Cancel** closes the form.\n- While paused, the card shows since when, who paused it, the reason and how many held actions will run when you resume. **Resume** is shown only to the principal. Anyone who can sign in can pause.\n- **Always does on its own**: what it does with no switch: the morning brief and evening digest, nudges, looking over your day, research and monitoring, and looking back at its chats (what it fixes, what it got wrong and what it learned from that go to **Pulse**). Pause stops these too.\n- A line under it points to **Delegate** for Take the lead, booking meetings and what it sends as you.\n- **Voice**: pick the voice the Executive answers you in. It saves when you pick.\n\n**Pausing the Executive:**\n\n- Open **Settings → Your Executive**, or **Pause or resume the Executive** in the account menu (the **⋯** next to your name at the bottom of the sidebar).\n- While paused, the Executive starts nothing on its own: no briefs, nudges, monitoring, inbox processing, workflow timers or Take the lead. An amber banner appears on every page, and a note on Your Executive says nothing there runs until you resume.\n- Chat and direct messages (Slack, Telegram, Discord, Google Chat) still get answers. Anything you tap **Send** or **Approve** on still goes.\n- Nothing is lost. Work that falls due during the pause waits, and runs when you click **Resume**.\n\n**Notifications:**\n\n- Each person sets their own. Only people on the People list can set them; anyone else is told so.\n- **Quiet hours**: a switch, then **From**, **To** and **Days** (**Every day**, or **Weekdays (weekends quiet all day)**). Click **Save quiet hours** after changing the times. What the Executive would send you on its own (nudges, check-ins on your work, alerts) waits until your quiet hours end. Replies when you message it still come straight away. Times are in your time zone; a link offers your browser's zone if it differs.\n- **How things reach you**: **As they happen**, or **In my briefs**. For the owner, **In my briefs** adds held messages to the next morning brief or end-of-day digest under \"While you were away\". For anyone else, they are sent together in one message when the briefs go out.\n- **Let urgent things through**: on, reminders about things waiting on your approval and critical alerts reach you right away, even in quiet hours or when you get things in your briefs. A question a workflow is waiting on you to answer always comes straight away.\n- A line at the top says how many messages are waiting, if any.\n\n**About you:**\n\n- Everything the Executive keeps about you. Each person sees only their own.\n- **Your profile**: what it has learned from your chats and replies, with your notes. Only you see it. It is read-only, and it is hidden when long-term memory is off.\n- **Share my work style with the team**: off by default. On, the Executive shares how you work (your role, your focus, how you like updates, your working style) with teammates when they ask, and uses it to help them work with you.\n- **Keep track of what happens**: on, it keeps private notes of what you tell it in chat, and of replies it drafted that you send. **Keep my notes for** picks a shorter time for your own notes. **See your notes** opens them on Pulse.\n- **How long notes last**: notes are forgotten after this unless their person pins them. The owner picks it **For everyone**; everyone else sees what it is.\n\n**Workspace:**\n\n- **Using Open Executive**: **Personal** or **Team**. Picking the other one asks you to confirm and says what changes, with **Switch to Personal** / **Switch to Team** and **Cancel**:\n - **Personal** pauses department check-ins and renames **Company** in the sidebar to **You**, with **Goals** (grouped by area), **People** and your profile. There is no Departments tab. Nothing is deleted: your departments stay, as the areas your goals are grouped by.\n - **Team** brings back **Company** with its **Departments** tab and their daily check-ins.\n - A persona you customised in Council stays in place in either mode.\n- **Your role** (Personal only): which describes you best (**Owner / founder**, **Executive inside an organisation**, **Independent or fractional** or **Other**), your title, who you report to, what you're responsible for and what you're measured on. Every field is optional. Click **Save role**, or **Discard changes**. The Executive uses it to fit its advice to your job. It stays saved if you switch to Team.\n- **Time zone**: when your morning brief, end-of-day digest and reflection arrive, and how the Executive reads \"tomorrow at 9\". Pick a zone, **Follow server default**, or click **Use this browser's time zone**. It saves when you pick.\n- **Company email domains** (under **Advanced** at the bottom, principal only): mail from these domains matches a teammate by the part before the @, so anna+invoices@ reaches the Anna already on your People list. Someone new writing from one is suggested as a teammate; you still confirm them. It follows your own address until you set it. **Save** keeps the list; **Use my address** goes back to your own address.\n- Only the principal can change the mode, role and time zone.\n- During first setup, **Who is this for?** asks Personal or Team. You can change it here later, and add teammates any time from **People**.\n\n**Advanced:**\n\n- The tools that open their own screen, grouped by what you'd use them for:\n - **Check & diagnose**: **Setup status**, **Audit log**, **Token usage**.\n - **Configure**: **Agent Council**, **Custom tools**, **Company Simulator**, **Client Companies**.\n - **Learn**: **User Guide**, **Architecture**.\n- **Setup status**: a light for each part of your setup and what to do about anything that isn't working.\n- **Audit log**: a searchable record of everything the Executive did: each chat, each question it passed to an expert, each tool it used and each scheduled job.\n- **Token usage**: what the AI has cost: the total, each day and each model.\n- **Agent Council**: choose how thorough answers are, and change each agent's model, instructions and the Executive's voice.\n- **Custom tools**: tools the Executive built when it didn't have the one it needed. Only the account owner sees them. Each has a switch, **Use in workflows**, and **Details, versions and runs** with **Use this one** to go back a version.\n- **Company Simulator**: load a demo company, save a copy of your data, or have AI make up a new one.\n- **Client Companies**: for fractional work: switch between the companies you work for.\n- **User Guide**: this guide. **Architecture**: the technical reference for how the system is built.\n\n**Checking your setup:**\n\n- Open **Settings → Advanced → Setup status**. Each part gets a light: green **Working**, amber **Needs attention**, red **Not working**, grey **Not set up** (optional).\n- The lights: **Sign-in**, **AI model**, **Company setup**, **Owner**, **The Executive's email address**, **API protection**, **Email (Gmail)**, **Your own mailbox (Act as me)**, **Slack**, **Discord**, **Telegram**, **Google Chat**, **Daily schedule**, **Daily brief** and **Long-term memory (Honcho)**. The page lists the ones that need you first.\n- It tests for real: the AI key, and each chat app's token with a quick call that sends nothing. For each chat app it also checks whether anyone on your People list can reach it, and shows when the last message arrived.\n- Anything that isn't green says what to do in plain words, with a link when the fix is on another page. After you change a setting and restart the app, click **Check again**.\n\n**About:**\n\n- Shows the version this install runs, and whether a newer one is out. When one is, **What's new** and **How to upgrade** open the release notes and the upgrade steps.\n\n**Old links:**\n\n- `/settings/on-its-own` opens **Your Executive**. `/settings/act-as-me` opens **Delegate → Act as me**.\n- Old one-page links still work: `/settings#executive` and `#on-its-own` open Your Executive, `#memory` About you, `#workspace` Workspace, `#tools` Advanced, `#about` About, and `#act-as-me` Delegate → Act as me.\n\n*Tip: if you're looking for a feature that isn't in the sidebar, it's probably under **Settings → Advanced**. The account menu (the **⋯** next to your name at the bottom of the sidebar) has **User Guide**, **Pause or resume the Executive** and, when you signed in with an account, **Sign out**.*\n",
+ "markdown": "**What it is:** The settings that live outside the day-to-day menu: whether the Executive is running and how it sounds, your notifications, what it knows about you, who Open Executive is for, the version, and the admin and power-user tools under **Advanced**. What the Executive may do as you or on its own is not here: it is under **Delegate** in the main menu (see the Delegate section of this guide).\n\n**What it does:**\n\n- Opens on a page of settings in three groups: **You and your Executive** (**Your Executive**, **Notifications**, **About you**), **Company** (**Workspace**) and **More** (**Advanced**, **About**). Each group is a card with a row per page. Each row says, where it can, how things stand now, and otherwise what's on its page: running or paused and the voice, your quiet hours, whether notes are on and how long they last, Personal or Team and the time zone, how many tools are under Advanced, the version and whether an update is available.\n- **Notifications** and **About you** have rows only for someone on the People list.\n- Click a row to open its page. The **Settings** link at the top of each page takes you back.\n\n**How to use:**\n\n1. Click **Settings** at the bottom of the sidebar. (On a phone, open the menu with the button at the top left; Settings is at its bottom.)\n2. Click a row to open that page.\n3. On **Advanced**, click a row to open that tool.\n\n**Your Executive:**\n\n- **Pause everything**: shows **Running** or **Paused**. Click **Pause…**, add a reason if you like (up to 200 characters), and click **Pause Executive**. **Cancel** closes the form.\n- While paused, the card shows since when, who paused it, the reason and how many held actions will run when you resume. **Resume** is shown only to the principal. Anyone who can sign in can pause.\n- **Always does on its own**: what it does with no switch: the morning brief and evening digest, nudges, looking over your day, research and monitoring, and looking back at its chats (what it fixes, what it got wrong and what it learned from that go to **Pulse**). Pause stops these too.\n- A line under it points to **Delegate** for Take the lead, booking meetings and what it sends as you.\n- **Voice**: pick the voice the Executive answers you in. It saves when you pick.\n\n**Pausing the Executive:**\n\n- Open **Settings → Your Executive**, or **Pause or resume the Executive** in the account menu (the **⋯** next to your name at the bottom of the sidebar).\n- While paused, the Executive starts nothing on its own: no briefs, nudges, monitoring, inbox processing, workflow timers or Take the lead. An amber banner appears on every page, and a note on Your Executive says nothing there runs until you resume.\n- Chat and direct messages (Slack, Telegram, Discord, Google Chat) still get answers. Anything you tap **Send** or **Approve** on still goes.\n- Nothing is lost. Work that falls due during the pause waits, and runs when you click **Resume**.\n\n**Notifications:**\n\n- Each person sets their own. Only people on the People list can set them; anyone else is told so.\n- **Quiet hours**: a switch, then **From**, **To** and **Days** (**Every day**, or **Weekdays (weekends quiet all day)**). Click **Save quiet hours** after changing the times. What the Executive would send you on its own (nudges, check-ins on your work, alerts) waits until your quiet hours end. Replies when you message it still come straight away. Times are in your time zone; a link offers your browser's zone if it differs.\n- **How things reach you**: **As they happen**, or **In my briefs**. For the owner, **In my briefs** adds held messages to the next morning brief or end-of-day digest under \"While you were away\". For anyone else, they are sent together in one message when the briefs go out.\n- **Let urgent things through**: on, reminders about things waiting on your approval and critical alerts reach you right away, even in quiet hours or when you get things in your briefs. A question a workflow is waiting on you to answer always comes straight away.\n- A line at the top says how many messages are waiting, if any.\n\n**About you:**\n\n- Everything the Executive keeps about you. Each person sees only their own.\n- **Your profile**: what it has learned from your chats and replies, with your notes. Only you see it. It is read-only, and it is hidden when long-term memory is off.\n- **Share my work style with the team**: off by default. On, the Executive shares how you work (your role, your focus, how you like updates, your working style) with teammates when they ask, and uses it to help them work with you.\n- **Keep track of what happens**: on, it keeps private notes of what you tell it in chat, and of replies it drafted that you send. **Keep my notes for** picks a shorter time for your own notes. **See your notes** opens them on Pulse.\n- **How long notes last**: notes are forgotten after this unless their person pins them. The owner picks it **For everyone**; everyone else sees what it is.\n\n**Workspace:**\n\n- **Using Open Executive**: **Personal** or **Team**. Picking the other one asks you to confirm and says what changes, with **Switch to Personal** / **Switch to Team** and **Cancel**:\n - **Personal** pauses department check-ins and renames **Company** in the sidebar to **You**, with **Goals** (grouped by area), **People** and your profile. There is no Departments tab. Nothing is deleted: your departments stay, as the areas your goals are grouped by.\n - **Team** brings back **Company** with its **Departments** tab and their daily check-ins.\n - A persona you customised in Council stays in place in either mode.\n- **Your role** (Personal only): which describes you best (**Owner / founder**, **Executive inside an organisation**, **Independent or fractional** or **Other**), your title, who you report to, what you're responsible for and what you're measured on. Every field is optional. Click **Save role**, or **Discard changes**. The Executive uses it to fit its advice to your job. It stays saved if you switch to Team.\n- **Time zone**: when your morning brief, end-of-day digest and reflection arrive, and how the Executive reads \"tomorrow at 9\". Pick a zone, **Follow server default**, or click **Use this browser's time zone**. It saves when you pick.\n- **Company email domains** (under **Advanced** at the bottom, principal only): mail from these domains matches a teammate by the part before the @, so anna+invoices@ reaches the Anna already on your People list. Someone new writing from one is suggested as a teammate; you still confirm them. It follows your own address until you set it. **Save** keeps the list; **Use my address** goes back to your own address.\n- Only the principal can change the mode, role and time zone.\n- During first setup, **Who is this for?** asks Personal or Team. You can change it here later, and add teammates any time from **People**.\n\n**Advanced:**\n\n- The tools that open their own screen, grouped by what you'd use them for:\n - **Check & diagnose**: **Setup status**, **Audit log**, **Token usage**.\n - **Configure**: **Agent Council**, **Custom tools**, **Company Simulator**, **Client Companies**.\n - **Learn**: **User Guide**, **Architecture**.\n- **Setup status**: a light for each part of your setup and what to do about anything that isn't working.\n- **Audit log**: a searchable record of everything the Executive did: each chat, each question it passed to an expert, each tool it used and each scheduled job.\n- **Token usage**: what the AI has cost: the total, each day and each model.\n- **Agent Council**: choose how thorough answers are, and change each agent's model, instructions and the Executive's voice.\n- **Custom tools**: tools the Executive built when it didn't have the one it needed. Only the account owner sees them. Each has a switch, **Use in workflows**, and **Details, versions and runs** with **Use this one** to go back a version.\n- **Company Simulator**: load a demo company, save a copy of your data, or have AI make up a new one.\n- **Client Companies**: for fractional work: switch between the companies you work for.\n- **User Guide**: this guide. **Architecture**: the technical reference for how the system is built.\n\n**Checking your setup:**\n\n- Open **Settings → Advanced → Setup status**. Each part gets a light: green **Working**, amber **Needs attention**, red **Not working**, grey **Not set up** (optional).\n- The lights: **Sign-in**, **AI model**, **Company setup**, **Owner**, **The Executive's email address**, **API protection**, **Email (Gmail)**, **Your own mailbox (Act as me)**, **Slack**, **Discord**, **Telegram**, **Google Chat**, **Daily schedule**, **Daily brief** and **Long-term memory (Honcho)**. The page lists the ones that need you first.\n- It tests for real: the AI key, and each chat app's token with a quick call that sends nothing. For each chat app it also checks whether anyone on your People list can reach it, and shows when the last message arrived.\n- Anything that isn't green says what to do in plain words, with a link when the fix is on another page. After you change a setting and restart the app, click **Check again**.\n\n**About:**\n\n- Shows the version this install runs, and whether a newer one is out. When one is, **What's new** and **How to upgrade** open the release notes and the upgrade steps.\n\n**Old links:**\n\n- `/settings/on-its-own` opens **Your Executive**. `/settings/act-as-me` opens **Delegate → Act as me**.\n- Old one-page links still work: `/settings#executive` and `#on-its-own` open Your Executive, `#memory` About you, `#workspace` Workspace, `#tools` Advanced, `#about` About, and `#act-as-me` Delegate → Act as me.\n\n*Tip: if you're looking for a feature that isn't in the sidebar, it's probably under **Settings → Advanced**. The account menu (the **⋯** next to your name at the bottom of the sidebar) has **User Guide**, **Pause or resume the Executive** and, when you signed in with an account, **Sign out**.*\n",
"mermaid": null,
"generated_at": "2026-10-16T19:00:00Z"
}
diff --git a/packages/ui/scripts/navConfig.test.mjs b/packages/ui/scripts/navConfig.test.mjs
index 2dc8cf66..1763eabf 100644
--- a/packages/ui/scripts/navConfig.test.mjs
+++ b/packages/ui/scripts/navConfig.test.mjs
@@ -4,11 +4,13 @@ import {
ADVANCED_GROUPS,
ADVANCED_ITEMS,
PROFILE_NAV,
+ SETTINGS_GROUPS,
SETTINGS_PAGES,
advancedItemsByGroup,
buildDestinations,
buildHubs,
buildMobilePrimary,
+ groupSettingsPages,
hubForPath,
isDestinationActive,
profileWording,
@@ -241,3 +243,24 @@ test("old /settings#anchors land on the matching page", () => {
const all = SETTINGS_PAGES.flatMap((p) => p.hashes);
assert.equal(new Set(all).size, all.length);
});
+
+test("every Settings page sits in a known group, and the hub lists the groups in order", () => {
+ const ids = SETTINGS_GROUPS.map((g) => g.id);
+ for (const p of SETTINGS_PAGES) assert.ok(ids.includes(p.group), `${p.id} has group ${p.group}`);
+ assert.deepEqual(
+ groupSettingsPages(SETTINGS_PAGES).map(({ group, pages }) => [group.label, pages.map((p) => p.label)]),
+ [
+ ["You and your Executive", ["Your Executive", "Notifications", "About you"]],
+ ["Company", ["Workspace"]],
+ ["More", ["Advanced", "About"]],
+ ],
+ );
+});
+
+test("a Settings group with no page left is dropped", () => {
+ const pages = SETTINGS_PAGES.filter((p) => p.group !== "company");
+ assert.deepEqual(
+ groupSettingsPages(pages).map(({ group }) => group.id),
+ ["you", "more"],
+ );
+});
diff --git a/packages/ui/src/app/settings/page.tsx b/packages/ui/src/app/settings/page.tsx
index bd8ac6f7..7a753967 100644
--- a/packages/ui/src/app/settings/page.tsx
+++ b/packages/ui/src/app/settings/page.tsx
@@ -10,6 +10,7 @@ import { MODE_LABEL } from "@/components/settings/WorkspaceCard";
import {
ADVANCED_ITEMS,
SETTINGS_PAGES,
+ groupSettingsPages,
settingsHrefForHash,
type SettingsPageDef,
type SettingsPageId,
@@ -28,9 +29,11 @@ import { retentionLabel } from "@/lib/history";
import { tileStatus as notificationsTileStatus } from "@/lib/notifications";
import { versionNotice } from "@/lib/versionNotice";
-// Settings — a hub of tiles, one per page (SETTINGS_PAGES): Your Executive,
-// Notifications, About you, Workspace, Advanced and About. Each tile says what's on its page
-// and, where it's cheap to know, how things stand right now. The one-page
+// Settings — a hub with a row per page (SETTINGS_PAGES), in headed groups
+// (SETTINGS_GROUPS): You and your Executive (Your Executive, Notifications,
+// About you), Company (Workspace) and More (Advanced, About). Each row says,
+// where it's cheap to know, how things stand right now, and otherwise what's
+// on its page. The one-page
// Settings this replaces used anchors (`/settings#workspace`); a link that
// still carries one is sent on to the matching page (Act as me's, to its tab
// under Delegate).
@@ -82,36 +85,47 @@ export default function SettingsPage() {
<p className="mt-2 text-[15px] text-fg-muted">
How the Executive runs, who it runs for, and the tools for looking under the hood.
</p>
- {/* Phones: one compact list (a card with a row per page) so every page
- fits on one screen. Wider: a grid of tiles. */}
- <ul className="mt-6 sm:mt-8 grid grid-cols-1 overflow-hidden rounded-2xl border border-line bg-surface-elevated divide-y divide-line sm:overflow-visible sm:rounded-none sm:border-0 sm:bg-transparent sm:divide-y-0 sm:gap-4 sm:grid-cols-2 lg:grid-cols-3">
- {pages.map((page) => (
- <li key={page.id} className="min-w-0">
- <SettingsTile page={page} status={statuses.byPage[page.id]} />
- </li>
+ {/* The pages in headed groups, each a card with a row per page. Phones:
+ one column. Wider: two columns of cards. */}
+ <div className="mt-6 sm:mt-8 sm:columns-2 sm:gap-6">
+ {groupSettingsPages(pages).map(({ group, pages: rows }) => (
+ <section key={group.id} aria-labelledby={`settings-group-${group.id}`} className="mb-6 break-inside-avoid">
+ <h2
+ id={`settings-group-${group.id}`}
+ className="mx-1 mb-2.5 text-[13px] font-bold uppercase tracking-wider text-fg-subtle"
+ >
+ {group.label}
+ </h2>
+ <ul className="overflow-hidden rounded-2xl border border-line bg-surface-elevated divide-y divide-line">
+ {rows.map((page) => (
+ <li key={page.id} className="min-w-0">
+ <SettingsRow page={page} status={statuses.byPage[page.id]} />
+ </li>
+ ))}
+ </ul>
+ </section>
))}
- </ul>
+ </div>
</div>
</main>
);
}
-function SettingsTile({ page, status }: { page: SettingsPageDef; status?: TileStatus }) {
+// One page's row: its name, and under it how things stand (or, for a page
+// with no status, what's on it).
+function SettingsRow({ page, status }: { page: SettingsPageDef; status?: TileStatus }) {
return (
<Link
href={page.href}
- className="group flex h-full min-h-14 items-center gap-3 px-4 py-3 sm:items-start sm:flex-col sm:gap-0 sm:rounded-2xl sm:border sm:border-line sm:bg-surface-elevated sm:p-6 transition-colors hover:bg-surface-overlay/40 sm:hover:border-accent/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent/60"
+ className="group flex min-h-16 items-center gap-3.5 px-4 py-3 sm:px-5 sm:py-3.5 transition-colors hover:bg-surface-overlay/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent/60"
>
- <span className="flex w-9 h-9 sm:w-11 sm:h-11 flex-shrink-0 items-center justify-center rounded-xl bg-accent/10 text-accent">
+ <span className="flex w-10 h-10 flex-shrink-0 items-center justify-center rounded-xl bg-accent/10 text-accent">
<Icon name={page.icon} size="w-5 h-5" />
</span>
- <span className="min-w-0 flex-1 sm:mt-4 sm:w-full">
- <span className="block font-display text-base sm:text-lg font-bold tracking-tight text-fg">{page.label}</span>
- <span className="hidden sm:block mt-1 text-[15px] text-fg-muted leading-relaxed">
- {page.description}
- </span>
- <span className="mt-0.5 sm:mt-3 flex min-h-[1.25rem] items-center gap-2 text-[13px] sm:text-sm text-fg-muted">
- {status && (
+ <span className="min-w-0 flex-1">
+ <span className="block font-display text-base sm:text-[17px] font-bold tracking-tight text-fg">{page.label}</span>
+ <span className="mt-0.5 flex min-h-[1.25rem] items-center gap-2 text-[13px] sm:text-sm text-fg-muted">
+ {status ? (
<>
{status.tone !== "none" && (
<span
@@ -123,19 +137,21 @@ function SettingsTile({ page, status }: { page: SettingsPageDef; status?: TileSt
)}
<span className="truncate">{status.text}</span>
</>
+ ) : (
+ <span className="truncate">{page.description}</span>
)}
</span>
</span>
<Icon
name="chevron-right"
size="w-5 h-5"
- className="sm:hidden text-fg-subtle group-hover:text-fg transition-colors"
+ className="flex-shrink-0 text-fg-subtle group-hover:text-fg transition-colors"
/>
</Link>
);
}
-// The one-line status under each tile. Each comes from a read the app makes
+// The one-line status under each row. Each comes from a read the app makes
// anyway (run state, workspace) or one small request; a read that fails
// leaves its tile without a status rather than guessing.
function useTileStatuses(): {
diff --git a/packages/ui/src/components/shell/navConfig.ts b/packages/ui/src/components/shell/navConfig.ts
index 27851fc8..d28e9d45 100644
--- a/packages/ui/src/components/shell/navConfig.ts
+++ b/packages/ui/src/components/shell/navConfig.ts
@@ -457,6 +457,20 @@ export type SettingsPageId =
| "advanced"
| "about";
+// The headed groups the Settings hub sorts its pages into, in order.
+export type SettingsGroupId = "you" | "company" | "more";
+
+export interface SettingsGroupDef {
+ id: SettingsGroupId;
+ label: string;
+}
+
+export const SETTINGS_GROUPS: SettingsGroupDef[] = [
+ { id: "you", label: "You and your Executive" },
+ { id: "company", label: "Company" },
+ { id: "more", label: "More" },
+];
+
export interface SettingsPageDef {
id: SettingsPageId;
label: string;
@@ -465,11 +479,14 @@ export interface SettingsPageDef {
/** What's on the page, as the hub tile says it. */
description: string;
hashes: string[];
+ /** The hub group the page is listed under. */
+ group: SettingsGroupId;
}
export const SETTINGS_PAGES: SettingsPageDef[] = [
{
id: "executive",
+ group: "you",
label: "Your Executive",
href: "/settings/executive",
icon: "cog",
@@ -478,6 +495,7 @@ export const SETTINGS_PAGES: SettingsPageDef[] = [
},
{
id: "notifications",
+ group: "you",
label: "Notifications",
href: "/settings/notifications",
icon: "bell",
@@ -486,6 +504,7 @@ export const SETTINGS_PAGES: SettingsPageDef[] = [
},
{
id: "memory",
+ group: "you",
label: "About you",
href: "/settings/memory",
icon: "user",
@@ -494,6 +513,7 @@ export const SETTINGS_PAGES: SettingsPageDef[] = [
},
{
id: "workspace",
+ group: "company",
label: "Workspace",
href: "/settings/workspace",
icon: "building",
@@ -502,6 +522,7 @@ export const SETTINGS_PAGES: SettingsPageDef[] = [
},
{
id: "advanced",
+ group: "more",
label: "Advanced",
href: "/settings/advanced",
icon: "grid",
@@ -511,6 +532,7 @@ export const SETTINGS_PAGES: SettingsPageDef[] = [
},
{
id: "about",
+ group: "more",
label: "About",
href: "/settings/about",
icon: "info",
@@ -519,6 +541,17 @@ export const SETTINGS_PAGES: SettingsPageDef[] = [
},
];
+// The hub's groups with the pages in each, in group order and each page in
+// the order given; a group with no page left is dropped.
+export function groupSettingsPages<P extends SettingsPageDef>(
+ pages: P[],
+ groups: SettingsGroupDef[] = SETTINGS_GROUPS,
+): { group: SettingsGroupDef; pages: P[] }[] {
+ return groups
+ .map((group) => ({ group, pages: pages.filter((p) => p.group === group.id) }))
+ .filter((g) => g.pages.length > 0);
+}
+
// The page an old `/settings#<hash>` link meant, or null for no hash or one
// that never named a section. Takes the hash with or without its "#".
export function settingsPageForHash(hash: string): SettingsPageDef | null {