Render the Lunch Flow card through ProviderItem::CardComponent
Summary
Provider kit Track B, B7c: Lunch Flow's connection card renders ProviderItem::CardComponent, as Brex's does since B4a. A pure move: the card's HTML is unchanged, proven against snapshots recorded from the old partial.
Part of jaysbeekay/sure#670 (Track B, step 7: the Lunch Flow conversion, card). Stacked on B7b (jaysbeekay/sure#737) in fork stack #687.
Upstream draft PR: https://github.com/we-promise/sure/pull/5249 (same branch, same commit), in native stack we-promise/sure#5268 on refactor/provider-kit.
What changed
app/views/lunchflow_items/_lunchflow_item.html.erb: 6 lines (from 129), rendering the component with the accounts page's@lunchflow_sync_stats_map. Lunch Flow passes no count maps; the component then asks the connection, as the partial did.test/components/provider_item/lunchflow_card_component_test.rband sevenlunchflow_card_*.htmlsnapshots: Brex's seven card cases (admin; admin with a linked account; member with accounts; member shown one of two; member with none; scheduled for deletion; sync error), each asserting the partial and the component both render the snapshot.
Screenshots
Rendering unchanged: this PR moves the Lunch Flow card onto a shared component, and the snapshot tests show the HTML matches the partial's. After only, at this PR's head: /accounts, the Lunch Flow connection from the test fixtures (lunchflow_items(:one)) with one linked account, "Everyday (linked)", added for the shot.
| Light | Dark | |
|---|---|---|
| After | ![]() | ![]() |
Demo data
No demo data needed.
Migration notes
No migration.
Verification
- Snapshots recorded first: the seven snapshots were written from the old partial (
PROVIDER_ITEM_SNAPSHOTS=write, partial cases only) before the partial changed. The component matched them then, and both match after. - Existing tests unedited: the accounts controller, views and Lunch Flow controller tests pass.
- Mutation, caught: the card handed every account instead of the viewer's visible ones ("member shown one of two").
bin/rails test(full, at the B7c commit): 16,416 runs, 0 failures; the same 8ReleaseNotesWorkflowTesterrors (nonodein the test image).erb_lint,bin/rubocopon changed files: no offenses.bin/brakeman: no warnings.- Size: non-test +5 / -128.
- Checked against upstream AGENTS.md (blob 1a5dbebd, 2026-11-17): no deviations.
Blast radius
- The partial is rendered by
accounts/indexand byProviderItemsController#complete_account_setup's Turbo stream, both withvisible_accounts:(ProviderItemCardsTestchecks every render site). - The sync-stats map: the accounts page builds it for every Lunch Flow connection it lists, so the component's fallback to the connection's latest sync, used when an item is missing from the map, isn't reached there.

