docs/plans/2026-04-11-toast-expand-message-default.md
For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
Goal: Add a persisted Show Full Text toast preference, expose it in the Toast debug panel, and make the default behavior show full toast text instead of truncating to two lines.
Architecture: Persist the preference in ToastStorage, thread that value through ToastManager into ToastContentView, and keep the debug panel checkbox in sync with storage. Cover the new default and view configuration with focused toast regression tests before implementation.
Tech Stack: Swift, AppKit, UserDefaults, existing toast regression test harness in tools/toast_regression_tests.swift
Files:
tools/toast_regression_tests.swiftStep 1: Write the failing test
Add tests that assert:
ToastStorage.shared.showsFullText defaults to trueToastContentView created with expandMessage: true uses unlimited lines and word wrappingToastContentView created with expandMessage: false still keeps the truncated two-line behaviorStep 2: Run test to verify it fails
Run: swiftc -module-cache-path /tmp/mos-toast-tests -o /tmp/mos-toast-tests tools/toast_regression_tests.swift Mos/Components/Toast/ToastLayout.swift Mos/Components/Toast/ToastVisibilityRules.swift Mos/Components/Toast/ToastContentView.swift Mos/Components/Toast/ToastStorage.swift && /tmp/mos-toast-tests
Expected: FAIL because ToastStorage does not yet expose the new preference
Files:
Mos/Components/Toast/ToastStorage.swiftMos/Components/Toast/Toast.swiftMos/Components/Toast/ToastManager.swiftStep 1: Write minimal implementation
Add a showsFullText boolean to ToastStorage with default true. Use it as the default expandMessage value in Toast.show(...), and make ToastManager.present(...) respect that default when callers do not override it.
Step 2: Run test to verify it passes
Run the same regression command as Task 1.
Expected: PASS for the new default/presentation behavior checks
Files:
Mos/Components/Toast/ToastPanel.swiftMos/Localizable.xcstringsStep 1: Add UI and persistence hook
Add a Show Full Text checkbox in the Toast debug panel configuration area. Bind it to ToastStorage.shared.showsFullText, default on, and refresh it when the panel opens.
Step 2: Add localization entry
Add the localized string key used by the new checkbox.
Step 3: Run regression/build verification
Run the toast regression command again, then run a focused build command for the app target if available.
Files:
Step 1: Run verification
Run:
swiftc -module-cache-path /tmp/mos-toast-tests -o /tmp/mos-toast-tests tools/toast_regression_tests.swift Mos/Components/Toast/ToastLayout.swift Mos/Components/Toast/ToastVisibilityRules.swift Mos/Components/Toast/ToastContentView.swift Mos/Components/Toast/ToastStorage.swift && /tmp/mos-toast-testsStep 2: Inspect diff
Run: git diff -- Mos/Components/Toast/ToastStorage.swift Mos/Components/Toast/Toast.swift Mos/Components/Toast/ToastManager.swift Mos/Components/Toast/ToastPanel.swift Mos/Localizable.xcstrings tools/toast_regression_tests.swift docs/plans/2026-04-11-toast-expand-message-default.md