-
Notifications
You must be signed in to change notification settings - Fork 2
fix: remove debug console.log statements from conversionHelpers #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
303f6e4 to
167f0d8
Compare
Remove debug logging statements that were accidentally left in: - conversionHelpers.ts: 12 console.log statements and unused isProxy helper - SimulationAdapter.ts: 4 console.log statements - HouseholdAdapter.ts: 2 console.warn statements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
167f0d8 to
c28f9b5
Compare
anth-volk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @MaxGhenis. There are some console.warn() and console.error() statements that I think we want to keep for RUM monitoring purposes.
| householdData[camelKey] = value as any; | ||
| } catch (error) { | ||
| // If entity not found in metadata, still include it but log warning | ||
| console.warn(`Entity "${key}" not found in metadata, including anyway`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue, blocking: We do want console.warn statements. We'll use these with RUM monitoring down the road to diagnose bugs.
| } else { | ||
| // If not found in metadata, try snake_case conversion | ||
| const snakeKey = key.replace(/([A-Z])/g, '_$1').toLowerCase(); | ||
| console.warn(`Entity "${key}" not found in metadata, using snake_case "${snakeKey}"`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue, blocking: Here, too, let's keep the console.warn()
| parsedKeys: parsedOutput ? Object.keys(parsedOutput) : [], | ||
| }); | ||
| } catch (error) { | ||
| console.error('[SimulationAdapter.fromMetadata] Failed to parse output:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue, blocking: Let's keep this console.error()
| test('given entity not in metadata then includes it anyway', () => { | ||
| const result = HouseholdAdapter.fromMetadata(mockHouseholdMetadataWithUnknownEntity); | ||
|
|
||
| expect(console.warn).toHaveBeenCalledWith( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue, non-blocking: Perhaps better to keep this, since we'd be looking to keep the console.warn(), as well
| test('given entity not in metadata then toCreationPayload uses snake_case', () => { | ||
| const result = HouseholdAdapter.toCreationPayload(mockHouseholdDataWithUnknownEntity, 'uk'); | ||
|
|
||
| expect(console.warn).toHaveBeenCalledWith( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue, non-blocking: Better to keep
| const result = HouseholdAdapter.fromMetadata(metadata as any); | ||
|
|
||
| expect(result.householdData.people).toBeDefined(); | ||
| expect(console.warn).toHaveBeenCalled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue, non-blocking: Here, too
|
Feel free to revise the PR as you see fit. Was just a bit annoying seeing all the messages about these when filing unrelated PRs. |
Summary
Remove debug logging statements that were accidentally left in adapter files.
Files fixed
app/src/adapters/conversionHelpers.ts- Removed 12console.logstatements and unusedisProxyhelper functionapp/src/adapters/SimulationAdapter.ts- Removed 4console.logstatementsapp/src/adapters/HouseholdAdapter.ts- Removed 2console.warnstatementsWhy
These debug statements were causing lint warnings and polluting the browser console in production.
🤖 Generated with Claude Code