fix(turbopack): drop pino logger from berth-range — async_hooks leaked to client bundle
Same client-server boundary bug class as adf4e2b. berth-range.ts
imported `logger` (-> request-context.ts -> node:async_hooks) for
two debug/warn calls. external-eoi-upload-dialog.tsx is a client
component and imports formatBerthRange — Turbopack chunked
async_hooks into the client bundle and crashed with:
Code generation for chunk item errored
Caused by: the chunking context (unknown) does not support
external modules (request: node:async_hooks)
Surface was the entire interest detail page on every viewport: dev
shell rendered the Turbopack overlay instead of the actual UI, so
the planned visual audit couldn't take any meaningful screenshots.
Replaced logger.debug + logger.warn with a single console.warn that
summarises non-canonical moorings. console.warn is safe in both
server and client contexts and the formatter's failure mode is
non-critical (verbatim passthrough — no data loss).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@@ -20,7 +20,12 @@
|
||||
* (plan §1).
|
||||
*/
|
||||
|
||||
import { logger } from '@/lib/logger';
|
||||
// Note: this module is imported by client components (e.g. the EOI
|
||||
// upload dialog), so we deliberately avoid `@/lib/logger` — that file
|
||||
// pulls in `request-context.ts` which uses `node:async_hooks`, an
|
||||
// import Turbopack can't include in a client bundle. `console.warn`
|
||||
// works on both client and server and is more than enough for a
|
||||
// formatter warning.
|
||||
|
||||
const CANONICAL = /^([A-Z]+)(\d+)$/;
|
||||
|
||||
@@ -61,19 +66,17 @@ export function formatBerthRange(mooringNumbers: readonly string[]): string {
|
||||
const p = tryParse(m);
|
||||
if (p) parsed.push(p);
|
||||
else {
|
||||
// Per-mooring is debug to keep logs quiet when archived rows
|
||||
// (with " (archived)" / " (deleted)" suffixes) flow through a
|
||||
// bundle; the single summary `warn` below makes the situation
|
||||
// observable without spamming.
|
||||
logger.debug({ mooring: m }, 'formatBerthRange: non-canonical mooring; passing through');
|
||||
// Per-mooring debug intentionally omitted to keep noise down;
|
||||
// the single summary warn below makes the situation observable.
|
||||
passthrough.push(m);
|
||||
}
|
||||
}
|
||||
|
||||
if (passthrough.length > 0) {
|
||||
logger.warn(
|
||||
{ count: passthrough.length, samples: passthrough.slice(0, 3) },
|
||||
'formatBerthRange: non-canonical moorings passed through (verbatim, not range-compressed)',
|
||||
console.warn(
|
||||
'formatBerthRange: %d non-canonical moorings passed through (samples: %o)',
|
||||
passthrough.length,
|
||||
passthrough.slice(0, 3),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
BIN
tmp/visual-audit-2026-05-22/01-login/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/01-login/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/01-login/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/01-login/375.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/01-login/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/02-dashboard/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/02-dashboard/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/02-dashboard/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/02-dashboard/375.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
tmp/visual-audit-2026-05-22/02-dashboard/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/03-clients/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/03-clients/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/03-clients/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/03-clients/375.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
tmp/visual-audit-2026-05-22/03-clients/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/04-client-detail/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/04-client-detail/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/04-client-detail/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/04-client-detail/375.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
tmp/visual-audit-2026-05-22/04-client-detail/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/05-interests/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/05-interests/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/05-interests/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/05-interests/375.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
tmp/visual-audit-2026-05-22/05-interests/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/06-interest-detail/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/06-interest-detail/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/06-interest-detail/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/06-interest-detail/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/06-interest-detail/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/07-berths/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/07-berths/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/07-berths/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/07-berths/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/07-berths/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/08-berth-detail/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/08-berth-detail/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/08-berth-detail/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/08-berth-detail/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/08-berth-detail/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/09-yachts/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/09-yachts/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/09-yachts/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/09-yachts/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/09-yachts/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/10-yacht-detail/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/10-yacht-detail/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/10-yacht-detail/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/10-yacht-detail/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/10-yacht-detail/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/11-companies/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/11-companies/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/11-companies/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/11-companies/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/11-companies/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/12-reservations/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/12-reservations/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/12-reservations/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/12-reservations/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/12-reservations/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/13-documents/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/13-documents/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/13-documents/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/13-documents/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/13-documents/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/14-reports/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/14-reports/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/14-reports/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/14-reports/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/14-reports/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/15-website-analytics/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/15-website-analytics/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/15-website-analytics/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/15-website-analytics/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/15-website-analytics/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/16-admin/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/16-admin/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/16-admin/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/16-admin/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/16-admin/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/17-admin-email/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/17-admin-email/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/17-admin-email/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/17-admin-email/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/17-admin-email/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/18-admin-branding/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/18-admin-branding/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/18-admin-branding/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/18-admin-branding/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/18-admin-branding/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/19-portal-login/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/19-portal-login/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/19-portal-login/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/19-portal-login/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
tmp/visual-audit-2026-05-22/19-portal-login/768.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
tmp/visual-audit-2026-05-22/20-residential/1024.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tmp/visual-audit-2026-05-22/20-residential/1440.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
tmp/visual-audit-2026-05-22/20-residential/1920.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
tmp/visual-audit-2026-05-22/20-residential/375.png
Normal file
|
After Width: | Height: | Size: 59 KiB |