Repository navigation
Conversation
…vironment favicons Icon colour had no consistent meaning: teal was both desktop and the extension tab, black was web and the extension toolbar, and admin was a near-black slate. Teal is now the product colour everywhere; docs, admin, development and staging each get their own tile so those tabs cannot be mistaken for production. All tile icons are now generated by `pnpm icons:brand` from one SVG template. File names are unchanged because they are public URLs. The desktop icons are left alone: they were already teal and need a padded squircle and .icns that the generator does not produce.
There was a problem hiding this comment.
🟡 Not ready to approve
The staging favicon can never be served: the swap is keyed on ENV.ENVIRONMENT, which is only ever development or production — staging is identified by ENV.STAGE. One-line fix, see the inline comment.
Reviewed: bb10b15 — 52 files, +256/-20. Focus: the serve-time favicon swap (API + Vite dev plugin), the extension manifest icon rename, the icon generator script.
Checked and clean: extension manifest/html icon names all resolve through sharedAssetsPlugin to files that exist in libs/shared/assets/public/images; the swap regex matches all three sized favicon links in apps/jetstream/index.html and leaves apple/android/ms icons alone; generated .ico files are valid 3-image containers and the PNGs have the sizes their names claim; favicon-docs.ico exists for Docusaurus; public file names are unchanged (SSO docs and canvas ECA URLs still resolve); sharp is already in allowBuilds; hover fill on the Salesforce page button targets the new jetstream-icon-tile class.
🤖 Final-gate review via Claude Code /pr-gatekeeper
| let jetstreamIndexHtml: string | null = null; | ||
| try { | ||
| jetstreamIndexHtml = readFileSync(join(__dirname, '../jetstream/index.html'), 'utf8'); | ||
| jetstreamIndexHtml = applyEnvironmentFavicons(readFileSync(join(__dirname, '../jetstream/index.html'), 'utf8'), ENV.ENVIRONMENT); |
There was a problem hiding this comment.
Medium — Logic & Correctness
ENV.ENVIRONMENT is z.enum(['development', 'production']) (libs/api-config/src/lib/env-config.ts:130), and staging runs with ENVIRONMENT='production' + STAGE='staging' (see the note in scanner.routes.ts:22). So ENVIRONMENT_FAVICON_PREFIX.staging is unreachable here and a staging tab keeps the teal production favicon — the exact confusion this PR sets out to remove. The unit test passes only because it calls the helper with the literal string 'staging'.
Derive the value from both variables, e.g.:
const faviconEnvironment = ENV.ENVIRONMENT === 'development' ? 'development' : ENV.STAGE;
jetstreamIndexHtml = applyEnvironmentFavicons(readFileSync(join(__dirname, '../jetstream/index.html'), 'utf8'), faviconEnvironment);(STAGE is development | staging | production, so it maps straight onto the prefix table.) Narrowing the helper's environment parameter from string to that union would let the compiler catch this kind of mismatch.
Staging runs with ENVIRONMENT='production' and is only identified by STAGE, so keying the favicon swap on ENVIRONMENT left staging tabs with the production icon. The helper now takes a typed environment so a mismatch like this fails typecheck.
There was a problem hiding this comment.
🟢 Ready to approve
No findings at the reporting threshold. The previous review's staging-favicon finding is fixed in 405bd8d87: the swap is now keyed on ENVIRONMENT/STAGE together and the helper takes a typed FaviconEnvironment, so ENV.STAGE maps straight onto the prefix table.
Reviewed: 405bd8d — 52 files, +260/-20. Focus: the serve-time favicon swap (API + Vite dev server), the extension manifest icon rename and how those files reach the bundle, and the icon generator script.
Checked and clean: the swap regex against the real apps/jetstream/index.html links (16/32/96 all have development and staging files; touch/android/ms icons are left alone); every jetstream-icon-pro-* name in the manifest and extension html exists in libs/shared/assets and is picked up by sharedAssetsPlugin; no remaining references to favicon-inverse.ico or the old jetstream-icon-<size>.png manifest names; the generated .ico files are valid 3-image containers; sharp is a root devDependency already allowed in allowBuilds. Static review only — nothing was built or run.
🤖 Final-gate review via Claude Code /pr-gatekeeper
Why
Icon colour had no consistent meaning. Teal was both the desktop app and the extension's tab, black was the web app and the extension toolbar icon, admin was a slate that read as black, and a localhost tab looked identical to production.
What changes
pnpm startand a locally built server)How
pnpm icons:brand(scripts/generate-brand-icons.mjs) writes every tile icon from one SVG template, so surfaces differ only by colour. Addssharpas a dev dependency for rasterising.favicon-development-*,favicon-staging-*,favicon-docs.ico.applyEnvironmentFaviconsin the API (keyed onENV.ENVIRONMENT) anddevFaviconPluginin the Vite dev server.jetstream-icon-pro-*.pngare regenerated with the shared corner radius; the extension manifest now points at them.Worth a look before merging
VARIANTSin the generator.-inverse,-bare,-white-bg,-sfdc-blue, blackjetstream-icon-*) are untouched because their URLs may be linked externally.