Skip to content
Merged
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: 0 additions & 2 deletions web/src/app/api/context/qa/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export async function POST(request: NextRequest) {
);
}

const lastMessage = messages[messages.length - 1];

// Fetch recent context
const recentActivities: Activity[] = await prisma.activity.findMany({
orderBy: { timestamp: "desc" },
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/insights/code-quality/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { withRateLimit } from "@/lib/rateLimit";

const prisma = new PrismaClient();

export const GET = withRateLimit(async (request: Request) => {
export const GET = withRateLimit(async () => {
try {
// In a real implementation, this would analyze static analysis reports or complex git churn metrics.
// For now, we simulate detection based on "high churn" files that might indicate instability.
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/insights/trends/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { NextResponse } from "next/server";
import { PrismaClient } from "@prisma/client";
import { withRateLimit } from "@/lib/rateLimit";
import { startOfDay, subDays, format } from "date-fns";
import { subDays, format } from "date-fns";

const prisma = new PrismaClient();

Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/integrations/jira/issues/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const generateMockIssues = (count: number): JiraIssue[] => {
}));
};

export const GET = withRateLimit(async (request: Request) => {
export const GET = withRateLimit(async () => {
try {
// In a real implementation:
// 1. Fetch JIRA_BASE_URL and JIRA_API_TOKEN from env/DB
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/integrations/knowledge/pages/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const generateMockPages = (count: number): KnowledgePage[] => {
})).sort((a, b) => new Date(b.lastEdited).getTime() - new Date(a.lastEdited).getTime());
};

export const GET = withRateLimit(async (request: Request) => {
export const GET = withRateLimit(async () => {
try {
// Check configuration
const notionConfigured = !!process.env.NOTION_API_KEY;
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/integrations/linear/issues/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const generateMockIssues = (count: number): LinearIssue[] => {
}).sort((a, b) => new Date(b.updated).getTime() - new Date(a.updated).getTime());
};

export const GET = withRateLimit(async (request: Request) => {
export const GET = withRateLimit(async () => {
try {
const isConfigured = !!process.env.LINEAR_API_KEY;
const issues = generateMockIssues(6);
Expand Down
4 changes: 1 addition & 3 deletions web/src/app/api/team/communication/notifications/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

import { NextResponse } from "next/server";
import { prisma } from "@/lib/prisma";
import { subDays } from "date-fns";
import { withRateLimit } from "@/lib/rateLimit";

// Mock data generator for demo purposes since we don't have real Slack/Discord tokens configured yet
Expand All @@ -22,7 +20,7 @@ const generateMockNotifications = (count: number) => {
})).sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
};

export const GET = withRateLimit(async (request: Request) => {
export const GET = withRateLimit(async () => {
try {
// In a real implementation, this would query:
// 1. Internal notification table
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/team/contributions/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const GET = withRateLimit(async (request: Request) => {
try {
const meta = (typeof a.metadata === 'string' ? JSON.parse(a.metadata) : a.metadata) as ActivityMetadata;
file = meta?.file || meta?.filePath;
} catch (e) {
} catch {
// ignore parse error
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/team/knowledge-heatmap/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const GET = withRateLimit(async (request: Request) => {
try {
const meta = typeof a.metadata === 'string' ? JSON.parse(a.metadata) : a.metadata;
file = meta?.file || meta?.filePath;
} catch (e) {
} catch {
// ignore
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/app/api/team/productivity/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextResponse } from "next/server";
import { prisma } from "@/lib/prisma";
import { subDays, startOfDay, format, differenceInMinutes } from "date-fns";
import { subDays, format, differenceInMinutes } from "date-fns";
import { withRateLimit } from "@/lib/rateLimit";

export const GET = withRateLimit(async (request: Request) => {
Expand Down
6 changes: 1 addition & 5 deletions web/src/components/ActivityTrendsPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { TrendingUp, Activity } from "lucide-react";
import { TrendingUp } from "lucide-react";
import useSWR from "swr";
import { format, parseISO } from "date-fns";

Expand Down Expand Up @@ -50,10 +50,6 @@ export function ActivityTrendsPanel() {
const trends: TrendPoint[] = data?.trends || [];
const maxCount = Math.max(...trends.map((t) => t.count), 1);

// SVG Chart Dimensions
const height = 160;
const width = 100; // percent

// Calculate points for SVG polyline
const points = trends
.map((point, index) => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/IntegrationsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use client";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Link2, Github, Gitlab, Slack, Trello, CheckCircle2, XCircle, AlertCircle, Plug } from "lucide-react";
import { Link2, Github, Gitlab, Slack, Trello, CheckCircle2, XCircle, Plug } from "lucide-react";
import useSWR from "swr";

interface Integration {
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/KnowledgeHeatmapPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use client";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Grid3X3, Users, Info, AlertCircle } from "lucide-react";
import { Grid3X3, Users, AlertCircle } from "lucide-react";
import useSWR from "swr";

interface HeatmapEntry {
Expand Down Expand Up @@ -98,7 +98,7 @@ export function KnowledgeHeatmapPanel() {
</div>

<div className="flex -space-x-2 ml-4">
{entry.contributors.slice(0, 3).map((name, i) => (
{entry.contributors.slice(0, 3).map((name) => (
<div
key={name}
className="h-5 w-5 rounded-full border border-background bg-muted flex items-center justify-center text-[8px] font-bold uppercase shrink-0"
Expand Down
3 changes: 1 addition & 2 deletions web/src/components/LinearIssuesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"use client";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { CircleDot, Circle, CheckCircle2, AlertCircle, SignalHigh, SignalMedium, SignalLow, AlertOctagon } from "lucide-react";
import { CircleDot, Circle, CheckCircle2, SignalHigh, SignalMedium, SignalLow, AlertOctagon } from "lucide-react";
import useSWR from "swr";
import { formatDistanceToNow } from "date-fns";

interface LinearIssue {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/TeamCommunicationPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use client";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { MessageSquare, Mail, Bell, Hash, AlertCircle, Check } from "lucide-react";
import { MessageSquare, Mail, Bell, Hash, AlertCircle } from "lucide-react";
import useSWR from "swr";
import { formatDistanceToNow } from "date-fns";

Expand Down
6 changes: 0 additions & 6 deletions web/src/lib/rateLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ export function withRateLimit(
return handler(request);
};
}

export const rateLimit = {
check: async (_request: NextRequest, _limit: number = 100) => {
return true; // Always allow in mock
},
};
Loading