-
Notifications
You must be signed in to change notification settings - Fork 0
Add codebase refactoring standards and implement full logging compliance #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…gging Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
|
@copilot What code changes do we need ti implement to be compliant with new standard please analyze and propose ir even better change codebase ( refactor ) |
… with logger, add response models Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
I've analyzed the codebase against the refactoring standards and implemented the high-priority changes in commits Completed Refactoring:
Files Changed:
Remaining Items (documented for future work):
The implementation checklist in |
|
@copilot What is the purpouse of first 3 remaining items? |
The first 3 remaining items serve these purposes: 1. Base Service Class (
2. Custom React Hooks (
3. TypeScript Strict Mode
These are medium-priority items that improve maintainability but require more extensive changes than the logging/response model fixes. |
|
@copilot Implement but test after to confirm all is working as it was before |
…React hooks Co-authored-by: goranjovic55 <83976007+goranjovic55@users.noreply.github.com>
Implemented all 3 items in commit 1. Base Service Class (
2. Custom React Hooks (
3. TypeScript Strict Mode
Testing:
The implementation checklist is updated to reflect all completed items. |
backend/app/services/base_service.py) ✅ NEWfrontend/src/hooks/) ✅ NEWLatest Changes
Base Service Class (
backend/app/services/base_service.py)Generic base class providing reusable CRUD operations:
get_by_id(id)- Get single recordget_all(skip, limit)- Get paginated recordscreate(data)- Create new recordupdate(id, data)- Update existing recorddelete(id)- Delete by IDdelete_all()- Delete all recordscount()- Total record countexists(id)- Check if existsCustom React Hooks (
frontend/src/hooks/)Query hooks with @tanstack/react-query:
useAssets()- Fetch assets with cachinguseDeleteAllAssets()- Delete mutationuseStartScan()- Scan mutationuseScanStatus()- Poll scan statususeAgents()- Fetch agentsuseCreateAgent(),useUpdateAgent(),useDeleteAgent(),useKillAgent()useGenerateAgent()- Generate agent fileBackend Tests
73 passed, 1 pre-existing failure (not related to changes)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.