mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 20:03:37 +00:00
feat(core): Persist current view across app refreshes
Added currentView to zustand persist partialize, ensuring that the last viewed route is saved to localStorage and restored on app load. This prevents the app from redirecting to overview on every refresh. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,16 +76,15 @@ export function KanbanCard({ feature, onEdit, onDelete, onViewOutput, onVerify,
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-start gap-2">
|
||||
<div
|
||||
{...listeners}
|
||||
className={cn(
|
||||
"mt-0.5 touch-none",
|
||||
isDraggable ? "cursor-grab" : "cursor-not-allowed opacity-50"
|
||||
)}
|
||||
data-testid={`drag-handle-${feature.id}`}
|
||||
>
|
||||
<GripVertical className="w-4 h-4 text-muted-foreground" />
|
||||
</div>
|
||||
{isDraggable && (
|
||||
<div
|
||||
{...listeners}
|
||||
className="mt-0.5 touch-none cursor-grab"
|
||||
data-testid={`drag-handle-${feature.id}`}
|
||||
>
|
||||
<GripVertical className="w-4 h-4 text-muted-foreground" />
|
||||
</div>
|
||||
)}
|
||||
<div className="flex-1 min-w-0">
|
||||
<CardTitle className="text-sm leading-tight">
|
||||
{feature.description}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
import type { Project } from "@/lib/electron";
|
||||
|
||||
export type ViewMode = "welcome" | "spec" | "board" | "code" | "agent" | "settings" | "tools" | "interview" | "context";
|
||||
export type ViewMode = "welcome" | "spec" | "board" | "agent" | "settings" | "tools" | "interview" | "context";
|
||||
export type ThemeMode = "light" | "dark" | "system";
|
||||
|
||||
export interface ApiKeys {
|
||||
@@ -398,6 +398,7 @@ export const useAppStore = create<AppState & AppActions>()(
|
||||
partialize: (state) => ({
|
||||
projects: state.projects,
|
||||
currentProject: state.currentProject,
|
||||
currentView: state.currentView,
|
||||
theme: state.theme,
|
||||
sidebarOpen: state.sidebarOpen,
|
||||
apiKeys: state.apiKeys,
|
||||
|
||||
Reference in New Issue
Block a user