agenta icon indicating copy to clipboard operation
agenta copied to clipboard

(chore) The organization fetcher logs emoji debug lines to the browser console on every settings page

Open mmabrouk opened this issue 3 months ago • 4 comments

Opening the browser console on any settings page shows a run of emoji-prefixed debug lines from the organization fetcher:

✅ Single organization fetcher success: [object Object]
🔍 Organizations fetcher debug: [object Object]
🚀 Calling fetchJson with URL: <origin>/api/organizations
✅ Organizations fetcher success: [object Object]

These are application-level console.log calls, not framework or dependency output, so unless they are stripped at build time they run for real users too. The organization fetcher loads on every settings page, so this is the normal console state rather than an edge case — which makes the console noisier to work in when debugging something else.

The 🚀 Calling fetchJson with URL: line also prints a full API URL on every call.

Steps to reproduce

  1. Open the browser devtools console.
  2. Navigate to Settings (any tab).
  3. Read the console output.

Expected: no application debug logging in a normal page load, or logging gated behind a development-only flag.

Actual: four or more emoji-prefixed console.log lines from the organization fetcher on each load.

Where it reproduces

A local development build at the v0.112.0 release tip, commit 91c83794f1. Found during v0.112.0 release QA — worth confirming whether these survive a production build before deciding how to handle them.

mmabrouk avatar Aug 12 '26 10:08 mmabrouk

AGE-4105

linear-code[bot] avatar Aug 12 '26 10:08 linear-code[bot]

Hi! I'd like to work on this issue if it's still available.

I confirmed on current main (728f39f9df0e8a278e1d3fc1a527fba202d7110e) that web/oss/src/services/organization/api/index.ts still contains six console.log calls across fetchAllOrgsList and fetchSingleOrg. I also checked the OSS/EE Next.js production configs and found no removeConsole or drop_console setting, so these calls are not intentionally stripped there.

My proposed scope is deliberately narrow:

  • remove the six debug/call/success console.log calls from those two fetchers;
  • preserve the two console.error failure logs and the existing fallback behavior;
  • make no API or behavioral changes.

I plan to verify the touched file with Prettier and ESLint, run the OSS TypeScript check, and include before/after browser-console evidence in the PR.

Is this scope acceptable, and could you assign #5972 to me if there is no overlapping work?

SJY051 avatar Aug 12 '26 17:08 SJY051

thanks @SJY051. i assigned this to you. please open a pr when you are ready.

mmabrouk avatar Aug 18 '26 06:08 mmabrouk

Fixed in #6095

bekossy avatar Aug 18 '26 11:08 bekossy