Skip to main content

Compose app surfaces

Surfaces are the pages shown in an installed app's navigation. They let you present a cohesive product while reusing mature TWL Tool experiences.

TypeUse it forRequired binding
frontendPageA custom overview, dashboard, or guided UIpage
dataWorkspaceViewRecords, saved content, and app datatable; optional viewKey
documentA document or a folder of documentsexactly one of document, documentFolder
chatAI chat constrained to one app workflowpreset.workflow
contentSchedulerScheduling documents from an appoptional documentFolder and space
conversationsOmnichannel inboxes and app activityinboxKey
knowledgeApp-specific facts, source material, and retrieval memorycontainerKey

Declare navigation​

ui: {
icon: 'sparkles',
color: '#6574f7',
defaultSurface: 'overview',
surfaces: [
{
key: 'overview',
label: 'Overview',
type: 'frontendPage',
page: ref('frontendPages', 'overview'),
},
{
key: 'inspiration',
label: 'Inspiration',
type: 'dataWorkspaceView',
table: ref('dataWorkspaceTables', 'inspiration'),
viewKey: 'gallery',
},
{
key: 'drafts',
label: 'Drafts',
type: 'document',
documentFolder: ref('documentFolders', 'drafts'),
},
{
key: 'activity',
label: 'Activity',
type: 'conversations',
inboxKey: 'activity',
allowRecordMessages: true,
},
{
key: 'knowledge',
label: 'Knowledge',
type: 'knowledge',
containerKey: 'business-knowledge',
allowWrite: true,
},
],
}

If surfaces exist and defaultSurface is omitted, defineApp() selects the first surface.

Choose the smallest custom surface​

A custom page is ideal for product-specific composition. Once a user enters a specialized task, navigate to the native surface that already owns the behavior. This preserves accessibility, permissions, updates, and consistent data handling across TWL Tool.

For an inbox or message history, use the native conversations surface instead of rebuilding a chat page. See Add a conversation inbox for storage, projection, and channel-adapter guidance.

For facts and source material used by an app's AI, use the native knowledge surface. See Add app knowledge for isolation and retrieval behavior.