diff --git a/.claude/skills/openbot-screen-layout/SKILL.md b/.claude/skills/openbot-screen-layout/SKILL.md index c559ed3a65..bd933ddfd6 100644 --- a/.claude/skills/openbot-screen-layout/SKILL.md +++ b/.claude/skills/openbot-screen-layout/SKILL.md @@ -44,9 +44,9 @@ deviation worth stating out loud and worth a comment saying why. Four components make the frame. They compose in this order and nest no other way. ``` -PageShell the page: header (title, description, action, backButton) then children - PageSection a titled group of unrelated decisions, with a deliberately large gap above it - PageRows the grouped card: rounded-lg border bg-card +PageShell the page: header (title, one-sentence description, action, backButton) then children + PageSection a group of unrelated decisions under a small label, a large gap above it + PageRows the list: flat rows, no card, split by hairline dividers Item one row, size="sm", divided from its neighbours by PageEmpty what a section says when it has nothing to list ``` @@ -68,21 +68,22 @@ components above; a screen that sets its own is drifting. |---------|-----|----------------| | Page edge (top / sides / bottom) | 48 / 16 / 64px | `PageShell` column (`pt-12` or `pt-8` under the bar, `px-4`, `pb-16`) | | Title → description | 8px | `PageShell` header | +| Section label → description | 0px | `PageSection` | | Title block → first content | 32px | `PageShell`: `[&>header+*]:mt-8` | | Title → tabs, tabs → content | 24px, then 32px | `PageShell`: `[&>header+nav]`, `[&>header+nav+*]` | | Section → section | 48px | `PageSection` (`mt-12`) | -| Section heading → description | 4px | `PageSection` | -| Heading block → section content | 16px | `PageRows` / `PageEmpty` (`mt-4`) | +| Label block → section content | 8px | `PageRows` / `PageEmpty` (`mt-2`) | | Controls stacked inside a section | 12px | the screen, with `gap-3` | -| A row in `PageRows` | 71px with a description, never under 56px | `Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) | -| Divider between rows | inset 16px from both edges | `PageRows`, on every horizontal `Separator` inside it | +| A row in `PageRows` | about 59px with a description, never under 48px | `PageRows` sets each row's `py-2` and `min-h-12` | +| Row text → column edge | 0px: the text lines up with the label above | `PageRows` (`-mx-2`, rows `px-2`) | +| Divider between rows | lined up with the rows' text | `PageRows`, on every horizontal `Separator` inside it | The 32px under the title is deliberately tighter than the 48px between sections: the title belongs to the page it introduces. Those `PageShell` selectors outrank the first child's own `mt-*`, so a section or notice keeps its usual margin everywhere else and loses it only at the top. -A page with one section gives that section no `title`: the page title already names it, and a second -heading 32px below the first says the same thing twice. Put the description on `PageShell` instead +A page with one section gives that section no `title`: the page title already names it, and a label +32px below it says the same thing twice. Put the description on `PageShell` instead (`connections.index.tsx`). A count or filter that belongs to a search sits on the search's row, not on a line of its own. @@ -92,6 +93,20 @@ sentence of description saying how the first one arrives, and an `action` — th page already has — when there is one to offer. Don't repeat "Add one with X" in the description when the action is right there. A search with no results uses `IconSearch` and "No matches". +## Words Under A Title + +A page's `description` and a section's `description` are each **one short sentence**: what the page +or the group is for. A longer explanation (how rules combine, what happens in each case, an +exception) goes in `learnMore`, on `PageShell` or `PageSection`. It opens under the sentence when the +person presses "Learn more". While closed it is hidden until found, so find-in-page still reaches +it. A +section whose title and rows already say it needs no description. + +The section title is a small label, not a heading to read: `text-sm`, medium weight, in the text +color so it reads as a title over the grey description. A count of what the section lists goes in +`count`, after the title, muted and in tabular figures. That is the one way to show a section's +count. The rows under it are what a person reads. + ## Screens, Not Dialogs **A dialog is used only where the request explicitly asks for one. Everything else is a new @@ -109,25 +124,27 @@ button. ### Procedure 1: Lay out a screen -1. Open with `PageShell`, giving it `title` and `description`. Leave `width` alone. +1. Open with `PageShell`, giving it `title` and a one-sentence `description` (Words Under A Title). + Leave `width` alone. 2. On a detail screen reached from a list, pass `backButton={{ label, linkProps }}` — it draws a chevron-left bar above the header. Do not put a Back button in `action`; `action` is for the page's one primary verb, on the title's baseline. 3. Group the page's decisions into `PageSection`s, each with a `title` and, where the grouping is not - self-evident, a `description`. -4. Give each section one `PageRows` card. Rows go inside it as `Item size="sm"`, with `` - between them and none after the last. `PageRows` is a card with dividers, not a stack of cards — - gaps between rows are the wrong shape. + self-evident, a one-sentence `description`. +4. Give each section one `PageRows`. Rows go inside it as `Item size="sm"`, with `` + between them and none after the last. `PageRows` is a flat list with dividers, not a card and not + a stack of cards: gaps between rows are the wrong shape. 5. Read `admin/plugins/index.tsx` for the whole pattern end to end, and `admin/plugins/$key.tsx` or `admin/components/$name.tsx` for a screen with several sections and mixed row kinds. ### Procedure 2: Compose a row -1. `ItemMedia variant="icon"` holds a leading icon from `@/components/icons`, drawn as a 16px glyph on - a 32px muted tile. It is what makes a card of rows scannable; a row without one reads as a - paragraph. Pass the bare icon — the variant sizes and colours it — and use plain `ItemMedia` only - for something that is its own picture, such as a Bot's avatar. +1. A row has no leading icon by default: a glyph beside every row repeats what its title says. + Give the rows icons only where the icon tells them apart: an app's mark, a file's kind. Then + each row's `ItemMedia variant="icon"` holds the icon from `@/components/icons` (a 16px glyph on a + 32px tile). Plain `ItemMedia` is for something that is its own picture, such as a Bot's avatar + or an app's logo. 2. `ItemContent` holds `ItemTitle` and, where the row needs a second line, `ItemDescription`. 3. `ItemActions` holds the control, or the value when the row is read-only. 4. `ItemHeader` and `ItemFooter` are `basis-full`, so they wrap onto a line of their own inside the @@ -178,7 +195,7 @@ itself when the screen behind it changes something. ### Procedure 4: Sizes and variants -1. `Item size="sm"` for rows inside a card. `default` only for a row standing on its own. +1. `Item size="sm"` for rows inside a list. `default` only for a row standing on its own. 2. `Button size="sm"` for a control inside a row or a dialog footer; `lg` for a page's own actions; `icon-sm` for a control floating over artwork. The page's main add action is one filled button, in the header or in the page's sticky toolbar @@ -255,8 +272,10 @@ is actually on screen. The root was once 15px, and every constant taken from the | Signal | What it means | Do instead | |--------|---------------|------------| -| A hand-written `rounded-lg border border-border bg-card` div wrapping rows | `PageRows` re-implemented, and it will drift from the other seven screens | Use `PageRows` | -| Rows separated by `gap-*` instead of `` | A stack of cards rather than one card of rows | `` between rows, none after the last | +| A hand-written `rounded-lg border border-border bg-card` div wrapping rows | A card around a list, which `PageRows` no longer draws | Use `PageRows` | +| Rows separated by `gap-*` instead of `` | A stack of cards rather than one list of rows | `` between rows, none after the last | +| `ItemMedia variant="icon"` on rows whose icons are one per kind of setting | A tile that repeats the title, the look this layout dropped | No media; keep tiles for app marks and file kinds | +| A page or section description of two or more sentences | A paragraph between the title and the rows | One sentence; the rest in `learnMore` | | `width="wide"` or `"full"` on rows or a form | Prose width is the default for a reason; the others are for a grid of cards and a table | Leave `width` alone | | A `max-w-*`, `p-*` or text size invented for one screen | A fifth container width, which is what this layout exists to stop | Reach for the existing component | | Children on an element passed to `Item`'s `render` | They replace the row's own children; the row draws empty | Pass a childless element | diff --git a/app/src/components/admin/controls/artifact-collaboration-section.tsx b/app/src/components/admin/controls/artifact-collaboration-section.tsx index 632e0fcb38..159592aec7 100644 --- a/app/src/components/admin/controls/artifact-collaboration-section.tsx +++ b/app/src/components/admin/controls/artifact-collaboration-section.tsx @@ -1,12 +1,10 @@ import { useMutation, useQuery } from "@tanstack/react-query"; -import { IconUsers } from "@/components/icons"; import { PageRows, PageSection } from "@/components/layout/page-shell"; import { Item, ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Switch } from "@/components/ui/switch"; @@ -43,9 +41,6 @@ export function ArtifactCollaborationSection() { ) : null} - - - Show who has an artifact open diff --git a/app/src/components/admin/controls/capabilities-section.tsx b/app/src/components/admin/controls/capabilities-section.tsx index 2cf85848a4..4d9f20c592 100644 --- a/app/src/components/admin/controls/capabilities-section.tsx +++ b/app/src/components/admin/controls/capabilities-section.tsx @@ -1,13 +1,8 @@ -import { - IconChevronRight, - IconSparkles, - IconToggleRight, - IconUsersGroup, -} from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; import { useState } from "react"; import { BusinessComputerLink } from "@/components/edition/team-features-dialog"; +import { IconChevronRight } from "@/components/icons"; import { PageRows } from "@/components/layout/page-shell"; import { Button } from "@/components/ui/button"; import { @@ -23,7 +18,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Label } from "@/components/ui/label"; @@ -44,7 +38,7 @@ import type { CapabilitySetting, EnterpriseOverview, } from "@/lib/enterprise/queries"; -import { loadFailure, failureSaid } from "@/lib/load-failure"; +import { failureSaid, loadFailure } from "@/lib/load-failure"; import { MISSING_TEAM } from "@/lib/teams/names"; import { teamListQueryOptions } from "@/lib/teams/queries"; import { queryClient } from "@/query-client"; @@ -87,9 +81,6 @@ export function CapabilitiesSection() { return (
- - - {capability.title} @@ -134,9 +125,6 @@ export function CapabilitiesSection() { } size="sm" > - - - Role and team overrides @@ -154,9 +142,6 @@ export function CapabilitiesSection() { render={} size="sm" > - - - Describe it in words diff --git a/app/src/components/admin/controls/computer-sections.tsx b/app/src/components/admin/controls/computer-sections.tsx index a4d8342c44..6b3d628bf1 100644 --- a/app/src/components/admin/controls/computer-sections.tsx +++ b/app/src/components/admin/controls/computer-sections.tsx @@ -1,16 +1,7 @@ -import { - IconAppWindow, - IconBrandWindows, - IconChevronRight, - IconDeviceDesktop, - IconNetwork, - IconPlus, - IconUsersGroup, - IconWorld, -} from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { useId, useState } from "react"; import { useEdition } from "@/components/edition/for-a-team"; +import { IconChevronRight } from "@/components/icons"; import { PageRows, PageSection } from "@/components/layout/page-shell"; import { Button } from "@/components/ui/button"; import { @@ -34,7 +25,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Label } from "@/components/ui/label"; @@ -135,9 +125,6 @@ export function InactiveComputersSection() { } size="sm" > - - - Stop inactive computers @@ -230,9 +217,6 @@ export function WindowsAllowlistSection() { - - - Only the programs listed here @@ -258,9 +242,6 @@ export function WindowsAllowlistSection() {
- - - {program} @@ -298,9 +279,6 @@ export function WindowsAllowlistSection() { } size="sm" > - - - Add a program @@ -441,9 +419,6 @@ function NetworkPolicies({ data }: { data: EnterpriseOverview }) { } size="sm" > - - - Organization @@ -471,13 +446,6 @@ function NetworkPolicies({ data }: { data: EnterpriseOverview }) { } size="sm" > - - {policy.scopeKind === "team" ? ( - - ) : ( - - )} - {/* A long team name wraps, and the row is a button, whose words center unless told. */} {titleOf(policy)} diff --git a/app/src/components/admin/controls/describe-capabilities.tsx b/app/src/components/admin/controls/describe-capabilities.tsx index fc7b24eaaa..c0bb735b7a 100644 --- a/app/src/components/admin/controls/describe-capabilities.tsx +++ b/app/src/components/admin/controls/describe-capabilities.tsx @@ -1,7 +1,12 @@ +import type { UseQueryResult } from "@tanstack/react-query"; +import { Fragment } from "react"; +import type { AuditEvent } from "@/components/audit/audit-cells"; +import { + type ReplayRow, + ReplayRows, +} from "@/components/boundaries/dry-run-changes"; import { - IconBuilding, IconChecklist, - IconCircleDashed, IconDeviceDesktop, IconFolder, IconKey, @@ -9,17 +14,7 @@ import { IconPlug, IconRobot, IconTrash, - IconUser, - IconUserShield, - IconUsersGroup, } from "@/components/icons"; -import type { UseQueryResult } from "@tanstack/react-query"; -import { Fragment } from "react"; -import type { AuditEvent } from "@/components/audit/audit-cells"; -import { - type ReplayRow, - ReplayRows, -} from "@/components/boundaries/dry-run-changes"; import { PageRows } from "@/components/layout/page-shell"; import { Button } from "@/components/ui/button"; import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"; @@ -28,7 +23,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -65,13 +59,6 @@ function scopeWords(change: CapabilityChange, teams: Teams): string { return change.scopeId; } -const SCOPE_ICONS: Partial> = { - organization: IconBuilding, - role: IconUserShield, - team: IconUsersGroup, - group: IconUsersGroup, -}; - /** What a switch is set to, in the overrides dialog's words: a team grants, the rest turn on or off. */ function settingWords(change: CapabilityChange): { text: string; @@ -116,7 +103,6 @@ export function ChangeRows({ {changes.map((change, index) => { const row = index + 1; - const Icon = SCOPE_ICONS[change.scopeKind] ?? IconCircleDashed; const setting = settingWords(change); const title = titles[change.capability] ?? change.capability; const wrong = problems.filter((problem) => problem.change === row); @@ -125,9 +111,6 @@ export function ChangeRows({ // biome-ignore lint/suspicious/noArrayIndexKey: see above - - - {title} {scopeWords(change, teams)} @@ -335,12 +318,6 @@ export function PermissionsPreview({ return ( - - - {nameOf(person)} diff --git a/app/src/components/admin/controls/mcp-allowlist-section.tsx b/app/src/components/admin/controls/mcp-allowlist-section.tsx index d620bcead6..e7e6fc01fa 100644 --- a/app/src/components/admin/controls/mcp-allowlist-section.tsx +++ b/app/src/components/admin/controls/mcp-allowlist-section.tsx @@ -1,10 +1,5 @@ -import { - IconChevronRight, - IconKey, - IconPlug, - IconWorld, -} from "@/components/icons"; import { useState } from "react"; +import { IconChevronRight } from "@/components/icons"; import { PageRows } from "@/components/layout/page-shell"; import { Button } from "@/components/ui/button"; import { @@ -22,7 +17,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -103,9 +97,6 @@ export function McpAllowlistSection() { <> - - - Only approved connectors @@ -149,9 +140,6 @@ export function McpAllowlistSection() {
- - - {server.title} @@ -193,9 +181,6 @@ export function McpAllowlistSection() {
- - - {new URL(entry).host} @@ -230,9 +215,6 @@ export function McpAllowlistSection() { } size="sm" > - - - Approve a connector by its address diff --git a/app/src/components/admin/controls/model-sections.tsx b/app/src/components/admin/controls/model-sections.tsx index 823a34760a..815b774026 100644 --- a/app/src/components/admin/controls/model-sections.tsx +++ b/app/src/components/admin/controls/model-sections.tsx @@ -1,20 +1,16 @@ +import { useQueries, useQuery } from "@tanstack/react-query"; +import { Link } from "@tanstack/react-router"; +import { Fragment, useState } from "react"; +import { HarnessMark } from "@/components/agents/harness-mark"; import { - IconBrain, IconBuilding, IconChartBar, IconChevronRight, IconCloud, IconCube, - IconKey, IconSearch, - IconShieldLock, IconSparkles, - IconUsers, } from "@/components/icons"; -import { useQueries, useQuery } from "@tanstack/react-query"; -import { Link } from "@tanstack/react-router"; -import { Fragment, useState } from "react"; -import { HarnessMark } from "@/components/agents/harness-mark"; import { PageEmpty, PageRows, @@ -414,9 +410,6 @@ export function ModelChoiceSection() { ) : ( - - - {open @@ -473,9 +466,6 @@ function OwnModelsChoice({ ) : ( - - - {allowed @@ -533,9 +523,6 @@ export function ModelAllowlistSection() { <> - - - Only allowed models @@ -567,9 +554,6 @@ export function ModelAllowlistSection() { render={
{description ? ( -

- {description} -

+ {description} ) : null} ); @@ -135,6 +175,12 @@ export function PageHeader({ * The gap above a section is deliberately large. These pages are lists of unrelated decisions, and * the space is what stops the eye running two of them together — it is doing the work a divider * would otherwise do, without drawing a line. + * + * The title is a small label above the group, as Claude and Grok draw theirs: the rows are what a + * person reads, and a bold heading over every group made each page a stack of titles. It keeps the + * text color, so it reads as a title over the grey description. A count of what the section lists + * goes in `count`, after the title. The description is one sentence. A longer explanation goes in + * `learnMore`. */ export function PageSection({ action, @@ -143,30 +189,42 @@ export function PageSection({ count, description, id, + learnMore, title, }: { action?: React.ReactNode; children?: React.ReactNode; className?: string; - /** How many things the section lists, said beside its title ("Skills 22"). */ + /** How many things the section lists, drawn after the title ("Skills 22"). The one way to show a count. */ count?: number; + /** One sentence. */ description?: React.ReactNode; /** For an address that opens the page at this section, as its hash. */ id?: string; + /** The longer explanation, behind "Learn more" after the description. */ + learnMore?: React.ReactNode; title?: string; }) { return (
{title ? ( -
- {/* - * Close to body size and lighter than the page title, so the sections read as parts of - * the page rather than as a second row of titles competing with it. - */} -

+
+

{title} {count === undefined ? null : ( - + {count} )} @@ -175,9 +233,7 @@ export function PageSection({

) : null} {description ? ( -

- {description} -

+ {description} ) : null} {children}

@@ -185,11 +241,16 @@ export function PageSection({ } /** - * The card that rows live in. + * The rows of a list: flat, one under another, split by hairline dividers. + * + * Rows are `` with a `` between them. There is no card around them, as + * in ChatGPT's and Claude's settings: a bordered box around every list made each page read as an + * admin tool. The rows' text lines up with the section's label above it, and a row that is a link + * shows its hover as a rounded fill a little wider than the text. Rendering nothing when there is + * nothing is deliberate — an empty list reads as nothing to see yet. * - * Rows are `` with a `` between them; this is only the border around - * them. Rendering nothing when there is nothing is deliberate — an empty bordered box reads as a - * thing that failed to load, where absence reads as nothing to see yet. + * A row gives itself a leading icon (`ItemMedia variant="icon"`) only where the icon tells rows + * apart: an app's mark, a file's kind. A glyph beside every row repeats what its title says. */ export function PageRows({ children, @@ -199,24 +260,33 @@ export function PageRows({ className?: string; }) { return ( - /* - * The rows are squared off and the card clips them. `Item` carries `rounded-lg` of its own, which - * inside a card of divided rows painted a hover as a floating pill: a middle row has no corners, - * and the first and last cannot be concentric with the card while sitting a border inside it. - * - * Every row is at least 56px, whatever it holds. A title over a description is 71px; a lone - * line would be 47px and look stunted beside it, so it is held up to the floor. A description - * that wraps to a second line still grows the row rather than being clipped. - */
{children}
@@ -227,8 +297,8 @@ export function PageRows({ * The card a page-sized form sits in: the fields, then its buttons on the right. * * For a screen that exists to fill something in, reached from a list by its Add button, with - * `PageShell`'s back button returning to it. The same border and fill as `PageRows`, so a form and - * a list read as the same kind of surface, padded rather than divided because it holds fields. + * `PageShell`'s back button returning to it. A form keeps its card: its fields need an edge to sit + * in, where a list of rows reads as a list without one. */ export function PageCard({ children, @@ -255,7 +325,7 @@ export function PageCard({ /** * What a section says when it has nothing to list, drawn as shadcn's empty state. * - * A dashed box where the rows would be, so the section keeps its shape: the icon says what kind of + * Flat where the rows would be, as the rows are, so the section keeps its shape: the icon says what kind of * thing would be here, the title says that there is none, the description says how one arrives, and * `action` is the button that adds the first one when the page has one to offer. * @@ -275,7 +345,7 @@ export function PageEmpty({ }) { return ( // `isolate` gives the pattern its own stacking context, so it sits behind the text, not on it. - + {/* The pattern is decoration: see `.empty-pattern` in styles.css and its tokens in theme.css. */}
diff --git a/app/src/components/layout/page-shell.tsx b/app/src/components/layout/page-shell.tsx index 5b5afe369f..3c865adec4 100644 --- a/app/src/components/layout/page-shell.tsx +++ b/app/src/components/layout/page-shell.tsx @@ -1,6 +1,6 @@ -import { IconChevronLeft, IconPlus } from "@/components/icons"; import { Link, type LinkProps } from "@tanstack/react-router"; import type * as React from "react"; +import { IconChevronLeft, IconPlus } from "@/components/icons"; import { cn } from "@/lib/utils"; import { Button } from "../ui/button"; import { @@ -32,6 +32,7 @@ export function PageShell({ children, className: given, description, + learnMore, media, title, width = "prose", @@ -43,7 +44,10 @@ export function PageShell({ media?: React.ReactNode; children: React.ReactNode; className?: string; + /** One short sentence under the title. */ description?: React.ReactNode; + /** The longer explanation, behind "Learn more" after the description. */ + learnMore?: React.ReactNode; title: string; width?: ShellWidth; backButton?: { @@ -78,6 +82,7 @@ export function PageShell({ title={title} action={action} description={description} + learnMore={learnMore} media={media} /> ); @@ -162,4 +167,10 @@ export function PageAddButton({ ); } -export { PageCard, PageEmpty, PageRows, PageSection } from "./page-parts"; +export { + PageCard, + PageEmpty, + PageIntro, + PageRows, + PageSection, +} from "./page-parts"; diff --git a/app/src/components/manage/credentials-page.tsx b/app/src/components/manage/credentials-page.tsx index fd08e388f9..095a551bb5 100644 --- a/app/src/components/manage/credentials-page.tsx +++ b/app/src/components/manage/credentials-page.tsx @@ -1,6 +1,6 @@ -import { IconKey, IconPlus } from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; +import { IconKey, IconPlus } from "@/components/icons"; import { PageAddButton, PageEmpty, @@ -15,7 +15,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -95,9 +94,6 @@ export function CredentialsList() { {credentials.data.map((credential, index) => ( - - - {credential.provider} diff --git a/app/src/components/manage/describe-grants.tsx b/app/src/components/manage/describe-grants.tsx index 462b4aece8..92c62b30cf 100644 --- a/app/src/components/manage/describe-grants.tsx +++ b/app/src/components/manage/describe-grants.tsx @@ -1,8 +1,3 @@ -import { - IconCircleMinus, - IconCirclePlus, - IconHistory, -} from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import * as React from "react"; import { useState } from "react"; @@ -30,7 +25,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -45,13 +39,13 @@ import { type AppGrantTranslation, translateAppGrants, } from "@/lib/app-grants/translate"; +import { failureSaid } from "@/lib/load-failure"; import { approvalNamesNobody, type SharedUseApproval, } from "@/lib/plugins/shared-use"; import { relativeTime } from "@/lib/relative-time"; import { queryClient } from "@/query-client"; -import { failureSaid } from "@/lib/load-failure"; /** What came back for one description, kept beside the words it came from. */ type WrittenGrants = AppGrantTranslation & { text: string }; @@ -125,13 +119,11 @@ export function replayWords(report: AppGrantReplay, appTitle: string): string { /** One card of actions, a few at a time: a description can turn on thirty of them. */ function ActionRows({ actions, - icon, note, verdict, verdictClassName, }: { actions: T[]; - icon: React.ReactNode; note: (action: T) => string; verdict: string; verdictClassName: string; @@ -144,9 +136,6 @@ function ActionRows({ {shown.map((action, index) => ( - - {icon} - {action.name} @@ -346,7 +335,6 @@ export function DescribeGrants({ {changes.removed.length > 0 ? ( } note={kindOf} verdict="Turns off" verdictClassName={TURNS_OFF} @@ -355,7 +343,6 @@ export function DescribeGrants({ {changes.added.length > 0 ? ( } note={kindOf} verdict="Turns on" verdictClassName={TURNS_ON} @@ -457,7 +444,6 @@ function RecentUse({ {report.removedUsed.length > 0 ? ( actions={report.removedUsed} - icon={} note={(action) => `Called ${plural(action.calls, "time")}, last ${relativeTime(action.lastCalled)}.` } @@ -468,7 +454,6 @@ function RecentUse({ {report.refusedGiven.length > 0 ? ( actions={report.refusedGiven} - icon={} note={(action) => `Refused ${plural(action.calls, "time")} because it didn't have it, last ${relativeTime(action.lastCalled)}.` } diff --git a/app/src/components/manage/plugin-page.tsx b/app/src/components/manage/plugin-page.tsx index 6aac05a03a..8180aafcfd 100644 --- a/app/src/components/manage/plugin-page.tsx +++ b/app/src/components/manage/plugin-page.tsx @@ -1,3 +1,8 @@ +import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { Link, useNavigate } from "@tanstack/react-router"; +import * as React from "react"; +import { useEffect, useRef, useState } from "react"; +import { ASK_FIRST_TITLE } from "@/components/approvals/ask-first-copy"; import { IconArrowUpRight, IconChevronRight, @@ -5,11 +10,6 @@ import { IconPuzzle, IconTool, } from "@/components/icons"; -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { Link, useNavigate } from "@tanstack/react-router"; -import * as React from "react"; -import { useEffect, useRef, useState } from "react"; -import { ASK_FIRST_TITLE } from "@/components/approvals/ask-first-copy"; import { PageEmpty, PageRows, @@ -993,14 +993,9 @@ export function PluginPage({ {/* * Which teams may give it to their own Bots without asking. A set of teams, so a - * summary and a dialog. No icon, as no other row of this card has one. + * summary and a dialog. */} - + ) : null} diff --git a/app/src/components/manage/plugins-list-page.tsx b/app/src/components/manage/plugins-list-page.tsx index bd14003338..30deac4fea 100644 --- a/app/src/components/manage/plugins-list-page.tsx +++ b/app/src/components/manage/plugins-list-page.tsx @@ -1,3 +1,6 @@ +import { useQuery } from "@tanstack/react-query"; +import { Link } from "@tanstack/react-router"; +import * as React from "react"; import { IconApps, IconBrandGoogleDrive, @@ -6,9 +9,6 @@ import { IconCircleCheck, IconPlug, } from "@/components/icons"; -import { useQuery } from "@tanstack/react-query"; -import { Link } from "@tanstack/react-router"; -import * as React from "react"; import { PageAddButton, PageEmpty, diff --git a/app/src/components/manage/skill-page.tsx b/app/src/components/manage/skill-page.tsx index 74fd309e67..0b97c49cc9 100644 --- a/app/src/components/manage/skill-page.tsx +++ b/app/src/components/manage/skill-page.tsx @@ -1,13 +1,12 @@ +import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { Link, linkOptions, useNavigate } from "@tanstack/react-router"; +import { useState } from "react"; import { IconBolt, IconChevronRight, IconFileOff, IconPencil, - IconTrash, } from "@/components/icons"; -import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { Link, linkOptions, useNavigate } from "@tanstack/react-router"; -import { useState } from "react"; import { PageEmpty, PageRows, @@ -32,7 +31,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -246,7 +244,7 @@ export function SkillPage({ description={ <> Bots with their switch on offer {skill.title} when someone types{" "} - /. It takes effect at once. + /. } title="Bots" @@ -332,9 +330,6 @@ export function SkillPage({ } size="sm" > - - - Delete diff --git a/app/src/components/manage/workspace-snapshots-section.tsx b/app/src/components/manage/workspace-snapshots-section.tsx index 071aa3511b..872bb6d363 100644 --- a/app/src/components/manage/workspace-snapshots-section.tsx +++ b/app/src/components/manage/workspace-snapshots-section.tsx @@ -1,12 +1,11 @@ +import { useMutation, useQuery } from "@tanstack/react-query"; +import { Fragment, useEffect, useRef, useState } from "react"; import { IconAlertTriangle, - IconCalendarTime, IconCircleCheck, IconHistory, IconLoader2, } from "@/components/icons"; -import { useMutation, useQuery } from "@tanstack/react-query"; -import { Fragment, useEffect, useRef, useState } from "react"; import { PageEmpty, PageRows, @@ -28,7 +27,6 @@ import { ItemContent, ItemDescription, ItemGroup, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -42,9 +40,9 @@ import { type ComputerSnapshots, workspaceSnapshotsQueryOptions, } from "@/lib/computers/queries"; +import { FailureNotice, failureSaid } from "@/lib/load-failure"; import { cn } from "@/lib/utils"; import { queryClient } from "@/query-client"; -import { FailureNotice, failureSaid } from "@/lib/load-failure"; /** * A computer's saved copies, on a Bot's Computer page, and restoring one. @@ -204,13 +202,6 @@ function SnapshotsBody({ const row = (snapshot: ComputerSnapshot) => ( - - {snapshot.kind === "before-restore" ? ( - - ) : ( - - )} - {copyLabel(snapshot)} diff --git a/app/src/components/memory/memories.tsx b/app/src/components/memory/memories.tsx index 90086a0342..121ceca4a6 100644 --- a/app/src/components/memory/memories.tsx +++ b/app/src/components/memory/memories.tsx @@ -1,7 +1,7 @@ -import { IconBrain, IconPlus, IconRobot, IconUser } from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; import { Fragment, type ReactNode, useId, useState } from "react"; +import { IconBrain, IconPlus } from "@/components/icons"; import { PageAddButton, PageEmpty, @@ -25,13 +25,13 @@ import { ItemContent, ItemDescription, ItemFooter, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; import { agentListQueryOptions } from "@/lib/agents/queries"; +import { failureSaid } from "@/lib/load-failure"; import { createMemoryMutationOptions, deleteMemoryMutationOptions, @@ -42,7 +42,6 @@ import { updateMemoryMutationOptions, } from "@/lib/memory"; import { queryClient } from "@/query-client"; -import { failureSaid } from "@/lib/load-failure"; /** * A fact the person tells their Bots directly. It reaches every one of them. @@ -258,9 +257,6 @@ function MemoryRow({ : memory.provenance; return ( - - {memory.formedBy === "bot" ? : } - {memory.content} diff --git a/app/src/components/memory/sources.tsx b/app/src/components/memory/sources.tsx index 1b5b1b42d6..a890164756 100644 --- a/app/src/components/memory/sources.tsx +++ b/app/src/components/memory/sources.tsx @@ -1,6 +1,6 @@ -import { IconPlugConnected, IconPlus } from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { Fragment, useId, useState } from "react"; +import { IconPlugConnected, IconPlus } from "@/components/icons"; import { PageEmpty, PageRows, @@ -29,7 +29,6 @@ import { ItemContent, ItemDescription, ItemFooter, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { @@ -150,9 +149,6 @@ export function MemorySources({ agentId: fixedBot }: { agentId?: string }) { {index > 0 ? : null} - - - {source.title} diff --git a/app/src/components/moves/moved-apps-notice.tsx b/app/src/components/moves/moved-apps-notice.tsx index 0c6e626944..7aaffb2bbc 100644 --- a/app/src/components/moves/moved-apps-notice.tsx +++ b/app/src/components/moves/moved-apps-notice.tsx @@ -1,7 +1,5 @@ -import { IconPlugConnected } from "@/components/icons"; import { Link, useLocation } from "@tanstack/react-router"; import { PageRows } from "@/components/layout/page-shell"; -import { RowMark } from "@/components/layout/row-mark"; import { Button } from "@/components/ui/button"; import { Item, @@ -24,9 +22,6 @@ export function MovedAppsNotice() { return ( - - - {stillToReconnect(remaining.length)} diff --git a/app/src/components/notifications/notifications-offer-row.tsx b/app/src/components/notifications/notifications-offer-row.tsx index 2481dce5f8..444ff132c0 100644 --- a/app/src/components/notifications/notifications-offer-row.tsx +++ b/app/src/components/notifications/notifications-offer-row.tsx @@ -1,11 +1,9 @@ -import { IconBell } from "@/components/icons"; import { Button } from "@/components/ui/button"; import { Item, ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -37,9 +35,6 @@ export function NotificationsOfferRow() { <> - - - Browser notifications {/* Whole on a phone too: clamped, the sentence lost what it was for. */} diff --git a/app/src/components/organizations/invitations-page.tsx b/app/src/components/organizations/invitations-page.tsx index 3e80693b7c..7de8c67aec 100644 --- a/app/src/components/organizations/invitations-page.tsx +++ b/app/src/components/organizations/invitations-page.tsx @@ -1,6 +1,6 @@ -import { IconBuilding, IconMail, IconMailOff } from "@/components/icons"; import { useMutation, useQuery } from "@tanstack/react-query"; import { Fragment, useState } from "react"; +import { IconMail, IconMailOff } from "@/components/icons"; import { PageEmpty, PageRows, PageShell } from "@/components/layout/page-shell"; import { Button } from "@/components/ui/button"; import { @@ -8,7 +8,6 @@ import { ItemActions, ItemContent, ItemDescription, - ItemMedia, ItemTitle, } from "@/components/ui/item"; import { Separator } from "@/components/ui/separator"; @@ -73,9 +72,6 @@ export function InvitationRow({ return ( <> - - - {name} diff --git a/app/src/components/organizations/organization-settings-page.tsx b/app/src/components/organizations/organization-settings-page.tsx index 33c983a4e4..5f47e28cd9 100644 --- a/app/src/components/organizations/organization-settings-page.tsx +++ b/app/src/components/organizations/organization-settings-page.tsx @@ -1,13 +1,11 @@ +import { useInfiniteQuery, useMutation, useQuery } from "@tanstack/react-query"; +import { useNavigate } from "@tanstack/react-router"; +import { Fragment, useEffect, useId, useState } from "react"; import { - IconBuilding, IconChevronDown, IconChevronRight, - IconCreditCard, IconSearch, } from "@/components/icons"; -import { useInfiniteQuery, useMutation, useQuery } from "@tanstack/react-query"; -import { useNavigate } from "@tanstack/react-router"; -import { Fragment, useEffect, useId, useState } from "react"; import { PageEmpty, PageRows, @@ -152,15 +150,9 @@ function NameRow({ organization: OrganizationSummary; }) { const [open, setOpen] = useState(false); - const media = ( - - - - ); if (!canManage) { return ( - {media} Name @@ -178,7 +170,6 @@ function NameRow({ render={