fix(cli): publish nightly branded favicons#4372
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR changes publish script behavior to select favicons based on version (nightly vs production). An unresolved review comment identifies potential inconsistency between the new version-checking logic and existing stricter patterns elsewhere, which warrants human review. You can customize Macroscope's approvability policy. Learn more. |
c47b807 to
1a73926
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1a73926. Configure here.
|
|
||
| export function resolveWebAssetBrandForPackageVersion(version: string): WebAssetBrand { | ||
| return version.includes("-nightly.") ? "nightly" : "production"; | ||
| } |
There was a problem hiding this comment.
Inconsistent nightly version branding
Low Severity
resolveWebAssetBrandForPackageVersion treats any version containing -nightly. as nightly, while CLI UI stage labeling and desktop web branding require /-nightly.\d{8}.\d+$/. Malformed versions can get nightly favicons while the app still does not identify as Nightly, reintroducing the branding mismatch this PR aims to fix. Existing resolveDesktopWebAssetBrand already maps version to WebAssetBrand with the stricter rule.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 1a73926. Configure here.
|
Thank goodness |


What Changed
*-nightly.*releases.dist/clientso they are not included in npm tarballs.Why
The CLI publish step always applied the production icon overrides, regardless of the package version or npm distribution tag. As a result,
pnpx t3@nightly serveserved the stable production favicon even though the application otherwise identified itself as a nightly build.The publish backups were also created inside
dist/client, causing*.publish-bakfiles to be included in the published npm package.This makes the packaged assets follow the release version and keeps temporary backup files out of published artifacts.
UI Changes
Validation
vp test run scripts/lib/brand-assets.test.tsvp run --filter @t3tools/scripts typecheckvp run --filter t3 typecheckChecklist
Note
Low Risk
Scoped to publish-time asset swapping and branding helpers; no auth or runtime API changes, with tests for version-based brand selection.
Overview
Publish now picks production vs nightly web favicons from the package version (
*-nightly.*→ nightly), so nightly npm releases no longer ship stable production icons.The publish command drops the fixed
PUBLISH_ICON_OVERRIDESpath andpreparePublishIcons, which usesresolveWebAssetBrandForPackageVersionandresolveWebIconOverrides.package.jsonand icon overrides are backed up in memory before write, then restored on release—replacing on-disk*.publish-bakfiles underdist/clientthat could end up in the tarball.Tests cover version→brand mapping and assert production icons via
resolveWebIconOverrides("production", "dist/client").Reviewed by Cursor Bugbot for commit 1a73926. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Publish nightly-branded favicons based on package version in the CLI publish command
resolveWebAssetBrandForPackageVersioninscripts/lib/brand-assets.tsto return"nightly"for versions containing-nightly., otherwise"production".apps/server/scripts/cli.tsnow selects icon overrides based on the detected brand, writing overrides just-in-time and restoring originals afterward.PUBLISH_ICON_OVERRIDESconstant and theapplyPublishIconOverrides/restorePublishIconOverrideshelpers that relied on.publish-bakfiles on disk.Macroscope summarized 1a73926.