Skip to content

Fix dashboard toast to follow live Fortal theme changes #97

Description

@leoafarias

Problem

The dashboard showToast implementation inserts a raw OverlayEntry and snapshots the current MixScope and FortalTheme. A toast that remains visible while the host theme changes continues rendering with the old Fortal tokens.

This was reproduced against merged main at 54bd065 with Flutter 3.44.0:

  1. Show a toast while the Fortal accent is blue.
  2. Change the host accent to green before the toast dismisses.
  3. Inspect the toast icon color.

The icon remains at the original blue token. A temporary widget regression test expecting the visible toast to follow the active theme failed with identical before/after colors.

Expected behavior

Visible toast content follows live inherited Fortal/Mix theme changes without manually freezing selected scopes.

Scope

  • Commit a widget regression test covering a theme change while a toast is visible.
  • Replace the raw OverlayEntry scope snapshot with OverlayPortal or another dashboard-local implementation that retains live inherited context.
  • Preserve the current animation, placement, action callback, and four-second automatic dismissal.
  • Keep the implementation private to the dashboard.

Acceptance criteria

  • The regression test demonstrates that a visible toast updates after the active Fortal theme changes.
  • Action dismissal and automatic dismissal remain covered.
  • Dashboard analysis and tests pass.

Non-goals

  • Adding a public Remix toast, overlay host, application shell, or navigation API.
  • Rewriting the dashboard shell.
  • Changing Remix Material imports or icon defaults.

Introduced with the dashboard in #95. Host capability documentation and library tests are tracked separately in #96.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions