-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
The codebase contains several leftover console.log statements, outdated TODO comments, and minor unused props that reduce clarity and maintainability.
This issue tracks the cleanup of unnecessary logs, removal of obsolete TODOs, and small refactor improvements.
To Reproduce
Not a functional bug, but the issues can be observed by reviewing the following files:
- Open the listed components/modules.
- Notice unused
console.logstatements. - Identify old TODO comments.
- See minor unused props (e.g.,
indexinTypeInfo.jsx).
Expected behavior
- No unnecessary debug logging in production code.
- Cleaner, more consistent error handling (
console.errorwhere appropriate). - Removal of unused props and outdated TODOs.
- Improved code readability with zero functional changes.
Proposed Changes
Cleanup
-
Workspace.jsx
- Remove
console.log(error)or replace withconsole.error.
- Remove
-
db.js
- Remove
console.log(e).
- Remove
-
ControlPanel.jsx
- Remove
console.log(error).
- Remove
-
CodeEditor/index.jsx
- Remove
console.log(e).
- Remove
-
Modal.jsx
- Remove
console.log(error).
- Remove
Refactoring
-
TypeInfo.jsx
- Remove usage of
indexprop sincedata.idis guaranteed to exist. - Remove outdated TODO comment.
- Remove usage of
-
dbml.js
- Remove outdated TODO comment (
// TODO: remove after a while)
while keeping timestamptz mapping logic for DBML compatibility.
- Remove outdated TODO comment (
Manual Verification Plan
- Run
npm run lint(if ESLint is functional; otherwise manual check). - Verify that:
- Diagrams load correctly (changes in Workspace.jsx).
- The Types tab behaves correctly (changes in TypeInfo.jsx).
- DBML export still works as expected (changes in dbml.js).
Screenshots
No screenshots required for this cleanup task.
Desktop (please complete the following information):
- OS: Any
- Browser: Any
Additional context
These changes are purely cleanup/refactoring and introduce no new functionality.
If any removed logs are needed for production debugging, please let me know.
Metadata
Metadata
Assignees
Labels
No labels