Skip to content

fix(chat): restore new-session UI after Nano provider rebase conflict#163

Merged
davidliuk merged 1 commit intomainfrom
fix/restore-chat-ui-after-nano-rebase
Apr 12, 2026
Merged

fix(chat): restore new-session UI after Nano provider rebase conflict#163
davidliuk merged 1 commit intomainfrom
fix/restore-chat-ui-after-nano-rebase

Conversation

@davidliuk
Copy link
Copy Markdown
Collaborator

Summary

  • Restores the clean Gemini-style new-session greeting layout (ProviderSelectionEmptyState, ChatMessagesPane, ChatInterface) that was broken by a rebase conflict in feat: Nano Claw Code provider (stream-json harness) #141 (Nano Claude Code provider)
  • Re-adds minimal nano provider wiring (types, availability map, model config, CLI status check) in ChatInterface and ChatComposer for compile compatibility with the rest of the codebase
  • Nano Claude Code is commented out in the composer provider list per advisor feedback (low usage frequency)

What 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

  • Open a new session — verify "Hi {name} / What should we do next?" greeting with composer badges (Research Session, provider, model, mode) and guided prompt buttons
  • Switch providers in the composer toolbar — all existing providers still work
  • Verify Nano Claude Code backend still functions (the server-side code is unchanged)

Made with Cursor

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
@davidliuk davidliuk requested review from bbsngg and Copilot April 11, 2026 20:00
newSessionMode = 'research',
onNewSessionModeChange,
}: ChatInterfaceProps) {
const { tasksEnabled, isTaskMasterInstalled } = useTasksSettings();
newSessionMode = 'research',
onNewSessionModeChange,
}: ChatInterfaceProps) {
const { tasksEnabled, isTaskMasterInstalled } = useTasksSettings();
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 + centered ChatComposer (workspace QA guidance via placeholder; guided prompt starter shown below composer).
  • Re-adds nano model/config plumbing in the composer (while keeping nano commented 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.

Comment on lines +113 to +116
const { tasksEnabled, isTaskMasterInstalled } = useTasksSettings();
const { refreshTasks } = useTaskMaster();
const { t } = useTranslation('chat');
const { isMobile } = useDeviceSettings({ trackPWA: false });
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
onOpenShellForSession?.();
}, [onOpenShellForSession]);
setSidebarTab('shell');
setIsSidebarCollapsed(false);
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
setIsSidebarCollapsed(false);
setIsSidebarCollapsed(false);
if (typeof window !== 'undefined') {
localStorage.setItem('chat-session-context-collapsed', 'false');
}

Copilot uses AI. Check for mistakes.
@@ -1,422 +1,33 @@
import React, { useState, useEffect, useRef, useCallback } from 'react';
import { Check, Search, Plus, X } from 'lucide-react';
import React from 'react';
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
import React from 'react';

Copilot uses AI. Check for mistakes.
@davidliuk davidliuk merged commit 5c5c5b9 into main Apr 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants