Skip to content

Phase A3: UI Workbench Connect - Directory Core

Date: 2026-01-05 Module: mod-uni-directory

1. Workbench Integration

The Directory UI (/directory) has been upgraded from a Mock Prototype to a Live Workbench.

Data Connection

  • Source: getDirectoryGraphAction (Server Action)
  • Guard: Protected by verifyContext (Admin/Board/Staff).
  • State: Powered by usePlatformContext hook to pass the active security context to the server.

Components

  • DirectoryGraphClient:
  • Removed hardcoded mockUnits.
  • Added useEffect to fetch real directory graph on mount.
  • Mapped server-side DirectoryUnit (Firestore) to Client UI Unit interface.
  • Handles "Loading" and "Error" states basic implementation.

2. Refactoring Status

  • Read Path: ✅ Live.
  • Write Path: 🔒 Secured via Server Actions (Gate 2), but UI Forms are not yet implemented in the Graph View. (Pending Phase B: Transactional Forms).
  • Note: The actions addOccupantAction, assignPropertyManagerAction, etc., are ready to be wired into "Action Island" modals.

3. Next Steps (Phase B)

  • Implement Editors: Create UnitEditor and ProfileEditor side-panels or modals.
  • Wire Actions: Connect the secured mutations to these forms.
  • Enhance Search: Improve the client-side filtering to server-side search for scalability if needed.

Status: Directory Workbench is LIVE (Read-Only) and SECURED.