Skip to content

Fixes for struct issues#346

Merged
ddon merged 11 commits intoBeamLabEU:devfrom
alexdont:dev
Feb 17, 2026
Merged

Fixes for struct issues#346
ddon merged 11 commits intoBeamLabEU:devfrom
alexdont:dev

Conversation

@alexdont
Copy link
Contributor

@alexdont alexdont commented Feb 17, 2026

double checked the changes with codex

Alexander Don and others added 11 commits February 17, 2026 15:39
Convert plain map to enforced struct with @type t() spec for
compile-time key validation in the session hijacking detection path.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Adds defstruct with @enforce_keys and @type t() for compile-time
validation. Adds get_spec/1 returning typed struct per country.
Internal @iban_specs stays as plain maps due to module attribute
compile order.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Mark SessionFingerprint and IbanData as done, add to completed
structs table, update summary counts (2/21 complete).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
New struct alongside UrlEntry with @enforce_keys [:filename,
:url_count] and @type t(). All 3 construction sites in generator.ex
updated, @SPEC annotations use SitemapFile.t().

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
New struct with @enforce_keys [:type], typed event_type() union of
10 event atoms, and @type t(). All 10 construction sites in
helpers.ex updated. Template dot-access works identically.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
New LegalFramework struct (7 fields) and PageType struct (4 fields)
with enforce_keys, type specs, and from_map/1 boundary converters.
Internal module attributes stay as plain maps; public accessors
convert at the boundary.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
…ync, emails, AI, and dashboard modules

Completes the Tier 1 cross-module struct conversions from the struct vs map audit:
- Billing: CheckoutSession, SetupSession, WebhookEventData, PaymentMethodInfo, ChargeResult, RefundResult, ProviderInfo
- Entities: FieldType with from_map/1 boundary conversion
- Dashboard: Group (extends Tab/Badge/ContextSelector family)
- Sync: TableSchema + ColumnInfo for wire protocol documentation
- Emails: EmailLogData (16-field struct for tracking pipeline)
- AI: AIModel with atom keys converted from JSON string keys at normalize boundary

All provider implementations (Stripe, PayPal, Razorpay) updated to return structs.
All consumer sites updated (templates, LiveViews, specs). Backward-compatible map
fallback clauses retained in AI module.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- endpoint_form.ex: find_model used string key m["id"] on AIModel atom-key struct
- group.ex: Add missing icon and collapsible fields used by sidebar templates
- registry.ex: Convert config groups to Group structs via Group.new/1
- user_dashboard_categories.ex: Return Group structs from to_groups/1
- data_importer.ex: Handle TableSchema struct in get_primary_keys/1
- billing.ex: Use dot access session.id/session.url on CheckoutSession struct
- subscription_renewal_worker.ex: Use charge_result.provider_transaction_id

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Sidebar templates used @group[:label], @group[:icon], @group[:collapsible]
bracket notation which silently returns nil on structs. Changed all to dot
notation. Also fixed info[:lastmod] on SitemapFile in sitemap generator.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Languages: normalize Language structs to maps before adding :country
  metadata key in get_languages_grouped_by_continent/0
- UserToken: extract fingerprint attrs via multi-clause helper that
  handles SessionFingerprint structs, plain maps, and nil
- modules.html.heex: switch @languages_default from bracket to dot access
- Tests: fix doctest compilation, bracket-access assertion, add grouped
  languages coverage

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- actions.ex: match {:ok, checkout_url} string instead of {:ok, %{url: _}}
- uuid_fk_columns.ex: remove dead nil branch (prefix is always a string)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@ddon ddon merged commit 6158667 into BeamLabEU:dev Feb 17, 2026
6 checks passed
ddon pushed a commit that referenced this pull request Feb 17, 2026
- PR #345: Guest checkout flow fixes and UUID migration constraints
- PR #346: Typed structs replacing plain maps across 20 modules
ddon pushed a commit that referenced this pull request Feb 17, 2026
Includes all changes from PR #345 (guest checkout fixes) and PR #346
(20 typed structs replacing plain maps). Fixes Language struct Access
error on admin modules page that affected 1.7.42 upgrades.
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.

2 participants

Comments