Skip to content

chore: remove signature save debug logging - #193

Open
sandeep-2536 wants to merge 2 commits into
vicharanashala:mainfrom
sandeep-2536:chore/remove-signature-debug-logging
Open

sandeep-2536 wants to merge 2 commits into
vicharanashala:mainfrom
sandeep-2536:chore/remove-signature-debug-logging

Conversation

@sandeep-2536

Copy link
Copy Markdown

What was there

SignatureTool.tsx had leftover development debug logging that ran every time a
user saved a signature. It logged the original file size, the outgoing payload
size, and request content-type/content-length details straight to the browser
console:

console.log('Original file size:', originalSize);
console.log('Payload size:', payloadSize);
console.log('Content-Type:', contentType);
console.log('Content-Length:', payloadSize);

This looked like instrumentation left over from development that was never
cleaned up before the feature shipped — it exposed internal request details
in the production console on every signature save.

Fix

  • Removed all 4 console.log statements
  • Removed the originalSize state variable, which existed only to feed these
    logs and had no other use in the component
  • No functional/behavioral change — the signature save flow works exactly as
    before, just without the console noise

How this was found

Found via manual code review of the Tee signature flow, not from an assigned
GitHub issue.

Testing

  • Added SignatureTool.test.tsx covering the upload-and-save flow to confirm
    behavior is unaffected by this cleanup
  • Manually tested locally: drew/uploaded a signature, saved it, confirmed the
    request still succeeds and the debug logs no longer appear in console
  • pnpm exec tsc --noEmit passes
  • pnpm test — new SignatureTool.test.tsx passes. Note: 3 unrelated test
    suites (api.test.ts, PremiumTee.test.ts, GoldenTicketDetailPage.test.tsx)
    fail on main as well, due to a pre-existing tooling error
    (jsTokens is not a function) unrelated to this change.

Leftover browser-console logs exposed request/payload details
each time a signature was saved in production.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant