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
1,465 changes: 1,040 additions & 425 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
"tauri:build:debug": "tauri build --debug"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.14",
"@tauri-apps/api": "^2.6.0",
"@tauri-apps/plugin-global-shortcut": "^2.3.0",
"@tauri-apps/plugin-opener": "^2",
"fuse.js": "^7.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-hook-form": "^7.65.0",
"react-router-dom": "^7.9.4",
"tailwindcss": "^4.1.14"
},
"devDependencies": {
"@tauri-apps/cli": "^2",
Expand Down
85 changes: 26 additions & 59 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,68 +1,35 @@
import { useEffect, useState, useRef } from "react";
import { getCurrentWindow } from "@tauri-apps/api/window";
Comment on lines 1 to 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Remove unused imports.

The imports useEffect, useState, useRef (line 1) and getCurrentWindow (line 2) are not used in this refactored version of App.jsx.

-import { useEffect, useState, useRef } from "react";
-import { getCurrentWindow } from "@tauri-apps/api/window";
+import React from "react";
 import "./App.css";

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/App.jsx around lines 1 to 2, the imports useEffect, useState, useRef and
getCurrentWindow are unused in the refactored file; remove those named imports
(either drop them from the import statement or remove the entire import lines if
nothing else is needed) so the file only imports what it actually uses.

import "./App.css";
import HomeOptions from "./components/HomeOptions";
import ClipboardPage from "./components/ClipboardPage";
import OnlineSearchPage from "./components/OnlineSearchPage";
import OpenFilePage from "./components/OpenFilePage";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { useFirstLaunch } from "./hooks/useFirstLaunch";
import Welcome from "./pages/WelcomePage";
import Home from "./pages/HomePage";
import Name from "./pages/Name";
import ClipboardGuide from "./pages/ClipboardGuide";
import About from "./pages/About";
import OnlineSearchGuide from "./pages/OnlineSearchGuide";
import OpenFileGuide from "./pages/OpenFileGuide";
import GuideEnd from "./pages/GuideEnd";

function App() {
const [query, setQuery] = useState("");
const inputRef = useRef(null);
const [currentPage, setCurrentPage] = useState("home");

useEffect(() => {
function handleKeyDown(e) {
if (e.key === "Escape") {
if (currentPage === "home") {
getCurrentWindow().hide();
} else {
setCurrentPage("home");
setQuery("");
inputRef.current?.focus();
}
}
}

window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, [currentPage]);

useEffect(() => {
inputRef.current?.focus();
}, []);

const isFirstLaunch = useFirstLaunch();

return (
<div className="raycast-overlay">
<div className="input-wrapper">
<input
ref={inputRef}
placeholder="Search..."
value={query}
onChange={(e) => setQuery(e.target.value)}
className="search-input"
/>
</div>
<div className="main-container">
<div className="results">
{currentPage === "home" && (
<HomeOptions
query={query}
onSelect={setCurrentPage}
clearQuery={() => {
setQuery("");
inputRef.current?.focus();
}}
/>
)}
{currentPage === "clipboard" && <ClipboardPage query={query} />}
{currentPage === "online-search" && (
<OnlineSearchPage query={query} />
)}
{currentPage === "open-app" && <OpenFilePage query={query} />}
</div>
</div>
</div>

<BrowserRouter>
<Routes>
<Route path="/" element={isFirstLaunch ? <Welcome/> : <Home/>}/>
<Route path="/home" element={<Home />} />
<Route path="/welcome" element={<Welcome/>} />
<Route path="/name" element={<Name/>} />
<Route path="/About" element={<About/>} />
<Route path="/ClipboardGuide" element={<ClipboardGuide/>} />
<Route path="/OnlineSearchGuide" element={<OnlineSearchGuide/>} />
<Route path="/OpenFileGuide" element={<OpenFileGuide/>} />
<Route path="/GuideEnd" element={<GuideEnd/>} />
</Routes>
</BrowserRouter>
);
}

Expand Down
Binary file added src/assets/snapshort2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/snapshort3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/snapshort4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/snapshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/hooks/useFirstLaunch.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { useEffect, useState } from "react";

export function useFirstLaunch() {
const [isFirstLaunch, setIsFirstLaunch] = useState(null);

useEffect(() => {
const flag = localStorage.getItem("firstLaunch");

if (flag === null) {
localStorage.setItem("firstLaunch", "true");
setIsFirstLaunch(true);
} else {
setIsFirstLaunch(false);
}
}, []);

return isFirstLaunch;
}
Comment on lines +3 to +18

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the initial null state to prevent incorrect rendering.

The initial null state causes a problem in App.jsx line 22 where isFirstLaunch ? <Welcome/> : <Home/> evaluates the condition. When isFirstLaunch is null during the initial render, it's falsy, so the app briefly renders <Home/> before the useEffect completes and updates the state. This creates a flash of the wrong page on first launch.

Solution: Initialize with a loading state and render nothing until the value is determined:

 export function useFirstLaunch() {
-  const [isFirstLaunch, setIsFirstLaunch] = useState(null);
+  const [isFirstLaunch, setIsFirstLaunch] = useState(undefined);

   useEffect(() => {
     const flag = localStorage.getItem("firstLaunch");

     if (flag === null) {
       localStorage.setItem("firstLaunch", "true");
       setIsFirstLaunch(true);
     } else {
       setIsFirstLaunch(false);
     }
   }, []);

   return isFirstLaunch;
 }

Then in App.jsx, add a loading check:

const isFirstLaunch = useFirstLaunch();

if (isFirstLaunch === undefined) {
  return null; // or a loading spinner
}

return (
  <BrowserRouter>
    {/* routes */}
  </BrowserRouter>
);
🤖 Prompt for AI Agents
In src/hooks/useFirstLaunch.jsx around lines 3 to 18, the hook initializes
isFirstLaunch to null which causes a flash of the wrong page; change the initial
state to undefined (e.g., useState(undefined) or simply useState()) so the hook
represents a "loading/undetermined" state, keep the effect logic to set
true/false, and in App.jsx (around line 22) check for isFirstLaunch ===
undefined and return null or a spinner until it resolves so the app does not
render Home before the first-launch value is known.

24 changes: 24 additions & 0 deletions src/pages/About.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Link } from "react-router-dom"


function About(){
console.log(localStorage.getItem("name"))
const username_json = localStorage.getItem("name")
const username = JSON.parse(username_json);
Comment on lines +5 to +7

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add error handling for localStorage access and remove console.log.

Two issues:

  1. The console.log statement should be removed from production code.
  2. If localStorage.getItem("name") returns null (e.g., user navigates directly to /About or localStorage is cleared), JSON.parse(null) will throw a TypeError, crashing the component.

Apply this diff to add error handling with a default value:

- console.log(localStorage.getItem("name"))
- const username_json = localStorage.getItem("name")
- const username = JSON.parse(username_json);
+ const username_json = localStorage.getItem("name")
+ const username = username_json ? JSON.parse(username_json) : { name: "Guest" };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log(localStorage.getItem("name"))
const username_json = localStorage.getItem("name")
const username = JSON.parse(username_json);
const username_json = localStorage.getItem("name")
const username = username_json ? JSON.parse(username_json) : { name: "Guest" };
🤖 Prompt for AI Agents
In src/pages/About.jsx around lines 5-7, remove the console.log call and guard
access to localStorage: get the raw value with localStorage.getItem("name"),
check if it's null (or undefined) before calling JSON.parse, and if it is null
use a safe default value (or parse a default JSON string) so JSON.parse never
receives null; alternatively wrap JSON.parse in a try/catch and fall back to the
same default on error — ensure the component uses the fallback username and no
console.log remains.

return(
<div style={{
backgroundImage: "radial-gradient(circle, rgba(39, 39, 42, 1) 1.5px, transparent 1px)",
backgroundSize: "20px 20px",
backgroundRepeat: "repeat",
}}
className="flex flex-col justify-center gap-5 p-5 h-[100vh] bg-[#3D3C3C] font-sans text-white">
<div className="felx flex-row justify-left text-left text-4xl ">Hi {username.name}, Welcome to Pathfinder</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix typo in className.

The className contains "felx" which should be "flex".

Apply this diff:

-            <div className="felx flex-row justify-left text-left text-4xl ">Hi {username.name}, Welcome to Pathfinder</div>
+            <div className="flex flex-row justify-left text-left text-4xl ">Hi {username.name}, Welcome to Pathfinder</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="felx flex-row justify-left text-left text-4xl ">Hi {username.name}, Welcome to Pathfinder</div>
<div className="flex flex-row justify-left text-left text-4xl ">Hi {username.name}, Welcome to Pathfinder</div>
🤖 Prompt for AI Agents
In src/pages/About.jsx around line 15, the className has a typo "felx" which
should be "flex"; update the className value to replace "felx" with "flex" so
the div reads with "flex flex-row justify-left text-left text-4xl" (preserve the
rest of the classes and spacing).

<div className="text-left backdrop-blur-sm">
A powerful Raycast-inspired launcher application built with Tauri and React. PathFinder provides instant access to your most-used tools and information through a beautiful, keyboard-driven interface. And you can access it just my pressing

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammatical error in user-facing text.

The text contains "just my pressing" which should be "just by pressing".

Apply this diff:

-                A powerful Raycast-inspired launcher application built with Tauri and React. PathFinder provides instant access to your most-used tools and information through a beautiful, keyboard-driven interface. And you can access it just my pressing 
+                A powerful Raycast-inspired launcher application built with Tauri and React. PathFinder provides instant access to your most-used tools and information through a beautiful, keyboard-driven interface. And you can access it just by pressing 
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
A powerful Raycast-inspired launcher application built with Tauri and React. PathFinder provides instant access to your most-used tools and information through a beautiful, keyboard-driven interface. And you can access it just my pressing
A powerful Raycast-inspired launcher application built with Tauri and React. PathFinder provides instant access to your most-used tools and information through a beautiful, keyboard-driven interface. And you can access it just by pressing
🤖 Prompt for AI Agents
In src/pages/About.jsx around line 17, the user-facing sentence contains a typo
"just my pressing"; update the text to read "just by pressing" so the sentence
becomes grammatically correct. Replace "my" with "by" and ensure spacing and
punctuation around the phrase remain correct.

</div>
<div className="text-5xl text-center text-[#737373]">Ctrl+Shift+Space</div>
<Link to='/ClipboardGuide'><button className="absolute bottom-3 left-180 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add explicit type attribute to button element.

The button is missing an explicit type attribute. Without it, the default type is "submit", which could cause unintended form submissions if this component is ever placed inside a form context.

As per static analysis hints.

Apply this diff:

-            <Link to='/ClipboardGuide'><button className="absolute bottom-3 left-180 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
+            <Link to='/ClipboardGuide'><button type="button" className="absolute bottom-3 left-180 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link to='/ClipboardGuide'><button className="absolute bottom-3 left-180 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
<Link to='/ClipboardGuide'><button type="button" className="absolute bottom-3 left-180 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
🧰 Tools
🪛 Biome (2.1.2)

[error] 20-20: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

🤖 Prompt for AI Agents
In src/pages/About.jsx around line 20, the button element lacks an explicit type
attribute (defaults to "submit"), so add type="button" to the button to prevent
accidental form submission when this component is rendered inside a form; update
the JSX to include type="button" alongside the existing className and props.

</div>
)
}
export default About
30 changes: 30 additions & 0 deletions src/pages/ClipboardGuide.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Link } from "react-router-dom"
import snapshort1 from '../assets/snapshot1.png'
import snapshot2 from '../assets/snapshort2.png'
Comment on lines +2 to +3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistent asset filename spelling.

Line 2 imports snapshort1 from '../assets/snapshot1.png' while line 3 imports snapshot2 from '../assets/snapshort2.png'. The variable names and file paths are inconsistent. Use consistent naming convention (prefer snapshot throughout).

-import snapshort1 from '../assets/snapshot1.png'
-import snapshot2 from '../assets/snapshort2.png'
+import snapshot1 from '../assets/snapshot1.png'
+import snapshot2 from '../assets/snapshot2.png'

Then update usage on lines 14 and 21:

-                <img src={snapshort1} alt='snapshot1'
+                <img src={snapshot1} alt='snapshot1'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import snapshort1 from '../assets/snapshot1.png'
import snapshot2 from '../assets/snapshort2.png'
import snapshot1 from '../assets/snapshot1.png'
import snapshot2 from '../assets/snapshot2.png'
🤖 Prompt for AI Agents
In src/pages/ClipboardGuide.jsx around lines 2-3 (and usages on lines 14 and
21), the asset import names and paths are inconsistent: change the variable and
import to consistently use "snapshot" (e.g., snapshot1 and snapshot2) and
correct any misspelled file paths (snapshort2 -> snapshot2) so both imports and
their usages on lines 14 and 21 reference the same consistent identifiers and
file names.



function ClipboardGuide(){
return(
<div className="flex flex-col justify-center gap-5 p-5 h-full bg-[#3D3C3C] font-sans text-white">
<div className="flex flex-row justify-left text-left text-4xl ">Clipboard:</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix invalid Tailwind class justify-left.

The class justify-left is not a valid Tailwind CSS class. Use justify-start for left alignment.

-            <div className="flex flex-row justify-left text-left text-4xl ">Clipboard:</div>
+            <div className="flex flex-row justify-start text-left text-4xl ">Clipboard:</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="flex flex-row justify-left text-left text-4xl ">Clipboard:</div>
<div className="flex flex-row justify-start text-left text-4xl ">Clipboard:</div>
🤖 Prompt for AI Agents
In src/pages/ClipboardGuide.jsx around line 9, the div uses an invalid Tailwind
class `justify-left`; replace `justify-left` with `justify-start` to achieve
left alignment (optionally remove `text-left` if redundant) so the element uses
valid Tailwind utility classes.

<div className="text-left backdrop-blur-sm">
A clipboard manager feature that displays all copied items with details like timestamp, size, and usage count. Users can easily view, search, and re-copy any saved entry, making it simple to manage frequently used texts or data efficiently.
</div>
<div className="m-5 px-10 pt-10 rounded-t-xl bg-[#929292]">
<img src={snapshort1} alt='snapshot1'
className="rounded-t-xl "/>
</div>

<div className="text-left mt-5 backdrop-blur-sm">
A clipboard search feature that lets users quickly find any saved clipboard entry by typing keywords. It filters items in real-time, showing relevant results with details like timestamp, size, and usage, enabling fast retrieval and efficient clipboard management. </div>
<div className="m-5 px-10 pt-10 rounded-t-xl bg-[#929292]">
<img src={snapshot2} alt='snapshot2'
className="rounded-t-xl "/>
</div>

<Link to='/OnlineSearchGuide'><button className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix invalid Tailwind class and add button type.

Two issues on this line:

  1. Missing explicit type attribute on the button element (as flagged by static analysis)
  2. The class left-170 is not valid Tailwind CSS syntax. Use bracket notation: left-[170px]

As per static analysis hints.

-            <Link to='/OnlineSearchGuide'><button className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
+            <Link to='/OnlineSearchGuide'><button type="button" className="relative bottom-3 left-[170px] flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link to='/OnlineSearchGuide'><button className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
<Link to='/OnlineSearchGuide'><button type="button" className="relative bottom-3 left-[170px] flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
🧰 Tools
🪛 Biome (2.1.2)

[error] 25-25: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

🤖 Prompt for AI Agents
In src/pages/ClipboardGuide.jsx around line 25, the button lacks an explicit
type and uses an invalid Tailwind class; change the button to include
type="button" and replace the invalid class "left-170" with the correct Tailwind
bracket notation "left-[170px]" so the element becomes a proper button and
Tailwind parses the positioning rule.


</div>
)
}
export default ClipboardGuide
15 changes: 15 additions & 0 deletions src/pages/GuideEnd.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Link } from "react-router-dom"


function GuideEnd(){

return(
<div className="flex flex-row gap-3 justify-center items-center h-[100vh] w-[100vw] bg-[#3D3C3C]">
<div className="text-center text-5xl">
All done, continue to
</div>
<Link to='/'><button type="button" className="py-2 px-3 bg-black rounded-md text-center text-white text-5xl">Pathfinder</button></Link>
</div>
)
export default GuideEnd
71 changes: 71 additions & 0 deletions src/pages/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { useEffect, useState, useRef } from "react";
import { getCurrentWindow } from "@tauri-apps/api/window";
import "../App.css";
import HomeOptions from "../components/HomeOptions";
import ClipboardPage from "../components/ClipboardPage";
import OnlineSearchPage from "../components/OnlineSearchPage";
import OpenFilePage from "../components/OpenFilePage";

function Home() {

const [query, setQuery] = useState("");
const inputRef = useRef(null);
const [currentPage, setCurrentPage] = useState("home");

useEffect(() => {
function handleKeyDown(e) {
if (e.key === "Escape") {
if (currentPage === "home") {
getCurrentWindow().hide();
} else {
setCurrentPage("home");
setQuery("");
inputRef.current?.focus();
}
}
}

window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, [currentPage]);

useEffect(() => {
inputRef.current?.focus();
}, []);

return (

<div className="raycast-overlay">
<div className="input-wrapper">
<input
ref={inputRef}
placeholder="Search..."
value={query}
onChange={(e) => setQuery(e.target.value)}
className="search-input"
/>
</div>
<div className="main-container">
<div className="results">
{currentPage === "home" && (
<HomeOptions
query={query}
onSelect={setCurrentPage}
clearQuery={() => {
setQuery("");
inputRef.current?.focus();
}}
/>
)}
{currentPage === "clipboard" && <ClipboardPage query={query} />}
{currentPage === "online-search" && (
<OnlineSearchPage query={query} />
)}
{currentPage === "open-file" && <OpenFilePage query={query} />}
</div>
</div>
</div>
);
}

export default Home;
38 changes: 38 additions & 0 deletions src/pages/Name.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Link } from "react-router-dom"
import { useForm } from "react-hook-form"
import { useNavigate } from "react-router-dom";


function Name(){

const navigate = useNavigate();

const {
register,
handleSubmit,
formState: { errors },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Unused form validation errors.

The errors object is destructured from formState but never used. Either display validation errors in the UI or remove it from the destructuring.

🤖 Prompt for AI Agents
In src/pages/Name.jsx around line 13, the formState.errors object is being
destructured but never used; either remove errors from the destructuring or
render the validation messages where appropriate. If you want to show errors,
access errors (e.g., errors.fieldName?.message) and display them near the
corresponding inputs (or a form-level summary); otherwise remove ", formState: {
errors }" from the useForm destructuring to eliminate the unused variable.

} = useForm()

const onSubmit = (data) => {
localStorage.setItem("name", JSON.stringify(data))
// console.log(localStorage.getItem("name"))
navigate("/About");
}

return(
<div className="flex flex-col justify-center items-center gap-5 h-[100vh] bg-[#3D3C3C] font-sans">
<div className="text-4xl">Enter Your Name</div>
<div>
<form onSubmit={handleSubmit(onSubmit)}>
<input
className="bg-white rounded-md text-2xl text-center"
defaultValue="" {...register("name")} type='text' placeholder="Type"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add validation for required name input.

The name input has no validation, allowing users to submit an empty name. This would result in "Hi , Welcome to Pathfinder" on the About page.

Apply this diff to add required validation:

-                    defaultValue="" {...register("name")} type='text' placeholder="Type"/>
+                    defaultValue="" {...register("name", { required: true })} type='text' placeholder="Type"/>

Consider also displaying an error message when the field is empty:

+                {errors.name && <span className="text-red-500">Name is required</span>}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
defaultValue="" {...register("name")} type='text' placeholder="Type"/>
defaultValue="" {...register("name", { required: true })} type='text' placeholder="Type"/>
🤖 Prompt for AI Agents
In src/pages/Name.jsx around line 29, the name input is registered without
validation so users can submit an empty name; update the react-hook-form
register call to include { required: true } (or a required message) so the field
cannot be empty, and add conditional rendering of an inline error message when
errors.name exists to inform the user (e.g., "Name is required") before allowing
submission.

</form>
</div>
<Link to='/About'><button type='submit' className="absolute bottom-3 right-5 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>

Comment on lines +22 to +33

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Form submission is broken.

The submit button (line 32) is outside the <form> element and wrapped in a <Link>. When clicked, the Link will navigate to '/About' immediately, bypassing the form's onSubmit handler. This means:

  1. The name will never be saved to localStorage (line 17 won't execute)
  2. Form validation won't run
  3. The About page will crash when trying to parse null from localStorage

Apply this diff to fix the form structure:

-            <div>
-                <form onSubmit={handleSubmit(onSubmit)}>
-                    <input
-                    className="bg-white rounded-md text-2xl text-center"
-                    defaultValue="" {...register("name")} type='text' placeholder="Type"/>
-                </form>
-            </div>
-        <Link to='/About'><button type='submit' className="absolute bottom-3 right-5 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
+            <form onSubmit={handleSubmit(onSubmit)} className="flex flex-col items-center gap-5">
+                <input
+                    className="bg-white rounded-md text-2xl text-center"
+                    defaultValue="" {...register("name")} type='text' placeholder="Type"/>
+                <button type='submit' className="absolute bottom-3 right-5 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button>
+            </form>
🤖 Prompt for AI Agents
In src/pages/Name.jsx around lines 22 to 33, the submit button is outside the
<form> and wrapped in a <Link>, so form.onSubmit and validation never run and
localStorage isn't set; move the button inside the form and remove the <Link>,
keep button type="submit" so the form submits normally, then perform navigation
from the onSubmit handler (use react-router's navigate or history.push) after
saving the name to localStorage so you only navigate when submission/validation
succeeds.

</div>
)
}

export default Name
20 changes: 20 additions & 0 deletions src/pages/OnlineSearchGuide.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Link } from "react-router-dom"
import snapshot3 from '../assets/snapshort3.png'


function OnlineSearchGuide(){
return(
<div className="flex flex-col justify-center gap-5 p-5 h-full bg-[#3D3C3C] font-sans text-white">
<div className="flex flex-row justify-left text-left text-4xl ">Online Search:</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix invalid Tailwind class justify-left.

The class justify-left is not a valid Tailwind CSS class. Use justify-start for left alignment.

-            <div className="flex flex-row justify-left text-left text-4xl ">Online Search:</div>
+            <div className="flex flex-row justify-start text-left text-4xl ">Online Search:</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="flex flex-row justify-left text-left text-4xl ">Online Search:</div>
<div className="flex flex-row justify-start text-left text-4xl ">Online Search:</div>
🤖 Prompt for AI Agents
In src/pages/OnlineSearchGuide.jsx around line 8, the div uses an invalid
Tailwind class `justify-left`; replace it with the correct class `justify-start`
to achieve left alignment (e.g., remove `justify-left` and add `justify-start`)
while keeping the other classes unchanged.

<div className="text-left backdrop-blur-sm">
Quick-access web search allows users to instantly search the internet directly from the app. With a streamlined interface, it supports rapid queries, displays results efficiently, and saves frequently used searches, enabling fast, convenient, and productive online information retrieval. </div>
<div className="m-5 px-10 pt-10 rounded-t-xl bg-[#929292]">
<img src={snapshot3} alt='snapshot1'
className="flex justify-center items-center rounded-t-xl "/>
</div>
<Link to='/OpenFileGuide'><button type="button" className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>

</div>
)
export default OnlineSearchGuide
19 changes: 19 additions & 0 deletions src/pages/OpenFileGuide.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Link } from "react-router-dom"
import snapshort4 from '../assets/snapshort4.png'



function OpenFileGuide(){
return(
<div className="flex flex-col justify-center gap-5 p-5 h-full bg-[#3D3C3C] font-sans text-white">
<div className="flex flex-row justify-left text-left text-4xl ">Open File:</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix invalid Tailwind class justify-left.

The class justify-left is not a valid Tailwind CSS class. Use justify-start for left alignment.

-            <div className="flex flex-row justify-left text-left text-4xl ">Open File:</div>
+            <div className="flex flex-row justify-start text-left text-4xl ">Open File:</div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="flex flex-row justify-left text-left text-4xl ">Open File:</div>
<div className="flex flex-row justify-start text-left text-4xl ">Open File:</div>
🤖 Prompt for AI Agents
In src/pages/OpenFileGuide.jsx around line 9, the div uses an invalid Tailwind
class `justify-left`; replace it with the correct left-alignment utility
`justify-start` (or remove justify-* if not needed) so the element uses a valid
Tailwind class and aligns content to the left.

<div className="text-left backdrop-blur-sm">
A fast file access feature that lets users locate and open files instantly. By typing filenames or keywords, it quickly filters results, showing file paths and details, streamlining workflow and saving time when managing documents, media, or system files. </div>
<div className="m-5 px-10 pt-10 rounded-t-xl bg-[#929292]">
<img src={snapshort4} alt='snapshot1' className="rounded-t-xl "/>
</div>
<Link to='/GuideEnd'><button type='button' className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix invalid Tailwind class left-170.

The class left-170 is not valid Tailwind CSS syntax. Use bracket notation for arbitrary values: left-[170px] or use proper spacing scale utilities.

-            <Link to='/GuideEnd'><button type='button' className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
+            <Link to='/GuideEnd'><button type='button' className="relative bottom-3 left-[170px] flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link to='/GuideEnd'><button type='button' className="relative bottom-3 left-170 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
<Link to='/GuideEnd'><button type='button' className="relative bottom-3 left-[170px] flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
🤖 Prompt for AI Agents
In src/pages/OpenFileGuide.jsx around line 15, the Tailwind class "left-170" is
invalid; replace it with a valid utility such as using bracket notation
(left-[170px]) or an appropriate spacing scale class (e.g., left-40) on the
button element to achieve the intended horizontal offset, and ensure the class
list remains space-separated and consistent with Tailwind conventions.

</div>
)
export default OpenFileGuide
18 changes: 18 additions & 0 deletions src/pages/WelcomePage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Link } from "react-router-dom"


function Welcome(){
return(
<div style={{
backgroundImage: "radial-gradient(circle, rgba(39, 39, 42, 1) 1.5px, transparent 1px)",
backgroundSize: "20px 20px",
backgroundRepeat: "repeat",
}}
className="flex flex-col justify-center items-center gap-1 h-[100vh] bg-[#3D3C3C] font-sans">
<div className="flex flex-row justify-center text-6xl pb-5 font-bold">Pathfinder</div>
<div className="felx flex-row justify-center text-center text-3xl">A tool to make your life easy</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix typo in className.

The className contains "felx" which should be "flex".

Apply this diff:

-            <div className="felx flex-row justify-center text-center text-3xl">A tool to make your life easy</div>
+            <div className="flex flex-row justify-center text-center text-3xl">A tool to make your life easy</div>
🤖 Prompt for AI Agents
In src/pages/WelcomePage.jsx around line 13, the className has a typo "felx"
which prevents the flex utility from applying; change "felx" to "flex" so the
div reads className="flex flex-row justify-center text-center text-3xl".

<Link to='/name'><button type="button" className="absolute bottom-3 right-5 flex flex-row justify-center py-1 px-3 bg-black rounded-md text-center text-white ">next</button></Link>
</div>
)
}
export default Welcome
3 changes: 2 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from '@tailwindcss/vite'

const host = process.env.TAURI_DEV_HOST;

// https://vitejs.dev/config/
export default defineConfig(async () => ({
plugins: [react()],
plugins: [react(), tailwindcss(),],

// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//
Expand Down