Files
pipelines/app/notes/remove-templates-from-settings.md
T
alan 1e07ab1ddc Remove Templates from Settings
Keep the Templates destination available through its direct routes while removing the obsolete Settings entry and wiring. Update navigation coverage and document the preserved route behavior.
2026-11-12 01:02:11 +00:00

3.0 KiB

Remove the Templates entry from Settings

What changed

  • Deleted lib/features/settings/settings_templates_section.dart (the Browse templates chevron row and its label constants).
  • Removed SettingsKeys.templates, the onOpenTemplates parameter and its doc comment from SettingsScreen, and the Templates row from the Tools topic's Library group (settings_topic_pages.dart). The Library group now renders only when a Schedules route is supplied.
  • pipelines_app.dart no longer passes onOpenTemplates.
  • settings_schedules_section.dart: doc comment no longer refers to the Templates entry.

Kept on purpose

  • The Templates destination (lib/application/templates_destination.dart), the AppRoute.templates kind, its codec (/templates, /settings/templates aliases), AppRouter.openTemplates/closeTemplates, and the templates feature under lib/features/templates/. They remain reachable by URL (/templates, /settings/templates) and by AppRouter.openTemplates, so they are not solely reachable from the removed row. Removing them is a separate follow-up if the route itself should go.

Tests

  • test/application/templates_wiring_test.dart and test/application/templates_behind_bar_test.dart used to reach Templates by tapping the Settings row. They now boot at /pipelines and push /templates by route, then assert the same embedded page, bar, refresh, detail and create expectations. The Settings-only assertions (edited server URL surviving the detour, the Settings row being present, the ping answer) were removed with the row.
  • readTemplates in templates_wiring_test.dart settles the frame after the list reply before answering validate, because the shell's own ping shares the request queue.
  • New test/features/settings/settings_library_test.dart: Tools shows Library with Schedules and no Browse templates; Schedules still calls its route; without a Schedules route the Library group is absent.

Focused results (app/, tool/memwatch/full.sh)

  • Baseline on the untouched worktree, 4 files: 31 passed, 0 failed.
  • After the change, 10 files (the 4 above plus settings_library_test.dart, settings_topic_restore_test.dart, settings_screen_test.dart, settings_layout_test.dart, settings_tabs_test.dart, settings_shell_background_test.dart): 61 passed, 0 failed.
  • tool/analyze.sh: clean.
  • Not run: the whole test directory (left to the land gate), and no UI capture was made.

Affected states (not yet captured)

  • Settings > Tools: Library group shows Schedules only.
  • /templates and /settings/templates deep links: still open the embedded Templates page; Back returns to Settings.

Known leftovers

  • app/tool/templates_wiring_probe*, templates_gallery_probe* and template_create_probe.dart drive Settings > Templates and will fail against this build. They were not edited or run here.
  • app/PARITY.md, app/WORK.md and app/pipelines/flutter-design.md may still describe the Settings entry; they were not reviewed.