mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
feat(skills): drop description column from skills list
Description is agent-facing routing metadata, not a scannable list property — Linear's display options expose no description column for the same reason. Removes the cell, column key, display toggle, lg grid track, skeleton cells, and the now-dead table.description / table.no_description locale keys. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,6 @@ export const EMPTY_SKILL_FILTERS: SkillListFilters = {
|
||||
// User-hideable columns. Name and the structural columns (checkbox, kebab)
|
||||
// are always visible.
|
||||
export type SkillColumnKey =
|
||||
| "description"
|
||||
| "usedBy"
|
||||
| "source"
|
||||
| "creator"
|
||||
|
||||
@@ -36,13 +36,11 @@
|
||||
},
|
||||
"table": {
|
||||
"name": "Name",
|
||||
"description": "Description",
|
||||
"created_by": "Added by",
|
||||
"used_by": "Used by",
|
||||
"source": "Source",
|
||||
"updated": "Updated",
|
||||
"created": "Created",
|
||||
"no_description": "No description",
|
||||
"lock_tooltip": "Read-only — only creator or admin can edit",
|
||||
"unused": "— unused",
|
||||
"by_creator": "by {{name}}",
|
||||
|
||||
@@ -36,13 +36,11 @@
|
||||
},
|
||||
"table": {
|
||||
"name": "名前",
|
||||
"description": "説明",
|
||||
"created_by": "追加者",
|
||||
"used_by": "使用中",
|
||||
"source": "ソース",
|
||||
"updated": "更新日",
|
||||
"created": "作成日",
|
||||
"no_description": "説明なし",
|
||||
"lock_tooltip": "読み取り専用 — 作成者または管理者のみが編集できます",
|
||||
"unused": "— 未使用",
|
||||
"by_creator": "{{name}}",
|
||||
|
||||
@@ -36,13 +36,11 @@
|
||||
},
|
||||
"table": {
|
||||
"name": "이름",
|
||||
"description": "설명",
|
||||
"created_by": "추가한 사람",
|
||||
"used_by": "사용 중",
|
||||
"source": "출처",
|
||||
"updated": "수정일",
|
||||
"created": "생성일",
|
||||
"no_description": "설명 없음",
|
||||
"lock_tooltip": "읽기 전용 — 생성자 또는 관리자만 수정할 수 있습니다",
|
||||
"unused": "— 미사용",
|
||||
"by_creator": "{{name}}님",
|
||||
|
||||
@@ -48,13 +48,11 @@
|
||||
},
|
||||
"table": {
|
||||
"name": "名称",
|
||||
"description": "描述",
|
||||
"created_by": "添加者",
|
||||
"used_by": "被谁使用",
|
||||
"source": "来源",
|
||||
"updated": "更新时间",
|
||||
"created": "创建时间",
|
||||
"no_description": "无描述",
|
||||
"lock_tooltip": "只读——只有创建者或管理员能编辑",
|
||||
"unused": "— 未使用",
|
||||
"by_creator": "由 {{name}} 创建",
|
||||
|
||||
@@ -52,7 +52,6 @@ import type { SkillRow } from "./skills-page";
|
||||
export type OriginType = SkillOriginType;
|
||||
|
||||
const COLUMN_KEYS: SkillColumnKey[] = [
|
||||
"description",
|
||||
"usedBy",
|
||||
"source",
|
||||
"creator",
|
||||
@@ -154,7 +153,6 @@ export function SkillListToolbar({
|
||||
};
|
||||
|
||||
const COLUMN_LABELS: Record<SkillColumnKey, string> = {
|
||||
description: t(($) => $.table.description),
|
||||
usedBy: t(($) => $.table.used_by),
|
||||
source: t(($) => $.table.source),
|
||||
creator: t(($) => $.table.created_by),
|
||||
|
||||
@@ -68,24 +68,24 @@ import { useT, useTimeAgo } from "../../i18n";
|
||||
|
||||
// Column template — single source of truth for header, rows, and skeletons.
|
||||
// Tracks: [edge 0.75rem] [checkbox 1rem] [name, only fr track]
|
||||
// [description ≤20rem, lg+] [usedBy max-content] [source max-content with
|
||||
// floor, lg+] [creator max-content, lg+] [updated 5rem, sm+] [kebab 1.75rem]
|
||||
// [usedBy max-content] [source max-content with floor, lg+]
|
||||
// [creator max-content, lg+] [updated 5rem, sm+] [kebab 1.75rem]
|
||||
// [edge 0.75rem]. Content cells carry a default px-2 from list-grid.tsx
|
||||
// (structural columns opt out with px-0), so the narrow edge tracks plus
|
||||
// cell padding land content 20px from the viewport edge. Hidden cells carry
|
||||
// the matching `hidden sm:flex` / `hidden lg:flex` classes.
|
||||
// Hideable columns use max-content tracks (content caps live on the cell
|
||||
// content, e.g. the description's max-w) so a user-hidden column — rendered
|
||||
// content, e.g. the source's max-w) so a user-hidden column — rendered
|
||||
// as an empty placeholder cell to keep subgrid auto-placement intact —
|
||||
// collapses to zero width instead of leaving a fixed-width hole.
|
||||
// Columns never get squashed below their content: the grid carries
|
||||
// `min-w-fit` and the page wrapper scrolls horizontally when every column
|
||||
// is enabled on a narrow viewport. Per-column caps live on cell content
|
||||
// (description max-w-[20rem], source max-w-[12rem], names max-w-[7rem]).
|
||||
// (source max-w-[12rem], names max-w-[7rem]).
|
||||
const GRID_COLS =
|
||||
"grid-cols-[0.75rem_1rem_minmax(140px,1fr)_max-content_1.75rem_0.75rem] " +
|
||||
"sm:grid-cols-[0.75rem_1rem_minmax(140px,1fr)_max-content_max-content_max-content_1.75rem_0.75rem] " +
|
||||
"lg:grid-cols-[0.75rem_1rem_minmax(200px,1fr)_max-content_max-content_max-content_max-content_max-content_max-content_1.75rem_0.75rem]";
|
||||
"lg:grid-cols-[0.75rem_1rem_minmax(200px,1fr)_max-content_max-content_max-content_max-content_max-content_1.75rem_0.75rem]";
|
||||
|
||||
// Sort/filter/column types and defaults live in the core view store
|
||||
// (@multica/core/skills/stores/view-store) so the persisted state and the
|
||||
@@ -207,20 +207,6 @@ function NameCell({ row }: { row: SkillRow }) {
|
||||
);
|
||||
}
|
||||
|
||||
function DescriptionCell({ description }: { description: string }) {
|
||||
return (
|
||||
<ListGridCell className="hidden lg:flex">
|
||||
{description ? (
|
||||
<span className="min-w-0 max-w-[20rem] truncate text-xs text-muted-foreground">
|
||||
{description}
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-xs text-muted-foreground/40">—</span>
|
||||
)}
|
||||
</ListGridCell>
|
||||
);
|
||||
}
|
||||
|
||||
function UsedByCell({ agents }: { agents: Agent[] }) {
|
||||
const { t } = useT("skills");
|
||||
if (agents.length === 0) {
|
||||
@@ -417,13 +403,6 @@ function SkillListHeader({
|
||||
<ListGridHeaderCell sorted={sorted("name")} onSort={() => onSort("name")}>
|
||||
{t(($) => $.table.name)}
|
||||
</ListGridHeaderCell>
|
||||
{isColVisible("description") ? (
|
||||
<ListGridHeaderCell className="hidden lg:flex">
|
||||
{t(($) => $.table.description)}
|
||||
</ListGridHeaderCell>
|
||||
) : (
|
||||
<ListGridHeaderCell className="hidden px-0 lg:flex" />
|
||||
)}
|
||||
{isColVisible("usedBy") ? (
|
||||
<ListGridHeaderCell
|
||||
sorted={sorted("usedBy")}
|
||||
@@ -483,9 +462,6 @@ function LoadingSkeleton() {
|
||||
<ListGridHeaderCell>
|
||||
<Skeleton className="h-3 w-12" />
|
||||
</ListGridHeaderCell>
|
||||
<ListGridHeaderCell className="hidden lg:flex">
|
||||
<Skeleton className="h-3 w-12" />
|
||||
</ListGridHeaderCell>
|
||||
<ListGridHeaderCell>
|
||||
<Skeleton className="h-3 w-14" />
|
||||
</ListGridHeaderCell>
|
||||
@@ -508,9 +484,6 @@ function LoadingSkeleton() {
|
||||
<ListGridCell>
|
||||
<Skeleton className="h-3.5 w-40 max-w-full" />
|
||||
</ListGridCell>
|
||||
<ListGridCell className="hidden lg:flex">
|
||||
<Skeleton className="h-3 w-56 max-w-full" />
|
||||
</ListGridCell>
|
||||
<ListGridCell>
|
||||
<Skeleton className="h-5 w-14" />
|
||||
</ListGridCell>
|
||||
@@ -813,11 +786,6 @@ export default function SkillsPage() {
|
||||
onToggle={() => toggleSelected(row.skill.id)}
|
||||
/>
|
||||
<NameCell row={row} />
|
||||
{isColVisible("description") ? (
|
||||
<DescriptionCell description={row.skill.description} />
|
||||
) : (
|
||||
<ListGridCell className="hidden px-0 lg:flex" />
|
||||
)}
|
||||
{isColVisible("usedBy") ? (
|
||||
<UsedByCell agents={row.agents} />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user