Skip to content

feat(screenshots): export Pen App Store layouts from mobile captures - #14254

Open
Bil0000 wants to merge 1 commit into
pingdotgg:mainfrom
Bil0000:t3code/pen-app-store-assets
Open

Bil0000 wants to merge 1 commit into
pingdotgg:mainfrom
Bil0000:t3code/pen-app-store-assets

Conversation

@Bil0000

@Bil0000 Bil0000 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

After iOS capture validation, the workflow exports G dark and H light Pen designs as seven 1290×2796 RGB PNGs per appearance/palette in app-store-pen-layouts. This generates fresh App Store artwork entirely on cloud runners, with no open Pen app, AI agent, or running laptop.

Only G/H, their shared components, and linked images are checked in. Pinned Pen CLI 0.3.9 exports at scale 1 from a temporary copy, replacing six phone screenshots while preserving text, phone frames, crop modes, callout artwork, and testimonials. Missing captures, export errors, or wrong dimensions fail the job. Existing raw iOS, iPad, and Google Play artifacts remain unchanged.

Verification and images

  • Passed 24 focused tests, scripts typecheck, targeted lint, formatting, and diff checks.
  • Visually checked all 14 layouts using real captures from successful upstream run 36075439990. Against the supplied PNGs, unchanged template exports match layout and dimensions; mean channel differences are 0.020–0.196/255 at antialiased edges and shadows, so desktop/headless output is not byte-identical.
  • The independent Linux cloud proof passed the tests and exported both appearances plus 14 reference renders. All 28 images exactly match the verified local renders. It reused upstream captures without rerunning the native build.
  • Download the image evidence: 14 reference renders in reference/, 14 finished images in app-store/pen/, and source captures. Inline attachments need upstream write access, which this account lacks.

Setup and limits

A maintainer must add the upstream Actions secret PEN_CLI_KEY; the supplied key exists only as a test-fork Actions secret, never in this PR. Export defaults on; disable pen_assets for raw captures only. These are iPhone layouts, not stretched iPad/Android designs. Callouts and testimonials stay fixed. Nothing uploads to either store. The operations guide covers setup, options, usage, and troubleshooting.

  • One workflow concern; supplied assets account for most of the diff
  • Behavior, setup, validation, limits, and before/after image comparisons included

Model: GPT-6 Astra, high reasoning. Harness: Codex in T3 Code.

Summary by CodeRabbit

  • New Features
    • The mobile screenshot workflow can now export seven App Store marketing images for each selected appearance and theme, using fresh iPhone screenshots alongside the existing design elements.
    • Marketing image export is enabled by default and can be turned off when dispatching the workflow.
  • Documentation
    • Added setup and usage guidance, including configuration requirements, export options, and troubleshooting.

@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 29, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a substantial secret-backed Pen CLI integration and a new default-enabled CI artifact workflow, alongside a large checked-in design asset. It also adds explicit static-analysis diagnostic suppressions, so the changes warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d23e9d52-d184-4b04-9600-0880f580dd9b

📥 Commits

Reviewing files that changed from the base of the PR and between d2c9281 and 54a880e.

⛔ Files ignored due to path filters (16)
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/01-sessions-dark@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/01-sessions-light@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/01-sessions.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/02-environments-dark@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/02-environments-light@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/03-chat-dark@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/03-chat-light@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/04-terminal-dark@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/04-terminal-light@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/05-diff-dark@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/05-diff-light@hi2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/06-live-activity-dark-card.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/06-live-activity-dark-v2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/06-live-activity-light-card.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/06-live-activity-light-v2.png is excluded by !**/*.png
  • scripts/mobile-showcase-assets/T3 Code AppStore Assets-assets/iphone18pro-frame.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • .github/workflows/mobile-showcase-screenshots.yml
  • docs/operations/mobile-app-store-screenshots.md
  • scripts/mobile-showcase-assets.test.ts
  • scripts/mobile-showcase-assets.ts
  • scripts/mobile-showcase-assets/app-store.pen

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds an exporter for Pen marketing layouts that uses iOS screenshots, validates the generated images, and uploads them through the mobile screenshot workflow. It also adds export documentation and tests for input preparation.

Changes

Pen asset export

Layer / File(s) Summary
Prepare and render Pen layouts
scripts/mobile-showcase-assets.ts, scripts/mobile-showcase-assets.test.ts
The exporter maps six scenes to appearance-specific filenames, prepares Pen inputs from screenshots, runs the Pen CLI, and validates seven output images. Tests check screenshot replacement, retained template assets, missing captures, and invalid dimensions.
Run and document the export
.github/workflows/mobile-showcase-screenshots.yml, docs/operations/mobile-app-store-screenshots.md
The workflow adds a default-enabled pen_assets input and a job that exports and uploads layouts after the iOS job. The documentation describes the secret, options, output, and failure conditions.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as pen-assets job
  participant Screenshots as iOS screenshot artifact
  participant Exporter as mobile-showcase-assets.ts
  participant PenCLI as Pen CLI
  participant Layouts as Pen layout artifact
  Workflow->>Screenshots: Download iOS screenshots
  Workflow->>Exporter: Run export with appearance and theme
  Exporter->>PenCLI: Export Pen layouts
  PenCLI-->>Exporter: Return layout images
  Exporter->>Exporter: Normalize and validate seven images
  Exporter-->>Workflow: Write validated layouts
  Workflow->>Layouts: Upload layouts
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 54a88

No concrete issue requiring a change before merge was established. The template image references could not be fully checked.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 54a88

The new export is limited to a manually started screenshot workflow and validates images before upload. It also introduces a credential-bearing third-party renderer. No specific security failure was established, but the template and exact renderer behavior were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new trust boundary gives the installed renderer access to the selected screenshots and Pen key in the export job. The reviewed workflow does not give that job repository write permission; the key’s authority outside this workflow was not established.

Trust Boundaries and Controls

  • observed — The workflow takes appearance and theme from defined manual choices. The exporter constructs the renderer command from fixed layout IDs, validates input and output PNG properties, and replaces the key in reported CLI failure details.
  • observed — The ranges identified as possible public entrypoints belong to an adjacent test with no production caller; the workflow invokes the exporter script instead.

Resilience and Maintainability Implications

  • observed — A missing capture, CLI failure, or invalid rendered image makes the exporter fail rather than complete its upload path; its temporary copy is cleaned up on exit.

Hardening Proposals

  • proposed — Before relying on the default-enabled export, verify the checked-in template and the installed renderer’s provenance, and confirm that PEN_CLI_KEY has only the authority this export needs.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: exporting Pen App Store layouts from mobile captures.
Description check ✅ Passed The description explains what changed, why it changed, verification results, setup requirements, limitations, and image evidence. It combines the template's What Changed and Why sections and uses equi…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@Bil0000

Bil0000 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Reviewed the final feedback against 54a880e. All 16 linked template images were checked, and the independent Linux cloud run exported all 14 finished layouts and 14 reference renders. Every cloud image was pixel-identical to its corresponding verified local render; the PR body links the downloadable evidence.

The docstring-coverage warning is intentionally left unchanged: this contribution was explicitly scoped to avoid adding code comments or docstrings. Usage, setup, and limits are covered in the operations guide, and the focused tests cover screenshot replacement and input validation. There are no actionable inline findings or unresolved review threads.

Macroscope correctness passed, but its eligibility policy requires human review for this integration. A maintainer must also configure the upstream PEN_CLI_KEY secret before using the default-enabled export.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Thanks for this. I'm closing it as part of PR triage. Right now we're only taking focused bug fixes from outside contributors (see Read this first), and this PR is not one.

From the review: Adds pen cli exports, a required secret, and marketing templates to the working screenshot workflow; outside feature and ci tooling without a defect.

It has also had no activity for 16 days. If this is still important to you, message me on Twitter at @maria_rcks and I'll take another look.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ 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