TenantAtlas/specs/286-ui-copy-ia-localization-neutralization/data-model.md
ahmido aeef285d1d feat: implement spec 286 UI copy, IA & localization neutralization (#345)
## Summary

Implements feature branch `286-ui-copy-ia-localization-neutralization`.

This change set:
- aligns chooser, managed-environment landing, dashboard, shell, and workspace context copy to environment-first terminology
- neutralizes the bounded policy and baseline helper copy called out by Spec 286
- adds focused feature, guard, and browser coverage plus the complete Spec 286 artifact set
- records the discovered `Capture snapshot` modal issue as out-of-scope runtime debt in the Spec 286 close-out notes

## Validation

- `export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Localization/EnvironmentContextTerminologyTest.php tests/Feature/Filament/EnvironmentContextSurfaceCopyTest.php tests/Feature/Filament/Localization/PolicyInventoryLocalizationTest.php tests/Feature/Guards/EnvironmentCopyNeutralizationGuardTest.php`
- `export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Spec286EnvironmentCopyNeutralizationSmokeTest.php`
- `export PATH="/bin:/usr/bin:/usr/local/bin:$PATH" && cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent`

## Notes

- Target branch: `platform-dev`
- Filament remains on v5 with Livewire v4.
- Provider registration remains unchanged in `apps/platform/bootstrap/providers.php`.
- No new destructive actions, asset strategy changes, or global-search posture changes are introduced in this slice.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #345
2026-05-09 23:29:11 +00:00

3.7 KiB

Data Model: UI Copy, IA & Localization Neutralization

Overview

286 introduces no new persisted entity, table, or lifecycle state. The "data model" for this package is a derived operator-copy contract shared across localization keys, page-title methods, shell labels, surface-local rendered labels/test IDs, and bounded helper text.

Canonical Operator Terms

Term Meaning Where It Is Primary Where It Is Secondary or Out of Scope
Workspace top-level SaaS context chooser precondition, workspace headings, registry context never the target object of environment-selection actions
Environment default operator noun for the selected managed target chooser actions, shell labels, dashboard headings, default action copy not used where auth provider is the subject
Managed environment disambiguated environment noun for registry/list headings registry titles and list headings not the default noun for chooser/shell/action labels
Provider generic external system noun default helper text where provider detail is secondary not used to hide when the provider is genuinely the subject
explicit provider name provider-owned detail auth-provider labels, secondary helper text, provider diagnostics not the default-visible noun on environment-scoped admin flows

In-Scope Localization Key Contract

Old Contract Family Canonical Replacement Purpose
tenant_scope environment_scope shell scope label
select_tenant select_environment chooser CTA
selected_tenant selected_environment selected-context label
no_tenant_selected no_environment_selected empty/current-context helper
switch_tenant switch_environment context-switch affordance
clear_tenant_scope clear_environment_scope scope reset affordance
no_active_tenants no_active_environments chooser empty-state message
view_managed_tenants view_managed_environments landing/registry CTA
search_tenants search_environments chooser search placeholder
tenant_title environment_title dashboard heading key

View-Model Contract Expectations

Field Meaning Example Notes
scope_label shell scope copy Environment scope: Production EU derived from current environment context
registry_back_link_label registry return label Back to environment registry route target unchanged
dashboard_title_key environment dashboard translation key localization.dashboard.environment_title consumed by dashboard title helpers
provider_detail_label explicit provider-owned secondary copy Microsoft Graph permissions are required. only used when provider detail is genuinely explanatory

Invariants

  • Operator-facing copy on the in-scope admin surfaces must never teach tenant as the default noun once the surrounding workflow is already environment-scoped.
  • Auth-provider labels remain provider-owned and unchanged.
  • Route names, slugs, PHP class names, model names, and capability names remain unchanged.
  • Shared payload keys outside the enumerated chooser/registry/dashboard/shell/widget surfaces remain unchanged in this slice, even if they still use tenant-shaped internal names.
  • English and German must expose the same in-scope noun choices.
  • No alias translation keys are added for the canonical replacement family inside this slice.

Out of Scope Data Changes

  • no database migrations
  • no persisted glossary table
  • no route-name registry changes
  • no capability or policy storage changes
  • no review/export/customer-facing copy contract changes beyond already-existing packages