Skip to content

[CLEANUP] Code Cleanup and Minor Refactoring #754

@SE7EN2028

Description

@SE7EN2028

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:

  1. Open the listed components/modules.
  2. Notice unused console.log statements.
  3. Identify old TODO comments.
  4. See minor unused props (e.g., index in TypeInfo.jsx).

Expected behavior

  • No unnecessary debug logging in production code.
  • Cleaner, more consistent error handling (console.error where 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 with console.error.
  • db.js

    • Remove console.log(e).
  • ControlPanel.jsx

    • Remove console.log(error).
  • CodeEditor/index.jsx

    • Remove console.log(e).
  • Modal.jsx

    • Remove console.log(error).

Refactoring

  • TypeInfo.jsx

    • Remove usage of index prop since data.id is guaranteed to exist.
    • Remove outdated TODO comment.
  • dbml.js

    • Remove outdated TODO comment (// TODO: remove after a while)
      while keeping timestamptz mapping logic for DBML compatibility.

Manual Verification Plan

  1. Run npm run lint (if ESLint is functional; otherwise manual check).
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions