claude-os/frontend
Bob Roberts 9788518c4c Add document delete functionality to Knowledge Base Management
✨ Features Added:
- Delete button on each document card (appears on hover)
- Confirmation modal with document preview before deletion
- Backend DELETE API endpoint for removing documents
- Frontend integration with React Query mutations
- Proper error handling and success feedback

📝 Implementation Details:
- New deleteDocument() API function in frontend/src/lib/api.ts
- Delete button styled in blaze-orange with hover effects
- Modal dialog with file name display and confirmation
- Automatic KB stats and document list refresh after deletion

🎯 User Experience:
- Delete button hidden until hover (prevents accidental clicks)
- Confirmation modal prevents irreversible mistakes
- Real-time list updates after deletion
- Success/error messages with 3s auto-dismiss

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 19:09:58 -05:00
..
public Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
src Add document delete functionality to Knowledge Base Management 2025-10-24 19:09:58 -05:00
.gitignore Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
eslint.config.js Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
index.html Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
package-lock.json mostly working correctly 2025-10-24 16:17:47 -05:00
package.json Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
postcss.config.js Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
README.md Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
tailwind.config.js mostly working correctly 2025-10-24 16:17:47 -05:00
tsconfig.app.json Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
tsconfig.json Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
tsconfig.node.json Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00
vite.config.ts Major updates to use react and agent os profiles 2025-10-23 19:23:05 -05:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])