Skip to content

[Bug] Leftover debug console.log statements in WebAPP/App/ controllers and models #436

@parthdagia05

Description

@parthdagia05

Summary

Several frontend controllers and model files in WebAPP/App/ contain leftover console.log debug statements that fire during normal user actions - page loads, cell edits, case selections, technology deletions, etc.

Grepping WebAPP/App/ for active (uncommented) console.log calls returns 25 sites across 20 files. Examples:

  • WebAPP/App/Controller/AddCase.js:99 - console.log('model ', model) on every Add Case page render (dumps the entire model object)
  • WebAPP/App/Controller/DataFile.js:585 - on every case selection
  • WebAPP/App/Controller/RYS.js:54, RYT.js:54 - on every parameter page open
  • WebAPP/App/Model/RESViewer.Model.js:211-215 - five logs per RES viewer render

This is consistent with the cleanup precedent set by PR #422, which removed similar debug console.log calls from Pivot.js, DataModelResult.Class.js, and Const.Class.js during the v5.5 sync.

What did you expect? (optional)

Production frontend code should not emit debug logs during normal user interactions. Browser DevTools console should stay clean unless an actual error occurs (console.error is fine and intentional).

How can we reproduce it?

  1. Check out current main (commit 5f8f89a)
  2. Open the app and load the Add Case page → DevTools console shows model {...} dump
  3. Select a case from the case picker → console shows select, {...} dump
  4. Edit a season name in the seasons grid → console shows seId ... log
  5. Open any RT-family parameter page → console shows model {...} dump

Static repro:

grep -rn --include='*.js' '^[[:space:]]*console\.log' WebAPP/App/

Returns 25 hits across 20 files in Controllers and Models.

Environment (optional)

Branch: main @ 5f8f89a
Affected files: WebAPP/App/Controller/.js, WebAPP/App/Model/.js
Browser-agnostic (any modern browser will display the logs)

Logs or screenshots (optional)

No response

Related issue, PR, or discussion (optional)

Precedent: PR #422 ("Absorb MUIO v5.5 changes") removed similar debug console.log statements from WebAPP/AppResults/Controller/Pivot.js, WebAPP/Classes/DataModelResult.Class.js, and WebAPP/Classes/Const.Class.js. This issue extends the same cleanup pattern to the remaining sites under WebAPP/App/.

Note: WebAPP/Classes/*.js also contains a few similar lines, but those files are upstream-overlap surface per docs/UPSTREAM_SYNC.md. Leaving those out of scope to avoid conflicts at the next upstream sync — happy to file a separate issue for them if maintainers prefer.

Plan: open a narrow PR removing only the active calls in WebAPP/App/ (~56 line deletions across 20 files). Will preserve console.error and commented-out lines.

Proposed track

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions