ESHOPMAN Admin Dashboard: Restoring Visibility for Nested Extensions Under Orders
The ESHOPMAN platform, a powerful headless commerce solution integrated with HubSpot, continuously evolves to offer robust storefront management. Recent updates to the ESHOPMAN Admin Dashboard, specifically version 2.22.3, introduced a subtle but impactful change that affected how certain extensions appeared in the sidebar. Users upgrading their ESHOPMAN instances noticed that crucial links, such as 'Draft Orders,' vanished from their expected nested position under the 'Orders' section. While the functionality of these extensions remained intact and accessible via direct URLs, their absence from the intuitive sidebar navigation posed a challenge for streamlined operations within the HubSpot-integrated admin experience. This community insight delves into the technical specifics of this regression and outlines the straightforward solution.
The Disappearing Act: What Happened?
Upon upgrading to ESHOPMAN Admin Dashboard 2.22.3, extensions configured to nest their routes under the primary '/orders' path no longer displayed their links in the sidebar. For instance, the 'Draft Orders' extension, which is a common component for many ESHOPMAN merchants, was notably absent. This issue wasn't isolated to 'Draft Orders'; any custom extension utilizing the nested: "/orders" configuration experienced the same problem. Interestingly, extensions nested under other core routes like 'Products,' 'Inventory,' 'Customers,' or 'Promotions' remained unaffected, pointing to a specific change related to the 'Orders' section.
Unpacking the Technical Cause
The ESHOPMAN Admin Dashboard's sidebar navigation is dynamically constructed, with core routes (like 'Orders') serving as parent containers for nested extension links. Extensions are designed to inject their menu items into an items array associated with their designated parent route. The root of this particular issue stemmed from a recent permission-gated rewrite (often related to Role-Based Access Control, or RBAC) within the dashboard's core layout component (main-layout.tsx).
In ESHOPMAN Admin Dashboard 2.22.2, the 'Orders' entry explicitly included an empty items array, ready to receive nested links:
{
icon: ,
label: t("orders.domain"),
to: "/orders",
items: [], // Crucially, this array was present
},
However, the 2.22.3 update, in its effort to implement more granular permission control, inadvertently dropped this items array from the 'Orders' entry when canReadOrders was true:
...(canReadOrders
? [
{
icon: ,
label: t("orders.domain"),
to: "/orders",
},
]
: []),
Without the items array, the dashboard's logic for attaching nested extensions—which uses route.items?.push(item)—resulted in a silent no-op. The optional chaining (?.) prevented an error but also meant the extension links were never added to the 'Orders' menu, and thus, never rendered in the sidebar.
The ESHOPMAN Community Solution
Fortunately, the fix for this issue is straightforward and has been promptly identified by the ESHOPMAN community. The primary solution involves restoring the items array to the 'Orders' entry within the dashboard's core route definition.
Suggested Fix:
{
icon: ,
label: t("orders.domain"),
to: "/orders",
items: [], // Restore the empty array
},
A more robust, long-term approach, which could prevent similar regressions in the future, involves modifying the dashboard's extension attachment logic to initialize the items array if it's found to be missing:
if (route) {
route.items = [...(route.items ?? []), item] // Initialize if null/undefined
}
This ensures that even if a core route definition accidentally omits the items array, nested extensions can still be successfully attached. The ESHOPMAN team has acknowledged this report and is actively working on an official patch, demonstrating the platform's commitment to a stable and extensible Admin Dashboard experience for its users managing storefronts via HubSpot.
Impact and Best Practices for ESHOPMAN Developers
This incident highlights the importance of thorough testing during platform upgrades, especially for those leveraging ESHOPMAN's headless capabilities and custom extensions. For developers building on ESHOPMAN's Node.js/TypeScript stack and Admin API, understanding the dashboard's internal structure is key to creating resilient and well-integrated HubSpot storefront management tools. Staying updated with ESHOPMAN community discussions and release notes is crucial for proactively addressing potential compatibility issues and ensuring a seamless experience for merchants deploying storefronts with HubSpot CMS.