Skip to content

fix(cli): publish nightly branded favicons#4372

Merged
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
maria-rcks:agent/fix-nightly-cli-favicon
Jul 23, 2026
Merged

fix(cli): publish nightly branded favicons#4372
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
maria-rcks:agent/fix-nightly-cli-favicon

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What Changed

  • Select the packaged web icon family from the CLI package version.
  • Use nightly favicons and the nightly Apple touch icon for *-nightly.* releases.
  • Continue using production icons for stable releases.
  • Store temporary publish backups outside dist/client so they are not included in npm tarballs.
  • Add focused coverage for stable and nightly package-version branding.

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 serve served 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-bak files 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

Before After
Nightly CLI served the production favicon.

Production favicon
Nightly CLI serves the nightly branded favicon.

Nightly favicon

Validation

  • vp test run scripts/lib/brand-assets.test.ts
  • vp run --filter @t3tools/scripts typecheck
  • vp run --filter t3 typecheck
  • Targeted formatting check
  • Full CLI build
  • Nightly publish dry run

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (not applicable; this is a static favicon change)

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_OVERRIDES path and preparePublishIcons, which uses resolveWebAssetBrandForPackageVersion and resolveWebIconOverrides. package.json and icon overrides are backed up in memory before write, then restored on release—replacing on-disk *.publish-bak files under dist/client that 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

  • Adds resolveWebAssetBrandForPackageVersion in scripts/lib/brand-assets.ts to return "nightly" for versions containing -nightly., otherwise "production".
  • The publish command in apps/server/scripts/cli.ts now selects icon overrides based on the detected brand, writing overrides just-in-time and restoring originals afterward.
  • Removes the old PUBLISH_ICON_OVERRIDES constant and the applyPublishIconOverrides/restorePublishIconOverrides helpers that relied on .publish-bak files on disk.

Macroscope summarized 1a73926.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 01d1dccf-8a25-48b8-9e97-78e96b0aacd7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 23, 2026
Comment thread apps/server/scripts/cli.ts Outdated
Comment thread apps/server/scripts/cli.ts Outdated
Comment thread apps/server/scripts/cli.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Jul 23, 2026
Comment thread apps/server/scripts/cliPublishAssets.ts Outdated
@maria-rcks
maria-rcks force-pushed the agent/fix-nightly-cli-favicon branch from c47b807 to 1a73926 Compare July 23, 2026 17:44

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ 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";
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1a73926. Configure here.

@xptea

xptea commented Jul 23, 2026

Copy link
Copy Markdown

Thank goodness

@juliusmarminge
juliusmarminge merged commit edb1240 into pingdotgg:main Jul 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants