#11549: lint: add no-console rule and migrate 5 files to structured logger
channel: whatsapp-web
stale
Cluster:
Hooks and UI Fixes
## Summary
Addresses #11513
Adds an oxlint `eslint/no-console` rule and migrates 5 files from `console.*` to the structured `createSubsystemLogger` pattern.
## Changes
- **`.oxlintrc.json`**: Added `eslint/no-console: warn` rule with test file exemption
- **5 files migrated** to use `createSubsystemLogger`:
- `src/infra/tailscale.ts`
- `src/infra/retry-policy.ts`
- `src/terminal/restore.ts`
- `src/entry.ts`
- `src/web/login.ts`
## Why `warn` instead of `error`?
There are ~248 remaining `console.*` instances in the codebase. Setting the rule to `warn` allows:
1. Gradual migration without breaking CI
2. Visibility into remaining work
3. Follow-up PRs to continue the migration
## Testing
- [x] `pnpm build` - passes
- [x] `pnpm check` - passes (248 warnings, 0 errors)
## AI-Assisted
This PR was AI-assisted using Claude Code. The changes were reviewed and tested locally.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds an oxlint `eslint/no-console` rule (set to `warn`, with a test-file override) and migrates five modules off `console.*` onto the structured `createSubsystemLogger` API.
Most changes are straightforward mechanical replacements, but a couple of the migrations also change *where* messages are emitted (structured logger vs `runtime` sink / CLI output). In particular, `src/web/login.ts` now logs end-user status/errors via a subsystem logger instead of the runtime-aware logging helpers, and `src/infra/tailscale.ts` mixes subsystem logging with `runtime.error(...)` in the same failure path, which can lead to duplicated or misplaced output depending on logger/runtime configuration.
<h3>Confidence Score: 4/5</h3>
- Safe to merge after addressing a couple of output-routing behavior changes.
- The lint config change is low-risk and the console-to-logger migrations are mostly mechanical, but a few replacements alter how user-facing messages are emitted (runtime sink vs structured logger), which can affect CLI UX or cause duplicate/missing output in some configurations.
- src/web/login.ts, src/infra/tailscale.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#23669: refactor(logging): migrate node-host and tailscale console calls to...
by kevinWangSheng · 2026-02-22
86.0%
#11153: refactor(hooks): replace console.warn/error with subsystem logger
by hclsys · 2026-02-07
81.7%
#9425: refactor(agents): replace console.warn with SubsystemLogger in comp...
by dinakars777 · 2026-02-05
77.3%
#9974: refactor(agents): replace console.warn with SubsystemLogger in comp...
by dinakars777 · 2026-02-05
77.2%
#11281: fix(logging): prevent subsystem loggers from bypassing file log lev...
by janckerchen · 2026-02-07
76.1%
#9461: refactor(cli): replace console.warn with SubsystemLogger in health.ts
by dinakars777 · 2026-02-05
75.9%
#15253: Adding structured log content
by emailhxn · 2026-02-13
75.9%
#11305: fix(logging): remove redundant subsystem prefix from log output
by janckerchen · 2026-02-07
75.6%
#13838: UI: fix config panel CI failures and modularize rendering
by fresed05 · 2026-02-11
75.4%
#5884: fix: curly lint errors and formal conformance fork permissions
by codearranger · 2026-02-01
75.2%