Skip to content

[codex] Fix API image production build blockers#782

Merged
law-chain-hot merged 3 commits into
mainfrom
codex/fix-create-box-metrics-public
Jun 15, 2026
Merged

[codex] Fix API image production build blockers#782
law-chain-hot merged 3 commits into
mainfrom
codex/fix-create-box-metrics-public

Conversation

@law-chain-hot

@law-chain-hot law-chain-hot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the stale box_public_request: request.public create-box metric after refactor(api): remove deprecated box-operation surfaces #762 moved metrics to the REST create DTO.
  • Replace the Tailwind v4-only toggle group gap class with valid Tailwind 3/CSS-var output.
  • Make dashboard:build depend on api-client:build so clean Docker builds have dist/libs/api-client before dashboard typecheck.

Root cause

sst deploy --stage dev failed while building the API image. The first blocker was api:build:production typechecking request.public against the REST CreateBoxDto, which intentionally has no public field. After that was fixed, the same clean Docker image path exposed two dashboard production blockers: invalid generated CSS from gap-[--spacing(var(--gap))], and a missing api-client build dependency.

Validation

  • git diff --check
  • Remote dev machine: cd apps && NX_DAEMON=false yarn nx build api --configuration=production --nxBail=true --output-style=stream
  • Remote dev machine: docker build -f apps/api/Dockerfile --target boxlite .

Notes

I checked current open PRs before opening this. #719 and #541 both touch metrics.interceptor.ts, but neither contains this stale request.public fix; #719 is also a broad draft for older API production webpack issues.

Summary by CodeRabbit

  • Style

    • Enhanced toggle group component spacing behavior for improved visual consistency
  • Chores

    • Updated build dependency configuration for dashboard production builds
    • Refined analytics metric collection payload structure

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a128e184-749f-4ede-87f5-7d21d7b57471

📥 Commits

Reviewing files that changed from the base of the PR and between 6d3c8a7 and 59c9479.

📒 Files selected for processing (3)
  • apps/api/src/interceptors/metrics.interceptor.ts
  • apps/dashboard/project.json
  • apps/dashboard/src/components/ui/toggle-group.tsx
💤 Files with no reviewable changes (1)
  • apps/api/src/interceptors/metrics.interceptor.ts

📝 Walkthrough

Walkthrough

Three unrelated minor fixes: the captureCreateBox analytics payload drops the box_public_request field; the dashboard Nx production build configuration gains api-client as a dependency alongside analytics-api-client; and ToggleGroup's CSS gap is recomputed as spacing * 0.25rem with gap-[var(--gap)] replacing the prior --spacing(var(--gap)) approach.

Changes

Miscellaneous Minor Fixes

Layer / File(s) Summary
Metrics payload field removal and build dependency update
apps/api/src/interceptors/metrics.interceptor.ts, apps/dashboard/project.json
Drops box_public_request from the captureCreateBox analytics records object; adds api-client to the dashboard Nx production build dependsOn list.
ToggleGroup CSS gap variable fix
apps/dashboard/src/components/ui/toggle-group.tsx
Replaces --spacing(var(--gap)) gap calculation with spacing * 0.25rem assigned to --gap and gap-[var(--gap)] in the Tailwind class list.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A field removed, a dep declared,
A gap recalculated with care,
Three tiny tweaks, a hoppy fix,
No grand refactor in the mix —
The rabbit tidies, hops away 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "[codex] Fix API image production build blockers" directly addresses the main purpose of the PR, which is fixing three production build blockers affecting the API image deployment.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-create-box-metrics-public

Comment @coderabbitai help to get the list of available commands and usage tips.

@law-chain-hot law-chain-hot marked this pull request as ready for review June 15, 2026 08:50
@law-chain-hot law-chain-hot requested a review from a team as a code owner June 15, 2026 08:50

@DorianZheng DorianZheng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@law-chain-hot law-chain-hot added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit 07fa30f Jun 15, 2026
30 of 31 checks passed
@law-chain-hot law-chain-hot deleted the codex/fix-create-box-metrics-public branch June 15, 2026 08:53
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.

2 participants