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.