mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-31 06:42:06 +00:00
fix: hide AssistantFAB during spec creation mode
The Chat AI Assistant button (AssistantFAB) was appearing on top of the full-screen spec creation chat overlay, causing a visual bug where the button would overlap with the Send input area. Changes: - Add onStepChange callback prop to NewProjectModal to notify parent when the modal step changes - Add onSpecCreatingChange callback prop to ProjectSelector to propagate spec creation state up to App.tsx - Add isSpecCreating state to App.tsx to track when spec creation chat is active - Update AssistantFAB render condition to include !isSpecCreating - Disable 'A' keyboard shortcut during spec creation mode The fix propagates the spec creation state through the component hierarchy: NewProjectModal -> ProjectSelector -> App.tsx, allowing the FAB to be hidden when step === 'chat' in the new project modal. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ interface ProjectSelectorProps {
|
||||
selectedProject: string | null
|
||||
onSelectProject: (name: string | null) => void
|
||||
isLoading: boolean
|
||||
onSpecCreatingChange?: (isCreating: boolean) => void
|
||||
}
|
||||
|
||||
export function ProjectSelector({
|
||||
@@ -17,6 +18,7 @@ export function ProjectSelector({
|
||||
selectedProject,
|
||||
onSelectProject,
|
||||
isLoading,
|
||||
onSpecCreatingChange,
|
||||
}: ProjectSelectorProps) {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const [showNewProjectModal, setShowNewProjectModal] = useState(false)
|
||||
@@ -166,6 +168,7 @@ export function ProjectSelector({
|
||||
isOpen={showNewProjectModal}
|
||||
onClose={() => setShowNewProjectModal(false)}
|
||||
onProjectCreated={handleProjectCreated}
|
||||
onStepChange={(step) => onSpecCreatingChange?.(step === 'chat')}
|
||||
/>
|
||||
|
||||
{/* Delete Confirmation Dialog */}
|
||||
|
||||
Reference in New Issue
Block a user