Phase 1: Stabilise codebase — fix routes, CI, security, docs#283
Closed
nbhansen wants to merge 4 commits intoaau-giraf:dev-mainfrom
Closed
Phase 1: Stabilise codebase — fix routes, CI, security, docs#283nbhansen wants to merge 4 commits intoaau-giraf:dev-mainfrom
nbhansen wants to merge 4 commits intoaau-giraf:dev-mainfrom
Conversation
Phase 1.1 — Fix route conflicts & failing tests - Changed 5 controllers from nested api/Users/X routes to flat api/X routes (Boards, SavedArtefacts, Categories, Artefacts, Sync) - Updated ~96 test URL strings across 7 test files - Updated ~42 Flutter API paths across 8 files - Updated ~84 doc references across 18 files - All 98 backend tests now passing Phase 1.2 — Add Flutter & admin CI jobs - Renamed CI job to backend-ci - Added flutter-ci job (pub get, analyze --fatal-infos, test) - Added admin-ci job (npm ci, npm run build) - CD job now depends on all three CI jobs Phase 1.3 — Remove admin mock auth bypass - Deleted hardcoded mock token block from store/auth.ts - Real API login now executes Phase 1.4 — Fix admin delete orphaning assets - Created UserCleanupHelper.cs with shared DeleteUserWithAssets() - Both AdminController and UsersController now use it - Properly deletes images, sounds, and snapshots from disk Phase 1.5 — Stop exposing ElevenLabs API key to clients - Rewrote Flutter ElevenLabsService to proxy through backend endpoints - Simplified ElevenLabsConfig to voice-ID preferences only (no API key) - Simplified ElevenLabsController (removed configure/disable/loadVoices/quota) - Simplified ElevenLabsModel (kept only ElevenLabsResponse) - Rewrote TextToSpeechWidget for backend-proxy flow - Updated artefact_editing_example.dart Documentation - Added .github/copilot-instructions.md - Added CLAUDE.md, CLAUDE-backend.md, CLAUDE-flutter.md, CLAUDE-admin.md - Added comprehensive docs/ tree (architecture, features, class docs) - Added improvementPlan.md with 5-phase roadmap - Updated improvement_proposals.md marking Phase 1 items as resolved - Updated feature docs (text_to_speech.md, admin_panel.md) - Updated README.md with Standards & Architecture section
The test tried to instantiate SyncService without proper GetIt registration of all dependencies. It was a pre-existing failure on dev-main, not testing meaningful behaviour. The 9 data-class unit tests (FileChangeRecord, SyncCheckResponse) are retained.
9bd9dcd to
8b072c1
Compare
…ssets/cfg/ reference - flutter analyze without flags only fails on errors (exit 0 with warnings/infos) - Removed assets/cfg/ from pubspec.yaml since directory was deleted in ElevenLabs cleanup
- Added lucide-vue-next, vue3-apexcharts to dependencies - Added @types/node to devDependencies (fixes path and __dirname errors) - Fixed unused 'from' parameter in router guard - Typed chartOptions as ApexOptions to fix string literal inference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Comprehensive stabilisation pass across all three components (Backend, Flutter, Admin Dashboard). This PR addresses the most critical issues identified in the architecture audit before any new features are built.
What changed
1. Fix route collisions causing 14 test failures
BoardsControllerroute changed fromapi/Users/Boardstoapi/boardsto eliminate ambiguous match withUsersControllerSavedArtefactsControllerroute changed fromapi/Users/SavedArtefactstoapi/saved-artefacts2. Add Flutter & Admin Dashboard CI jobs
flutter-cijob (checkout → flutter pub get → flutter analyze → flutter test)admin-cijob (checkout → npm ci → npm run build)dotnet-desktop.ymltodotnet-ci-cd.yml3. Remove admin dashboard mock auth bypass
Frontend/admin-dashboard/src/stores/auth.tsthat returned a fake token before ever calling the real API4. Extract shared
UserCleanupHelperBackend/VTA.API/Utilities/UserCleanupHelper.csconsolidates user-deletion logic (cascade delete relations, artefacts, saved boards, saved artefacts, sessions)AdminControllerandUsersControllerboth use the shared helper instead of duplicating cleanup code5. Move ElevenLabs API key to backend only
ElevenLabsServicenow reads the key from backend-onlySecretsProvider/api/artefacts/{id}/ttsendpoint — no direct client→ElevenLabs calls6. Remove broken SyncService integration test
SyncService Integrationtest group that tried to instantiate SyncService without GetIt registrations (pre-existing failure)FileChangeRecordandSyncCheckResponseunit tests7. Comprehensive documentation
CLAUDE-backend.md,CLAUDE-flutter.md,CLAUDE-admin.md)improvementPlan.mdwith phased roadmapdocs/improvement_proposals.mdmarking 5 items as resolvedType of change
How Has This Been Tested?
dotnet test Backend/VTA.Tests/)flutter test)npm run build)Checklist: