Uh oh!
There was an error while loading. Please reload this page.
fix(app-shell): guard unsaved OWD overview rows in the Access rail and Studio header nav (#2600 follow-up) - #2610
Merged
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
8 tasks
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…d Studio header nav (#2600 follow-up) PackageOwdOverviewPanel tracked its unsaved per-object OWD rows internally (rowState/dirtyCount) but reported them to no one, so both unsaved-edit guards discarded them silently: the Access rail's confirm (confirmDiscardMatrixEdits checked only matrixDirty) and the Studio header's surface-level pillarDirty guard from PR #2606. - PackageOwdOverviewPanel grows onDirtyChange — same contract as PermissionMatrixEditPage (ref-stabilized transitions, false on unmount). - AccessPillar folds it in as owdDirty alongside matrixDirty: the rail confirm gates on the combined bit (the two surfaces never coexist), and the combined bit mirrors up to the surface via an effect (replacing the reportMatrixDirty wrapper). - Re-clicking the open OWD rail entry is now a no-op (nothing remounts, so no confirm), mirroring the set re-click. - The create flow now lands on the new set's matrix even from the OWD overview (setOwdOpen(false) in doCreate), so the up-front gate's discard warning is truthful. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
xuyushun441-sysforce-pushed
the
claude/owd-dirty-guard-2600
branch
from
July 16, 2026 13:50
359e8c8 to
9491270CompareContributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch contains #2606's commit (rebased over #2599, which merged to main mid-flight) plus one follow-up commit. Merge #2606 first, then rebase this branch — the replayed #2606 patch drops out automatically and only the follow-up commit remains. Per issue #2600's 「合并注意」,
StudioDesignSurface.tsxPRs merge serially.Summary
Closes the gap #2606 explicitly left out of scope:
PackageOwdOverviewPanel(the Access pillar's Record Sharing Baseline batch-editor) tracked its unsaved per-object rows internally (rowState/dirtyCount) but reported them to no one, so both unsaved-edit guards discarded them silently:confirmDiscardMatrixEditschecked onlymatrixDirty) — switching to a permission set, opening the create flow;pillarDirty) — pillar links, Home, PackageSwitcher.Changes
PackageOwdOverviewPanelgrowsonDirtyChange— the exact PR fix(studio): Access pillar no longer silently discards unsaved permission-matrix edits on rail switch #2588 contractPermissionMatrixEditPageuses: ref-stabilized transition reports,falseon unmount so a confirmed discard clears the host's guard by itself.AccessPillarfolds it in asowdDirtyalongsidematrixDirty. The rail confirm (confirmDiscardEdits, renamed) gates on the combined bit — the two main-panel surfaces never coexist, so at most one bit is set — and the combined bit mirrors up to the surface via a ref-stabilized effect with afalse-on-unmount cleanup (replacing fix(studio): confirm before header SPA nav discards unsaved pillar edits (#2600) #2606'sreportMatrixDirtywrapper).owdDirtyfolded in it would have prompted spuriously.setOwdOpen(false)indoCreate) — the "+ New" gate warns about discarding, so the discard must actually happen; before, creating from the overview left it open with the new set silently selected underneath.Tests
PackageOwdOverviewPanel.test.tsx+2: the onDirtyChange contract (edit →true, revert →false, unmount →false; save →false).StudioDesignSurface.accessGuard.test.tsx+3 (real panel now, stub mock removed): dirty overview → set swap prompts, cancel keeps edits, confirm discards and resets the guard; OWD rail re-click never prompts; create flow gates and lands on the new set's matrix.StudioDesignSurface.pillarNavGuard.test.tsx+1 (stub mock removed): dirty overview rows gate a header pillar switch through the real StudioDesignSurface → AccessPillar → PackageOwdOverviewPanel stack, and a confirmed discard resets the surface guard.vitest run packages/app-shell/src/views/studio-design/— 17 files / 108 tests passtsc --noEmitinpackages/app-shell— clean🤖 Generated with Claude Code