File tree Expand file tree Collapse file tree
ui/packages/app-shell/src/views/studio-design Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ export interface StudioSaveEntry {
6767}
6868
6969interface StudioSaveRegistry {
70- register : ( id : number , entry : React . MutableRefObject < StudioSaveEntry | null > ) => ( ) => void ;
70+ /** Add a buffer; the answer removes it. (Not `register`: that name is the component registry's.) */
71+ enlist : ( id : number , entry : React . MutableRefObject < StudioSaveEntry | null > ) => ( ) => void ;
7172 /** An entry's `dirty` or `held` changed: the top bar re-reads them. */
7273 changed : ( ) => void ;
7374}
@@ -94,7 +95,7 @@ export function useStudioSaveEntry(entry: StudioSaveEntry | null): void {
9495 const [ id ] = React . useState ( ( ) => ++ nextEntryId ) ;
9596 React . useEffect ( ( ) => {
9697 if ( ! registry ) return ;
97- return registry . register ( id , ref ) ;
98+ return registry . enlist ( id , ref ) ;
9899 } , [ registry , id ] ) ;
99100 const dirty = entry ?. dirty ?? false ;
100101 const held = entry ?. held ?? null ;
@@ -127,7 +128,7 @@ export function useStudioSaveCoordinator(locale: string): StudioSaveCoordinator
127128 } , [ ] ) ;
128129 // A state initializer, so its identity is the surface's for life (AGENTS.md #10).
129130 const [ registry ] = React . useState < StudioSaveRegistry > ( ( ) => ( {
130- register : ( id , ref ) => {
131+ enlist : ( id , ref ) => {
131132 entriesRef . current . set ( id , ref ) ;
132133 setDirty ( readDirty ( ) ) ;
133134 return ( ) => {
You can’t perform that action at this time.
0 commit comments