Skip to content

test(brand): assert manifest icon purpose is exactly "any" - #158

Closed
spizeck wants to merge 3 commits into
mainfrom
feat/ddb-brand-assets
Closed

spizeck wants to merge 3 commits into
mainfrom
feat/ddb-brand-assets

Conversation

@spizeck

@spizeck spizeck commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follow-up to #157 — this commit was pushed after #157 merged, so it did not ride along. Addresses the remaining CodeRabbit nitpick on that PR: the manifest test now asserts purpose is exactly "any" rather than merely truthy, so a future "maskable" change cannot pass while the badge art is not safe-zone guaranteed.

Changes

  • tests/brand-assets.test.ts — strict purpose === "any" assertion

Verification

  • npx tsc --noEmit — clean
  • node --import tsx --test tests/brand-assets.test.ts — 5/5 pass

Risk / deployment notes

  • No secrets, credentials, or private data were committed.

Generated with Devin

Summary by Sourcery

Standardize the brewery brand experience across the web app, trade emails, and app icons while improving trade communication readability and asset validation.

New Features:

  • Add consistent hoppy turtle branding across site navigation, footer, browser/app icons, trade email templates, and outbound activity indicators.
  • Improve the admin trade workspace with clearer email subjects, collapsed quoted history, branded outbound markers, and preserved reply/resend actions.

Bug Fixes:

  • Ensure manifest icons explicitly use the non-maskable any purpose and validate referenced brand assets.
  • Preserve branded email HTML across retries while maintaining compatibility for older communications.

Enhancements:

  • Introduce reusable brand-mark rendering and documented brand asset usage guidelines.
  • Add email-safe branded HTML wrappers and conservative quoted-reply splitting for inbound trade messages.

Documentation:

  • Document the brand asset inventory, usage rules, and branded trade email behavior.

Tests:

  • Add coverage for favicon, manifest, and brand asset wiring.
  • Add tests for branded outbound email rendering and quoted-reply splitting.

Summary by CodeRabbit

  • New Features

    • Added branded marks to the site header, footer, and outbound trade emails.
    • Trade email replies now separate new text from quoted history where possible, and email timelines use clearer message layouts with grouped reply actions.
    • Updated browser icon variants for light and dark color schemes.
  • Documentation

    • Added guidance on brand mark usage and documented the branded trade email format.

spizeck and others added 3 commits October 3, 2026 18:33
- Regenerate favicon.ico/PNG icons and app icons from the Option C
  circular badge; add light/dark PNG variants and adaptive favicon.svg
- Update layout icon metadata (SVG + media-hinted PNG fallbacks) and
  manifest icon purposes
- Add reusable BrandMark component (black-on-light / white-on-dark) and
  wire into headers and footer
- Wrap outbound trade email in a branded table shell with the email mark
  resolved to an absolute siteUrl URL; plain-text part unchanged
- Polish admin trade timeline: subject display, quieter quoted text via
  splitQuotedEmailText, outbound brand avatar, separated actions
- Document the brand mark hierarchy in THEME_AND_BRANDING.md and the
  email shell in TECHNICAL.md

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…end payload

- splitQuotedEmailText: a '>'-triggered split now bails when plain text
  resumes after the quoted run, so post-quote instructions are never
  folded into collapsed history
- Persist rendered htmlBody on outbound communications so resends replay
  the identical provider payload under the same Resend idempotency key;
  pre-branding records fall back to the legacy unbranded render
- Correct favicon filename glob in THEME_AND_BRANDING.md

Addresses CodeRabbit review on PR #157.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The badge art is not maskable safe-zone guaranteed, so a "maskable"
purpose must never pass the test.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @spizeck, this account has used its review budget of 1,500,000 diff characters for the last 7 days.

You can request another review in 2 days and 1 hour by commenting @sourcery-ai review. Upgrade to get a review now.

@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
deepdivebrewing-web Ready Ready Preview Oct 3, 2026 11:01pm UTC

Request Review

@sourcery-ai

sourcery-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR establishes a centralized monochrome brand system across the web UI, favicons, app icons, outbound email, and admin timeline, while adding deterministic email HTML persistence, quoted-reply presentation, asset-wiring coverage, and an exact manifest purpose === "any" guard.

Sequence diagram for branded outbound email persistence and resend

sequenceDiagram
    participant Staff
    participant TradeEmail as trade-leads-email
    participant Firestore
    participant Resend

    Staff->>TradeEmail: sendLeadEmail
    TradeEmail->>TradeEmail: buildTradeLeadOutboundHtml
    TradeEmail->>Firestore: persist htmlBody
    TradeEmail->>Resend: send html with idempotencyKey
    Resend-->>TradeEmail: delivery result

    Staff->>TradeEmail: retryEmail
    TradeEmail->>Firestore: load stored htmlBody
    TradeEmail->>Resend: send stored html with same idempotencyKey
    Resend-->>TradeEmail: delivery result
Loading

File-Level Changes

Change Details Files
Introduced a centralized monochrome brand-mark system across site UI, favicons, app icons, and email assets.
  • Added the reusable BrandMark component with tone, sizing, and accessibility controls.
  • Added light/dark favicon metadata, SVG support, app-icon assets, and brand-asset wiring tests.
  • Documented brand asset inventory and usage rules.
components/brand-mark.tsx
components/site-header.tsx
components/site-header-default.tsx
components/site-footer.tsx
app/layout.tsx
public/favicon.svg
public/site.webmanifest
tests/brand-assets.test.ts
THEME_AND_BRANDING.md
Branded outbound trade-lead emails while preserving deterministic resend behavior.
  • Wrapped escaped plain-text content in an inline-styled, table-based branded HTML shell with absolute asset and site URLs.
  • Persisted rendered HTML on communication records and reused it for retries, with legacy fallback for older records.
  • Added coverage for HTML structure, escaping, asset references, and resend-related rendering.
lib/trade-leads-email-common.ts
lib/trade-leads-email.ts
docs/TECHNICAL.md
tests/lib/trade-leads-email.test.ts
Improved the admin trade timeline’s email presentation and outbound visual identification.
  • Used the transparent brand avatar for outbound email activities.
  • Displayed subjects and grouped retry/reply actions beneath communication details.
  • Collapsed common quoted-reply formats while retaining interleaved or ambiguous content in full.
components/admin-trade-workspace.tsx
lib/trade-leads-email-common.ts
tests/lib/trade-leads-email.test.ts
Made the manifest icon-purpose test enforce the safe-zone constraint explicitly.
  • Changed the assertion from truthiness to exact equality with "any" for every manifest icon.
  • Retained checks for icon existence, PNG type, and required 192px/512px sizes.
tests/brand-assets.test.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-03T23:07:52.102241Z 069c8c5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: efa1af49-a8d3-4352-ac10-7b2c69f653f5
📥 Commits

Reviewing files that changed from the base of the PR and between a9afead and 069c8c5.

⛔ Files ignored due to path filters (18)
  • public/android-chrome-192x192.png is excluded by !**/*.png
  • public/android-chrome-512x512.png is excluded by !**/*.png
  • public/apple-touch-icon.png is excluded by !**/*.png
  • public/brand/avatar-dark-512.png is excluded by !**/*.png
  • public/brand/avatar-light-512.png is excluded by !**/*.png
  • public/brand/avatar-transparent-black-512.png is excluded by !**/*.png
  • public/brand/avatar-transparent-white-512.png is excluded by !**/*.png
  • public/brand/email-mark-black.png is excluded by !**/*.png
  • public/brand/email-mark-white.png is excluded by !**/*.png
  • public/brand/hoppy-turtle-black-1600.png is excluded by !**/*.png
  • public/brand/hoppy-turtle-white-1600.png is excluded by !**/*.png
  • public/favicon-16x16-dark.png is excluded by !**/*.png
  • public/favicon-16x16.png is excluded by !**/*.png
  • public/favicon-32x32-dark.png is excluded by !**/*.png
  • public/favicon-32x32.png is excluded by !**/*.png
  • public/favicon-48x48.png is excluded by !**/*.png
  • public/favicon.ico is excluded by !**/*.ico
  • public/favicon.svg is excluded by !**/*.svg
📒 Files selected for processing (13)
  • THEME_AND_BRANDING.md
  • app/layout.tsx
  • components/admin-trade-workspace.tsx
  • components/brand-mark.tsx
  • components/site-footer.tsx
  • components/site-header-default.tsx
  • components/site-header.tsx
  • docs/TECHNICAL.md
  • lib/trade-leads-email-common.ts
  • lib/trade-leads-email.ts
  • public/site.webmanifest
  • tests/brand-assets.test.ts
  • tests/lib/trade-leads-email.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@spizeck

spizeck commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

Superseded by a clean branch off main — #157 was squash-merged, so continuing on this branch produced phantom conflicts.

This branch was successfully deployed

1 active deployment
Preview — 069c8c51 Deployed Oct 3, 2026 by vercel[bot]
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