Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

feat(web): agent settings — import under the list, dashed empty blocks (#390)

Yaowei Zheng6d7a1f558308
diff --git a/changelog/unreleased/2026-08-21-agent-settings-empty-block.md b/changelog/unreleased/2026-08-21-agent-settings-empty-block.md
new file mode 100644
index 00000000..e765ef23
--- /dev/null
+++ b/changelog/unreleased/2026-08-21-agent-settings-empty-block.md
@@ -0,0 +1,28 @@
+# Agent settings: a dashed empty block, and skills import above the list
+
+- **Date:** 2026-08-21
+- **Type:** refactor
+- **Scope:** `web`
+- **PR:** [#390](https://github.com/Prism-Shadow/penguin-harness/pull/390)
+
+[中文版](2026-08-21-agent-settings-empty-block.zh.md)
+
+Two layout changes on the Agent settings tabs. The "Import skill" button moved out of the
+Skills tab header down to the head of the installed list, right-aligned in its own row above
+it. And the four sections that can come up empty — Skills, Vault, Schedules and the Tools tab's
+MCP Server list — traded their bare line of placeholder text for one shared block: rounded,
+dashed-bordered, the message centered on both axes.
+
+## Details
+
+- The import action kept its modal untouched — the recommended chat install, the zip upload,
+ the overwrite confirmation and the error toasts all behave as before. Only its position
+ changed, and it stays disabled until the installed list has loaded. The row renders in all
+ three list states — loading, empty and populated — so the button never shifts and the empty
+ block keeps a header above it. With the button gone from the tab header, the tab's
+ description fold spans the full width of the panel, matching the other tabs.
+- Added `SettingsEmpty` beside `EmptyState` in `src/components/ui/empty-state.tsx` and pointed
+ all four sections at it, so they cannot drift apart. The block is 6rem tall at minimum, which
+ is what gives the message something to be vertically centered in; it keeps the gray level the
+ placeholder text already used and borrows the corner radius of the table or list it stands in
+ for.
diff --git a/changelog/unreleased/2026-08-21-agent-settings-empty-block.zh.md b/changelog/unreleased/2026-08-21-agent-settings-empty-block.zh.md
new file mode 100644
index 00000000..0493d468
--- /dev/null
+++ b/changelog/unreleased/2026-08-21-agent-settings-empty-block.zh.md
@@ -0,0 +1,22 @@
+# Agent 设置:虚线框空状态,导入技能移到列表上方
+
+- **Date:** 2026-08-21
+- **Type:** refactor
+- **Scope:** `web`
+- **PR:** [#390](https://github.com/Prism-Shadow/penguin-harness/pull/390)
+
+[English](2026-08-21-agent-settings-empty-block.md)
+
+Agent 设置标签页的两处布局调整。「导入技能」按钮从技能标签页的页首下移到已安装列表的头部,单独占
+一行并右对齐。另外,四处可能为空的区块——技能、保险柜、定时任务,以及工具标签页的 MCP Server 列表
+——不再以一行裸文字提示,改为共用同一个 block:圆角、虚线边框,文字水平垂直均居中。
+
+## 细节
+
+- 导入动作的弹窗未作改动——推荐的对话安装、zip 上传、覆盖确认与错误 toast 行为照旧,变的只是位置,
+ 且仍在已安装列表加载完成前保持禁用。该行在列表的三种状态下都渲染——加载中、为空、有内容——按钮
+ 不会移位,空状态 block 上方也始终有一行头部。页首去掉按钮后,该标签页的说明折叠行占满面板宽度,
+ 与其他标签页一致。
+- 在 `src/components/ui/empty-state.tsx` 中于 `EmptyState` 旁新增 `SettingsEmpty`,四处区块统一
+ 指向它,不会各自漂移。block 最小高度 6rem,垂直居中才有落点;文字沿用原有的灰度层级,圆角取自它
+ 所替代的表格或列表。
diff --git a/packages/web/src/components/ui/empty-state.tsx b/packages/web/src/components/ui/empty-state.tsx
index fe53c658..6d347ae8 100644
--- a/packages/web/src/components/ui/empty-state.tsx
+++ b/packages/web/src/components/ui/empty-state.tsx
@@ -1,5 +1,7 @@
/**
- * Empty state component: a placeholder message for when a list/detail view has no data (plain text, no graphic decoration).
+ * Empty state components: a placeholder message for when a list/detail view has no data
+ * (plain text, no graphic decoration) — `EmptyState` for a page, `SettingsEmpty` for the
+ * slot a settings tab's table or list would occupy.
*/
import type { ReactNode } from "react";
@@ -20,3 +22,18 @@ export function EmptyState({
</div>
);
}
+
+/**
+ * Settings-area empty state: the message centered on both axes inside a dashed, rounded
+ * block that stands where the populated list or table would. Dashed rather than solid so an
+ * empty slot never reads as a rendered-but-blank container, and `min-h` gives the text
+ * something to be vertically centered in. Every settings tab that can come up empty
+ * (Skills, Vault, Schedules, MCP servers) uses this, so they stay identical.
+ */
+export function SettingsEmpty({ children }: { children: ReactNode }) {
+ return (
+ <div className="flex min-h-24 items-center justify-center rounded-md border border-dashed border-gray-300 px-4 text-center text-xs text-gray-400 dark:border-gray-700 dark:text-gray-500">
+ {children}
+ </div>
+ );
+}
diff --git a/packages/web/src/features/agents/mcp-servers-section.tsx b/packages/web/src/features/agents/mcp-servers-section.tsx
index b989da15..0fa740d6 100644
--- a/packages/web/src/features/agents/mcp-servers-section.tsx
+++ b/packages/web/src/features/agents/mcp-servers-section.tsx
@@ -27,6 +27,7 @@ import { Button } from "../../components/ui/button";
import { Input, Textarea } from "../../components/ui/input";
import { Modal } from "../../components/ui/modal";
import { ConfirmModal } from "../../components/ui/confirm-modal";
+import { SettingsEmpty } from "../../components/ui/empty-state";
import { OptionMenu, type OptionMenuChoice } from "../../components/ui/option-menu";
import { Segmented } from "../../components/ui/segmented";
import { toastError, toastSuccess } from "../../components/ui/toast";
@@ -300,7 +301,7 @@ export function McpServersSection({
</p>
{servers.length === 0 ? (
- <p className="py-2 text-xs text-gray-400 dark:text-gray-500">{S.agent.mcpEmpty}</p>
+ <SettingsEmpty>{S.agent.mcpEmpty}</SettingsEmpty>
) : (
<div className="overflow-x-auto overflow-y-clip rounded-md border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
<table className="w-full min-w-[520px] text-left text-sm">
diff --git a/packages/web/src/features/agents/schedules-tab.tsx b/packages/web/src/features/agents/schedules-tab.tsx
index cf9bdf99..73a849c2 100644
--- a/packages/web/src/features/agents/schedules-tab.tsx
+++ b/packages/web/src/features/agents/schedules-tab.tsx
@@ -39,6 +39,7 @@ import { Input, Textarea } from "../../components/ui/input";
import { Select } from "../../components/ui/select";
import { Modal } from "../../components/ui/modal";
import { ConfirmModal } from "../../components/ui/confirm-modal";
+import { SettingsEmpty } from "../../components/ui/empty-state";
import { SkeletonList } from "../../components/ui/skeleton";
import { FormPicker } from "../../components/ui/form-picker";
import { FieldError, FieldLabel } from "../../components/ui/field";
@@ -445,8 +446,7 @@ export function SchedulesTab({
{data === null ? (
<SkeletonList rows={4} />
) : schedules.length === 0 ? (
- // Plain-text empty state (settings area doesn't use the penguin-icon EmptyState, keeps the same gray level as the table area).
- <p className="py-2 text-xs text-gray-400 dark:text-gray-500">{S.schedule.empty}</p>
+ <SettingsEmpty>{S.schedule.empty}</SettingsEmpty>
) : (
<div className="overflow-x-auto overflow-y-clip rounded-md border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
<table className="w-full min-w-[720px] text-left text-sm">
diff --git a/packages/web/src/features/agents/skills-tab.tsx b/packages/web/src/features/agents/skills-tab.tsx
index 00638871..ad798b2d 100644
--- a/packages/web/src/features/agents/skills-tab.tsx
+++ b/packages/web/src/features/agents/skills-tab.tsx
@@ -36,6 +36,7 @@ import { Modal } from "../../components/ui/modal";
import { ConfirmModal } from "../../components/ui/confirm-modal";
import { DownloadIcon } from "../../components/ui/icons";
import { HiddenFileInput } from "../../components/ui/hidden-file-input";
+import { SettingsEmpty } from "../../components/ui/empty-state";
import { SkeletonList } from "../../components/ui/skeleton";
import { toastError, toastSuccess } from "../../components/ui/toast";
import { SkillIcon, skillTileColor } from "../skills/skill-icon-view";
@@ -288,30 +289,26 @@ export function SkillsTab({
return (
<div className="space-y-4">
- {/* The import button is not a title, so the description cannot anchor a "?" to it either. */}
- <div className="flex items-start justify-between gap-3">
- <HelpFold label={S.agent.tabSkills} className="min-w-0 flex-1">
- {S.skills.agentTabDesc}
- </HelpFold>
- <Button
- size="sm"
- variant="primary"
- className="shrink-0"
- disabled={skills === null}
- onClick={openImport}
- >
- {S.skills.importSkill}
- </Button>
- </div>
+ {/* Tab-level description: no title in the panel to anchor a "?" to (see help-fold.tsx). */}
+ <HelpFold label={S.agent.tabSkills}>{S.skills.agentTabDesc}</HelpFold>
{toggleCard}
{alertStrip}
+ {/* Import entry point at the head of the installed list, right-aligned — the admin users
+ page puts its create action in the same slot above its table. It renders in every list
+ state (loading, empty, populated) so the action never shifts and the dashed empty block
+ keeps a header instead of standing alone; the modal carries both install paths. */}
+ <div className="flex justify-end">
+ <Button size="sm" variant="primary" disabled={skills === null} onClick={openImport}>
+ {S.skills.importSkill}
+ </Button>
+ </div>
+
{skills === null ? (
<SkeletonList rows={4} />
) : skills.length === 0 ? (
- // Plain-text empty state (settings area doesn't use the penguin-icon EmptyState, keeps the same gray level as the table area).
- <p className="py-2 text-xs text-gray-400 dark:text-gray-500">{S.skills.agentTabEmpty}</p>
+ <SettingsEmpty>{S.skills.agentTabEmpty}</SettingsEmpty>
) : (
<div className="overflow-hidden rounded-md border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
{skills.map((skill) => (
diff --git a/packages/web/src/features/agents/vault-tab.tsx b/packages/web/src/features/agents/vault-tab.tsx
index 9e5c7d74..d5d4eeb7 100644
--- a/packages/web/src/features/agents/vault-tab.tsx
+++ b/packages/web/src/features/agents/vault-tab.tsx
@@ -24,6 +24,7 @@ import { Input } from "../../components/ui/input";
import { PasswordInput } from "../../components/ui/password-input";
import { Modal } from "../../components/ui/modal";
import { ConfirmModal } from "../../components/ui/confirm-modal";
+import { SettingsEmpty } from "../../components/ui/empty-state";
import { SkeletonList } from "../../components/ui/skeleton";
import { toastError, toastSuccess } from "../../components/ui/toast";
import { usePromptInjection } from "./prompt-injection-controls";
@@ -173,8 +174,7 @@ export function VaultTab({
{entries === null ? (
<SkeletonList rows={4} />
) : entries.length === 0 ? (
- // Plain-text empty state (settings area doesn't use the penguin-icon EmptyState, keeps the same gray level as the table area).
- <p className="py-2 text-xs text-gray-400 dark:text-gray-500">{S.vault.empty}</p>
+ <SettingsEmpty>{S.vault.empty}</SettingsEmpty>
) : (
<div className="overflow-x-auto overflow-y-clip rounded-md border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
<table className="w-full min-w-[420px] text-left text-sm">