Skip to content

[P1] Prevent sticky unsaved-changes guard across sessions #3

@kgarg2468

Description

@kgarg2468

Problem

isDirty is persisted in localStorage, so users can get blocked by unsaved-changes modal after reload/new session without current edits.

Evidence: lib/store/business-store.ts persists isDirty via partialize.

Scope

  • Stop persisting ephemeral dirty-state or reset it safely on hydration/route entry.

Acceptance Criteria

  • Fresh page load does not show unsaved-changes block unless edits happened in current session.
  • Project switching only prompts when there are real unsaved edits.

Suggested Files

  • lib/store/business-store.ts
  • app/(app)/data/page.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions