Louis Knight-Webb 010b03aafd Include workspace diff files in file typeahead results (Vibe Kanban) (#2083)
* The implementation is complete. Here's a summary of the changes made to `file-tag-typeahead-plugin.tsx`:

1. **Added import** for `useWorkspaceContext` from `@/contexts/WorkspaceContext`

2. **Created helper function** `getMatchingDiffFiles()` that:
   - Takes a query and the `diffPaths` Set
   - Filters paths that match the query (checking both filename and full path)
   - Returns properly typed `DiffFileResult` objects with all required fields (`is_file`, `match_type`, `score`)
   - Uses a high score value to ensure diff files rank above server results

3. **Modified `onQueryChange`** to:
   - Extract `diffPaths` from WorkspaceContext
   - Get matching local files from diffPaths first
   - Fetch server results via `searchTagsAndFiles()`
   - Deduplicate server file results by filtering out any paths already in local files
   - Merge results with order: tags → local diff files → server files

The changes ensure that:
- Files from the current workspace diffs appear in typeahead results
- Diff files are ranked higher than server-sourced files
- No duplicate entries appear when a file exists in both sources

* Done. The fix involved two changes:

1. **`WorkspaceContext.tsx`** (line 78-81): Exported the `WorkspaceContext` so it can be used directly with `useContext`

2. **`file-tag-typeahead-plugin.tsx`**:
   - Changed import from `useWorkspaceContext` to `WorkspaceContext`
   - Added `useContext` to React imports
   - Changed usage from `const { diffPaths } = useWorkspaceContext()` to:
     ```typescript
     const workspaceContext = useContext(WorkspaceContext);
     const diffPaths = workspaceContext?.diffPaths ?? new Set<string>();
     ```

Now when the WYSIWYG is used in the old UI (without a `WorkspaceProvider`), `workspaceContext` will be `null`, and `diffPaths` will default to an empty Set, meaning only server results will be shown. In the new UI with `WorkspaceProvider`, diff files will be included as expected.

* Done. The changes:

1. Added `MAX_FILE_RESULTS = 10` constant
2. Updated the result merging logic to:
   - Limit local diff files to max 10
   - Fill remaining slots with server files
   - This ensures diffPaths files always appear first (prioritized)

File results are now capped at 10 total, preventing the menu from scrolling off the page.

* Cleanup script changes for workspace bda801c1-f48c-4ae8-948b-f0db6269d807

* Lint passes now. The fix was to wrap the `diffPaths` fallback in `useMemo` to ensure a stable reference when the context is not available.
2026-01-15 23:11:02 +00:00
2025-08-08 13:53:27 +01:00
2026-01-15 10:58:39 +00:00
2025-11-14 15:37:56 +00:00
2025-12-16 10:55:27 +00:00
2025-11-14 15:37:56 +00:00
2025-07-11 15:57:30 +01:00
2025-12-15 19:42:13 +00:00
2025-07-11 16:31:08 +01:00
2026-01-15 10:58:39 +00:00
2025-06-25 09:27:29 +01:00

Vibe Kanban Logo

Get 10X more out of Claude Code, Gemini CLI, Codex, Amp and other coding agents...

npm Build status Ask DeepWiki

We're hiring!

Overview

AI coding agents are increasingly writing the world's code and human engineers now spend the majority of their time planning, reviewing, and orchestrating tasks. Vibe Kanban streamlines this process, enabling you to:

  • Easily switch between different coding agents
  • Orchestrate the execution of multiple coding agents in parallel or in sequence
  • Quickly review work and start dev servers
  • Track the status of tasks that your coding agents are working on
  • Centralise configuration of coding agent MCP configs
  • Open projects remotely via SSH when running Vibe Kanban on a remote server

You can watch a video overview here.

Installation

Make sure you have authenticated with your favourite coding agent. A full list of supported coding agents can be found in the docs. Then in your terminal run:

npx vibe-kanban

Documentation

Please head to the website for the latest documentation and user guides.

Support

We use GitHub Discussions for feature requests. Please open a discussion to create a feature request. For bugs please open an issue on this repo.

Contributing

We would prefer that ideas and changes are first raised with the core team via GitHub Discussions or Discord, where we can discuss implementation details and alignment with the existing roadmap. Please do not open PRs without first discussing your proposal with the team.

Development

Prerequisites

Additional development tools:

cargo install cargo-watch
cargo install sqlx-cli

Install dependencies:

pnpm i

Running the dev server

pnpm run dev

This will start the backend. A blank DB will be copied from the dev_assets_seed folder.

Building the frontend

To build just the frontend:

cd frontend
pnpm build

Build from source (macOS)

  1. Run ./local-build.sh
  2. Test with cd npx-cli && node bin/cli.js

Environment Variables

The following environment variables can be configured at build time or runtime:

Variable Type Default Description
POSTHOG_API_KEY Build-time Empty PostHog analytics API key (disables analytics if empty)
POSTHOG_API_ENDPOINT Build-time Empty PostHog analytics endpoint (disables analytics if empty)
PORT Runtime Auto-assign Production: Server port. Dev: Frontend port (backend uses PORT+1)
BACKEND_PORT Runtime 0 (auto-assign) Backend server port (dev mode only, overrides PORT+1)
FRONTEND_PORT Runtime 3000 Frontend dev server port (dev mode only, overrides PORT)
HOST Runtime 127.0.0.1 Backend server host
MCP_HOST Runtime Value of HOST MCP server connection host (use 127.0.0.1 when HOST=0.0.0.0 on Windows)
MCP_PORT Runtime Value of BACKEND_PORT MCP server connection port
DISABLE_WORKTREE_ORPHAN_CLEANUP Runtime Not set Disable git worktree cleanup (for debugging)

Build-time variables must be set when running pnpm run build. Runtime variables are read when the application starts.

Remote Deployment

When running Vibe Kanban on a remote server (e.g., via systemctl, Docker, or cloud hosting), you can configure your editor to open projects via SSH:

  1. Access via tunnel: Use Cloudflare Tunnel, ngrok, or similar to expose the web UI
  2. Configure remote SSH in Settings → Editor Integration:
    • Set Remote SSH Host to your server hostname or IP
    • Set Remote SSH User to your SSH username (optional)
  3. Prerequisites:
    • SSH access from your local machine to the remote server
    • SSH keys configured (passwordless authentication)
    • VSCode Remote-SSH extension

When configured, the "Open in VSCode" buttons will generate URLs like vscode://vscode-remote/ssh-remote+user@host/path that open your local editor and connect to the remote server.

See the documentation for detailed setup instructions.

Description
Get 10X more out of Claude Code, Codex or any coding agent
https://www.vibekanban.com/
Readme Apache-2.0 48 MiB
Languages
Rust 51.1%
TypeScript 46.6%
CSS 1.1%
JavaScript 0.7%
PLpgSQL 0.2%
Other 0.2%