AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
A filtering framework for data-heavy products. Filters people can see, find and undo, in one row above your data. Distributed as a shadcn/ui registry item, so you install the source and make it yours.檢視完整 README ↗A filtering framework for data-heavy products. Filters people can see, find and undo, in one row above your data. Distributed as a shadcn/ui registry item, so you install the source and make it yours.
Plus the details: humanised date presets ("1 week ago") in one click, selected options that never jump under the cursor, an Apply step for heavy tables (or instant mode for light ones), filters in the URL, full keyboard support, and every size and colour as a CSS variable.
Live site and demo: filter-components-nu.vercel.app
The thinking behind it is in the article Crafting a modular filtering framework for data-heavy applications.
Requirements: React 19, Tailwind CSS v4, and shadcn/ui set up with a Radix-based style (for example npx shadcn@latest init --base radix). Base UI styles aren't supported yet.
npx shadcn@latest add https://filter-components-nu.vercel.app/r/filter-bar.json
This adds components/filter-bar/, the shadcn components it uses (button, calendar, command, dialog, input, popover, separator, tooltip), date-fns, lucide-react, and the --fb-* CSS variables. Chip tooltips need shadcn's <TooltipProvider> above the bar, usually in app/layout.tsx.
For client-side filtering with TanStack Table v8, add the adapter:
npx shadcn@latest add https://filter-components-nu.vercel.app/r/filter-bar-tanstack.json
"use client";
import { useState } from "react";
import { FilterBar } from "@/components/filter-bar/filter-bar";
import type { FilterDefinition, SortState } from "@/components/filter-bar/types";
import { useFilterUrlState } from "@/components/filter-bar/url-state";
import { useFilters } from "@/components/filter-bar/use-filters";
const definitions: FilterDefinition[] = [
{ id: "createdAt", label: "Created Date", type: "dateRange", tier: "quick" },
{
id: "status",
label: "Status",
type: "multiSelect",
tier: "quick",
options: [
{ value: "open", label: "Open" },
{ value: "closed", label: "Closed" },
],
},
{ id: "batchId", label: "Batch ID", type: "text", tier: "more" },
];
export function Documents() {
const url = useFilterUrlState(definitions); // optional: keep filters in the URL
const filters = useFilters({ definitions, ...url });
const [sort, setSort] = useState<SortState>();
// filters.applied is what to filter by: send it to your API, or use the TanStack adapter.
return <FilterBar filters={filters} sort={sort} onSortChange={setSort} />;
}
With TanStack Table, give each column the same id as its filter and the matching filter function:
import {
dateRangeFn, multiSelectFn, textFn, toColumnFilters,
} from "@/components/filter-bar-tanstack/adapter";
const columns = [
{ id: "status", accessorKey: "status", filterFn: multiSelectFn },
{ id: "createdAt", accessorKey: "createdAt", filterFn: dateRangeFn },
{ id: "batchId", accessorKey: "batchId", filterFn: textFn },
];
const columnFilters = useMemo(() => toColumnFilters(filters.applied, definitions), [filters.applied]);
const table = useReactTable({ data, columns, state: { columnFilters }, /* … */ });
The full API (filter definitions, useFilters, URL sync, the adapter, keyboard behaviour) is in the docs.
Everything is a CSS variable, installed with the component. The customiser writes overrides for you.
:root {
--fb-density: 1; /* 0.875 compact · 1 · 1.125 comfortable */
--fb-chip-radius: var(--radius-sm);
--fb-chip-border-style: dashed; /* unset chips */
--fb-accent: var(--primary); /* values, Apply, checkmarks, focus borders */
}
This repo is the registry and its docs site (Next.js App Router, TypeScript, Tailwind v4, shadcn/ui).
pnpm install
pnpm dev # docs site and demos on http://localhost:5000
pnpm test # unit and component tests (Vitest + Testing Library)
pnpm test:e2e # end-to-end and accessibility tests (Playwright + axe)
pnpm typecheck
pnpm lint
pnpm registry:build # builds the registry JSON into public/r
The component source is in registry/filter-bar/ and registry/filter-bar-tanstack/. Behaviour is specified in SPEC.md; every rule marked [T] there has a test.
Designed by Nahid Noushathu, from the pattern described in Crafting a modular filtering framework for data-heavy applications.