All files / realm/blong-commander/browser/orchestrator/component commanderBrowse.ts

0% Statements 0/30
0% Branches 0/1
0% Functions 0/1
0% Lines 0/30

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                                                             
import {handler} from '@feasibleone/blong';

/**
 * `commander.browse` — custom browser page mounting the Commander
 * universal backend explorer.
 *
 * The portal menu (`ui.portal.portal.menu` → `commander.browse`) resolves this
 * page via `component/commander.browse`. The portal config fallback
 * (`portalConfigGet`) is provided by the `commander.portal` group so a
 * model-less standalone commander browser still gets a menu (App.tsx calls
 * `portalConfigGet` unconditionally after login).
 *
 * The page JSX lives in `src/pages/` (outside the well-known browser layer
 * folders) and is loaded lazily — the Node tap runner loads this handler
 * without ever resolving the `.tsx` (which only Vite can bundle).
 */
export default handler(function commanderBrowse() {
    return {
        'commander.browse': async () => ({
            title: 'Commander',
            icon: 'pi pi-sitemap',
            component: async () => {
                const {CommanderBrowsePage} = await import(
                    '../../../src/pages/commanderBrowsePage.js'
                );
                return CommanderBrowsePage;
            },
        }),
    };
});