Skip to content

Enhance Cognitive Signal Engine™ — PDF executive upgrade, media cost impact, UI improvements#57

Open
anilp-stack wants to merge 1 commit into
facebookresearch:mainfrom
anilp-stack:feature/cse-pdf-enhancements-ui-upgrades
Open

Enhance Cognitive Signal Engine™ — PDF executive upgrade, media cost impact, UI improvements#57
anilp-stack wants to merge 1 commit into
facebookresearch:mainfrom
anilp-stack:feature/cse-pdf-enhancements-ui-upgrades

Conversation

@anilp-stack
Copy link
Copy Markdown

Summary

  • Executive Decision Block (PDF Page 2): Single CMO-facing card combining CPCi, memory score, media cost multiplier, and cold audience deployment risk into one unmissable decision: DO NOT SCALE / OPTIMISE BEFORE SCALING / READY TO SCALE
  • Media Efficiency Impact (PDF Page 2): Dynamic multiplier line — This creative will cost ~X× more media to achieve the same recall — with waste callout if multiplier > 1.5
  • Visual signal bars (PDF Page 4): Horizontal progress bars for Attention, Memory, Emotional Valence, and Cognitive Load for instant scan-ability
  • Cover page enhancements: Client name in 22px bold, CPCi interpretation line (tier-adaptive, centred below the score)
  • Cold Audience Deployment Risk badge (Strategic page): HIGH / MODERATE / LOW, colour-coded, driven by memory score
  • Reduced PDF redundancy: Removed duplicate CPCi explanation and "What This Means" from Page 3; Page 3 now shows formula detail not covered elsewhere
  • Why This Matters block (app UI): Media cost multiplier line (18px, colour-coded) + waste callout when multiplier > 1.5
  • CTA block: "Ready to test your creatives before media spend?" with primary Analyze button and PDF download at bottom of results
  • Science tab: TRIBE v2 → CPCi architecture diagram (Layer 1 / Layer 2)
  • Bug fixes: HTML rendering fix for CTA block; client name flowing correctly through all PDF download paths; venv path fix in launch.json

Test plan

  • Upload a creative and verify CPCi, memory, and multiplier values are consistent across the app UI and all PDF pages
  • Generate PDF with a client name — confirm it appears on cover page in large bold text
  • Test all three Executive Decision tiers: CPCi < 40, 40–70, > 70
  • Verify Cold Audience Deployment Risk badge appears on Strategic page with correct colour
  • Confirm signal bars render on Page 4 without layout overflow
  • Click "Analyze Your Creative" CTA — confirm cached results clear and uploader is shown
  • Confirm no raw HTML is visible in the app UI

🤖 Generated with Claude Code

Major upgrades to app.py and science_tab.py across this session:

PDF Report (executive-grade):
- Cover page: client name (22px bold), CPCi interpretation line (tier-adaptive, centred)
- Executive Decision Block (Page 2): combines CPCi, memory, multiplier, and deployment risk
  into a single CMO-facing decision card (DO NOT SCALE / OPTIMISE / READY TO SCALE)
- Media Efficiency Impact section (Page 2): dynamic multiplier line + waste callout
- Visual signal bars (Page 4): horizontal progress bars for Attention/Memory/Valence/Load
- Cold Audience Deployment Risk badge (Strategic page): HIGH/MODERATE/LOW, colour-coded
- Reduced redundancy: removed duplicate CPCi explanation and What This Means from Page 3
- Page 3 now shows formula detail (weights + expression) not covered elsewhere

App UI:
- Why This Matters block: media cost multiplier line (18px, colour-coded) + waste callout
  if multiplier > 1.5
- CTA block at bottom: "Ready to test your creatives before media spend?" with primary
  Analyze button (clears cache, reruns) and PDF download carrying client name
- HTML rendering fix: removed position:absolute and HTML comments from CTA markdown block
- Client name: flows correctly through all three PDF paths (export bar, CTA download)

Science tab:
- Architecture section: TRIBE v2 (Layer 1) → CPCi (Layer 2) diagram with signal pills

Dev:
- .claude/launch.json: fixed to use /Users/anilpandit/tribe_env/bin/streamlit (venv path)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 26, 2026

Hi @anilp-stack!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

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