fix(chat): restore new-session UI after Nano provider rebase conflict#163
fix(chat): restore new-session UI after Nano provider rebase conflict#163
Conversation
The rebase in #141 (Nano Claude Code provider) incorrectly resolved conflicts in the chat empty-state components, replacing the clean Gemini-style greeting layout with the old verbose provider-selection cards. This restores the pre-#141 UI for ProviderSelectionEmptyState, ChatMessagesPane, and ChatInterface, then re-adds the minimal nano provider wiring (types, availability, model config) needed for compile compatibility. Nano Claude Code is commented out in the composer provider list for now. Made-with: Cursor
| newSessionMode = 'research', | ||
| onNewSessionModeChange, | ||
| }: ChatInterfaceProps) { | ||
| const { tasksEnabled, isTaskMasterInstalled } = useTasksSettings(); |
| newSessionMode = 'research', | ||
| onNewSessionModeChange, | ||
| }: ChatInterfaceProps) { | ||
| const { tasksEnabled, isTaskMasterInstalled } = useTasksSettings(); |
There was a problem hiding this comment.
Pull request overview
Restores the streamlined “new session” chat layout after a rebase conflict, shifting provider/model/session-mode selection back into the centered composer experience while keeping minimal Nano provider wiring for TypeScript compatibility.
Changes:
- Simplifies the empty-state UI back to the greeting/title layout and removes the verbose provider-selection UI from the messages pane.
- Moves new-session UX behaviors into
ChatInterface+ centeredChatComposer(workspace QA guidance via placeholder; guided prompt starter shown below composer). - Re-adds
nanomodel/config plumbing in the composer (while keepingnanocommented out in the visible provider list).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/components/chat/view/subcomponents/ProviderSelectionEmptyState.tsx | Reverts empty-state to the minimal greeting/title UI and removes provider-selection UI logic. |
| src/components/chat/view/subcomponents/ChatMessagesPane.tsx | Adjusts empty-state layout behavior and removes workspace QA guidance block (now composer placeholder-driven). |
| src/components/chat/view/subcomponents/ChatComposer.tsx | Adds Nano model wiring (types/config/localStorage key handling) while leaving Nano hidden from the provider picker list. |
| src/components/chat/view/ChatInterface.tsx | Rebuilds the new-session layout around a centered composer + guided starter, adds sidebar collapse control wiring, and introduces a modal file preview overlay. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const { tasksEnabled, isTaskMasterInstalled } = useTasksSettings(); | ||
| const { refreshTasks } = useTaskMaster(); | ||
| const { t } = useTranslation('chat'); | ||
| const { isMobile } = useDeviceSettings({ trackPWA: false }); |
There was a problem hiding this comment.
tasksEnabled and isTaskMasterInstalled are destructured from useTasksSettings but never used. This will trip no-unused-vars linting/TypeScript checks in many configurations; either remove the unused variables or use them to conditionally render task UI (e.g., hide ChatTaskProgressPill when tasks are disabled/not installed).
| onOpenShellForSession?.(); | ||
| }, [onOpenShellForSession]); | ||
| setSidebarTab('shell'); | ||
| setIsSidebarCollapsed(false); |
There was a problem hiding this comment.
handleConfirmOpenShell expands the sidebar by setting isSidebarCollapsed to false, but this bypasses ChatContextSidebar's internal persistence logic (which writes chat-session-context-collapsed to localStorage). As a result, the sidebar may re-collapse on refresh even though it was programmatically expanded here. Consider also persisting the collapsed flag (or invoking the same persistence path) when changing collapse state from ChatInterface.
| setIsSidebarCollapsed(false); | |
| setIsSidebarCollapsed(false); | |
| if (typeof window !== 'undefined') { | |
| localStorage.setItem('chat-session-context-collapsed', 'false'); | |
| } |
| @@ -1,422 +1,33 @@ | |||
| import React, { useState, useEffect, useRef, useCallback } from 'react'; | |||
| import { Check, Search, Plus, X } from 'lucide-react'; | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
React is imported but not referenced directly in this component. If the project is using the React 17+ automatic JSX runtime (as suggested by other TSX files that omit a React import), this will trigger a no-unused-vars/TS lint error; remove the unused React import here (or reference it explicitly if the classic runtime is required).
| import React from 'react'; |
Summary
ProviderSelectionEmptyState,ChatMessagesPane,ChatInterface) that was broken by a rebase conflict in feat: Nano Claw Code provider (stream-json harness) #141 (Nano Claude Code provider)nanoprovider wiring (types, availability map, model config, CLI status check) inChatInterfaceandChatComposerfor compile compatibility with the rest of the codebaseWhat happened
PR #141 introduced the Nano Claude Code provider. During the rebase onto main, conflicts in the chat empty-state components were incorrectly resolved — the old verbose provider-selection cards (session mode radio cards, provider grid, model dropdown) replaced the newer streamlined greeting + composer-badge layout. This PR reverts the UI files to their pre-#141 state and layers on only the type-level nano additions needed to keep TypeScript happy.
Test plan
Made with Cursor