Skip to content

Commit 265daa4

Browse files
committed
cli: reduce ad logging
1 parent dd9cc9f commit 265daa4

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

cli/src/components/ad-banner.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ const extractDomain = (url: string): string => {
2222
}
2323

2424
export const AdBanner: React.FC<AdBannerProps> = ({ ad }) => {
25-
useEffect(() => {
26-
logger.info(
27-
{ adText: ad.adText?.substring(0, 50), hasClickUrl: !!ad.clickUrl },
28-
'[gravity] Rendering AdBanner',
29-
)
30-
}, [ad])
3125
const theme = useTheme()
3226
const { separatorWidth, terminalWidth } = useTerminalDimensions()
3327
const [isLinkHovered, setIsLinkHovered] = useState(false)

cli/src/hooks/use-gravity-ad.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ export const useGravityAd = (): GravityAdState => {
5858
if (isActive && ad?.impUrl && !impressionFiredRef.current.has(ad.impUrl)) {
5959
const currentImpUrl = ad.impUrl
6060
impressionFiredRef.current.add(currentImpUrl)
61-
logger.info(
62-
{ impUrl: currentImpUrl },
63-
'[gravity] Recording ad impression',
64-
)
65-
6661
const authToken = getAuthToken()
6762
if (!authToken) {
6863
logger.warn('[gravity] No auth token, skipping impression recording')
@@ -196,13 +191,8 @@ export const useGravityAd = (): GravityAdState => {
196191

197192
rotationTimerRef.current = setTimeout(async () => {
198193
adsShownRef.current += 1
199-
logger.info(
200-
{ adsShown: adsShownRef.current, max: MAX_ADS_AFTER_ACTIVITY },
201-
'[gravity] Ad cycle complete',
202-
)
203194

204195
if (adsShownRef.current >= MAX_ADS_AFTER_ACTIVITY) {
205-
logger.info('[gravity] Max ads shown, pausing rotation')
206196
isPausedRef.current = true
207197
return
208198
}
@@ -222,7 +212,6 @@ export const useGravityAd = (): GravityAdState => {
222212
adsShownRef.current = 0
223213

224214
if (wasPaused) {
225-
logger.info('[gravity] User active, resuming ad rotation')
226215
isPausedRef.current = false
227216
scheduleRotation()
228217
}
@@ -259,7 +248,6 @@ export const useGravityAd = (): GravityAdState => {
259248

260249
if (hasUserMessage) {
261250
unsubscribe()
262-
logger.info('[gravity] First user message detected, starting ads')
263251
setIsActive(true)
264252
}
265253
})

0 commit comments

Comments
 (0)