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:
catlog22
2026-01-31 21:20:10 +08:00
parent 6d225948d1
commit 1bd082a725
79 changed files with 5870 additions and 449 deletions

View File

@@ -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'] });