Document the provider generator's provider kit output
Summary
Provider kit Track B, B6 follow-up: docs/api/rails_provider_generator.md described the pre-kit output of rails g provider:family (models on ApplicationRecord with their own syncer and unlinking, a hand-built single-form panel, a full CRUD controller, a hand-written route block). It now describes what the generator writes after B6a–B6d. Docs only.
Part of #5003 (Track B, step 6).
Stacked on #5266. Fork pre-flight: jaysbeekay/sure#758 (same branch, same commit; its CI, Gatekeeper review and screenshot history live there).
What the guide now says
- Models:
<Key>Item < ProviderItem(syncing throughProviderItem::Syncer, unlinking throughProviderItem::Unlinking), withimport_latest_<key>_data(sync_start_date:)and thewith_credentialsscope;<Key>Account < ProviderAccount, withname_for,currency_foranddefault_accountable_attributes. - Account flow: the six hooks of the generated
<Key>Item::AccountFlow,.cache_sensitive_paramsgenerated from the declared fields (read on every edit) and the other five each aNotImplementedErrorstub with a TODO. - Adapter: the
declares_connectionwithsettings_page/settings_panellists, andbuild_providerraising until implemented. - Views: a table of the generated views and the kit component each renders; the panel's list shape and
setup_stepsslot; the_credential_fieldshook (secrets rendered withvalue: nil, the blank-keeps-it placeholder; written even with--skip-view); the<Key>ItemsHelper. - Controller and routes: the thin
ProviderItemsControllersubclass with its blank-secret drop on edit; the oneresources … concerns: :provider_itemsline inserted after the concern, or printed when the concern is missing. - What the kit replaced: the deleted syncer and unlinking templates, and what a generated provider no longer gets (investment trade/holding stats, the auth-error status flip,
unlink_all!'sdisposition:). - Customization: implement the SDK and
build_provider, then the account flow, then model and view tweaks. - The MyBank example passes
--type=banking, so the snippets (kinds: %w[Bank]) match what the generator writes;--typeis documented in one line.
Every snippet and statement was checked against the templates and family_generator.rb at b5f1c11ae, and against ProviderItem, ProviderAccount, ProviderItem::AccountFlow, ProviderItemsController, ProviderItem::PanelComponent and the provider_items route concern.
Left as they were (not kit changes)
- The migration section already differs from
migration.rb.tt(class name, indexes, account columns) before this stack; the kit did not touch the migration. - The generator's own header comment still says "Manual panel view", and its summary points at
docs/PER_FAMILY_PROVIDER_GUIDE.md, which does not exist. Both are code, outside a docs slice. - The
provider:globalsections.
Screenshots
None: docs only.
Demo data
No demo data needed.
Migration notes
No migration.
Verification
Docs only: no code or test change, so no test run. Size: +182 / -295 in one file.
- The earlier merge-down commits' subjects ("Merge up/... into up/...") exceed 72 characters. They stay fork-only: Track B is rebased linear when it goes upstream, as Track A was, so they never reach we-promise/sure.
- Checked against upstream AGENTS.md (blob 1a5dbebd, 2026-11-17): no deviations.
Summary by cubic
Updates docs/api/rails_provider_generator.md to document what rails g provider:family writes with the provider kit: ProviderItem/ProviderAccount models, the stubbed AccountFlow, the thin ProviderItemsController subclass, routes through the provider_items concern, and views rendering kit components. The guide previously described the pre-kit output — models on ApplicationRecord with their own syncer and unlinking, a hand-built panel, a full CRUD controller, and a hand-written route block.
- Covers the dropped kit templates, what a generated provider no longer gets (trade/holding stats, the auth-error status flip,
unlink_all!'sdisposition:), and the customization order (SDK, account flow, model, views). - The migration snippet matches the template's composite unique index and only the five private
AccountFlowhooks raiseNotImplementedError;.cache_sensitive_paramsis generated from the declared fields. - Docs only; no code, test, or migration changes.