@@ -45,6 +45,7 @@ import {
4545 defaultOrganizationName ,
4646 loadAssignedProjects ,
4747 loadUserAdminAccess ,
48+ loadUserOrganizationName ,
4849 updateProjectStatus ,
4950} from "../lib/adminBackend" ;
5051import { downloadUrl } from "../lib/download" ;
@@ -294,7 +295,7 @@ export function useAppController() {
294295 }
295296 if ( ! active ) return ;
296297 setAdminAccess ( hasAdminAccess ? "allowed" : "denied" ) ;
297- if ( remoteProjects . length )
298+ if ( remoteProjects . length ) {
298299 setState ( ( current ) => ( {
299300 ...current ,
300301 projects : remoteProjects ,
@@ -303,17 +304,27 @@ export function useAppController() {
303304 ( candidate ) => candidate . id === current . project . id ,
304305 ) ?? remoteProjects [ 0 ] ,
305306 } ) ) ;
306- else
307+ } else {
308+ const userOrg = hasAdminAccess
309+ ? await loadUserOrganizationName ( ) . catch ( ( ) => null )
310+ : null ;
307311 setState ( ( current ) => ( {
308312 ...current ,
309313 projects : [ ] ,
310314 // Confirmed empty assignment: hide the cached project so a
311315 // revoked contributor cannot keep collecting offline into
312- // ACTION_REQUIRED records.
313- project : emptyProject ,
316+ // ACTION_REQUIRED records. Keep the organization name for clarity.
317+ project : {
318+ ...emptyProject ,
319+ organization :
320+ userOrg ??
321+ current . project . organization ??
322+ defaultOrganizationName ,
323+ } ,
314324 mode : current . mode ,
315325 view : current . mode === "admin" ? "admin" : "home" ,
316326 } ) ) ;
327+ }
317328 } ;
318329 // Invites are claimed before the project list loads: an already-registered
319330 // contributor receives membership only through claim-invites, and the list
0 commit comments