Guard unsaved Library Source edits during navigation - #92
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_cb784d0a-a132-4e55-bd82-f299dd93925a) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_b6ec44f6-c3bb-4064-a0e8-5be5061f396c) |
A Library Source's Import files and Naming editors use explicit Save buttons. If the user changes either draft and opens another Source or leaves Library, the draft currently disappears without a discard decision.
Register the sheet's dirty state with a small Library context and extend the existing single navigation blocker. Tab and file query changes within the same Source remain available. Route exits and Source switches ask whether to discard, then either keep the current editor or continue navigation. The sheet's close prompt and browser reload warning remain in place.
Isolated Chrome proof: with Source A's import selection changed, cancelling a Source B switch kept Source A and its 0/1 draft; accepting switched Sources, and the Source A API still held the saved selection. With a Naming override changed, cancelling navigation to Builds kept Library and the unchecked draft; accepting opened Builds. Focused guard tests cover both cancellations and acceptance. Web suite: 264 files and 1,396 tests passed with
--maxWorkers=2. Monorepo typecheck, lint, and diff check passed.This branch is stacked on #91. It also contains cherry-picked #87 data-router commits through
bc0a799c, since the shared blocker depends on them. The new GRE-301 change is commitda10fe98; the #87 commits can be deduplicated when the stack is landed.Tracks GRE-301.