Capability first · transport second

CommunicationAppController.js

Binds shared inbox, conversation, settings, theme, and provider workflows into one UI controller.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
On this page

Overview

Binds shared inbox, conversation, settings, theme, and provider workflows into one UI controller.

  • Artifact
    CommunicationAppController.js · esm
  • Classification
    public first party
  • Availability
    Browser / native WebView hybrid
  • Normalization
    Controller state normalized; provider/DOM failures mixed.

Import and lifecycle

JavaScript
import * as module from '/arcane/modules/CommunicationAppController.js';

Binds fixed DOM components and listeners, loads theme and preferences, creates providers, refreshes and sends, mutates modal and status UI, and may open an external URL.

Application-facing behavior: default controller with start(), bind(), configure(), refresh(), select(), send(), and settings actions.

Protocol and host implementation

DOM plus communication providers This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
COMMUNICATION_APP_CONTROLLER_ERROR_CODESvariable · valuevariable COMMUNICATION_APP_CONTROLLER_ERROR_CODES
defaultdefault · classclass CommunicationAppController
CallableKindExact public signatureParameter syntax
CommunicationAppController.startpublic-memberasync start()
CommunicationAppController.bindpublic-memberbind()
CommunicationAppController.configurepublic-memberconfigure()
CommunicationAppController.refreshpublic-memberasync refresh()
CommunicationAppController.selectpublic-memberasync select(thread)thread
CommunicationAppController.sendpublic-memberasync send({thread,body}){thread,body}
MemberKindExact public declarationParameter syntax
CommunicationAppController.constructorconstructorconstructor({ appId, services, channels, labels={}, inspectMessage=null, prepareMessageInspection=null, onAdvisoryAction=null }){ appId, services, channels, labels={}, inspectMessage=null, prepareMessageInspection=null, onAdvisoryAction=null }
CommunicationAppController.assertActivemethodassertActive()
CommunicationAppController.startasync methodasync start()
CommunicationAppController.bindmethodbind()
CommunicationAppController.handleOpenSettingsmethodhandleOpenSettings()
CommunicationAppController.handleCloseSettingsmethodhandleCloseSettings()
CommunicationAppController.handleSaveSettingsmethodhandleSaveSettings(event)event
CommunicationAppController.handleIntegrationActionmethodhandleIntegrationAction(event)event
CommunicationAppController.handleInboxRefreshmethodhandleInboxRefresh()
CommunicationAppController.handleThreadSelectmethodhandleThreadSelect(event)event
CommunicationAppController.handleCommunicationSendmethodhandleCommunicationSend(event)event
CommunicationAppController.handleAdvisoryActionmethodhandleAdvisoryAction(event)event
CommunicationAppController.handleSettingsBackdropClickmethodhandleSettingsBackdropClick(event)event
CommunicationAppController.handleDocumentKeyDownmethodhandleDocumentKeyDown(event)event
CommunicationAppController.handlePageHidemethodhandlePageHide()
CommunicationAppController.configuremethodconfigure()
CommunicationAppController.rebuildHubmethodrebuildHub()
CommunicationAppController.disposeHubmethoddisposeHub()
CommunicationAppController.disposeHubInstancemethoddisposeHubInstance(hub)hub
CommunicationAppController.setStatusmethodsetStatus(message,tone='muted')message,tone='muted'
CommunicationAppController.refreshasync methodasync refresh()
CommunicationAppController.selectasync methodasync select(thread)thread
CommunicationAppController.sendasync methodasync send({thread,body}){thread,body}
CommunicationAppController.openSettingsmethodopenSettings()
CommunicationAppController.closeSettingsmethodcloseSettings()
CommunicationAppController.saveSettingsasync methodasync saveSettings(values)values
CommunicationAppController.actionmethodaction(service)service
CommunicationAppController.destroymethoddestroy()

Parameter meanings and results

CommunicationAppController(options) exposes start, bind, configure, rebuildHub, setStatus, refresh, select, send, and settings actions. Workflow methods update UI and generally contain provider errors as status text.

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

  • consumes unified-inbox-ready
  • consumes conversation-view-ready
  • consumes integration-settings-ready
  • consumes integration-settings-close
  • consumes integration-settings-save
  • consumes integration-action
  • consumes inbox-refresh
  • consumes thread-select
  • consumes communication-send
  • consumes communication-advisory-action

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • constructor and DOM contract failures can throw
  • most asynchronous workflow and provider failures are rendered rather than rethrown

Availability and capabilities

Browser / native WebView hybrid. Controller state normalized; provider/DOM failures mixed.

High-level browser UI orchestration over normalized communication providers; Core is involved only through configured host preferences or providers.

Contract example

JavaScript
import CommunicationAppController from '/arcane/modules/CommunicationAppController.js';

const status=document.body.appendChild(
    Object.assign(document.createElement('p'),{id:'appStatus'})
);
const controller=new CommunicationAppController({
    appId:'communications',
    services:[],
    channels:[]
});
controller.setStatus('Ready','success');
console.log(status.dataset.tone);