diff --git a/.c8rc.json b/.c8rc.json index 1f371e0..f0583ad 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -4,7 +4,8 @@ "scripts/cli-args.mjs", "scripts/build-diff-data.mjs", "scripts/generate-summaries.mjs", - "scripts/present.mjs" + "scripts/present.mjs", + "scripts/serve-built.mjs" ], "reporter": [ "text", diff --git a/.github/workflows/product-gate.yml b/.github/workflows/product-gate.yml index 981e774..b6fbd74 100644 --- a/.github/workflows/product-gate.yml +++ b/.github/workflows/product-gate.yml @@ -17,12 +17,14 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v6 + - name: Enable the pinned pnpm version + run: corepack enable - name: Set up Node uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} - - name: Enable the pinned pnpm version - run: corepack enable + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install lockfile dependencies run: pnpm install --frozen-lockfile - name: Run product gate diff --git a/.github/workflows/test-lanes.yml b/.github/workflows/test-lanes.yml index 7f98bd2..f7f2127 100644 --- a/.github/workflows/test-lanes.yml +++ b/.github/workflows/test-lanes.yml @@ -20,14 +20,18 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v6 + - name: Enable the pinned pnpm version + run: corepack enable - name: Set up Node uses: actions/setup-node@v6 with: node-version: 22.13.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: corepack pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile - name: Run fast unit tests - run: corepack pnpm run test:unit + run: pnpm run test:unit integration: if: github.event_name != 'schedule' @@ -35,14 +39,18 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v6 + - name: Enable the pinned pnpm version + run: corepack enable - name: Set up Node uses: actions/setup-node@v6 with: node-version: 22.13.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: corepack pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile - name: Run Git and server tests - run: corepack pnpm run test:integration + run: pnpm run test:integration coverage: if: github.event_name != 'schedule' @@ -50,14 +58,18 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v6 + - name: Enable the pinned pnpm version + run: corepack enable - name: Set up Node uses: actions/setup-node@v6 with: node-version: 22.13.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: corepack pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile - name: Check core coverage - run: corepack pnpm run test:coverage + run: pnpm run test:coverage - name: Upload coverage report if: always() uses: actions/upload-artifact@v6 @@ -72,16 +84,20 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v6 + - name: Enable the pinned pnpm version + run: corepack enable - name: Set up Node uses: actions/setup-node@v6 with: node-version: 22.13.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: corepack pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile - name: Install browser system packages run: npx playwright install --with-deps chromium - name: Run the browser journey - run: corepack pnpm run test:browser + run: pnpm run test:browser platform: if: github.event_name != 'pull_request' @@ -95,11 +111,15 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v6 + - name: Enable the pinned pnpm version + run: corepack enable - name: Set up Node uses: actions/setup-node@v6 with: node-version: 22.13.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: corepack pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile - name: Check host shell assumptions - run: corepack pnpm run test:platform + run: pnpm run test:platform diff --git a/PRODUCT.md b/PRODUCT.md index c5bf66b..b4bd336 100644 --- a/PRODUCT.md +++ b/PRODUCT.md @@ -28,7 +28,10 @@ Developers run `npx diffsplain` in a Git checkout. With no arguments, it compare - Compare the current checkout with its default branch when no target is passed. - Accept local paths, Git URLs, and GitHub `owner/name` repo names. - Report local dependency paths, versions, and readiness with `diffsplain doctor`. -- Try Codex, Claude, Copilot, Cursor, then OpenCode when no agent is chosen. +- Try Codex, Claude, Copilot, then OpenCode when no agent is chosen. Cursor + detection does not mean support: Diffsplain detects it only so it can report + that Cursor is unsupported. It has no supported read-only, no-network, + no-tool mode, so it cannot generate notes. - Show tracked and untracked worktree changes, exact local ranges, and remote branches as secondary targets. - Present full or shortened unified diffs, including binary-file metadata. - Pair the whole change and each file with agent-written summaries, reasons, details, and risks. diff --git a/app/page.tsx b/app/page.tsx index 4d917f1..e824e6e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -480,8 +480,11 @@ export default function Home() { const visibleFiles = useMemo(() => { const cleanQuery = query.trim().toLowerCase(); - if (!cleanQuery) return files; - return files.filter((file) => file.path.toLowerCase().includes(cleanQuery)); + return files.flatMap((file, index) => + !cleanQuery || file.path.toLowerCase().includes(cleanQuery) + ? [{ file, index }] + : [], + ); }, [files, query]); if (!snapshot) { @@ -918,8 +921,7 @@ export default function Home() { className="picker-list" id="file-picker-list" > - {visibleFiles.map((file) => { - const index = files.findIndex((item) => item.path === file.path); + {visibleFiles.map(({ file, index }) => { const active = file.path === currentFile.path; return (