mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: add tests and implementation for issue discovery and queue pages
- Implemented `DiscoveryPage` with session management and findings display. - Added tests for `DiscoveryPage` to ensure proper rendering and functionality. - Created `QueuePage` for managing issue execution queues with stats and actions. - Added tests for `QueuePage` to verify UI elements and translations. - Introduced `useIssues` hooks for fetching and managing issue data. - Added loading skeletons and error handling for better user experience. - Created `vite-env.d.ts` for TypeScript support in Vite environment.
This commit is contained in:
@@ -63,7 +63,7 @@ export function useMemory(options: UseMemoryOptions = {}): UseMemoryReturn {
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: workspaceQueryKeys.memoryList(projectPath),
|
||||
queryFn: fetchMemories,
|
||||
queryFn: () => fetchMemories(projectPath),
|
||||
staleTime,
|
||||
enabled: queryEnabled,
|
||||
retry: 2,
|
||||
@@ -137,7 +137,7 @@ export function useCreateMemory(): UseCreateMemoryReturn {
|
||||
const projectPath = useWorkflowStore(selectProjectPath);
|
||||
|
||||
const mutation = useMutation({
|
||||
mutationFn: createMemory,
|
||||
mutationFn: (input: { content: string; tags?: string[] }) => createMemory(input, projectPath),
|
||||
onSuccess: () => {
|
||||
// Invalidate memory cache to trigger refetch
|
||||
queryClient.invalidateQueries({ queryKey: projectPath ? workspaceQueryKeys.memory(projectPath) : ['memory'] });
|
||||
@@ -163,7 +163,7 @@ export function useUpdateMemory(): UseUpdateMemoryReturn {
|
||||
|
||||
const mutation = useMutation({
|
||||
mutationFn: ({ memoryId, input }: { memoryId: string; input: Partial<CoreMemory> }) =>
|
||||
updateMemory(memoryId, input),
|
||||
updateMemory(memoryId, input, projectPath),
|
||||
onSuccess: () => {
|
||||
// Invalidate memory cache to trigger refetch
|
||||
queryClient.invalidateQueries({ queryKey: projectPath ? workspaceQueryKeys.memory(projectPath) : ['memory'] });
|
||||
@@ -188,7 +188,7 @@ export function useDeleteMemory(): UseDeleteMemoryReturn {
|
||||
const projectPath = useWorkflowStore(selectProjectPath);
|
||||
|
||||
const mutation = useMutation({
|
||||
mutationFn: deleteMemory,
|
||||
mutationFn: (memoryId: string) => deleteMemory(memoryId, projectPath),
|
||||
onSuccess: () => {
|
||||
// Invalidate to ensure sync with server
|
||||
queryClient.invalidateQueries({ queryKey: projectPath ? workspaceQueryKeys.memory(projectPath) : ['memory'] });
|
||||
|
||||
Reference in New Issue
Block a user