Add comprehensive comments to code changes#70
Merged
JoshuaAFerguson merged 1 commit intoNov 17, 2025
Conversation
Add detailed JSDoc and GoDoc comments to all files modified in today's commits to improve code maintainability and developer experience. API Backend (Go): - api/internal/api/stubs.go: Add comprehensive package-level documentation explaining stub endpoints, backwards compatibility, K8s resource management, compliance stubs, and WebSocket upgrader security configuration - Enhanced GetMetrics function documentation with data source explanations WebSocket Hooks (TypeScript): - ui/src/hooks/useWebSocket.ts: Add detailed JSDoc to all hooks including @param, @returns, @example tags; document custom backoff strategy - ui/src/hooks/useEnterpriseWebSocket.ts: Add comprehensive JSDoc for enterprise WebSocket hook, useWebSocketEvent, and all 13 predefined event hooks with block comment explaining event types UI Components (React): - ui/src/pages/admin/Nodes.tsx: Add file-level JSDoc documenting node management features, operations, workflows, and real-time updates - ui/src/pages/admin/Compliance.tsx: Add file-level JSDoc documenting compliance frameworks, policy types, violation management, and plugin integration Documentation Improvements: - All hooks now have comprehensive JSDoc with parameter descriptions, return value documentation, and usage examples - Backoff strategy clearly documented (30s, 15s, 15s, then 60s pattern) - WebSocket security features explained (origin validation, token auth) - All predefined event hooks have descriptive single-line JSDoc - Admin pages have comprehensive feature lists and workflow descriptions Related Files Already Well-Documented: - api/internal/handlers/nodes.go: Already has excellent documentation - api/internal/k8s/client.go: Already has comprehensive package docs - ui/src/pages/admin/Scaling.tsx: Already has detailed JSDoc This ensures all code changed today is thoroughly documented for future developers and maintainers.
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.
Add detailed JSDoc and GoDoc comments to all files modified in today's commits to improve code maintainability and developer experience.
API Backend (Go):
WebSocket Hooks (TypeScript):
UI Components (React):
Documentation Improvements:
Related Files Already Well-Documented:
This ensures all code changed today is thoroughly documented for future developers and maintainers.