03: routing and screen layout - #3
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Free Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (14)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment Tip CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present. |
There was a problem hiding this comment.
Pull request overview
Introduces in-app routing and new screen/layout structure for the CLI UI, including a session shell and message components, while also renaming the theme preferences config directory.
Changes:
- Add
react-routermemory routing with aRootLayoutand three initial screens (Home,NewSession,Session). - Introduce shared UI building blocks:
SessionShell, message components (UserMessage,BotMessage,ErrorMessage), and a spinner component. - Update theme preferences storage directory from
~/.nightcodeto~/.voidcode.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/src/screens/sessions.tsx | Adds a placeholder session screen routed via /session/:id. |
| packages/cli/src/screens/new-session.tsx | Adds a “new session” screen that reads a message from navigation state and renders sample message layout. |
| packages/cli/src/screens/home.tsx | Adds a home screen that navigates to the new session route on submit. |
| packages/cli/src/providers/theme/index.tsx | Renames the theme preferences directory to .voidcode. |
| packages/cli/src/layouts/themed-root.tsx | Adds a themed root container to apply background color consistently. |
| packages/cli/src/layouts/root-layout.tsx | Adds a root layout that composes Theme/Keyboard/Dialog/Toast providers and an <Outlet />. |
| packages/cli/src/index.tsx | Switches app entry to a react-router RouterProvider with a memory router. |
| packages/cli/src/components/spinner.tsx | Adds a themed spinner component backed by opentui-spinner. |
| packages/cli/src/components/session-shell.tsx | Adds a reusable session layout with scrollable content, input bar, and status row. |
| packages/cli/src/components/messages/user-message.tsx | Adds user message rendering with themed border styling. |
| packages/cli/src/components/messages/error-message.tsx | Adds error message rendering with themed border styling. |
| packages/cli/src/components/messages/bot-message.tsx | Adds bot message rendering including model label. |
| packages/cli/src/components/messages/index.tsx | Adds a barrel export for message components. |
| packages/cli/package.json | Adds react-router and opentui-spinner dependencies. |
| bun.lock | Updates lockfile for new dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@opentui/core": "^0.2.10", | ||
| "@opentui/react": "^0.2.10", | ||
| "react": "^19.2.6" | ||
| "opentui-spinner": "^0.0.7", | ||
| "react": "^19.2.6", | ||
| "react-router": "^7.17.0" |
| import { useEffect } from "react"; | ||
| import { useNavigate, useLocation } from "react-router"; | ||
| import { useTheme } from "../providers/theme"; | ||
| import { SessionShell } from "../components/session-shell"; | ||
| import { ErrorMessage, UserMessage, BotMessage } from "../components/messages"; |
| const navigate = useNavigate(); | ||
| const location = useLocation(); | ||
| const { colors } = useTheme(); |
No description provided.