-
Notifications
You must be signed in to change notification settings - Fork 0
Add Copilot instructions for repository #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,339 @@ | ||||||
| # Obsidian Kanban Bases View Plugin - Copilot Instructions | ||||||
|
|
||||||
| ## Repository Overview | ||||||
|
|
||||||
| This is an **Obsidian plugin** that provides a **kanban board view** for Obsidian Bases (database functionality). The plugin integrates with Obsidian's Bases API to display data in a drag-and-drop kanban board layout with configurable grouping, virtual scrolling, and persistent column ordering. | ||||||
|
|
||||||
| **Key Technologies:** | ||||||
| - TypeScript (strict mode enabled) | ||||||
| - React 19.2.0 with JSX | ||||||
| - Vite for building | ||||||
| - Vitest for testing | ||||||
| - @dnd-kit for drag-and-drop | ||||||
| - @tanstack/react-virtual for virtual scrolling | ||||||
|
|
||||||
| ## Build, Test, and Lint Commands | ||||||
|
|
||||||
| ### Package Manager | ||||||
| **CRITICAL: Always use `pnpm` for package management, not npm.** The project uses pnpm workspaces and npm will timeout. | ||||||
|
|
||||||
| ### Installation | ||||||
| ```bash | ||||||
| pnpm install --frozen-lockfile | ||||||
| ``` | ||||||
|
|
||||||
| ### Development | ||||||
| ```bash | ||||||
| # Using mise (preferred for local development) | ||||||
| mise run dev | ||||||
|
|
||||||
| # Manual build with watch mode | ||||||
| pnpm vite build --watch | ||||||
| ``` | ||||||
|
|
||||||
| ### Building | ||||||
| ```bash | ||||||
| # Production build | ||||||
| pnpm vite build --mode production | ||||||
|
|
||||||
| # Development build | ||||||
| pnpm vite build | ||||||
| ``` | ||||||
|
|
||||||
| ### Type Checking | ||||||
| ```bash | ||||||
| tsc -noEmit | ||||||
| ``` | ||||||
|
|
||||||
| ### Testing | ||||||
| ```bash | ||||||
| # Run all tests | ||||||
| vitest run | ||||||
|
|
||||||
| # Run tests in watch mode | ||||||
| vitest watch | ||||||
|
|
||||||
| # Run tests with coverage | ||||||
| vitest run --coverage | ||||||
|
|
||||||
| # Run specific test file | ||||||
| vitest run src/__tests__/KanbanBoard.test.tsx | ||||||
| ``` | ||||||
|
|
||||||
| ### Linting | ||||||
| ```bash | ||||||
| # Check for linting errors | ||||||
| eslint src --ext .ts,.tsx | ||||||
|
|
||||||
| # Auto-fix linting errors (if possible) | ||||||
| eslint src --ext .ts,.tsx --fix | ||||||
| ``` | ||||||
|
|
||||||
| ### Full Check Suite | ||||||
| ```bash | ||||||
| # Run all checks (typecheck, lint, test) | ||||||
| mise run check | ||||||
| ``` | ||||||
|
|
||||||
| Note: The `mise run check` command requires `VAULT_PATH` environment variable to be set to a valid Obsidian vault directory. | ||||||
|
|
||||||
| ## Project Structure | ||||||
|
|
||||||
| ``` | ||||||
| obsidian-bases-kanban-view/ | ||||||
| ├── .github/ # GitHub workflows and configurations | ||||||
| │ ├── workflows/ # CI/CD workflows (PR checks, releases) | ||||||
| │ └── copilot-instructions.md # This file | ||||||
| ├── .mise/ # Mise task definitions | ||||||
| │ └── tasks/ # Build automation scripts | ||||||
| ├── src/ | ||||||
| │ ├── main.ts # Plugin entry point, registers with Obsidian Bases API | ||||||
| │ ├── views/ | ||||||
| │ │ └── KanbanBasesView.ts # Core kanban board (523 lines) - drag-drop, grouping, virtual scrolling | ||||||
| │ ├── components/ # React components for kanban board UI | ||||||
| │ ├── utils/ | ||||||
| │ │ └── VirtualScroller.ts # Virtual scrolling implementation (99 lines) | ||||||
|
||||||
| │ │ └── VirtualScroller.ts # Virtual scrolling implementation (99 lines) | |
| │ │ └── KanbanStateController.ts # State management, data transformation, grouping, card movement (237 lines) |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple inaccuracies: 1) File is KanbanBasesView.tsx not .ts. 2) Data flow goes through KanbanStateController, not direct grouping by groupByPropertyId. 3) Virtual scrolling is not implemented in the codebase. 4) The file delegates state management to KanbanStateController rather than handling it directly.
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section describes a feature that doesn't exist. The file VirtualScroller.ts is not present in the repository, and @tanstack/react-virtual is not used anywhere in the codebase. The actual implementation in Column.tsx renders all cards without virtual scrolling.
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect file reference: the file is KanbanBasesView.tsx (not .ts), and the relevant logging examples are on lines 68 and 72-82, not 75-79.
| - Log meaningful state during operations (see `src/views/KanbanBasesView.ts` lines 75-79 as reference) | |
| - Log meaningful state during operations (see `src/views/KanbanBasesView.tsx` lines 68 and 72-82 as reference) |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method name is incorrect. The actual implementation is moveCard() in KanbanStateController.ts (lines 144-189), and it does persist property updates via frontmatter. The drag-drop functionality is implemented, not stubbed.
| - Property updates from drag-drop not persisted (see `updateEntryProperty()` stub in `KanbanBasesView.ts`) | |
| - Property updates from drag-drop are persisted via `moveCard()` in `KanbanStateController.ts` |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The virtual scrolling claim is inaccurate—there is no virtual scrolling implementation in the codebase. The @tanstack/react-virtual package is listed in dependencies but not actually used in any components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file extension is incorrect. The actual file is
KanbanBasesView.tsx(not.ts), and it's 145 lines, not 523 lines. Additionally, the file doesn't implement virtual scrolling directly—it delegates state management to KanbanStateController.