--- phase: quick-261007-p4y plan: 01 status: complete subsystem: admin, cabana, pact, sm-translate-plugin tags: [admin-spa, settings, pact, cabana, translate, parity] requires: [] provides: - "pact.SettingsItem.Controller: a settings entry that links to an admin controller" - "cabana link compile/validation, metadata filtering (Allows + canOpen), singleton-endpoint 404s" - "SPA settingsPath / settingsLinkFor; Settings-aware rail, breadcrumbs and page title" - "translate plugin: Locales on the Settings page instead of the main navigation" affects: [sm-grzybyfunkcjonalne-app, sm-summercmsio-app] tech-stack: added: [] patterns: - "Settings entries share one code namespace across singleton and link entries" - "Registry.Setting hides link entries so protectSetting answers 404 with no http.go change" key-files: created: - modules/cabana/settings_link_test.go - modules/cabana/example_settings_test.go - ../sm-translate-plugin/admin_settings.go modified: - admin/src/components/form/fields/SwitchField.vue - modules/pact/capabilities.go - modules/cabana/settings.go - modules/cabana/registry.go - modules/cabana/navigation.go - modules/cabana/contracts.go - modules/cabana/example_test.go - admin/openapi/admin.json - admin/src/api/schema.d.ts - admin/tests/fixtures/settings.json - admin/src/state/useSettings.ts - admin/src/views/SettingsIndexView.vue - admin/src/components/shell/PluginRail.vue - admin/src/components/shell/Breadcrumbs.vue - admin/src/app/pageTitle.ts - modules/pact/README.md - modules/cabana/README.md - docs/backend/settings.md - docs/setup/coming-from-wintercms.md - modules/boardwalk/dist/ - ../sm-translate-plugin/admin.go - ../sm-translate-plugin/plugin_test.go - ../sm-translate-plugin/locales_admin_test.go - ../sm-translate-plugin/README.md deleted: - ../sm-translate-plugin/admin_navigation.go decisions: - "A settings link entry rejects Model as well as Form/NewModel, so the SPA never sees a misleading model string" - "Translate's settings category follows the PHP reference (golem15.translate::lang.plugin.name); no core System category constant added" - "The docs Go example for the link entry lives in its own file (example_settings_test.go) because example_controller_test.go is embedded whole in admin-controllers.md" metrics: duration: "13 min" completed: 2026-10-07 estimate: tokens: 140000 tasks: 3 actuals: tokens: 15600 tasks: 3 commits: 3 plan_head_before: a586357a346a66111d37bd8c1d564c769a412715 plan_head_after: 0b09acdb0cca4955a2dcba2e9a2708a06b032104 --- # Quick 261007-p4y: Toggle proportions and Settings controller links Summary The admin switch now has pixel-based proportions: a 44x26 track and a 20px knob. Settings entries can now link to an admin controller through an additive `pact.SettingsItem.Controller` field, covered from start-up validation through to the Settings page. The translate plugin now lists Locales on the Settings page, under the Translate category, as WinterCMS did. ## Commits summercms.go (3 commits, measured `git rev-list --count a586357..HEAD` = 3): | Task | Commit | Message | |------|--------|---------| | 1 | b040ee3 | fix(admin): size the switch toggle in pixels at the 14px root | | 2A | 4a9b089 | feat(cabana): settings entries that link to an admin controller | | 2B | 0b09acd | feat(admin): open controller-link settings entries from the settings index | sm-translate-plugin (separate repo, 1 commit): | Task | Commit | Message | |------|--------|---------| | 3 | bde3f1a | feat(settings): open Locales from the Settings page | No commit has a co-author trailer. No commit touches `.planning`. Nothing was pushed. ## What was built - **Switch:** `w-[44px]` and `size-[20px]` give 3 + 20 + 18 + 3 = 44, with a symmetric inset. Dist was rebuilt and committed on its own. - **pact:** `SettingsItem.Controller` is a new additive field placed before `Form`. Keyed literals in other code compile unchanged, and a grep of the meta repo found no unkeyed ones. - **cabana:** - `compileSettingLink` rejects a link that also sets Form, NewModel or Model. - The link branch in `compileContributions` skips the AdminFS requirement. - After every plugin is collected, start-up fails on an unknown controller with `cabana: setting references unknown controller `. - `Registry.Setting` hides link entries, so all three singleton endpoints answer 404. - `SettingsEntry.Controller` is serialised as `json:"controller"` and is always present. - Metadata lists a link entry only when the principal passes `Allows(item.Permissions)` and `canOpen(controller)`. - **OpenAPI:** `controller` is a required string on `cabana.SettingsEntry` in admin.json and schema.d.ts. The settings fixture entries now carry `"controller": ""`. - **SPA:** - Index cards link through `settingsPath`. - The rail marks Settings current on a linked controller that has no navigation entry. A linked controller that does have a navigation entry keeps its plugin highlighted. - Breadcrumbs on such a page read `Ustawienia >