Conversation
|
@kevinw-openai is attempting to deploy a commit to the 0xBuns Team on Vercel. A member of the Team first needs to authorize it. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Greptile SummaryThis PR replaces TanStack Router's bare default "Not Found" paragraph with a properly styled
One minor style note: in Confidence Score: 5/5Safe to merge — no P0 or P1 issues; all findings are minor style suggestions. The change is small, well-scoped, and well-tested. It follows existing patterns throughout the codebase (layout, styling, test structure) and has no correctness, data-integrity, or reliability concerns. The only finding is a redundant No files require special attention.
|
| Filename | Overview |
|---|---|
| src/components/NotFoundPage.tsx | New component rendering a styled 404 page; follows existing <main className="section"> conventions used across all other route components. |
| src/components/NotFoundPage.test.tsx | Tests render the component with a mocked Link and assert the 404 heading and "Return home" CTA; one redundant .toBeTruthy() assertion on getByText (P2 style). |
| src/router.tsx | Imports and wires NotFoundPage as defaultNotFoundComponent; change is minimal and correct. |
| src/router.test.tsx | Verifies the router option is set to the correct component reference; test structure and env setup look sound. |
| src/styles.css | Adds well-scoped .not-found-* CSS classes consistent with the existing design tokens and responsive patterns; no conflicts with existing rules detected. |
Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/components/NotFoundPage.test.tsx
Line: 20
Comment:
**Redundant `.toBeTruthy()` after `getByText`**
`screen.getByText(...)` already throws (and fails the test) when the element is not found — the chained `.toBeTruthy()` is always truthy on a successful query and adds no extra safety net. Prefer `toBeInTheDocument()` for a more expressive assertion, or simply omit the assertion and rely on `getByText`'s implicit throw:
```suggestion
expect(screen.getByText("404 • Page not found")).toBeInTheDocument();
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix: add a proper 404 page" | Re-trigger Greptile
| it("renders a single recovery action back to the homepage", () => { | ||
| render(<NotFoundPage />); | ||
|
|
||
| expect(screen.getByText("404 • Page not found")).toBeTruthy(); |
There was a problem hiding this comment.
Redundant
.toBeTruthy() after getByText
screen.getByText(...) already throws (and fails the test) when the element is not found — the chained .toBeTruthy() is always truthy on a successful query and adds no extra safety net. Prefer toBeInTheDocument() for a more expressive assertion, or simply omit the assertion and rely on getByText's implicit throw:
| expect(screen.getByText("404 • Page not found")).toBeTruthy(); | |
| expect(screen.getByText("404 • Page not found")).toBeInTheDocument(); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/NotFoundPage.test.tsx
Line: 20
Comment:
**Redundant `.toBeTruthy()` after `getByText`**
`screen.getByText(...)` already throws (and fails the test) when the element is not found — the chained `.toBeTruthy()` is always truthy on a successful query and adds no extra safety net. Prefer `toBeInTheDocument()` for a more expressive assertion, or simply omit the assertion and rely on `getByText`'s implicit throw:
```suggestion
expect(screen.getByText("404 • Page not found")).toBeInTheDocument();
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Why
Visiting a non-existent route currently falls back to TanStack Router's default
Not Foundparagraph.That leaves the page looking unstyled and broken, with no clear recovery action for the user.
What changed
defaultNotFoundComponentNotFoundPagecomponent with real layout and styling404 • Page not foundReturn homeCTABefore
Not FoundstringAfter
Return homeactionVerification
bunx vitest run src/components/NotFoundPage.test.tsx src/router.test.tsxbunx tsc --noEmitbunx tsc -p packages/schema/tsconfig.json --noEmitbunx tsc -p packages/clawdhub/tsconfig.json --noEmitbun --bun vite build/asdfdThis PR is assisted by codex.