Skip to content

fix(dashboard): resolve broken Card import breaking next build (base-red from #6061) - #6155

Merged
diegosouzapw merged 2 commits into
release/v3.8.44from
fix/release-v3.8.44-cooling-panel-card-import
Jul 4, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.44from
fix/release-v3.8.44-cooling-panel-card-import

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Problem — release-blocking base-red

next build on release/v3.8.44 (tip 415d159c8) fails to compile:

./src/app/(dashboard)/dashboard/providers/[id]/components/CoolingConnectionsPanel.tsx
Module not found: Can't resolve '@/components/ui/card'
> Build failed because of webpack errors

CoolingConnectionsPanel (introduced by #6061, e9d83e7c3) imports Card from @/components/ui/card — a shadcn-style path that does not exist in this repo (there is no src/components/ui/; the repo's card lives at @/shared/components/Card). It is the only @/components/ui/* reference in the whole tree.

It slipped in because the PR→release fast-gates do not run next build (only the release PR → main does), so the broken import wasn't caught at merge time. This would blow up the next /generate-release.

Fix

  • The <Card> here was only a styled container, so replace it with a <div> carrying the equivalent Tailwind classes (border/bg/padding + rounded-card shadow-sm to keep the card look). Faithful drop-in — no behavior change.
  • Normalize the file CRLF → LF (it shipped with CRLF, off the repo's LF/prettier standard).

Validation (Rule #18 — TDD)

New tests/unit/ui/CoolingConnectionsPanel.test.tsx (vitest/jsdom):

Regression guard lives in tests/unit/ui/ so test:vitest:ui picks it up.

…red from #6061)

CoolingConnectionsPanel imported `Card` from `@/components/ui/card`, a path
that does not exist in this repo (there is no shadcn-style `src/components/ui/`).
The PR->release fast-gates do not run `next build`, so the broken import slipped
in and `next build` failed with:

  Module not found: Can't resolve '@/components/ui/card'

Fix: the <Card> here was only a styled container, so replace it with a <div>
carrying the equivalent Tailwind classes (border/bg/padding + rounded-card
shadow-sm). Also normalize the file from CRLF to LF (it shipped with CRLF).

Adds a vitest/jsdom regression test (tests/unit/ui/CoolingConnectionsPanel.test.tsx)
that fails-without-fix (Vite: 'Failed to resolve import @/components/ui/card')
and passes with it, plus renders/empty-state coverage. Rule #18.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…B barrel into browser bundle

Second base-red from #6061, surfaced once the broken Card import was fixed:

  ./node_modules/ioredis/built/connectors/StandaloneConnector.js
  Module not found: Can't resolve 'net'
  Import trace: ioredis <- rateLimiter.ts <- apiKeys.ts <- @/lib/localDb
                <- CoolingConnectionsPanel.tsx (a "use client" component)

The client panel imported `formatResetCountdown` from `@/lib/localDb` — the
server-side DB re-export barrel — which transitively pulls better-sqlite3/ioredis
(node:net) into the browser bundle. That violates the CLAUDE.md rule 'never
barrel-import from localDb'.

`formatResetCountdown` is a pure date-formatting function, so move its
implementation to the client-safe `@/shared/utils/formatting` (alongside
formatTime/formatDuration) and re-export it from db/providers/rateLimit.ts for the
existing server callers + barrel. The panel now imports it directly from the
shared util — no server code in the client bundle.

Tests (Rule #18):
- tests/unit/format-reset-countdown.test.ts (node:test, blocking test:unit) —
  pure-function coverage: null/past/invalid, s, m+s, h+m, ISO string.
- tests/unit/ui/CoolingConnectionsPanel.test.tsx mock updated to the new module.
@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Update — a second base-red surfaced behind the Card one

Once the @/components/ui/card import was fixed, next build revealed a second failure from the same #6061 component:

./node_modules/ioredis/built/connectors/StandaloneConnector.js
Module not found: Can't resolve 'net'
Import trace:
  ioredis <- src/shared/utils/rateLimiter.ts <- src/lib/db/apiKeys.ts
          <- src/lib/localDb.ts <- CoolingConnectionsPanel.tsx  ("use client")

The client panel imported formatResetCountdown from @/lib/localDb (the server DB re-export barrel), dragging better-sqlite3/ioredis → node:net into the browser bundle — the CLAUDE.md 'never barrel-import from localDb' rule.

Second commit moves the pure formatResetCountdown to the client-safe @/shared/utils/formatting, re-exports it from db/providers/rateLimit.ts for server callers + the barrel, and points the panel at the shared util. Adds tests/unit/format-reset-countdown.test.ts (node:test, blocking suite).

Both fixes together make next build green — validated as the bundle for the #6114 antigravity VPS check (deploy in progress).

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Merging as release captain (Phase 0 of /generate-release v3.8.44): this fixes the release-blocking next build break on the release tip, the owning worktree is clean and idle at the PR head, and the PR's red CI checks are the inherited base-reds already fixed on the release branch (provider-count 167, oc/ alias, S2b scope, auggie EPIPE, test-masking). Operator directive: close v3.8.44 tonight.

@diegosouzapw
diegosouzapw merged commit 5ca28f2 into release/v3.8.44 Jul 4, 2026
2 of 3 checks passed
diegosouzapw added a commit that referenced this pull request Jul 4, 2026
…bsorption

- fix(models): stop resolveProviderAlias at registered provider ids so oc/
  reaches the no-auth opencode provider again (#2901 contract, regressed by
  #5918's transitive chain; transitivity kept across alias-only hops)
- fix(auggie): handle async EPIPE 'error' events on child stdin so a
  fast-exiting CLI surfaces a sanitized error instead of crashing (both
  spawn sites); deflakes auggie-executor tests
- test: align provider family count 166->167 (Kenari #6104), regenerate
  translate-path golden on Linux (+kenari), opencode quota scope
  provider->connection (#6061)
- quality(test-masking): add _deletedWithReplacement allowlist support to
  check-test-masking.mjs (deletion exempt ONLY when the declared replacement
  test exists in HEAD; 5 new gate unit tests) + reduction allowlist entries
  for the verified #5958/#6088/#5816 migrations + targetExhaustion->
  combo-target-exhaustion replacement (#5976, 21 cases/52 asserts vs 13/37)
- quality(file-size): absorb v3.8.44 cycle drift (oauth route 960,
  providerLimits 998, chat 1662, auth 2426) with justification; #6158 will
  restore the oauth-route freeze
- changelog: bullets for the above + the #6155 cooling-panel build fix
@diegosouzapw diegosouzapw mentioned this pull request Jul 4, 2026
@diegosouzapw
diegosouzapw deleted the fix/release-v3.8.44-cooling-panel-card-import branch July 4, 2026 20:37
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…red from cheaper-inference#6061) (cheaper-inference#6155)

* fix(dashboard): resolve broken Card import breaking next build (base-red from cheaper-inference#6061)

CoolingConnectionsPanel imported `Card` from `@/components/ui/card`, a path
that does not exist in this repo (there is no shadcn-style `src/components/ui/`).
The PR->release fast-gates do not run `next build`, so the broken import slipped
in and `next build` failed with:

  Module not found: Can't resolve '@/components/ui/card'

Fix: the <Card> here was only a styled container, so replace it with a <div>
carrying the equivalent Tailwind classes (border/bg/padding + rounded-card
shadow-sm). Also normalize the file from CRLF to LF (it shipped with CRLF).

Adds a vitest/jsdom regression test (tests/unit/ui/CoolingConnectionsPanel.test.tsx)
that fails-without-fix (Vite: 'Failed to resolve import @/components/ui/card')
and passes with it, plus renders/empty-state coverage. Rule cheaper-inference#18.

* fix(dashboard): stop client CoolingConnectionsPanel dragging server DB barrel into browser bundle

Second base-red from cheaper-inference#6061, surfaced once the broken Card import was fixed:

  ./node_modules/ioredis/built/connectors/StandaloneConnector.js
  Module not found: Can't resolve 'net'
  Import trace: ioredis <- rateLimiter.ts <- apiKeys.ts <- @/lib/localDb
                <- CoolingConnectionsPanel.tsx (a "use client" component)

The client panel imported `formatResetCountdown` from `@/lib/localDb` — the
server-side DB re-export barrel — which transitively pulls better-sqlite3/ioredis
(node:net) into the browser bundle. That violates the CLAUDE.md rule 'never
barrel-import from localDb'.

`formatResetCountdown` is a pure date-formatting function, so move its
implementation to the client-safe `@/shared/utils/formatting` (alongside
formatTime/formatDuration) and re-export it from db/providers/rateLimit.ts for the
existing server callers + barrel. The panel now imports it directly from the
shared util — no server code in the client bundle.

Tests (Rule cheaper-inference#18):
- tests/unit/format-reset-countdown.test.ts (node:test, blocking test:unit) —
  pure-function coverage: null/past/invalid, s, m+s, h+m, ISO string.
- tests/unit/ui/CoolingConnectionsPanel.test.tsx mock updated to the new module.
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…bsorption

- fix(models): stop resolveProviderAlias at registered provider ids so oc/
  reaches the no-auth opencode provider again (cheaper-inference#2901 contract, regressed by
  cheaper-inference#5918's transitive chain; transitivity kept across alias-only hops)
- fix(auggie): handle async EPIPE 'error' events on child stdin so a
  fast-exiting CLI surfaces a sanitized error instead of crashing (both
  spawn sites); deflakes auggie-executor tests
- test: align provider family count 166->167 (Kenari cheaper-inference#6104), regenerate
  translate-path golden on Linux (+kenari), opencode quota scope
  provider->connection (cheaper-inference#6061)
- quality(test-masking): add _deletedWithReplacement allowlist support to
  check-test-masking.mjs (deletion exempt ONLY when the declared replacement
  test exists in HEAD; 5 new gate unit tests) + reduction allowlist entries
  for the verified cheaper-inference#5958/cheaper-inference#6088/cheaper-inference#5816 migrations + targetExhaustion->
  combo-target-exhaustion replacement (cheaper-inference#5976, 21 cases/52 asserts vs 13/37)
- quality(file-size): absorb v3.8.44 cycle drift (oauth route 960,
  providerLimits 998, chat 1662, auth 2426) with justification; cheaper-inference#6158 will
  restore the oauth-route freeze
- changelog: bullets for the above + the cheaper-inference#6155 cooling-panel build fix
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