Skip to content

[preview] Grid Statements Playground — assembly (do not merge) - #1032

Draft
jaymantri wants to merge 30 commits into
mainfrom
ajay/grid-statements-playground
Draft

jaymantri wants to merge 30 commits into
mainfrom
ajay/grid-statements-playground

Conversation

@jaymantri

@jaymantri jaymantri commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Why

This PR is an assembly preview. It lets reviewers test the full Statements playground before the work is split into reviewer-sized PRs.

Do not merge this assembly PR.

Fourth-polish result

  1. Configure statement: One two-by-two grid now selects Consumer, Commercial, Mobile, and Desktop.
  2. Rail geometry: The configure and API rails keep the shared Cards widths and remain in viewport bounds at wide, stacked, and mobile breakpoints.
  3. Automatic load: Account changes show the Wallet loader for at least 500 ms, then stage the three ordered calls. The manual Period closes and Reset flow is gone. Re-selecting the active account does not reload it.
  4. Desktop device: Desktop uses a Wallet-based landscape Duo shell with an 890 x 626 screen and shell-contained scrolling.
  5. Document surfaces: Masthead and section treatments use the configured secondary color. The details and footer rules no longer add unwanted strokes.
  6. Shared controls: Choice, color, share, panel, rail, typography, font, and Wallet shell sources are either byte-identical to Cards or Wallet, or covered by named adaptation checks.
  7. Live design changes: Brand and color edits update the visible preview and open share preview without extra API calls. Account changes re-run the calls.
  8. Reg E notice: The duplicate footer contact block is removed. The complete Reg E error-resolution notice still contains 8605 Santa Monica Blvd. and (855) 516-0103.
  9. Live share preview: Share reuses the active Mobile or Desktop preview tree and current brand state. It closes when a new account load starts.
  10. Responsive share controls: The Cards share pill and three actions remain bounded and reachable at 1280, 1680, 2560, stacked, and 390 px mobile widths.
  11. Mobile statement width: The in-app document fills the 380 px Wallet screen body. It uses Wallet's 24 px horizontal padding and scrolls inside the shell.
  12. Single-header contract: Mobile shows one September statement app title with Wallet title typography, no logo, no period line, and showMasthead={false}. Standalone, Desktop, HTML, and PDF documents keep the masthead. UI titles and aurora-september-statement.{pdf,html} filenames use one shared closed-period derivation.

Commits

  • ab6fbaea — configure, loading, rail, and device preview refactor
  • ff4bfd1e — title, export, width, footer, and Reg E document polish
  • d2feb188 — live responsive share preview
  • 7e6938c7 — browser, visual, and parity audit coverage
  • e96a9552 — preserve the executable audit entry point
  • 4cad8c65 — close final audit findings

Verified at 4cad8c65

  • npm test: 48 tests pass in 13 files.
  • npx tsc --noEmit: passes.
  • npm run build: passes.
  • npm run check:chrome: passes.
  • npm run audit:behavior: passes. Mobile article and scroller are both 380 px; desktop and mobile scroll positions advance inside their shells.
  • AUDIT_LABEL=fourth-polish-final npm run audit:visual: passes.
  • Independent diff audit: no findings after fixes.
  • make lint: passes with existing informational OpenAPI output.
  • Audit artifacts: components/grid-statements-demo/.artifacts/visual-audit/fourth-polish-final/.

Parity

  • Cards shared sources: identical, except named local exceptions in the parity script.
  • Wallet AppShell: eight files identical; AppShell.tsx and usePhoneFitScale.ts are checked adaptations for the landscape Duo geometry.
  • Cards share button: StageShareButton.tsx is identical at Cards commit 39baddfd; its SCSS is a checked mobile-position adaptation.
  • Statement-only document and preview code: local by design and covered by unit, behavior, and visual checks.

Preview

Not in this PR

  • No Statements endpoint in the OpenAPI spec.
  • No email chrome.
  • No card effects.
  • The MDX-pure artifacts in the separate grid-statements repo remain the static paste target.

jaymantri and others added 7 commits September 17, 2026 15:39
Add the standalone statement renderer and its focused tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Set an explicit TypeScript base URL for clean remote builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the Mintlify page, restore its Overview navigation entry, and point the embed at the public playground project.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fork the Cards chrome and layout contract into Statements.
Drive the statement, API samples, and totals from one typed model.
Reuse Cards presets and real Grid OpenAPI operation IDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document the cp-based chrome port contract.
Add byte-parity, behavior, and visual audit scripts.
Keep generated browser evidence out of Git.

Co-authored-by: Cursor <cursoragent@cursor.com>
Map Mintlify preview branches to the Statements Vercel preview host.
Pass embed, theme, and navigation state in the iframe URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
State that Grid account balances are current data and that the platform stores period balances.
Generate distinct transaction identities for each statement period and pin the rebuild behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Sep 18, 2026, 8:18 PM

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
grid-statements-demo Ready Ready Preview Sep 19, 2026 12:30am UTC
grid-statements-playground Ready Ready Preview Sep 19, 2026 12:30am UTC
3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Sep 19, 2026 12:30am UTC
grid-flow-builder Ignored Ignored Preview Sep 19, 2026 12:30am UTC
grid-wallet-demo Ignored Ignored Preview Sep 19, 2026 12:30am UTC

Request Review

Rename the Vercel project to grid-statements-demo to match the Cards
and Wallet projects and the components directory. Mirror the Cards
embed snippet so Mintlify previews use the branch-derived Vercel host.
Update the layout metadata base and the chrome parity exception.
Document the 22-character branch name budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reg E periodic statements cover the Lead Bank prepaid account behind
the card program, and card purchases are the statement line items, so
the playground belongs in the Cards tab next to the Cards playground.

- global-accounts/periodic-statements-playground -> cards/statements
- snippet moved to snippets/cards/statements-demo-embed.mdx
- redirect added for the old path
- ls-page-playground path lists updated (head raw + sidebar-toggle.js)
- sidebar label is the single word "Statements" to avoid wrapping

Co-authored-by: Cursor <cursoragent@cursor.com>
@jaymantri

Copy link
Copy Markdown
Contributor Author

Docs nav: the statements playground now lives in the Cards tab (commit 0e88008).

  • New path: /cards/statements (mintlify/cards/statements.mdx), listed in Cards → Overview right after the Cards Playground.
  • Redirect: /global-accounts/periodic-statements-playground/cards/statements (verified 307 locally).
  • Sidebar label: Statements — one word, so it does not wrap in the sidebar.
  • Snippet moved to mintlify/snippets/cards/statements-demo-embed.mdx; ls-page-playground path lists in docs.json head and sidebar-toggle.js updated.

Why Cards: Reg E periodic statements cover the Lead Bank prepaid account behind the card program, and card purchases are the statement line items.

jaymantri and others added 8 commits September 18, 2026 13:21
Add four typed statement color tokens, WCAG checks, print colors, and Cards-style controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
Parameterize the Cards AppShell shape for standard iPhone and iPhone Duo Mail views.

Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh calls for preset, account, and period changes without reacting to brand edits.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a two-action export preview, print isolation, and self-contained HTML downloads.

Co-authored-by: Cursor <cursoragent@cursor.com>
Lock the Duo outer preset, finish control and accessibility polish, and enforce browser audit evidence.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the official open-body and inner-display proportions, and remove the invented camera treatment from the device preset.

Co-authored-by: Cursor <cursoragent@cursor.com>
Assert both the official open-body ratio and inner-display ratio.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the portrait camera offset so the landscape status bar uses the shared safe inset.

Co-authored-by: Cursor <cursoragent@cursor.com>
jaymantri and others added 3 commits September 18, 2026 14:28
Use the measured closed outer geometry required for the Mail preview.
Restore the asymmetric hinge bezel, corner radii, and camera hole.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the locked open-device geometry after a concurrent commit changed the view to the closed outer display. Assert both official ratios and use the neutral landscape safe inset.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the Mail preview on the measured closed outer display.
Restore the asymmetric hinge bezel, corner radii, and camera hole.

Co-authored-by: Cursor <cursoragent@cursor.com>
jaymantri and others added 2 commits September 18, 2026 15:11
The server rendered relative timestamps from its own clock and locale.
A reader in another time zone saw different text and React discarded
the tree with errors 418, 423, and 425.

Start the list empty and fill it on the client. The visual audit now
runs the browser in a time zone behind UTC, so this mismatch fails
locally instead of in production.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apple publishes an open body of 164.6 by 117.8 mm and an inner display
of 1878 by 2670 at 430 ppi. The preset held closed cover dimensions and
an invented camera hole instead.

Use the open landscape body and inner display, with symmetric bezels.
Delete the camera hole, because no published source gives its position.

Co-authored-by: Cursor <cursoragent@cursor.com>
- port the Wallet AppShell and Cards choice and share patterns
- replace device, period, mail, and legacy export controls
- stage statement API calls only after the period closes
- keep branding live with fixed closed-cycle statement data

Co-authored-by: Cursor <cursoragent@cursor.com>
- avoid share-button hydration differences
- capture the closed mobile state in visual audits
- frame transaction derivation from the app view

Co-authored-by: Cursor <cursoragent@cursor.com>
jaymantri and others added 5 commits September 18, 2026 17:19
Move account and viewport choices into one configure grid. Replace the
manual close flow with the timed loading state, and add the Wallet-based
landscape Duo preview while preserving rail geometry parity.

Co-authored-by: Cursor <cursoragent@cursor.com>
Derive statement titles and filenames from the closed period. Keep one
Wallet title in-app, retain standalone mastheads for exports, use the full
mobile width, and remove duplicate footer contact blocks without changing
the Reg E notice.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse the active preview tree in the share panel. Restore the Cards share
control behavior and cap the responsive panel while keeping mobile controls
clear and reachable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover timed loading, rail bounds, shared live previews, export names,
full-width shell scrolling, responsive share bounds, and final visual cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid duplicate account reloads, close share during account loading, and remove redundant legal contact constants.

Co-authored-by: Cursor <cursoragent@cursor.com>
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