Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

UI polish round 4: aligned Inbox header, calmer scrims, one name for conversations

aivsomkar2e467a19e92f
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.ts
index 9cc878da6a..9b8fec3712 100644
--- a/src/components/BotSettingsDialog.simple.test.ts
+++ b/src/components/BotSettingsDialog.simple.test.ts
@@ -621,7 +621,7 @@ describe("the Details tab", () => {
it("says what routines are while the bot has none, with Add a routine, and lists them once it has some", () => {
const empty = botTab(makeBot());
expect(empty.html).toContain('data-panel-empty="routines"');
- expect(empty.html).toContain(">Jobs this bot runs on a schedule, like a news roundup every morning.<");
+ expect(empty.html).toContain(">Jobs this bot runs on a schedule, like a news roundup every morning. Every bot&#x27;s routines are also in Automations.<");
expect(empty.html.match(/data-panel-page="routines"/g)).toHaveLength(1);
const add = find(empty, "data-panel-page", "routines");
expect(empty.html).toMatch(/data-panel-page="routines"[^>]*>.*<span class="truncate">Add a routine<\/span><\/button>/);
diff --git a/src/components/CommandPalette.tsx b/src/components/CommandPalette.tsx
index db1160dd8c..76f510bccf 100644
--- a/src/components/CommandPalette.tsx
+++ b/src/components/CommandPalette.tsx
@@ -151,7 +151,7 @@ export function CommandPalette({ onOpenChange }: { onOpenChange?: (open: boolean
return (
<div
- className="fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-6 pt-[14vh]"
+ className="fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-6 pt-[14vh] [:root[data-skin=daylight]_&]:bg-black/[0.18]"
onMouseDown={(e) => e.target === e.currentTarget && setOpen(false)}
onKeyDown={onKeyDown}
>
diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx
index a850fee716..84a2256f99 100644
--- a/src/components/SettingsModal.tsx
+++ b/src/components/SettingsModal.tsx
@@ -571,7 +571,7 @@ export function SettingsModal() {
ref={scrollRef}
data-settings-scroll
className={cn(
- "flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-4 pb-8 pt-4 [mask-image:linear-gradient(to_bottom,#000_calc(100%-28px),transparent)] sm:px-8 sm:pb-7 sm:pt-[22px]",
+ "flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto px-4 pb-8 pt-4 [mask-image:linear-gradient(to_bottom,#000_calc(100%-28px),transparent)] sm:px-8 sm:pb-7 sm:pt-[22px]",
SIMPLE_BUTTONS,
"[&_.uppercase]:normal-case [&_.uppercase]:tracking-normal",
)}
diff --git a/src/components/SettingsPrimitives.tsx b/src/components/SettingsPrimitives.tsx
index da1f3ad42c..43f7f080c9 100644
--- a/src/components/SettingsPrimitives.tsx
+++ b/src/components/SettingsPrimitives.tsx
@@ -102,7 +102,7 @@ export function SettingsGroup({ label, block, actions, footnote, children }: {
>
{(label || actions) && (
<div className="flex min-h-4 items-center justify-between gap-3 pl-4 pr-1">
- {label && <h3 id={labelId} className="text-[12px] leading-4 font-normal text-ink-secondary">{label}</h3>}
+ {label && <h3 id={labelId} className="text-[13px] leading-4 font-semibold text-ink-secondary">{label}</h3>}
{actions}
</div>
)}
diff --git a/src/components/SetupOffer.tsx b/src/components/SetupOffer.tsx
index eef54bf142..da6d84b15a 100644
--- a/src/components/SetupOffer.tsx
+++ b/src/components/SetupOffer.tsx
@@ -129,7 +129,7 @@ export function SetupOffer({ botId, threadId, message, transcript }: { botId: st
{options.map((option, index) => (
<button key={option.label} type="button" data-ask-choice="" disabled={quiet || busy} onClick={option.pick}
className={cn("group flex min-h-10 items-center gap-3 rounded-lg px-3 py-2 text-start",
- quiet ? "cursor-default" : "bg-ink/[0.03] hover:bg-ink/[0.07] disabled:cursor-default")}>
+ quiet ? "cursor-default" : "bg-ink/[0.05] hover:bg-ink/[0.09] disabled:cursor-default")}>
<kbd className={cn("flex size-6 shrink-0 items-center justify-center rounded-md font-sans text-[12px] font-medium",
quiet ? "bg-ink/[0.04] text-ink-tertiary" : "bg-ink/[0.07] text-ink-secondary group-hover:bg-ink/[0.1]")}>
{LETTERS[index]}
diff --git a/src/components/SidebarThreadRow.test.ts b/src/components/SidebarThreadRow.test.ts
index 5060550d10..64dfc75290 100644
--- a/src/components/SidebarThreadRow.test.ts
+++ b/src/components/SidebarThreadRow.test.ts
@@ -322,7 +322,7 @@ describe("thread title direction", () => {
it("renders the title with dir=auto and leaves the time a fixed column", () => {
const arabic = "انسخ محتوى الذكاء الاصطناعي وصمم منشورات";
const arabicClass = titleSpan(row(arabic), arabic);
- const englishClass = titleSpan(row("New thread"), "New thread");
+ const englishClass = titleSpan(row("New thread"), "New conversation");
const withByline = titleSpan(row("QA PR 245", { botId: "scout", name: "Scout", at: 1 }), "QA PR 245");
for (const classes of [arabicClass, englishClass, withByline]) {
expect(classes).toContain("min-w-0");
diff --git a/src/components/SidebarThreadRow.tsx b/src/components/SidebarThreadRow.tsx
index 2bdffc0c30..a88998c30d 100644
--- a/src/components/SidebarThreadRow.tsx
+++ b/src/components/SidebarThreadRow.tsx
@@ -330,7 +330,10 @@ export const SidebarThreadRow = memo(function SidebarThreadRow({ task, ownerId,
</span>}
{panel ? <span className="flex min-w-0 flex-1 flex-col gap-0.5">
{heading}
- {preview && <span dir="auto" className="truncate text-[13px] font-normal text-ink-secondary">{preview}</span>}
+ {(preview || updatedLabel) && <span className="flex min-w-0 items-baseline gap-2 text-[13px] font-normal text-ink-secondary">
+ <span dir="auto" className="min-w-0 flex-1 truncate">{preview}</span>
+ {updatedLabel && <time dateTime={new Date(updatedAt).toISOString()} className="shrink-0 text-[12px] tabular-nums text-ink-tertiary">{updatedLabel}</time>}
+ </span>}
{isWorking(task) && <span data-thread-working="" className="flex items-center gap-1 text-[12px] font-normal text-success">
{t("chat.activity.working")}{task.turnStartedAt ? <><span aria-hidden="true">·</span><WorkingTimer since={task.turnStartedAt} /></> : null}
</span>}
@@ -339,7 +342,7 @@ export const SidebarThreadRow = memo(function SidebarThreadRow({ task, ownerId,
{task.link && <a href={task.link} target="_blank" rel="noreferrer" dir="ltr" title={task.link} aria-label={t("task.openLink", { link: threadLinkLabel(task.link) ?? task.link })}
className={cn("shrink-0 rounded px-1 font-mono text-[11px] text-ink-secondary hover:bg-raised hover:text-ink outline-none focus-visible:ring-1 focus-visible:ring-accent/60 [unicode-bidi:isolate]", panel && "mt-2.5")}>{threadLinkLabel(task.link) ?? t("task.link")}</a>}
{!renaming && <span className={cn("flex shrink-0 items-center gap-2 px-1", panel && "pt-2.5")} onClick={choose} onContextMenu={contextMenu}>
- {updatedLabel && <time dateTime={new Date(updatedAt).toISOString()} className="shrink-0 tabular-nums text-[10px] text-ink-secondary">{updatedLabel}</time>}
+ {updatedLabel && !panel && <time dateTime={new Date(updatedAt).toISOString()} className="shrink-0 tabular-nums text-[10px] text-ink-secondary">{updatedLabel}</time>}
{task.pinned === true && <Pin size={11} className="shrink-0 text-ink-secondary" aria-label={t("sidebar.bot.pin")} />}
{task.activity === "waiting-on-you" ? <span className="shrink-0 text-[10px] font-medium text-warning">{t("task.waiting")}</span> : isWaitingOnTeammate(task) ? <Clock3 size={11} className="shrink-0 text-ink-secondary" aria-label={t("task.waitingOnTeammate")} /> : isWorking(task) && !panel ? <Loader2 size={11} className="shrink-0 animate-spin text-success" aria-label={activityLabel ?? t("chat.activity.working")} /> : task.queued ? <span className="shrink-0 text-[10px] text-ink-secondary">{t("task.queued")}</span> : null}
{task.unread && <span className="size-1.5 shrink-0 rounded-full bg-accent" aria-label={t("task.unread")} />}
diff --git a/src/components/SimpleModelMenu.tsx b/src/components/SimpleModelMenu.tsx
index 7d5aefae6f..3a58e35184 100644
--- a/src/components/SimpleModelMenu.tsx
+++ b/src/components/SimpleModelMenu.tsx
@@ -160,7 +160,7 @@ function Thinking({ thinking, labelId }: { thinking: SimpleThinking; labelId: st
const levels = thinking;
const auto = levels.current === undefined;
const pill = (pressed: boolean) => cn(
- "h-6 min-w-0 truncate rounded-full px-1 text-[12px] leading-4 transition-colors touch:h-8",
+ "h-7 min-w-0 truncate rounded-full px-1.5 text-[12px] leading-4 transition-colors touch:h-8",
pressed ? "bg-ink/[0.1] font-medium text-ink" : "text-ink-secondary hover:text-ink",
);
return (
@@ -189,9 +189,9 @@ function Thinking({ thinking, labelId }: { thinking: SimpleThinking; labelId: st
</button>
))}
</div>
- {auto && (
- <p data-simple-effort-auto className="px-2 pb-1 text-[12px] leading-4 text-ink-tertiary">{t("model.simple.thinkingDefault")}</p>
- )}
+ <p data-simple-effort-auto={auto || undefined} className="px-2 pb-1 text-[12px] leading-4 text-ink-tertiary">
+ {auto ? t("model.simple.thinkingDefault") : t("model.simple.thinkingLevel", { level: effortLabel(levels.current!) })}
+ </p>
</div>
);
}
diff --git a/src/components/bot-panel/rows.tsx b/src/components/bot-panel/rows.tsx
index d4b023d963..158cc1ccb0 100644
--- a/src/components/bot-panel/rows.tsx
+++ b/src/components/bot-panel/rows.tsx
@@ -23,7 +23,7 @@ export const chipCls = (on: boolean) =>
export function CardLabel({ children, action }: { children: ReactNode; action?: ReactNode }) {
return (
- <div className="mx-1 mb-2 mt-5 flex min-h-5 items-center justify-between gap-3 text-[13px] text-ink-secondary">
+ <div className="mx-1 mb-2 mt-5 flex min-h-5 items-center justify-between gap-3 text-[13px] font-semibold text-ink-secondary">
<span className="min-w-0 truncate">{children}</span>
{action}
</div>
diff --git a/src/components/inbox/InboxPanel.tsx b/src/components/inbox/InboxPanel.tsx
index 64c3d564d1..49e97ff29a 100644
--- a/src/components/inbox/InboxPanel.tsx
+++ b/src/components/inbox/InboxPanel.tsx
@@ -12,8 +12,8 @@ import { InboxRowItem } from "./InboxRow";
import { matchesSearch, nextAfter } from "./inbox-answer";
import { listedRows, waitingCount } from "./inbox-view";
import { useInboxActions } from "./use-inbox-actions";
+import { roundButtonCls } from "../bot-panel/rows";
-const BAR_BUTTON = "flex size-7 shrink-0 items-center justify-center rounded-md text-ink-secondary hover:bg-raised hover:text-ink pointer-coarse:size-9";
export function InboxPanel() {
const view = useInboxView();
@@ -59,20 +59,20 @@ export function InboxPanel() {
const count = waitingCount(view);
const body = (
<>
- <div className="flex items-center gap-1 px-3 pb-1 pt-2">
- <div data-inbox-tab-chip className="flex h-8 min-w-0 flex-1 items-center gap-2 ps-1 text-[14px]">
+ <div className="flex h-[50px] shrink-0 items-start gap-2.5 px-[13px] pt-[13px]">
+ <div data-inbox-tab-chip className="flex h-[34px] min-w-0 flex-1 items-center gap-2 ps-1 text-[14px]">
<Inbox size={16} aria-hidden="true" className="shrink-0 text-ink-secondary" />
<span className="min-w-0 truncate font-medium text-ink">{t("inbox.panel.title")}</span>
{count > 0 && <span data-inbox-tab-count className="shrink-0 tabular-nums text-ink-tertiary">{count}</span>}
</div>
{!phone && (
<button type="button" onClick={() => widenInbox(!panel.wide)} aria-pressed={Boolean(panel.wide)} aria-label={t(panel.wide ? "inbox.action.narrow" : "inbox.action.widen")}
- title={t(panel.wide ? "inbox.action.narrow" : "inbox.action.widen")} className={BAR_BUTTON}>
- {panel.wide ? <Minimize2 size={14} aria-hidden="true" /> : <Maximize2 size={14} aria-hidden="true" />}
+ title={t(panel.wide ? "inbox.action.narrow" : "inbox.action.widen")} className={roundButtonCls}>
+ {panel.wide ? <Minimize2 size={15} aria-hidden="true" /> : <Maximize2 size={15} aria-hidden="true" />}
</button>
)}
- <button type="button" onClick={closeInbox} aria-label={t("inbox.action.closePanel")} title={t("inbox.action.closePanel")} className={BAR_BUTTON}>
- <X size={15} aria-hidden="true" />
+ <button type="button" onClick={closeInbox} aria-label={t("inbox.action.closePanel")} title={t("inbox.action.closePanel")} className={roundButtonCls}>
+ <X size={16} aria-hidden="true" />
</button>
</div>
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
diff --git a/src/lib/task-title.ts b/src/lib/task-title.ts
index 68abb98051..0ab365164f 100644
--- a/src/lib/task-title.ts
+++ b/src/lib/task-title.ts
@@ -4,5 +4,5 @@ import { t } from "./i18n";
/** Localize the factory title while preserving titles chosen by the user. */
export function localizedTaskTitle(title: string): string {
if (title === SHARED_CHAT_TITLE) return t("task.sharedChat");
- return title === "New thread" ? t("task.newShort") : title;
+ return title === "New thread" ? t("task.untitledConversation") : title;
}
diff --git a/src/locales/en.json b/src/locales/en.json
index 7b4ce5b5a3..496213d2fd 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -4255,7 +4255,7 @@
"botPanel.tab.details": "Details",
"botPanel.tab.library": "Library",
"botPanel.routines.empty": "Routines are recurring tasks this bot runs on a schedule. Ask it in chat to set one up.",
- "botPanel.routines.emptyHint": "Jobs this bot runs on a schedule, like a news roundup every morning.",
+ "botPanel.routines.emptyHint": "Jobs this bot runs on a schedule, like a news roundup every morning. Every bot's routines are also in Automations.",
"botPanel.routines.add": "Add a routine",
"botPanel.library.empty": "Pages, files, and apps this bot makes show up here",
"botPanel.library.pages": "Pages",
diff --git a/src/styles.css b/src/styles.css
index 76d97a41bb..615fd1a24f 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -1150,6 +1150,7 @@
background: color-mix(in srgb, var(--color-card), var(--color-ink) 4%);
}
[data-reply-bubble] [data-table-card] {
+ width: 100%;
border-radius: 12px;
}
/* A card under its own bot's bubble (and a bubble under its card) sits 12px below it, not the 16px between senders. */
@@ -1562,10 +1563,14 @@ body {
border-color: var(--settings-edge);
}
:root[data-skin="midnight"] [data-settings-look] > .glass-scrim {
- background: rgb(0 0 0 / 0.7);
+ background: rgb(0 0 0 / 0.55);
}
:root[data-skin="daylight"] [data-settings-look] > .glass-scrim {
- background: rgb(0 0 0 / 0.5);
+ background: rgb(0 0 0 / 0.18);
+}
+/* Over a light scrim the sheet needs its own lift. */
+:root[data-skin="daylight"] [data-settings-look] .glass-surface {
+ box-shadow: 0 24px 64px -16px rgb(28 28 28 / 0.28), 0 2px 8px rgb(28 28 28 / 0.06);
}
@media (min-width: 768px) {
.glass-popup-frame[data-settings-sheet][data-settings-look="simple"] {