@peers-app/peers-ui 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/README.md +52 -0
- package/.github/workflows/publish.yml +45 -0
- package/babel.config.js +7 -0
- package/dist/app.d.ts +9 -0
- package/dist/app.js +54 -0
- package/dist/command-palette/command-palette-ui.d.ts +2 -0
- package/dist/command-palette/command-palette-ui.js +192 -0
- package/dist/command-palette/command-palette.d.ts +23 -0
- package/dist/command-palette/command-palette.js +371 -0
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.js +20 -0
- package/dist/components/group-switcher.d.ts +6 -0
- package/dist/components/group-switcher.js +301 -0
- package/dist/components/input-date.d.ts +7 -0
- package/dist/components/input-date.js +19 -0
- package/dist/components/input-datetime.d.ts +7 -0
- package/dist/components/input-datetime.js +35 -0
- package/dist/components/input-number.d.ts +9 -0
- package/dist/components/input-number.js +87 -0
- package/dist/components/input.d.ts +7 -0
- package/dist/components/input.js +20 -0
- package/dist/components/io-schema-values.d.ts +15 -0
- package/dist/components/io-schema-values.js +105 -0
- package/dist/components/io-schema.d.ts +13 -0
- package/dist/components/io-schema.js +163 -0
- package/dist/components/lazy-list.d.ts +13 -0
- package/dist/components/lazy-list.js +91 -0
- package/dist/components/lazy-sortable-list.d.ts +29 -0
- package/dist/components/lazy-sortable-list.js +12 -0
- package/dist/components/left-bar.d.ts +3 -0
- package/dist/components/left-bar.js +130 -0
- package/dist/components/list-screen.d.ts +16 -0
- package/dist/components/list-screen.js +100 -0
- package/dist/components/loading-indicator.d.ts +2 -0
- package/dist/components/loading-indicator.js +12 -0
- package/dist/components/main-content-container.d.ts +2 -0
- package/dist/components/main-content-container.js +90 -0
- package/dist/components/markdown-editor/autolink-plugin.d.ts +2 -0
- package/dist/components/markdown-editor/autolink-plugin.js +29 -0
- package/dist/components/markdown-editor/editor-inline.d.ts +3 -0
- package/dist/components/markdown-editor/editor-inline.js +13 -0
- package/dist/components/markdown-editor/editor.d.ts +18 -0
- package/dist/components/markdown-editor/editor.js +143 -0
- package/dist/components/markdown-editor/markdown-plugin.d.ts +9 -0
- package/dist/components/markdown-editor/markdown-plugin.js +194 -0
- package/dist/components/markdown-editor/mention-node.d.ts +21 -0
- package/dist/components/markdown-editor/mention-node.js +160 -0
- package/dist/components/markdown-editor/mentions-plugin.d.ts +7 -0
- package/dist/components/markdown-editor/mentions-plugin.js +268 -0
- package/dist/components/markdown-editor/theme.d.ts +46 -0
- package/dist/components/markdown-editor/theme.js +48 -0
- package/dist/components/markdown-editor/toolbar.d.ts +10 -0
- package/dist/components/markdown-editor/toolbar.js +112 -0
- package/dist/components/markdown-with-mentions.d.ts +4 -0
- package/dist/components/markdown-with-mentions.js +140 -0
- package/dist/components/message-logs/message-logs.d.ts +6 -0
- package/dist/components/message-logs/message-logs.js +307 -0
- package/dist/components/messages/avatar.d.ts +10 -0
- package/dist/components/messages/avatar.js +65 -0
- package/dist/components/messages/channel-message-list.d.ts +14 -0
- package/dist/components/messages/channel-message-list.js +158 -0
- package/dist/components/messages/channel-view.d.ts +6 -0
- package/dist/components/messages/channel-view.js +82 -0
- package/dist/components/messages/message-compose.d.ts +11 -0
- package/dist/components/messages/message-compose.js +152 -0
- package/dist/components/messages/message-display.d.ts +10 -0
- package/dist/components/messages/message-display.js +152 -0
- package/dist/components/messages/thread-message-list.d.ts +11 -0
- package/dist/components/messages/thread-message-list.js +122 -0
- package/dist/components/messages/thread-view.d.ts +6 -0
- package/dist/components/messages/thread-view.js +174 -0
- package/dist/components/off-canvas.d.ts +13 -0
- package/dist/components/off-canvas.js +89 -0
- package/dist/components/router.d.ts +6 -0
- package/dist/components/router.js +240 -0
- package/dist/components/save-button.d.ts +13 -0
- package/dist/components/save-button.js +75 -0
- package/dist/components/sortable-list.d.ts +36 -0
- package/dist/components/sortable-list.js +77 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +69 -0
- package/dist/components/text-list-editor.tsx/text-list-editor.d.ts +6 -0
- package/dist/components/text-list-editor.tsx/text-list-editor.js +13 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +20 -0
- package/dist/components/top-bar.d.ts +2 -0
- package/dist/components/top-bar.js +51 -0
- package/dist/components/typeahead/mentions-plugin.d.ts +7 -0
- package/dist/components/typeahead/mentions-plugin.js +203 -0
- package/dist/components/typeahead/typeahead-editor.d.ts +15 -0
- package/dist/components/typeahead/typeahead-editor.js +134 -0
- package/dist/components/typeahead/typeahead.d.ts +12 -0
- package/dist/components/typeahead/typeahead.js +94 -0
- package/dist/components/typeahead.d.ts +22 -0
- package/dist/components/typeahead.js +270 -0
- package/dist/globals.d.ts +29 -0
- package/dist/globals.js +148 -0
- package/dist/hooks.d.ts +34 -0
- package/dist/hooks.js +137 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/layout-vars.d.ts +6 -0
- package/dist/layout-vars.js +10 -0
- package/dist/mention-configs.d.ts +18 -0
- package/dist/mention-configs.js +149 -0
- package/dist/screens/assistants/assistant-config.d.ts +5 -0
- package/dist/screens/assistants/assistant-config.js +52 -0
- package/dist/screens/assistants/assistant-details.d.ts +4 -0
- package/dist/screens/assistants/assistant-details.js +85 -0
- package/dist/screens/assistants/assistant-info.d.ts +6 -0
- package/dist/screens/assistants/assistant-info.js +28 -0
- package/dist/screens/assistants/assistant-list.d.ts +2 -0
- package/dist/screens/assistants/assistant-list.js +114 -0
- package/dist/screens/assistants/assistant-tools.d.ts +5 -0
- package/dist/screens/assistants/assistant-tools.js +38 -0
- package/dist/screens/contacts/contact-details.d.ts +6 -0
- package/dist/screens/contacts/contact-details.js +100 -0
- package/dist/screens/contacts/contact-list.d.ts +2 -0
- package/dist/screens/contacts/contact-list.js +213 -0
- package/dist/screens/contacts/index.d.ts +4 -0
- package/dist/screens/contacts/index.js +21 -0
- package/dist/screens/events/cron.d.ts +3 -0
- package/dist/screens/events/cron.js +77 -0
- package/dist/screens/events/event-details.d.ts +6 -0
- package/dist/screens/events/event-details.js +112 -0
- package/dist/screens/events/event-handlers.d.ts +7 -0
- package/dist/screens/events/event-handlers.js +84 -0
- package/dist/screens/events/event-info.d.ts +5 -0
- package/dist/screens/events/event-info.js +19 -0
- package/dist/screens/events/event-list.d.ts +2 -0
- package/dist/screens/events/event-list.js +107 -0
- package/dist/screens/events/event-schedule.d.ts +5 -0
- package/dist/screens/events/event-schedule.js +124 -0
- package/dist/screens/groups/group-details.d.ts +6 -0
- package/dist/screens/groups/group-details.js +218 -0
- package/dist/screens/groups/group-list.d.ts +2 -0
- package/dist/screens/groups/group-list.js +275 -0
- package/dist/screens/groups/group-members.d.ts +8 -0
- package/dist/screens/groups/group-members.js +315 -0
- package/dist/screens/groups/index.d.ts +6 -0
- package/dist/screens/groups/index.js +23 -0
- package/dist/screens/knowledge/knowledge-frame-details.bk.d.ts +6 -0
- package/dist/screens/knowledge/knowledge-frame-details.bk.js +84 -0
- package/dist/screens/knowledge/knowledge-frame-details.d.ts +8 -0
- package/dist/screens/knowledge/knowledge-frame-details.js +143 -0
- package/dist/screens/knowledge/knowledge-frame-list.d.ts +2 -0
- package/dist/screens/knowledge/knowledge-frame-list.js +45 -0
- package/dist/screens/knowledge/knowledge-value-details.d.ts +6 -0
- package/dist/screens/knowledge/knowledge-value-details.js +150 -0
- package/dist/screens/knowledge/knowledge-value-list-item.d.ts +5 -0
- package/dist/screens/knowledge/knowledge-value-list-item.js +39 -0
- package/dist/screens/knowledge/knowledge-value-list.d.ts +3 -0
- package/dist/screens/knowledge/knowledge-value-list.js +123 -0
- package/dist/screens/packages/package-details.d.ts +6 -0
- package/dist/screens/packages/package-details.js +82 -0
- package/dist/screens/packages/package-info.d.ts +5 -0
- package/dist/screens/packages/package-info.js +42 -0
- package/dist/screens/packages/package-list.d.ts +2 -0
- package/dist/screens/packages/package-list.js +182 -0
- package/dist/screens/packages/package-new-local.d.ts +2 -0
- package/dist/screens/packages/package-new-local.js +82 -0
- package/dist/screens/peer-types/peer-type-details.d.ts +10 -0
- package/dist/screens/peer-types/peer-type-details.js +126 -0
- package/dist/screens/peer-types/peer-type-list.d.ts +2 -0
- package/dist/screens/peer-types/peer-type-list.js +57 -0
- package/dist/screens/predicates/predicate-details.d.ts +6 -0
- package/dist/screens/predicates/predicate-details.js +103 -0
- package/dist/screens/predicates/predicate-list.d.ts +2 -0
- package/dist/screens/predicates/predicate-list.js +46 -0
- package/dist/screens/profile.d.ts +2 -0
- package/dist/screens/profile.js +66 -0
- package/dist/screens/search/global-search.d.ts +2 -0
- package/dist/screens/search/global-search.js +186 -0
- package/dist/screens/settings/color-mode-dropdown.d.ts +6 -0
- package/dist/screens/settings/color-mode-dropdown.js +63 -0
- package/dist/screens/settings/settings-page.d.ts +2 -0
- package/dist/screens/settings/settings-page.js +49 -0
- package/dist/screens/setup-user.d.ts +2 -0
- package/dist/screens/setup-user.js +270 -0
- package/dist/screens/tools/tool-code.d.ts +5 -0
- package/dist/screens/tools/tool-code.js +32 -0
- package/dist/screens/tools/tool-details.d.ts +6 -0
- package/dist/screens/tools/tool-details.js +68 -0
- package/dist/screens/tools/tool-info.d.ts +5 -0
- package/dist/screens/tools/tool-info.js +74 -0
- package/dist/screens/tools/tool-list.d.ts +2 -0
- package/dist/screens/tools/tool-list.js +123 -0
- package/dist/screens/tools/tool-schema.d.ts +5 -0
- package/dist/screens/tools/tool-schema.js +30 -0
- package/dist/screens/tools/tool-test-details.d.ts +4 -0
- package/dist/screens/tools/tool-test-details.js +54 -0
- package/dist/screens/tools/tool-test-list.d.ts +4 -0
- package/dist/screens/tools/tool-test-list.js +82 -0
- package/dist/screens/variables/variable-details.d.ts +6 -0
- package/dist/screens/variables/variable-details.js +140 -0
- package/dist/screens/variables/variable-list.d.ts +2 -0
- package/dist/screens/variables/variable-list.js +58 -0
- package/dist/screens/workflows/workflow-details.d.ts +6 -0
- package/dist/screens/workflows/workflow-details.js +122 -0
- package/dist/screens/workflows/workflow-info.d.ts +5 -0
- package/dist/screens/workflows/workflow-info.js +18 -0
- package/dist/screens/workflows/workflow-instructions.d.ts +5 -0
- package/dist/screens/workflows/workflow-instructions.js +118 -0
- package/dist/screens/workflows/workflow-list.d.ts +2 -0
- package/dist/screens/workflows/workflow-list.js +109 -0
- package/dist/screens/workflows/workflow-subscriptions.d.ts +6 -0
- package/dist/screens/workflows/workflow-subscriptions.js +81 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +31 -0
- package/dist/system-apps/assistants.app.d.ts +2 -0
- package/dist/system-apps/assistants.app.js +8 -0
- package/dist/system-apps/contacts.app.d.ts +2 -0
- package/dist/system-apps/contacts.app.js +9 -0
- package/dist/system-apps/events.app.d.ts +2 -0
- package/dist/system-apps/events.app.js +8 -0
- package/dist/system-apps/groups.app.d.ts +2 -0
- package/dist/system-apps/groups.app.js +9 -0
- package/dist/system-apps/index.d.ts +19 -0
- package/dist/system-apps/index.js +90 -0
- package/dist/system-apps/knowledge-frames.app.d.ts +2 -0
- package/dist/system-apps/knowledge-frames.app.js +9 -0
- package/dist/system-apps/knowledge-values.app.d.ts +2 -0
- package/dist/system-apps/knowledge-values.app.js +9 -0
- package/dist/system-apps/packages.app.d.ts +2 -0
- package/dist/system-apps/packages.app.js +8 -0
- package/dist/system-apps/predicates.app.d.ts +2 -0
- package/dist/system-apps/predicates.app.js +8 -0
- package/dist/system-apps/profile.app.d.ts +2 -0
- package/dist/system-apps/profile.app.js +8 -0
- package/dist/system-apps/search.app.d.ts +2 -0
- package/dist/system-apps/search.app.js +9 -0
- package/dist/system-apps/settings.app.d.ts +2 -0
- package/dist/system-apps/settings.app.js +8 -0
- package/dist/system-apps/threads.app.d.ts +2 -0
- package/dist/system-apps/threads.app.js +8 -0
- package/dist/system-apps/tools.app.d.ts +2 -0
- package/dist/system-apps/tools.app.js +8 -0
- package/dist/system-apps/types.app.d.ts +2 -0
- package/dist/system-apps/types.app.js +8 -0
- package/dist/system-apps/variables.app.d.ts +2 -0
- package/dist/system-apps/variables.app.js +8 -0
- package/dist/system-apps/workflows.app.d.ts +2 -0
- package/dist/system-apps/workflows.app.js +8 -0
- package/dist/tabs-layout/tabs-layout.d.ts +5 -0
- package/dist/tabs-layout/tabs-layout.js +374 -0
- package/dist/tabs-layout/tabs-state.d.ts +26 -0
- package/dist/tabs-layout/tabs-state.js +239 -0
- package/dist/three-bar-layout/left-bar-content.d.ts +7 -0
- package/dist/three-bar-layout/left-bar-content.js +151 -0
- package/dist/three-bar-layout/right-bar-content.d.ts +2 -0
- package/dist/three-bar-layout/right-bar-content.js +64 -0
- package/dist/three-bar-layout/three-bar-layout.d.ts +5 -0
- package/dist/three-bar-layout/three-bar-layout.js +218 -0
- package/dist/ui-defaults/index.d.ts +2 -0
- package/dist/ui-defaults/index.js +4 -0
- package/dist/ui-defaults/list-screen.d.ts +6 -0
- package/dist/ui-defaults/list-screen.js +74 -0
- package/dist/ui-defaults/notes-editor.d.ts +7 -0
- package/dist/ui-defaults/notes-editor.js +41 -0
- package/dist/ui-router/routes-loader.d.ts +25 -0
- package/dist/ui-router/routes-loader.js +97 -0
- package/dist/ui-router/ui-loader.d.ts +18 -0
- package/dist/ui-router/ui-loader.js +481 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +250 -0
- package/docs/conversation-tab.md +201 -0
- package/docs/getting-started.md +284 -0
- package/docs/knowledge.md +187 -0
- package/docs/tabs-ui.md +696 -0
- package/docs/user-contacts-ui.md +384 -0
- package/jest.config.js +25 -0
- package/package.json +109 -0
- package/src/app.tsx +59 -0
- package/src/command-palette/command-palette-ui.tsx +264 -0
- package/src/command-palette/command-palette.ts +364 -0
- package/src/components/checkbox.tsx +22 -0
- package/src/components/group-switcher.tsx +469 -0
- package/src/components/input-date.tsx +28 -0
- package/src/components/input-datetime.tsx +41 -0
- package/src/components/input-number.tsx +67 -0
- package/src/components/input.tsx +22 -0
- package/src/components/io-schema-values.tsx +122 -0
- package/src/components/io-schema.tsx +234 -0
- package/src/components/lazy-list.tsx +98 -0
- package/src/components/lazy-sortable-list.tsx +51 -0
- package/src/components/left-bar.tsx +264 -0
- package/src/components/list-screen.tsx +105 -0
- package/src/components/loading-indicator.tsx +9 -0
- package/src/components/main-content-container.tsx +76 -0
- package/src/components/markdown-editor/autolink-plugin.tsx +36 -0
- package/src/components/markdown-editor/editor-inline.tsx +10 -0
- package/src/components/markdown-editor/editor.tsx +152 -0
- package/src/components/markdown-editor/markdown-plugin.tsx +224 -0
- package/src/components/markdown-editor/mention-node.ts +199 -0
- package/src/components/markdown-editor/mentions-plugin.tsx +356 -0
- package/src/components/markdown-editor/theme.ts +47 -0
- package/src/components/markdown-editor/toolbar.tsx +263 -0
- package/src/components/markdown-with-mentions.tsx +183 -0
- package/src/components/message-logs/message-logs.tsx +406 -0
- package/src/components/messages/avatar.tsx +95 -0
- package/src/components/messages/channel-message-list.tsx +177 -0
- package/src/components/messages/channel-view.tsx +74 -0
- package/src/components/messages/message-compose.tsx +162 -0
- package/src/components/messages/message-display.tsx +217 -0
- package/src/components/messages/thread-message-list.tsx +126 -0
- package/src/components/messages/thread-view.tsx +214 -0
- package/src/components/off-canvas.tsx +83 -0
- package/src/components/router.tsx +224 -0
- package/src/components/save-button.tsx +109 -0
- package/src/components/sortable-list.tsx +102 -0
- package/src/components/tabs.tsx +70 -0
- package/src/components/text-list-editor.tsx/text-list-editor.tsx +13 -0
- package/src/components/tooltip.tsx +50 -0
- package/src/components/top-bar.tsx +119 -0
- package/src/components/typeahead/mentions-plugin.tsx +265 -0
- package/src/components/typeahead/typeahead-editor.tsx +140 -0
- package/src/components/typeahead/typeahead.tsx +77 -0
- package/src/components/typeahead.tsx +359 -0
- package/src/globals.tsx +162 -0
- package/src/hooks.ts +144 -0
- package/src/index.tsx +8 -0
- package/src/layout-vars.ts +8 -0
- package/src/mention-configs.ts +166 -0
- package/src/screens/assistants/assistant-config.tsx +80 -0
- package/src/screens/assistants/assistant-details.tsx +77 -0
- package/src/screens/assistants/assistant-info.tsx +45 -0
- package/src/screens/assistants/assistant-list.tsx +115 -0
- package/src/screens/assistants/assistant-tools.tsx +61 -0
- package/src/screens/contacts/contact-details.tsx +175 -0
- package/src/screens/contacts/contact-list.tsx +251 -0
- package/src/screens/contacts/index.ts +6 -0
- package/src/screens/events/cron.ts +74 -0
- package/src/screens/events/event-details.tsx +117 -0
- package/src/screens/events/event-handlers.tsx +61 -0
- package/src/screens/events/event-info.tsx +29 -0
- package/src/screens/events/event-list.tsx +104 -0
- package/src/screens/events/event-schedule.tsx +130 -0
- package/src/screens/groups/group-details.tsx +306 -0
- package/src/screens/groups/group-list.tsx +366 -0
- package/src/screens/groups/group-members.tsx +455 -0
- package/src/screens/groups/index.ts +9 -0
- package/src/screens/knowledge/knowledge-frame-details.bk.tsx +160 -0
- package/src/screens/knowledge/knowledge-frame-details.tsx +176 -0
- package/src/screens/knowledge/knowledge-frame-list.tsx +49 -0
- package/src/screens/knowledge/knowledge-value-details.tsx +181 -0
- package/src/screens/knowledge/knowledge-value-list-item.tsx +48 -0
- package/src/screens/knowledge/knowledge-value-list.tsx +131 -0
- package/src/screens/packages/package-details.tsx +117 -0
- package/src/screens/packages/package-info.tsx +83 -0
- package/src/screens/packages/package-list.tsx +191 -0
- package/src/screens/packages/package-new-local.tsx +93 -0
- package/src/screens/peer-types/peer-type-details.tsx +162 -0
- package/src/screens/peer-types/peer-type-list.tsx +74 -0
- package/src/screens/predicates/predicate-details.tsx +125 -0
- package/src/screens/predicates/predicate-list.tsx +50 -0
- package/src/screens/profile.tsx +68 -0
- package/src/screens/search/global-search.tsx +274 -0
- package/src/screens/settings/color-mode-dropdown.tsx +57 -0
- package/src/screens/settings/settings-page.tsx +76 -0
- package/src/screens/setup-user.tsx +367 -0
- package/src/screens/tools/tool-code.tsx +35 -0
- package/src/screens/tools/tool-details.tsx +101 -0
- package/src/screens/tools/tool-info.tsx +60 -0
- package/src/screens/tools/tool-list.tsx +121 -0
- package/src/screens/tools/tool-schema.tsx +42 -0
- package/src/screens/tools/tool-test-details.tsx +100 -0
- package/src/screens/tools/tool-test-list.tsx +74 -0
- package/src/screens/variables/variable-details.tsx +183 -0
- package/src/screens/variables/variable-list.tsx +74 -0
- package/src/screens/workflows/workflow-details.tsx +130 -0
- package/src/screens/workflows/workflow-info.tsx +29 -0
- package/src/screens/workflows/workflow-instructions.tsx +127 -0
- package/src/screens/workflows/workflow-list.tsx +107 -0
- package/src/screens/workflows/workflow-subscriptions.tsx +58 -0
- package/src/setupTests.ts +32 -0
- package/src/system-apps/assistants.app.ts +7 -0
- package/src/system-apps/contacts.app.ts +8 -0
- package/src/system-apps/events.app.ts +7 -0
- package/src/system-apps/groups.app.ts +8 -0
- package/src/system-apps/index.ts +79 -0
- package/src/system-apps/knowledge-frames.app.ts +8 -0
- package/src/system-apps/knowledge-values.app.ts +8 -0
- package/src/system-apps/packages.app.ts +7 -0
- package/src/system-apps/predicates.app.ts +7 -0
- package/src/system-apps/profile.app.ts +7 -0
- package/src/system-apps/search.app.ts +8 -0
- package/src/system-apps/settings.app.ts +7 -0
- package/src/system-apps/threads.app.ts +7 -0
- package/src/system-apps/tools.app.ts +7 -0
- package/src/system-apps/types.app.ts +7 -0
- package/src/system-apps/variables.app.ts +7 -0
- package/src/system-apps/workflows.app.ts +7 -0
- package/src/tabs-layout/tabs-layout.tsx +672 -0
- package/src/tabs-layout/tabs-state.ts +269 -0
- package/src/three-bar-layout/left-bar-content.tsx +202 -0
- package/src/three-bar-layout/right-bar-content.tsx +67 -0
- package/src/three-bar-layout/three-bar-layout.tsx +297 -0
- package/src/ui-defaults/index.ts +3 -0
- package/src/ui-defaults/list-screen.tsx +92 -0
- package/src/ui-defaults/notes-editor.tsx +51 -0
- package/src/ui-router/routes-loader.ts +98 -0
- package/src/ui-router/ui-loader.tsx +497 -0
- package/src/utils.ts +266 -0
- package/tsconfig.json +24 -0
package/docs/tabs-ui.md
ADDED
|
@@ -0,0 +1,696 @@
|
|
|
1
|
+
# Tabs-Based UI Redesign Plan
|
|
2
|
+
|
|
3
|
+
## Current State
|
|
4
|
+
- Existing UI has left/right sidebars and a non-functional top bar
|
|
5
|
+
- Need to redesign for better user experience and app management
|
|
6
|
+
|
|
7
|
+
## Vision: Tabs-Based Interface
|
|
8
|
+
|
|
9
|
+
### Core Concept
|
|
10
|
+
Transform the current layout into a modern tabs-based interface that provides:
|
|
11
|
+
- Intuitive app discovery and management
|
|
12
|
+
- Multiple concurrent app instances
|
|
13
|
+
- Cross-app navigation and integration
|
|
14
|
+
|
|
15
|
+
### UI Structure
|
|
16
|
+
|
|
17
|
+
#### App Launcher Tab (Always Present)
|
|
18
|
+
The leftmost tab serves as the central app hub with organized sections:
|
|
19
|
+
|
|
20
|
+
1. **Recently Used** - Quick access to frequently opened apps
|
|
21
|
+
2. **User Apps** - Custom/third-party applications
|
|
22
|
+
3. **System Apps** - Core platform functionality
|
|
23
|
+
4. **Suggested Apps** - Recommendations based on usage patterns
|
|
24
|
+
|
|
25
|
+
#### Dynamic Tabs
|
|
26
|
+
- Each app opens in its own tab
|
|
27
|
+
- Apps can spawn multiple tabs (not limited to one instance)
|
|
28
|
+
- Cross-app linking: apps can open/reference tabs from other apps
|
|
29
|
+
- Visual identification via app-specific icons
|
|
30
|
+
|
|
31
|
+
### App Categories
|
|
32
|
+
|
|
33
|
+
**System Apps:**
|
|
34
|
+
- Users management
|
|
35
|
+
- Groups management
|
|
36
|
+
- Device management
|
|
37
|
+
- Connection management
|
|
38
|
+
- Workflow builder
|
|
39
|
+
- Event monitoring
|
|
40
|
+
|
|
41
|
+
**User Apps:**
|
|
42
|
+
- Task management
|
|
43
|
+
- Knowledge base (second brain)
|
|
44
|
+
- Games
|
|
45
|
+
- Story creator
|
|
46
|
+
- Social features
|
|
47
|
+
|
|
48
|
+
## Implementation Approach
|
|
49
|
+
|
|
50
|
+
### Leveraging Existing Architecture
|
|
51
|
+
The current system provides excellent foundation:
|
|
52
|
+
- **Package System:** `IPackage` interface with `appNavs[]` for app icons
|
|
53
|
+
- **Dynamic Loading:** `routes-loader.ts` and `ui-loader.tsx` for component loading
|
|
54
|
+
- **UI Router:** Existing `UIRouter` for component resolution
|
|
55
|
+
- **Layout System:** `ThreeBarLayout` as reference for responsive design
|
|
56
|
+
|
|
57
|
+
### New Top-Level Entry Point: `tabs-layout.tsx`
|
|
58
|
+
Create a complete standalone layout component:
|
|
59
|
+
- Serves as the primary UI entry point for the entire application
|
|
60
|
+
- Implements tabs-based interface using current package system
|
|
61
|
+
- Leverages `allPackages()` observable for app discovery
|
|
62
|
+
- Uses existing `UIRouter` for tab content rendering
|
|
63
|
+
|
|
64
|
+
### Technology Stack
|
|
65
|
+
- **Framework:** React with existing hooks (`useObservable`, `usePromise`)
|
|
66
|
+
- **Styling:** Bootstrap (consistent with current system)
|
|
67
|
+
- **Icons:** Package `appNavs[].iconClassName` for tab identification
|
|
68
|
+
- **State:** Observable-based state management (peers-sdk pattern)
|
|
69
|
+
|
|
70
|
+
### Component Architecture
|
|
71
|
+
|
|
72
|
+
#### Core Components
|
|
73
|
+
```
|
|
74
|
+
tabs-layout.tsx
|
|
75
|
+
├── TabsContainer
|
|
76
|
+
│ ├── AppLauncherTab (always visible)
|
|
77
|
+
│ │ ├── RecentlyUsedSection
|
|
78
|
+
│ │ ├── UserAppsSection
|
|
79
|
+
│ │ ├── SystemAppsSection
|
|
80
|
+
│ │ └── SuggestedAppsSection
|
|
81
|
+
│ └── DynamicTabs[]
|
|
82
|
+
│ ├── TabHeader (with icon + close)
|
|
83
|
+
│ └── TabContent (UIRouter)
|
|
84
|
+
└── TabsState (observables for active tabs)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### Integration Points
|
|
88
|
+
- **Package Discovery:** Use `allPackages()` from `routes-loader.ts`
|
|
89
|
+
- **Content Rendering:** Use `UIRouter` from `ui-loader.tsx`
|
|
90
|
+
- **Navigation:** Integrate with `globals.mainContentPath` observable
|
|
91
|
+
- **Icons:** Extract from package `appNavs[].iconClassName`
|
|
92
|
+
|
|
93
|
+
### Development Phases
|
|
94
|
+
|
|
95
|
+
#### Phase 1: Basic Tabs Infrastructure
|
|
96
|
+
- Create `tabs-layout.tsx` component
|
|
97
|
+
- Implement tab container with basic open/close
|
|
98
|
+
- Create app launcher tab with package listing
|
|
99
|
+
- Basic navigation between tabs
|
|
100
|
+
|
|
101
|
+
#### Phase 2: Package Integration
|
|
102
|
+
- Load packages via `allPackages()` observable
|
|
103
|
+
- Extract app icons from `appNavs[]`
|
|
104
|
+
- Integrate `UIRouter` for tab content
|
|
105
|
+
- Implement cross-app tab opening
|
|
106
|
+
|
|
107
|
+
#### Phase 3: Enhanced Features
|
|
108
|
+
- Recently used tracking (extend package metadata)
|
|
109
|
+
- App suggestions based on usage patterns
|
|
110
|
+
- Tab state persistence in localStorage
|
|
111
|
+
- Keyboard shortcuts for tab navigation
|
|
112
|
+
|
|
113
|
+
#### Phase 4: Advanced Layout (Future)
|
|
114
|
+
- Grid-based layout within tabs
|
|
115
|
+
- Configurable app routes as tab components
|
|
116
|
+
- Save/restore tab configurations
|
|
117
|
+
- Split-screen tab arrangements
|
|
118
|
+
|
|
119
|
+
## Technical Implementation Details
|
|
120
|
+
|
|
121
|
+
### State Management
|
|
122
|
+
```typescript
|
|
123
|
+
// Observable-based tab state
|
|
124
|
+
const activeTabs = observable<TabState[]>([]);
|
|
125
|
+
const activeTabId = observable<string>('launcher');
|
|
126
|
+
const recentlyUsedApps = observable<string[]>([]);
|
|
127
|
+
|
|
128
|
+
interface TabState {
|
|
129
|
+
tabId: string;
|
|
130
|
+
packageId?: string; // 'launcher' for app launcher tab
|
|
131
|
+
path: string;
|
|
132
|
+
title: string;
|
|
133
|
+
iconClassName?: string;
|
|
134
|
+
closable: boolean;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Package Integration
|
|
139
|
+
```typescript
|
|
140
|
+
// Leverage existing package system
|
|
141
|
+
const [packages] = useObservable(allPackages);
|
|
142
|
+
const appPackages = packages.filter(p => !p.disabled && p.appNavs?.length);
|
|
143
|
+
|
|
144
|
+
// App categorization
|
|
145
|
+
const systemApps = appPackages.filter(p => isSystemApp(p.name));
|
|
146
|
+
const userApps = appPackages.filter(p => !isSystemApp(p.name));
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Content Rendering
|
|
150
|
+
```typescript
|
|
151
|
+
// Use existing UIRouter for tab content
|
|
152
|
+
const renderTabContent = (tab: TabState) => {
|
|
153
|
+
if (tab.packageId === 'launcher') {
|
|
154
|
+
return <AppLauncherContent />;
|
|
155
|
+
}
|
|
156
|
+
return <UIRouter path={tab.path} uiCategory="screen" props={{}} />;
|
|
157
|
+
};
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Performance Considerations
|
|
161
|
+
- **Lazy Tab Loading:** Only render active tab content
|
|
162
|
+
- **Package Caching:** Leverage existing bundle loading cache
|
|
163
|
+
- **Memory Management:** Cleanup inactive tabs after threshold
|
|
164
|
+
- **Efficient Re-rendering:** Use React.memo for tab components
|
|
165
|
+
|
|
166
|
+
### User Experience
|
|
167
|
+
- **Familiar Navigation:** Bootstrap tab styling for consistency
|
|
168
|
+
- **Visual Feedback:** Loading states during package loading
|
|
169
|
+
- **Responsive Design:** Mobile-friendly tab overflow handling
|
|
170
|
+
- **Keyboard Support:** Tab switching with Ctrl+Tab, etc.
|
|
171
|
+
|
|
172
|
+
## Application Entry Point
|
|
173
|
+
|
|
174
|
+
### Complete UI Replacement
|
|
175
|
+
- **`tabs-layout.tsx`:** New primary layout component
|
|
176
|
+
- **Direct Integration:** Replace existing layout in App.tsx
|
|
177
|
+
- **Standalone System:** Self-contained tabs-based interface
|
|
178
|
+
|
|
179
|
+
### Integration Points
|
|
180
|
+
- **App.tsx:** Use `TabsLayout` as main component
|
|
181
|
+
- **Route Loading:** Reuse existing `routes-loader.ts`
|
|
182
|
+
- **Package System:** Leverage current `allPackages()` observable
|
|
183
|
+
- **UI Components:** Reuse via existing `UIRouter`
|
|
184
|
+
|
|
185
|
+
## Implementation Status
|
|
186
|
+
|
|
187
|
+
✅ **COMPLETED** - Tabs-based UI has been fully implemented and integrated:
|
|
188
|
+
|
|
189
|
+
### What's Done
|
|
190
|
+
1. **Complete TabsLayout Component** (`src/tabs-layout/tabs-layout.tsx`)
|
|
191
|
+
- Full tabs-based interface replacing three-bar layout
|
|
192
|
+
- App launcher tab with categorized app discovery
|
|
193
|
+
- Dynamic tab management (open/close/switch)
|
|
194
|
+
- **Multiple App Instances**: Apps can be opened in multiple tabs simultaneously
|
|
195
|
+
- Integration with existing UIRouter for content rendering
|
|
196
|
+
|
|
197
|
+
2. **Persistent State Management**
|
|
198
|
+
- `activeTabs`: Device-scoped persistent variable storing tab states
|
|
199
|
+
- `activeTabId`: Device-scoped active tab tracking
|
|
200
|
+
- `recentlyUsedApps`: User-scoped recently used apps (syncs across devices)
|
|
201
|
+
- All state persists between application reloads
|
|
202
|
+
|
|
203
|
+
3. **App Discovery & Categorization**
|
|
204
|
+
- **Nav Item-Based Apps**: Each `navItem` in packages becomes an individual app
|
|
205
|
+
- **Built-in System Apps**: Core system functionality (Assistants, Tools, Workflows, etc.)
|
|
206
|
+
- Automatic package discovery via `allPackages()` observable
|
|
207
|
+
- Smart categorization: Recently Used, User Apps, System Apps
|
|
208
|
+
- Icon and metadata extraction from `appNavs[]` (name, iconClassName, navigationPath)
|
|
209
|
+
- **Multi-App Packages**: Packages with multiple nav items show multiple app icons
|
|
210
|
+
- **Dual Path Routing**: Direct paths for system apps, `package-nav/` format for packages
|
|
211
|
+
|
|
212
|
+
4. **UI/UX Features**
|
|
213
|
+
- Bootstrap-based responsive design with mobile optimization
|
|
214
|
+
- Browser-style compact tabs with minimal UI footprint (36px height)
|
|
215
|
+
- Mobile-friendly dropdown tab switcher
|
|
216
|
+
- Home screen style app launcher with theme-aware icons
|
|
217
|
+
- Keyboard-friendly navigation
|
|
218
|
+
- Loading states during package discovery
|
|
219
|
+
- Full color mode support (light/dark themes)
|
|
220
|
+
- Adaptive layouts for desktop and mobile
|
|
221
|
+
|
|
222
|
+
5. **Integration Complete**
|
|
223
|
+
- `App.tsx` updated to use TabsLayout as primary component
|
|
224
|
+
- **System Apps Integration**: All left-bar functionality now available as individual apps
|
|
225
|
+
- Leverages existing infrastructure (UIRouter, routes-loader, package system)
|
|
226
|
+
- No breaking changes to existing package/route system
|
|
227
|
+
- **Modular App Structure**: Each system app defined in separate `.app.ts` files
|
|
228
|
+
|
|
229
|
+
### Technical Implementation
|
|
230
|
+
|
|
231
|
+
#### Persistent State Management
|
|
232
|
+
```typescript
|
|
233
|
+
// Database-backed persistent variables
|
|
234
|
+
export const activeTabs = persistentVar<TabState[]>('activeTabs', {
|
|
235
|
+
defaultValue: [launcherTab],
|
|
236
|
+
scope: 'device' // Per-device tab states
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
export const activeTabId = persistentVar<string>('activeTabId', {
|
|
240
|
+
defaultValue: 'launcher',
|
|
241
|
+
scope: 'device'
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
export const recentlyUsedApps = persistentVar<string[]>('recentlyUsedApps', {
|
|
245
|
+
defaultValue: [],
|
|
246
|
+
scope: 'user' // Syncs across user's devices
|
|
247
|
+
});
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### System Apps Integration
|
|
251
|
+
```typescript
|
|
252
|
+
// Individual system app definitions
|
|
253
|
+
export const assistantsApp: IAppNav = {
|
|
254
|
+
name: 'Assistants',
|
|
255
|
+
iconClassName: 'bi-person-fill-gear',
|
|
256
|
+
navigationPath: 'assistants'
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// Virtual system package containing all system apps
|
|
260
|
+
export const systemPackage = {
|
|
261
|
+
packageId: 'system-apps',
|
|
262
|
+
name: 'System Apps',
|
|
263
|
+
appNavs: [assistantsApp, toolsApp, workflowsApp, /* ... */],
|
|
264
|
+
hasUIBundle: false // Uses existing router
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// Combined package discovery with system apps
|
|
268
|
+
const allPackages_ = [...packages, systemPackage];
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### Nav Item-Based App Discovery
|
|
272
|
+
```typescript
|
|
273
|
+
// Transform all packages (including system) into individual nav item apps
|
|
274
|
+
const allApps: AppItem[] = allPackages_
|
|
275
|
+
.filter(p => !p.disabled && p.appNavs && p.appNavs.length > 0)
|
|
276
|
+
.flatMap(pkg =>
|
|
277
|
+
pkg.appNavs!.map(navItem => {
|
|
278
|
+
// Dual path handling: direct for system apps, package-nav for others
|
|
279
|
+
let path: string;
|
|
280
|
+
if (pkg.packageId === 'system-apps') {
|
|
281
|
+
// System apps use direct routing (assistants, tools, etc.)
|
|
282
|
+
path = navItem.navigationPath ?? navItem.name.replace(/\s/g, '-').toLowerCase();
|
|
283
|
+
} else {
|
|
284
|
+
// Regular packages use package-nav format
|
|
285
|
+
path = `package-nav/${pkg.packageId}/${(navItem.navigationPath ?? navItem.name).replace(/[^a-zA-Z0-9]/g, '-').toLowerCase()}`;
|
|
286
|
+
while (path.includes('//')) path = path.replace('//', '/');
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return {
|
|
290
|
+
packageId: pkg.packageId,
|
|
291
|
+
packageName: pkg.name,
|
|
292
|
+
navItem, path, name: navItem.name,
|
|
293
|
+
iconClassName: navItem.iconClassName || 'bi-box-seam'
|
|
294
|
+
};
|
|
295
|
+
})
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
// Multiple instance tab opening
|
|
299
|
+
const openTab = (tab: Omit<TabState, 'tabId'>, forceNew = false) => {
|
|
300
|
+
const newTab: TabState = {
|
|
301
|
+
...tab,
|
|
302
|
+
tabId: `${tab.packageId || 'tab'}-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
if (forceNew) {
|
|
306
|
+
// Always create new tab (app launcher behavior)
|
|
307
|
+
activeTabs([...currentTabs, newTab]);
|
|
308
|
+
activeTabId(newTab.tabId);
|
|
309
|
+
} else {
|
|
310
|
+
// Reuse existing tab if available (internal navigation)
|
|
311
|
+
const existingTab = currentTabs.find(t => t.path === tab.path);
|
|
312
|
+
if (existingTab) {
|
|
313
|
+
activeTabId(existingTab.tabId);
|
|
314
|
+
} else {
|
|
315
|
+
activeTabs([...currentTabs, newTab]);
|
|
316
|
+
activeTabId(newTab.tabId);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Theme-Aware Component Design
|
|
323
|
+
```typescript
|
|
324
|
+
// Dynamic theming for app icons
|
|
325
|
+
const AppCard = ({ appItem, isMobile }) => {
|
|
326
|
+
const [colorMode] = useObservable(colorMode);
|
|
327
|
+
const isDark = colorMode === 'dark';
|
|
328
|
+
|
|
329
|
+
return (
|
|
330
|
+
<div style={{
|
|
331
|
+
backgroundColor: isDark ? '#343a40' : '#f8f9fa',
|
|
332
|
+
border: `1px solid ${isDark ? '#495057' : '#e9ecef'}`,
|
|
333
|
+
boxShadow: isDark ? '0 2px 4px rgba(0,0,0,0.3)' : '0 2px 4px rgba(0,0,0,0.08)'
|
|
334
|
+
}}>
|
|
335
|
+
<i className={appItem.iconClassName} style={{ color: '#0d6efd' }} />
|
|
336
|
+
<span>{appItem.name}</span>
|
|
337
|
+
</div>
|
|
338
|
+
);
|
|
339
|
+
};
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Browser-Style Tab Rendering
|
|
343
|
+
```typescript
|
|
344
|
+
// Professional tab styling with elevation
|
|
345
|
+
const TabHeader = ({ isActive, colorMode }) => (
|
|
346
|
+
<div style={{
|
|
347
|
+
height: '34px',
|
|
348
|
+
borderRadius: isActive ? '6px 6px 0 0' : '0',
|
|
349
|
+
borderTop: isActive ? '2px solid #0d6efd' : 'transparent',
|
|
350
|
+
marginBottom: isActive ? '-1px' : '0',
|
|
351
|
+
zIndex: isActive ? 1 : 0,
|
|
352
|
+
boxShadow: isActive ? '0 2px 4px rgba(0,0,0,0.1)' : 'none'
|
|
353
|
+
}} />
|
|
354
|
+
);
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Key Architecture Benefits
|
|
358
|
+
- **Zero Migration Required**: Complete standalone replacement
|
|
359
|
+
- **Persistent User Experience**: Tab states survive app restarts
|
|
360
|
+
- **Nav Item-Driven**: Each package nav item becomes an individual app
|
|
361
|
+
- **Complete System Integration**: All core system functions accessible as apps
|
|
362
|
+
- **Granular App Access**: Direct access to specific package features
|
|
363
|
+
- **Multiple Instances**: Same app can be opened in multiple tabs
|
|
364
|
+
- **Cross-Device Sync**: Recent apps sync across user devices (by path)
|
|
365
|
+
- **Performance Optimized**: Lazy tab content loading
|
|
366
|
+
- **Mobile-First Design**: Responsive interface with mobile-specific optimizations
|
|
367
|
+
- **Dual Path Routing**: Direct paths for system apps, package-nav for others
|
|
368
|
+
- **Modular Architecture**: Individual app files for maintainability
|
|
369
|
+
- **Future-Ready**: Foundation for grid layouts and advanced features
|
|
370
|
+
|
|
371
|
+
### Desktop & Mobile Experience Features
|
|
372
|
+
|
|
373
|
+
#### Browser-Style Tabs
|
|
374
|
+
- **Compact Design**: 36px height tabs with 12px fonts for minimal footprint
|
|
375
|
+
- **Visual Hierarchy**: Active tabs elevated with rounded corners and shadows
|
|
376
|
+
- **Smooth Interactions**: Hover effects and seamless transitions
|
|
377
|
+
- **Professional Styling**: Chrome/Firefox-like tab appearance
|
|
378
|
+
|
|
379
|
+
#### Home Screen Style App Launcher
|
|
380
|
+
- **Nav Item Apps**: Each package nav item displays as individual app icon
|
|
381
|
+
- **Icon-First Design**: Rounded square containers (64px-72px) with icons underneath titles
|
|
382
|
+
- **Theme-Aware Styling**: Dark/light mode adaptive backgrounds and borders
|
|
383
|
+
- **Touch-Optimized**: Proper spacing and hover animations (scale 1.05x)
|
|
384
|
+
- **Natural Grid Flow**: Flexbox layout with consistent gaps (16px-20px)
|
|
385
|
+
- **Desktop/Mobile Sizes**: 80px (mobile) / 90px (desktop) app icon widths
|
|
386
|
+
- **Granular Access**: Direct access to specific package features via nav items
|
|
387
|
+
- **Multiple Instances**: Each app click creates a new tab (no tab reuse)
|
|
388
|
+
|
|
389
|
+
#### Mobile Optimizations
|
|
390
|
+
- **Dropdown Tab Switcher**: Compact tab navigation for small screens
|
|
391
|
+
- **Current Tab Display**: Clear indication of active tab with icon/title
|
|
392
|
+
- **One-Tap Tab Closing**: Easy tab management with dedicated close buttons
|
|
393
|
+
- **Adaptive Typography**: Smaller fonts and compact spacing on mobile
|
|
394
|
+
|
|
395
|
+
## Future Enhancements
|
|
396
|
+
|
|
397
|
+
### Phase 2 Opportunities
|
|
398
|
+
- **Keyboard Shortcuts**: Ctrl+Tab navigation, Ctrl+W close
|
|
399
|
+
- **Tab Reordering**: Drag & drop tab arrangement
|
|
400
|
+
- **Tab Groups**: Organize related tabs into collapsible groups
|
|
401
|
+
- **Pinned Tabs**: Keep frequently used apps always open
|
|
402
|
+
|
|
403
|
+
### Phase 3 Advanced Features
|
|
404
|
+
- **Split Screen**: Multiple apps visible simultaneously
|
|
405
|
+
- **Tab Templates**: Save and restore common tab configurations
|
|
406
|
+
- **Deep Linking**: URL-based tab state restoration
|
|
407
|
+
- **Tab Search**: Quick search through open tabs and available apps
|
|
408
|
+
|
|
409
|
+
### Phase 4 Grid Layout System
|
|
410
|
+
- **Configurable Layouts**: Drag & drop app components into grid
|
|
411
|
+
- **Layout Persistence**: Save custom workspace arrangements
|
|
412
|
+
- **Component-Level Routing**: Individual app routes as layout blocks
|
|
413
|
+
- **Responsive Grids**: Adaptive layouts for different screen sizes
|
|
414
|
+
|
|
415
|
+
## Real-World Usage Examples
|
|
416
|
+
|
|
417
|
+
### Package with Multiple Nav Items
|
|
418
|
+
```typescript
|
|
419
|
+
// Example package structure
|
|
420
|
+
{
|
|
421
|
+
packageId: "user-management",
|
|
422
|
+
name: "User Management",
|
|
423
|
+
appNavs: [
|
|
424
|
+
{ name: "Users", iconClassName: "bi-people", navigationPath: "users" },
|
|
425
|
+
{ name: "Roles", iconClassName: "bi-shield", navigationPath: "roles" },
|
|
426
|
+
{ name: "Permissions", iconClassName: "bi-key", navigationPath: "permissions" }
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// Results in 3 separate app icons:
|
|
431
|
+
// 1. "Users" → package-nav/user-management/users
|
|
432
|
+
// 2. "Roles" → package-nav/user-management/roles
|
|
433
|
+
// 3. "Permissions" → package-nav/user-management/permissions
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### Multiple App Instances
|
|
437
|
+
- **New Tab Per Click**: Each app launcher click creates a fresh tab
|
|
438
|
+
- **Unique Tab IDs**: Uses timestamp + random string for uniqueness
|
|
439
|
+
- **Independent Sessions**: Each tab maintains its own state
|
|
440
|
+
- **No Tab Reuse**: Apps can run simultaneously in different tabs
|
|
441
|
+
|
|
442
|
+
### Recently Used Tracking
|
|
443
|
+
- **Path-Based**: Tracks individual nav item usage by constructed path
|
|
444
|
+
- **Cross-Session**: Persists between app restarts
|
|
445
|
+
- **User-Scoped**: Syncs across devices for same user
|
|
446
|
+
- **Smart Ordering**: Most recently used appears first
|
|
447
|
+
- **Instance Agnostic**: Tracks app usage regardless of number of instances
|
|
448
|
+
|
|
449
|
+
### System Apps Collection
|
|
450
|
+
```typescript
|
|
451
|
+
// Available system apps (formerly left sidebar items)
|
|
452
|
+
const systemApps = [
|
|
453
|
+
// Core Management
|
|
454
|
+
{ name: 'Variables', icon: 'bi-braces', path: 'variables' },
|
|
455
|
+
{ name: 'Types', icon: 'bi-code-square', path: 'peer-types' },
|
|
456
|
+
{ name: 'Assistants', icon: 'bi-person-fill-gear', path: 'assistants' },
|
|
457
|
+
{ name: 'Tools', icon: 'bi-tools', path: 'tools' },
|
|
458
|
+
{ name: 'Workflows', icon: 'bi-database-fill-gear', path: 'workflows' },
|
|
459
|
+
{ name: 'Events', icon: 'bi-lightning-charge-fill', path: 'events' },
|
|
460
|
+
{ name: 'Packages', icon: 'bi-box-fill', path: 'packages' },
|
|
461
|
+
|
|
462
|
+
// Knowledge & Communication
|
|
463
|
+
{ name: 'Threads', icon: 'bi-cpu', path: 'shell' },
|
|
464
|
+
{ name: 'Knowledge Values', icon: 'bi-journal-bookmark-fill', path: 'knowledge-values' },
|
|
465
|
+
{ name: 'Knowledge Frames', icon: 'bi-window-dock', path: 'knowledge-frames' },
|
|
466
|
+
{ name: 'Predicates', icon: 'bi-node-plus-fill', path: 'predicates' },
|
|
467
|
+
|
|
468
|
+
// User & Settings Apps
|
|
469
|
+
{ name: 'Profile', icon: 'bi-person-circle', path: 'profile' },
|
|
470
|
+
{ name: 'Settings', icon: 'bi-gear-fill', path: 'settings' }
|
|
471
|
+
];
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### App Categorization Logic
|
|
475
|
+
- **System Apps**: Built-in core functionality (13 apps from former left sidebar + profile/settings)
|
|
476
|
+
- **User Apps**: All other packages with nav items
|
|
477
|
+
- **Recently Used**: Cross-category recent apps section
|
|
478
|
+
- **Dynamic Updates**: Automatically reflects package changes
|
|
479
|
+
- **Modular Structure**: Each system app in individual `src/system-apps/*.app.ts` file
|
|
480
|
+
|
|
481
|
+
## System Apps Architecture
|
|
482
|
+
|
|
483
|
+
### File Structure
|
|
484
|
+
```
|
|
485
|
+
src/system-apps/
|
|
486
|
+
├── index.ts # Main exports and system package definition
|
|
487
|
+
├── assistants.app.ts # AI Assistant management
|
|
488
|
+
├── tools.app.ts # Tool management
|
|
489
|
+
├── workflows.app.ts # Workflow builder
|
|
490
|
+
├── events.app.ts # Event monitoring
|
|
491
|
+
├── variables.app.ts # Variable management
|
|
492
|
+
├── types.app.ts # Peer type definitions
|
|
493
|
+
├── packages.app.ts # Package management
|
|
494
|
+
├── threads.app.ts # Shell/communication
|
|
495
|
+
├── knowledge-values.app.ts # Knowledge data
|
|
496
|
+
├── knowledge-frames.app.ts # Knowledge structure
|
|
497
|
+
├── predicates.app.ts # Predicate logic
|
|
498
|
+
├── profile.app.ts # User profile
|
|
499
|
+
└── settings.app.ts # Application settings
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Migration from Left Sidebar
|
|
503
|
+
- **Complete Parity**: All left sidebar functionality preserved
|
|
504
|
+
- **Enhanced Experience**: System functions now benefit from tabs (multiple instances, persistence)
|
|
505
|
+
- **Modular Design**: Each app independently maintainable
|
|
506
|
+
- **Consistent Interface**: Same icons and paths as original left bar
|
|
507
|
+
- **No Functionality Loss**: All existing routing and features intact
|
|
508
|
+
|
|
509
|
+
### Recent Improvements (Latest)
|
|
510
|
+
|
|
511
|
+
#### Display Name Enhancement
|
|
512
|
+
- **Name Truncation Solution**: Added `displayName` field to `IAppNav` interface
|
|
513
|
+
- **Shorter Labels**: Knowledge apps now use "K-Values" and "K-Frames" instead of truncated full names
|
|
514
|
+
- **Tooltip Support**: Full app names still visible on hover for context
|
|
515
|
+
- **Visual Polish**: Increased spacing between app launcher sections for better visual separation
|
|
516
|
+
|
|
517
|
+
#### Mobile/Desktop Responsive Improvements
|
|
518
|
+
- **Section Spacing**: Enhanced visual separation between "Recently Used", "User Apps", and "System Apps" sections
|
|
519
|
+
- **Consistent Design**: Unified spacing approach across mobile and desktop layouts
|
|
520
|
+
|
|
521
|
+
#### System Apps Expansion
|
|
522
|
+
- **Profile & Settings**: Added Profile and Settings as system apps to restore old left bar functionality
|
|
523
|
+
- **Complete Coverage**: All original left bar items now available as individual apps (13 total)
|
|
524
|
+
- **Familiar Icons**: Used `bi-person-circle` for Profile and `bi-gear-fill` for Settings
|
|
525
|
+
|
|
526
|
+
#### Smart Tab Management
|
|
527
|
+
- **Configurable Tab Behavior**: Added `alwaysNewTab` property to `IAppNav` interface
|
|
528
|
+
- **Default Switch-to-Existing**: App launcher now switches to existing tabs by default instead of creating duplicates
|
|
529
|
+
- **Selective New Tabs**: Apps can set `alwaysNewTab: true` to always open fresh instances
|
|
530
|
+
- **Better UX**: Reduces tab clutter while preserving flexibility for apps that need multiple instances
|
|
531
|
+
|
|
532
|
+
#### Dynamic Title Updates
|
|
533
|
+
- **Generic Fallbacks**: Tabs system provides basic title parsing ("Assistant Details", "Tool Details")
|
|
534
|
+
- **Detail Screen Enhancement**: Exported `updateActiveTabTitle()` function for screens to set specific titles
|
|
535
|
+
- **Progressive Enhancement**: Titles improve from generic to specific as data loads
|
|
536
|
+
- **Separation of Concerns**: Detail screens handle their own data-driven titles
|
|
537
|
+
|
|
538
|
+
## Internal App Navigation Synchronization
|
|
539
|
+
|
|
540
|
+
### Challenge
|
|
541
|
+
When a tab is open, the app inside it can navigate internally by changing `mainContentPath`. Currently this creates a disconnect:
|
|
542
|
+
- The tab's stored `path` in `activeTabs` remains the original path
|
|
543
|
+
- The tab's `title` doesn't reflect the current content
|
|
544
|
+
- Users lose context about where they are within the app
|
|
545
|
+
|
|
546
|
+
### Requirements
|
|
547
|
+
When `mainContentPath` changes due to internal app navigation:
|
|
548
|
+
1. **Update Tab Path**: Sync the active tab's `path` in `activeTabs` persistent variable
|
|
549
|
+
2. **Update Tab Title**: Reflect the new content in the tab title/header
|
|
550
|
+
|
|
551
|
+
### Technical Challenges
|
|
552
|
+
1. **Change Detection**: Distinguish between:
|
|
553
|
+
- `mainContentPath` changes from tab switching (initiated by tabs system)
|
|
554
|
+
- `mainContentPath` changes from internal navigation (initiated by app)
|
|
555
|
+
2. **Title Derivation**: Generate meaningful titles from arbitrary paths:
|
|
556
|
+
- System apps: Parse path structure (e.g., `assistants/123` → "Assistant Details")
|
|
557
|
+
- Package apps: Limited routing context available
|
|
558
|
+
3. **State Consistency**: Avoid infinite loops or conflicting updates
|
|
559
|
+
|
|
560
|
+
### Proposed Implementation
|
|
561
|
+
|
|
562
|
+
#### 1. Path Synchronization Strategy
|
|
563
|
+
```typescript
|
|
564
|
+
// Add flag to track when we're switching tabs
|
|
565
|
+
const [isSwitchingTabs, setIsSwitchingTabs] = useState(false);
|
|
566
|
+
|
|
567
|
+
// Listen for mainContentPath changes
|
|
568
|
+
const [currentPath] = useObservable(mainContentPath);
|
|
569
|
+
|
|
570
|
+
// React to path changes that aren't from tab switching
|
|
571
|
+
useEffect(() => {
|
|
572
|
+
if (!isSwitchingTabs && currentPath) {
|
|
573
|
+
const activeTabData = tabs.find(t => t.tabId === activeTab);
|
|
574
|
+
if (activeTabData && activeTabData.path !== currentPath) {
|
|
575
|
+
// This is internal navigation - update the tab
|
|
576
|
+
updateTabPath(activeTab, currentPath);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}, [currentPath, isSwitchingTabs, activeTab, tabs]);
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
#### 2. Title Derivation Approaches
|
|
583
|
+
**Option A: Keep Original App Name (Simple)**
|
|
584
|
+
- Maintain original app name as title
|
|
585
|
+
- Add path indicator for context: `"Assistants - Details"`
|
|
586
|
+
|
|
587
|
+
**Option B: Smart Title Generation (Complex)**
|
|
588
|
+
- Parse path patterns for system apps:
|
|
589
|
+
- `assistants` → "Assistants"
|
|
590
|
+
- `assistants/123` → "Assistant Details"
|
|
591
|
+
- `tools/456/tests/789` → "Tool Test Details"
|
|
592
|
+
- For package apps: Keep package nav item name
|
|
593
|
+
|
|
594
|
+
**Option C: Hybrid Approach (Recommended)**
|
|
595
|
+
- System apps: Use smart parsing for common patterns
|
|
596
|
+
- Package apps: Keep original app name
|
|
597
|
+
- Fallback: Use original title if parsing fails
|
|
598
|
+
|
|
599
|
+
#### 3. Implementation Plan
|
|
600
|
+
1. **Add Path Sync Logic**: Monitor `mainContentPath` changes and update active tab
|
|
601
|
+
2. **Implement Title Parser**: Create title generation for system app patterns
|
|
602
|
+
3. **Add State Management**: Prevent conflicts during tab switching
|
|
603
|
+
4. **Update Tab Display**: Show updated titles in headers and mobile dropdown
|
|
604
|
+
|
|
605
|
+
#### 4. System App Title Patterns
|
|
606
|
+
```typescript
|
|
607
|
+
const parseSystemAppTitle = (path: string, originalTitle: string): string => {
|
|
608
|
+
const segments = path.toLowerCase().split('/').filter(Boolean);
|
|
609
|
+
|
|
610
|
+
if (segments.length === 1) {
|
|
611
|
+
return originalTitle; // "Assistants", "Tools", etc.
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// Pattern matching for detail views
|
|
615
|
+
const patterns: Record<string, string> = {
|
|
616
|
+
'assistants': 'Assistant Details',
|
|
617
|
+
'tools': segments[2] === 'tests' ? 'Tool Test Details' : 'Tool Details',
|
|
618
|
+
'workflows': 'Workflow Details',
|
|
619
|
+
'events': 'Event Details',
|
|
620
|
+
'variables': 'Variable Details',
|
|
621
|
+
'packages': 'Package Details',
|
|
622
|
+
'knowledge-values': 'Knowledge Value Details',
|
|
623
|
+
'knowledge-frames': 'Knowledge Frame Details',
|
|
624
|
+
'predicates': 'Predicate Details'
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
return patterns[segments[0]] || `${originalTitle} - Details`;
|
|
628
|
+
};
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Benefits
|
|
632
|
+
- **Better UX**: Users always know where they are within an app
|
|
633
|
+
- **Accurate Navigation**: Tab switching works correctly with updated paths
|
|
634
|
+
- **Context Preservation**: Deep links and bookmarking work properly
|
|
635
|
+
- **Visual Clarity**: Tab titles reflect current content, not just app names
|
|
636
|
+
|
|
637
|
+
### Implementation Priority
|
|
638
|
+
**Phase 1**: Basic path synchronization and simple title updates ✅
|
|
639
|
+
**Phase 2**: Smart title generation for system apps ✅
|
|
640
|
+
**Phase 3**: Enhanced title context and breadcrumb-style navigation
|
|
641
|
+
|
|
642
|
+
### Detail Screen Title Updates
|
|
643
|
+
|
|
644
|
+
#### Challenge with Database-Driven Titles
|
|
645
|
+
While the tabs system can parse generic patterns (`assistants/123` → "Assistant Details"), it can't access specific data to show meaningful titles like "Assistant: GPT-4 Helper" without tight coupling to every database table.
|
|
646
|
+
|
|
647
|
+
#### Hybrid Approach (Recommended)
|
|
648
|
+
1. **Tabs System**: Provides generic titles as fallback ("Assistant Details", "Tool Details")
|
|
649
|
+
2. **Detail Screens**: Update to specific titles when data loads ("Assistant: GPT-4 Helper")
|
|
650
|
+
|
|
651
|
+
#### Implementation Strategy
|
|
652
|
+
```typescript
|
|
653
|
+
// Export a function for detail screens to update tab titles
|
|
654
|
+
export const updateActiveTabTitle = (newTitle: string) => {
|
|
655
|
+
const currentTabs = activeTabs();
|
|
656
|
+
const activeTabIndex = currentTabs.findIndex(t => t.tabId === activeTabId());
|
|
657
|
+
|
|
658
|
+
if (activeTabIndex >= 0) {
|
|
659
|
+
const updatedTabs = [...currentTabs];
|
|
660
|
+
updatedTabs[activeTabIndex] = {
|
|
661
|
+
...updatedTabs[activeTabIndex],
|
|
662
|
+
title: newTitle
|
|
663
|
+
};
|
|
664
|
+
activeTabs(updatedTabs);
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
// Detail screens can call this when data loads
|
|
669
|
+
// Example: AssistantDetails component
|
|
670
|
+
import { updateActiveTabTitle } from '../tabs-layout/tabs-layout';
|
|
671
|
+
|
|
672
|
+
export const AssistantDetails = (props: { assistantId: string }) => {
|
|
673
|
+
const assistant = usePromise(async () => {
|
|
674
|
+
const assistant = await Assistants().get(props.assistantId);
|
|
675
|
+
// ... load logic
|
|
676
|
+
return assistant;
|
|
677
|
+
}, [props.assistantId]);
|
|
678
|
+
|
|
679
|
+
// Update tab title when assistant data loads
|
|
680
|
+
React.useEffect(() => {
|
|
681
|
+
if (assistant?.name) {
|
|
682
|
+
updateActiveTabTitle(`Assistant: ${assistant.name}`);
|
|
683
|
+
}
|
|
684
|
+
}, [assistant]);
|
|
685
|
+
|
|
686
|
+
// Component render logic...
|
|
687
|
+
};
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
#### Benefits
|
|
691
|
+
- **Separation of Concerns**: Tabs system handles navigation, detail screens handle data
|
|
692
|
+
- **No Tight Coupling**: Tabs system doesn't need to know about every database table
|
|
693
|
+
- **Progressive Enhancement**: Generic titles initially, specific ones when data loads
|
|
694
|
+
- **Flexible**: Each detail screen can format titles as appropriate
|
|
695
|
+
|
|
696
|
+
The tabs-based UI is now live with complete system integration, full nav item support, and polished visual design!
|