Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM node:24-alpine
RUN apk add --no-cache bash git curl python3 make g++ pkgconf sqlite sqlite-dev
RUN apk add --no-cache bash git curl python3 make g++ pkgconf postgresql-client
WORKDIR /workspaces/${localWorkspaceFolderBasename}
24 changes: 17 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
{
"name": "Taskflow",
"build": {
"dockerfile": "Dockerfile"
},
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"postCreateCommand": "npm ci",
"postStartCommand": "npm run db:setup",
"postAttachCommand": "npm run dev",
"forwardPorts": [3000],
"forwardPorts": [
3000,
5432
],
"portsAttributes": {
"3000": {
"label": "App",
"label": "Next.js App",
"onAutoForward": "openPreview"
},
"5432": {
"label": "PostgreSQL",
"onAutoForward": "silent"
}
},
"containerEnv": {
"NODE_ENV": "development"
"NODE_ENV": "development",
"DATABASE_URL": "postgresql://taskflow:taskflow@db:5432/taskflow"
},
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"Prisma.prisma"
]
}
}
Expand Down
34 changes: 34 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3.8'
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspaces/${localWorkspaceFolderBasename}:cached
command: sleep infinity
environment:
DATABASE_URL: postgresql://taskflow:taskflow@db:5432/taskflow
depends_on:
db:
condition: service_healthy

db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: taskflow
POSTGRES_PASSWORD: taskflow
POSTGRES_DB: taskflow
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U taskflow" ]
interval: 5s
timeout: 5s
retries: 5

volumes:
postgres_data:
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# THIS FILE WILL NOT BE IGNORED BY GIT, USE FOR DEMO PURPOSES ONLY
# You can store environment variables here for local development
# IMPORTANT: DO NOT STORE SENSITIVE INFORMATION IN THIS FILE!!

# Database Configuration
DATABASE_URL="postgresql://taskflow:taskflow@localhost:5432/taskflow"
Comment on lines +1 to +6
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .env file should not be committed to version control as it can contain sensitive information. While the comment at the top indicates this is for demo purposes only, the .gitignore changes show .env* files are now being tracked (lines 33-35 are commented out). This is a security risk. Even for demo purposes, use .env.example for sample configurations and keep .env in .gitignore.

Suggested change
# THIS FILE WILL NOT BE IGNORED BY GIT, USE FOR DEMO PURPOSES ONLY
# You can store environment variables here for local development
# IMPORTANT: DO NOT STORE SENSITIVE INFORMATION IN THIS FILE!!
# Database Configuration
DATABASE_URL="postgresql://taskflow:taskflow@localhost:5432/taskflow"
# .env.example
# Copy this file to .env and fill in your actual secrets for local development.
# IMPORTANT: DO NOT COMMIT YOUR REAL .env FILE TO VERSION CONTROL!
# Database Configuration
DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/DATABASE"

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See `package.json` for the available project scripts and dependencies.
23 changes: 23 additions & 0 deletions .github/prompts/debug-with-logs.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
You are a senior developer helping to debug issues in a codebase. A user has reported a bug and you need to help them identify and fix the issue by examining the bug report outlined in `BUG_REPORT.md`.


Follow these steps to debug the issue:
1. **Understand the Bug Report**: Carefully read the bug report to understand the issue, including the steps to reproduce, current behavior, expected behavior, and environment details.
2. **Identify Relevant Code Areas**: Based on the bug report, identify which parts of the codebase are likely involved in the issue (e.g., task editing logic, database update functions, UI components).
3. **Check the database**: Access the PostgreSQL MCP server to inspect the current state of the database. Ensure that all data is correct and consistent with expectations.
4. **Add logging**: Add logs to both the front end and back end code paths involved. In every log, include which file you're in as well as the function and any other relevant information. This will help trace the flow of data and identify where the update is failing.
5. **Run the tests**: Run the unit and E2E tests to see if the bug can be reproduced in the test environment. Note any failures or unexpected behaviors.
- Unit tests can be run with `npm run test`
- E2E tests can be run with `npm run test:e2e:debug` (use :debug here to see logs from both front end and back end).
- E2E tests can be filtered using the `-g` option to focus on tests related to the bug report. For example, if the bug report is about editing a task via a modal form, you can run:
```
npm run test:e2e:debug -- -g "edit task via modal form"
```
6. **(OPTIONAL) Write a new test**: If no existing test covers the bug scenario, write a new unit or E2E test that reproduces the bug based on the steps provided in the bug report. This will help ensure that the bug is captured and can be verified as fixed later. Run the new test to confirm it fails as expected.
7. **Fix the Bug**: Investigate the logs and code to identify the root cause of the issue. Implement a fix to ensure that the task assignee updates correctly and persists after a page refresh.
8. **Verify the Fix**: Re-run the unit and E2E tests to confirm that the bug has been resolved and that no other functionality is broken.
9. **Clean Up**: Remove any logging added during the debugging process to keep the codebase clean.

---

**IMPORTANT**: Whenever you run the e2e tests use the `npm run test:e2e:debug` command to get detailed logs from both the front end and back end.
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
# # env files (can opt-in for committing if needed)
# .env*
# !.env.example

# vercel
.vercel
Expand All @@ -44,4 +45,6 @@ next-env.d.ts


# database
/prisma/app.db
/prisma/app.db
/prisma/*.db
/prisma/*.db-journal
12 changes: 12 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"servers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://taskflow:taskflow@localhost:5432/taskflow"
]
}
}
}
48 changes: 48 additions & 0 deletions BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Bug Report: Missing Tasks on Kanban Board

## 📝 Description

Tasks are disappearing from the Kanban board view. Users report that when they navigate to `/board`, they only see a fraction of their tasks, even though the complete list is visible on the `/tasks` page.

## 🔴 Severity

**High** - This significantly impacts user experience and makes the board view nearly unusable.

## 📍 Location

- **Page:** `/board` (Kanban Board)
- **Component:** `components/kanban-board.tsx`
- **Related:** `app/(dashboard)/board/page.tsx`

## 🪜 Steps to Reproduce

1. Navigate to the Tasks page at `/tasks`
2. Note the total number of tasks displayed (should be 30)
3. Navigate to the Board page at `/board`
4. Observe that only a small subset of tasks appear on the board
5. Count the tasks on each column - the total is much less than expected

## ✅ Expected Behavior

All 30 tasks should be distributed across the four Kanban columns:
- **To Do** - Tasks with status "todo"
- **In Progress** - Tasks with status "in_progress"
- **Review** - Tasks with status "review"
- **Done** - Tasks with status "done"

The total count across all columns should match the total tasks in the database.

## ❌ Actual Behavior

Only approximately 7 tasks appear on the Kanban board, while 23 tasks are missing. The task counts on the board columns are significantly lower than expected.

## 🔍 Initial Observations

1. The tasks DO exist in the database (visible on `/tasks` page)
2. The issue seems to be with how tasks are being filtered or queried for the board
3. No errors are shown in the console or logs
4. The issue is consistent across all users

## IMPORTANT Considerations

- Any modifications to data in the database must use the PostgreSQL MCP server.
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence is incomplete and ends abruptly. Complete the sentence to provide clear guidance on using the PostgreSQL MCP server.

Suggested change
- Any modifications to data in the database must use the PostgreSQL MCP server.
- Any modifications to data in the database must use the PostgreSQL MCP server. Please use the official MCP management interface or the provided SQL scripts as documented in [MCP Server Guide](https://company-internal-docs/mcp-server-guide) to ensure data consistency and audit compliance.

Copilot uses AI. Check for mistakes.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci

# Install SQLite
RUN apk add --no-cache sqlite sqlite-dev && \
npm install better-sqlite3

COPY . .

# Setup the Database
RUN npm run db:setup
# Generate Prisma Client
RUN npx prisma generate

RUN npm run build

ENV NODE_ENV=production
EXPOSE 3000

CMD ["npm", "run", "start"]
# Run migrations and start the app
CMD ["sh", "-c", "npx prisma migrate deploy && npm run start"]
Loading