From 33a9f4962571c930f844e1967d9f784d0cb55c04 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 12 Nov 2024 09:44:55 -0400 Subject: [PATCH 1/5] Add issue tracking page for displaying and managing current known issues --- app/issues/issues.tsx | 41 +++++++++++++ app/issues/issuesList.tsx | 115 +++++++++++++++++++++++++++++++++++++ app/issues/page.tsx | 84 +++++++++++++++++++++++++++ app/issues/repositories.ts | 29 ++++++++++ 4 files changed, 269 insertions(+) create mode 100644 app/issues/issues.tsx create mode 100644 app/issues/issuesList.tsx create mode 100644 app/issues/page.tsx create mode 100644 app/issues/repositories.ts diff --git a/app/issues/issues.tsx b/app/issues/issues.tsx new file mode 100644 index 000000000..8f6320bec --- /dev/null +++ b/app/issues/issues.tsx @@ -0,0 +1,41 @@ +import React from "react"; + +type Severity = "low" | "medium" | "high" | "critical"; + +export type IssueEntry = { + date: string; + title: string; + description: React.ReactNode; + repositoryId: string; + issueLink: string; + severity: Severity; + screenshot?: { + src: string; + alt: string; + width: number; + height: number; + }; +}; + +const issues: IssueEntry[] = [ + { + date: "2024-11-10", + title: "Remote SSH not working", + description: ( + <> +

Currently PearAI does not support remote SSH.

+

Impact:

+ + + ), + repositoryId: "pearai-app", + issueLink: "https://trypear.ai/issues", + severity: "high", + }, +]; + +export default issues; diff --git a/app/issues/issuesList.tsx b/app/issues/issuesList.tsx new file mode 100644 index 000000000..a062820e6 --- /dev/null +++ b/app/issues/issuesList.tsx @@ -0,0 +1,115 @@ +import React from "react"; +import Image from "next/image"; +import Link from "next/link"; +import { cn } from "@/lib/utils"; +import { getTimePassed } from "@/utils/dateUtils"; +import { Info, AlertCircle, AlertTriangle, XCircle } from "lucide-react"; + +type Severity = "low" | "medium" | "high" | "critical"; + +type IssueItemProps = { + date: string; + title: string; + description: React.ReactNode; + issueLink: string; + severity: Severity; + screenshot?: { + src: string; + alt: string; + width: number; + height: number; + }; +}; + +export const IssueList: React.FC = ({ + date, + title, + description, + issueLink, + severity, + screenshot, +}) => { + const getSeverityIcon = () => { + switch (severity) { + case "low": + return ; + case "medium": + return ; + case "high": + return ; + case "critical": + return ; + default: + return ; + } + }; + + const getSeverityLabel = () => { + switch (severity) { + case "low": + return "Low Severity"; + case "medium": + return "Medium Severity"; + case "high": + return "High Severity"; + case "critical": + return "Critical Severity"; + default: + return "Severity Unknown"; + } + }; + + return ( +
+
+ {/* Header */} +
+ {/* Icon and Title */} +
+ {/* Icon */} +
{getSeverityIcon()}
+ {/* Issue Title */} +

+ + {title} + +

+
+ {/* Date */} +
+ + ({getTimePassed(date)}) +
+
+ {/* Severity Label */} +
+ + {getSeverityLabel()} + +
+ {/* Description */} +
{description}
+ {/* Screenshot */} + {screenshot && ( +
+ {screenshot.alt} +
+ )} +
+
+ ); +}; diff --git a/app/issues/page.tsx b/app/issues/page.tsx new file mode 100644 index 000000000..b239609f3 --- /dev/null +++ b/app/issues/page.tsx @@ -0,0 +1,84 @@ +import React from "react"; +import issues from "./issues"; +import repositories from "./repositories"; +import { IssueList } from "./issuesList"; +import Link from "next/link"; +import { Metadata } from "next"; +import { constructMetadata } from "@/lib/utils"; + +type IssueEntry = (typeof issues)[number]; +type Repository = (typeof repositories)[number]; + +export const metadata: Metadata = constructMetadata({ + title: "Issues", + description: "This page lists all current known issues and their status.", + canonical: "/issues", +}); + +const CurrentKnownIssues: React.FC = () => { + const repositoryMap = repositories.reduce>( + (acc, repo) => { + acc[repo.id] = repo; + return acc; + }, + {}, + ); + + const issuesByRepositoryId = issues.reduce>( + (acc, issue) => { + const repoId = issue.repositoryId; + if (!acc[repoId]) { + acc[repoId] = []; + } + acc[repoId].push(issue); + return acc; + }, + {}, + ); + + return ( +
+

+ Current Known Issues +

+
+ {Object.entries(issuesByRepositoryId).map( + ([repoId, repoIssues], index) => { + const repo = repositoryMap[repoId]; + const issuesHref = `${repo.href}/issues`; + + return ( +
+ {/* Separator */} + {index > 0 &&
} + {/* Repository Name as a Link */} +

+ + {repo.name} + +

+ {/* Link to Repository Issues Page */} +
+ + View All Issues + +
+ {/* List of Issues */} +
+ {repoIssues.map((issue, index) => ( + + ))} +
+
+ ); + }, + )} +
+
+ ); +}; + +export default CurrentKnownIssues; diff --git a/app/issues/repositories.ts b/app/issues/repositories.ts new file mode 100644 index 000000000..7af51baa6 --- /dev/null +++ b/app/issues/repositories.ts @@ -0,0 +1,29 @@ +const repositories = [ + { + id: "pearai-app", + name: "PearAI App", + href: "https://github.com/trypear/pearai-app", + }, + { + id: "pearai-submodule", + name: "PearAI Submodule", + href: "https://github.com/trypear/pearai-submodule", + }, + { + id: "pear-landing-page", + name: "Pear Landing Page", + href: "https://github.com/trypear/pear-landing-page", + }, + { + id: "pearai-documentation", + name: "PearAI Documentation", + href: "https://github.com/trypear/pearai-documentation", + }, + { + id: "pearai-server-issues-public", + name: "PearAI Server Issues (Public)", + href: "https://github.com/trypear/pearai-server-issues-public", + }, +]; + +export default repositories; From ce850443f51cd9c054a265adf26852fc521d062e Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 12 Nov 2024 21:40:29 -0400 Subject: [PATCH 2/5] Made severity optional --- app/issues/issues.tsx | 4 ++-- app/issues/issuesList.tsx | 35 ++++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/issues/issues.tsx b/app/issues/issues.tsx index 8f6320bec..ea7473b4d 100644 --- a/app/issues/issues.tsx +++ b/app/issues/issues.tsx @@ -8,7 +8,7 @@ export type IssueEntry = { description: React.ReactNode; repositoryId: string; issueLink: string; - severity: Severity; + severity?: Severity; screenshot?: { src: string; alt: string; @@ -29,12 +29,12 @@ const issues: IssueEntry[] = [
  • As of now, you can't use remote SSH to connect to your server.
  • +
  • PearAI plans on supporting this in the near future.
  • ), repositoryId: "pearai-app", issueLink: "https://trypear.ai/issues", - severity: "high", }, ]; diff --git a/app/issues/issuesList.tsx b/app/issues/issuesList.tsx index a062820e6..21534e430 100644 --- a/app/issues/issuesList.tsx +++ b/app/issues/issuesList.tsx @@ -12,7 +12,7 @@ type IssueItemProps = { title: string; description: React.ReactNode; issueLink: string; - severity: Severity; + severity?: Severity; screenshot?: { src: string; alt: string; @@ -30,6 +30,7 @@ export const IssueList: React.FC = ({ screenshot, }) => { const getSeverityIcon = () => { + if (!severity) return null; switch (severity) { case "low": return ; @@ -45,6 +46,7 @@ export const IssueList: React.FC = ({ }; const getSeverityLabel = () => { + if (!severity) return "Severity Unknown"; switch (severity) { case "low": return "Low Severity"; @@ -67,7 +69,7 @@ export const IssueList: React.FC = ({ {/* Icon and Title */}
    {/* Icon */} -
    {getSeverityIcon()}
    + {severity &&
    {getSeverityIcon()}
    } {/* Issue Title */}

    @@ -75,6 +77,7 @@ export const IssueList: React.FC = ({

    + {/* Date */}
    @@ -82,19 +85,21 @@ export const IssueList: React.FC = ({
    {/* Severity Label */} -
    - - {getSeverityLabel()} - -
    + {severity && ( +
    + + {getSeverityLabel()} + +
    + )} {/* Description */}
    {description}
    {/* Screenshot */} From 005e9da4e81d1c12b6be6358d24c13fe99fc2641 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 21 Nov 2024 22:26:49 -0400 Subject: [PATCH 3/5] Renamed issues folder to issues and added faq question --- app/{issues => known-issues}/issues.tsx | 0 app/{issues => known-issues}/issuesList.tsx | 0 app/{issues => known-issues}/page.tsx | 2 +- app/{issues => known-issues}/repositories.ts | 0 components/faq.tsx | 13 +++++++++++++ 5 files changed, 14 insertions(+), 1 deletion(-) rename app/{issues => known-issues}/issues.tsx (100%) rename app/{issues => known-issues}/issuesList.tsx (100%) rename app/{issues => known-issues}/page.tsx (98%) rename app/{issues => known-issues}/repositories.ts (100%) diff --git a/app/issues/issues.tsx b/app/known-issues/issues.tsx similarity index 100% rename from app/issues/issues.tsx rename to app/known-issues/issues.tsx diff --git a/app/issues/issuesList.tsx b/app/known-issues/issuesList.tsx similarity index 100% rename from app/issues/issuesList.tsx rename to app/known-issues/issuesList.tsx diff --git a/app/issues/page.tsx b/app/known-issues/page.tsx similarity index 98% rename from app/issues/page.tsx rename to app/known-issues/page.tsx index b239609f3..574661c5c 100644 --- a/app/issues/page.tsx +++ b/app/known-issues/page.tsx @@ -12,7 +12,7 @@ type Repository = (typeof repositories)[number]; export const metadata: Metadata = constructMetadata({ title: "Issues", description: "This page lists all current known issues and their status.", - canonical: "/issues", + canonical: "/known-issues", }); const CurrentKnownIssues: React.FC = () => { diff --git a/app/issues/repositories.ts b/app/known-issues/repositories.ts similarity index 100% rename from app/issues/repositories.ts rename to app/known-issues/repositories.ts diff --git a/components/faq.tsx b/components/faq.tsx index e84d53461..514a75aca 100644 --- a/components/faq.tsx +++ b/components/faq.tsx @@ -222,4 +222,17 @@ const faqData: FAQItem[] = [

    ), }, + { + id: "known-issues", + question: "4. What are current known issues?!", + answer: ( +

    + See the known issues section:{" "} + + Known Issues + + . +

    + ), + }, ]; From 60cdf5368f3619c2ad9ceab58f3818db5ff08897 Mon Sep 17 00:00:00 2001 From: Duke Pan Date: Sat, 23 Nov 2024 18:20:43 -0800 Subject: [PATCH 4/5] cleanup --- app/known-issues/issues.tsx | 26 ++++++++------ app/known-issues/issuesList.tsx | 8 ++--- app/known-issues/page.tsx | 60 ++------------------------------ app/known-issues/repositories.ts | 29 --------------- components/faq.tsx | 16 ++++----- 5 files changed, 30 insertions(+), 109 deletions(-) delete mode 100644 app/known-issues/repositories.ts diff --git a/app/known-issues/issues.tsx b/app/known-issues/issues.tsx index ea7473b4d..9ebb1786a 100644 --- a/app/known-issues/issues.tsx +++ b/app/known-issues/issues.tsx @@ -19,22 +19,26 @@ export type IssueEntry = { const issues: IssueEntry[] = [ { - date: "2024-11-10", - title: "Remote SSH not working", + date: "", + title: "Remote SSH not supported", description: ( <> -

    Currently PearAI does not support remote SSH.

    -

    Impact:

    -
      -
    • - As of now, you can't use remote SSH to connect to your server. -
    • -
    • PearAI plans on supporting this in the near future.
    • -
    +

    Currently PearAI does not support remote SSH. We plan on supporting this in the near future.

    ), repositoryId: "pearai-app", - issueLink: "https://trypear.ai/issues", + issueLink: "", + }, + { + date: "", + title: "Liveshare not supported", + description: ( + <> +

    Currently PearAI does not support Liveshare extension. We plan on supporting this in the near future.

    + + ), + repositoryId: "pearai-app", + issueLink: "", }, ]; diff --git a/app/known-issues/issuesList.tsx b/app/known-issues/issuesList.tsx index 21534e430..7b4ebd3f8 100644 --- a/app/known-issues/issuesList.tsx +++ b/app/known-issues/issuesList.tsx @@ -1,6 +1,5 @@ import React from "react"; import Image from "next/image"; -import Link from "next/link"; import { cn } from "@/lib/utils"; import { getTimePassed } from "@/utils/dateUtils"; import { Info, AlertCircle, AlertTriangle, XCircle } from "lucide-react"; @@ -25,7 +24,6 @@ export const IssueList: React.FC = ({ date, title, description, - issueLink, severity, screenshot, }) => { @@ -72,17 +70,19 @@ export const IssueList: React.FC = ({ {severity &&
    {getSeverityIcon()}
    } {/* Issue Title */}

    - +

    {title} - +

    {/* Date */} + {date && (
    ({getTimePassed(date)})
    + )} {/* Severity Label */} {severity && ( diff --git a/app/known-issues/page.tsx b/app/known-issues/page.tsx index 574661c5c..015d2161b 100644 --- a/app/known-issues/page.tsx +++ b/app/known-issues/page.tsx @@ -1,14 +1,9 @@ import React from "react"; import issues from "./issues"; -import repositories from "./repositories"; import { IssueList } from "./issuesList"; -import Link from "next/link"; import { Metadata } from "next"; import { constructMetadata } from "@/lib/utils"; -type IssueEntry = (typeof issues)[number]; -type Repository = (typeof repositories)[number]; - export const metadata: Metadata = constructMetadata({ title: "Issues", description: "This page lists all current known issues and their status.", @@ -16,64 +11,15 @@ export const metadata: Metadata = constructMetadata({ }); const CurrentKnownIssues: React.FC = () => { - const repositoryMap = repositories.reduce>( - (acc, repo) => { - acc[repo.id] = repo; - return acc; - }, - {}, - ); - - const issuesByRepositoryId = issues.reduce>( - (acc, issue) => { - const repoId = issue.repositoryId; - if (!acc[repoId]) { - acc[repoId] = []; - } - acc[repoId].push(issue); - return acc; - }, - {}, - ); - return (

    Current Known Issues

    - {Object.entries(issuesByRepositoryId).map( - ([repoId, repoIssues], index) => { - const repo = repositoryMap[repoId]; - const issuesHref = `${repo.href}/issues`; - - return ( -
    - {/* Separator */} - {index > 0 &&
    } - {/* Repository Name as a Link */} -

    - - {repo.name} - -

    - {/* Link to Repository Issues Page */} -
    - - View All Issues - -
    - {/* List of Issues */} -
    - {repoIssues.map((issue, index) => ( - - ))} -
    -
    - ); + {issues.map( + (issue, index) => { + return }, )}
    diff --git a/app/known-issues/repositories.ts b/app/known-issues/repositories.ts deleted file mode 100644 index 7af51baa6..000000000 --- a/app/known-issues/repositories.ts +++ /dev/null @@ -1,29 +0,0 @@ -const repositories = [ - { - id: "pearai-app", - name: "PearAI App", - href: "https://github.com/trypear/pearai-app", - }, - { - id: "pearai-submodule", - name: "PearAI Submodule", - href: "https://github.com/trypear/pearai-submodule", - }, - { - id: "pear-landing-page", - name: "Pear Landing Page", - href: "https://github.com/trypear/pear-landing-page", - }, - { - id: "pearai-documentation", - name: "PearAI Documentation", - href: "https://github.com/trypear/pearai-documentation", - }, - { - id: "pearai-server-issues-public", - name: "PearAI Server Issues (Public)", - href: "https://github.com/trypear/pearai-server-issues-public", - }, -]; - -export default repositories; diff --git a/components/faq.tsx b/components/faq.tsx index 514a75aca..fa59fab91 100644 --- a/components/faq.tsx +++ b/components/faq.tsx @@ -125,12 +125,12 @@ export default FAQComponent; const faqData: FAQItem[] = [ { id: "name", - question: "0. Why is it called PearAI?!", + question: "0. Why is it called PearAI?", answer:

    Pair programming... Pear Programming... PearAI! 🍐💡

    , }, { id: "competitors", - question: "1. Why PearAI over competitors?!", + question: "1. Why PearAI over competitors?", answer: (

    Over using vanilla LLM’s:

    @@ -191,7 +191,7 @@ const faqData: FAQItem[] = [ }, { id: "privacy", - question: "2. Does PearAI store my code?!", + question: "2. Does PearAI store my code?", answer: (

    No. All codebase indexing occurs and remains strictly local on your @@ -211,7 +211,7 @@ const faqData: FAQItem[] = [ }, { id: "contribute", - question: "3. How can I contribute to PearAI?!", + question: "3. How can I contribute to PearAI?", answer: (

    See the contributor's section:{" "} @@ -224,12 +224,12 @@ const faqData: FAQItem[] = [ }, { id: "known-issues", - question: "4. What are current known issues?!", + question: "4. What are current known issues?", answer: (

    - See the known issues section:{" "} - - Known Issues + See the{" "} + + known issues section .

    From 493fd7fa9d6663b314e528688e8ba75b91064a6e Mon Sep 17 00:00:00 2001 From: Duke Pan Date: Sat, 23 Nov 2024 18:20:57 -0800 Subject: [PATCH 5/5] cleanup --- app/known-issues/issues.tsx | 10 ++++++++-- app/known-issues/issuesList.tsx | 12 +++++------- app/known-issues/page.tsx | 8 +++----- components/faq.tsx | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/known-issues/issues.tsx b/app/known-issues/issues.tsx index 9ebb1786a..18481b833 100644 --- a/app/known-issues/issues.tsx +++ b/app/known-issues/issues.tsx @@ -23,7 +23,10 @@ const issues: IssueEntry[] = [ title: "Remote SSH not supported", description: ( <> -

    Currently PearAI does not support remote SSH. We plan on supporting this in the near future.

    +

    + Currently PearAI does not support remote SSH. We plan on supporting + this in the near future. +

    ), repositoryId: "pearai-app", @@ -34,7 +37,10 @@ const issues: IssueEntry[] = [ title: "Liveshare not supported", description: ( <> -

    Currently PearAI does not support Liveshare extension. We plan on supporting this in the near future.

    +

    + Currently PearAI does not support Liveshare extension. We plan on + supporting this in the near future. +

    ), repositoryId: "pearai-app", diff --git a/app/known-issues/issuesList.tsx b/app/known-issues/issuesList.tsx index 7b4ebd3f8..3172e0677 100644 --- a/app/known-issues/issuesList.tsx +++ b/app/known-issues/issuesList.tsx @@ -70,18 +70,16 @@ export const IssueList: React.FC = ({ {severity &&
    {getSeverityIcon()}
    } {/* Issue Title */}

    -

    - {title} -

    +

    {title}

    {/* Date */} {date && ( -
    - - ({getTimePassed(date)}) -
    +
    + + ({getTimePassed(date)}) +
    )}
    {/* Severity Label */} diff --git a/app/known-issues/page.tsx b/app/known-issues/page.tsx index 015d2161b..a8c86573a 100644 --- a/app/known-issues/page.tsx +++ b/app/known-issues/page.tsx @@ -17,11 +17,9 @@ const CurrentKnownIssues: React.FC = () => { Current Known Issues
    - {issues.map( - (issue, index) => { - return - }, - )} + {issues.map((issue, index) => { + return ; + })}
    ); diff --git a/components/faq.tsx b/components/faq.tsx index fa59fab91..7bb480c62 100644 --- a/components/faq.tsx +++ b/components/faq.tsx @@ -229,7 +229,7 @@ const faqData: FAQItem[] = [

    See the{" "} - known issues section + known issues section .