Skip to content

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Make toasts actionable so tapping a toast can perform an application action instead of only dismissing it.
  • Specifically allow the "post sent" success toast to navigate to the created status detail when tapped.
  • Provide an extensible mechanism so other toasts can carry actions in the future.

Description

  • Added Toast.Action nested struct and an optional action property to ToastCenter.Toast, and updated the initializer and equality logic to include the action id.
  • Updated ToastOverlayView to invoke action.handler() when a toast is tapped before dismissing the toast.
  • Wired the post-success toast in StatusEditor.ToolbarItems to set an action that calls routerPath.navigate(to: .statusDetailWithStatus(status: status)) so tapping the success toast opens the status detail.
  • Kept existing toast behaviors (show, update, dismiss, progress handling) unchanged apart from the added action support.

Testing

  • No automated tests were executed in this environment because XcodeBuildMCP/CI was not available here.
  • Please run a full build and package tests locally or in CI (per project guidelines) to validate compilation and behavior.

Codex Task

@Dimillian Dimillian merged commit ca1a722 into main Jan 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants