Introducing a new way to review your PRs.

Read the announcement

frappe / helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / desk-application-shell

Desk application shell and navigation

The Desk application shell is the browser-facing frame for Frappe Helpdesk. It starts the Vue application, selects an agent or customer portal, protects navigation with session and access checks, and gives every page a shared desktop or mobile frame. The shell also connects common list controls and global client settings so that pages behave as one product. See the agent desk platform page for the wider agent workflow and identity, permissions, and realtime page for the access and live-update services behind the shell.

Application entrypoints and roots

Application startup

The browser loads desk/index.html as the Helpdesk document. It provides the app mount point, language and text direction from boot data, and the metadata needed for an installable mobile experience. desk/…/main.js then creates the app and installs the shared UI, state, router, translation, telemetry, and dialog services before mounting it.

The startup path also establishes the common service boundary. Frappe requests provide data to UI resources, server messages become user notices, and uncaught request errors become error toasts. The client starts its live connection before mount and exposes it to the rest of the app. In development, it first loads server context so the local app matches the site session.

References: desk/index.html• L1-9 desk/index.html• L201-211 desk/…/main.js• L1-24 desk/…/main.js• L39-55 desk/…/main.js• L63-97

Root selection

The router places the Desk route tree under AgentRoot. A separate setup route sits outside that shell so a site that still needs setup can show the setup experience without normal Desk navigation. The root selects the shared shell from the current viewport rather than from a portal persona, so Desk routes enter the agent frame. The router's access redirects send users without Desk access to the customer portal before a private Desk page can display.

The base route redirects to the home page. A direct page request therefore enters the same guarded navigation path as an in-app click.

References: desk/…/AgentRoot.vue• L1-31 desk/…/index.ts• L142-153 desk/…/index.ts• L164-187

Agent root

AgentRoot renders the active page inside a shared responsive layout. It starts agent availability state at shell creation and switches between desktop and mobile layouts from the common screen-size signal.

The root does not decide whether the user has Desk access. The router performs that check first and redirects users without access to the configured customer home page. The router also sends users to the setup route while setup is pending, which keeps setup outside the normal shell.

References: desk/…/AgentRoot.vue• L1-31 desk/…/index.ts• L164-187

Router configuration and guarded navigation

Route groups

The router maps Desk paths to named routes and loads page content on demand. Agent routes cover work areas such as home, tickets, knowledge base, customers, contacts, dashboard, and call logs. These routes are mounted under AgentRoot; the standalone setup route is handled before that shell. Customer destinations are reached through access redirects rather than through a second route root in this app.

The route names are part of the shell contract. Sidebar items, onboarding actions, view records, and redirects use those names rather than hard-coded page components. Ticket creation carries parent and success-route metadata so the page can return to the right list after an action.

The application uses /helpdesk/ as its history base. A catch-all route turns unknown paths into the invalid-page view, while the base route redirects to home.

References: desk/…/index.ts• L23-140 desk/…/index.ts• L142-153

The router guard is the first access boundary for every navigation. It restores the user's session when a signed-in state is present, then applies setup, persona, and Desk-access rules before it allows the route to render.

When navigation reaches an access or setup condition, the guard follows these rules:

  • A signed-out user goes to the full login page with a return path.
  • A non-agent who reaches the agent ticket route is sent to the matching customer ticket.
  • A signed-in user without Desk access is sent to the configured customer home page.
  • A site with pending setup sends all non-setup navigation to setup. A site without pending setup sends setup navigation to home.
  • A permitted navigation continues to its named route.

After navigation, the shared user list is fetched if it is not ready. This gives later shell controls a usable user source without making each page repeat the load.

References: desk/…/index.ts• L9-21 desk/…/index.ts• L164-195 desk/…/auth.ts• L14-21 desk/…/auth.ts• L24-35

The following flow shows how a browser request becomes a guarded page inside the Desk shell or the setup experience.

flowchart TD
    A[Browser opens Helpdesk] --> B[Create shared Vue services]
    B --> C[Router resolves a route]
    C --> D{Signed in?}
    D -- No --> E[Full login with return path]
    D -- Yes --> F[Restore session]
    F --> G{Agent ticket for non-agent?}
    G -- Yes --> H[Matching customer ticket]
    G -- No --> I{Desk access?}
    I -- No --> J[Configured customer home]
    I -- Yes --> K{Setup pending?}
    K -- Yes --> L[Setup route]
    K -- No --> M[AgentRoot]
    M --> N[Desktop or mobile layout]

References: desk/…/main.js• L63-97 desk/…/index.ts• L164-195 desk/…/AgentRoot.vue• L16-31

Layouts and navigation chrome

Desktop layout

The desktop frame reserves the left side for navigation and the main area for the current route. AppHeader provides the shared header slot and places the call control beside it. Notifications sit at the shell level so they remain available while the page changes.

AppSidebar turns the current portal's navigation options into links. It also provides search, notifications, saved views, the user menu, and view actions. The sidebar can collapse on desktop, but its content and active route remain tied to the router.

References: desk/…/DesktopLayout.vue• L1-15 desk/…/AppHeader.vue• L1-23 desk/…/AppSidebar.vue• L1-105 desk/…/AppSidebar.vue• L143-169

Mobile layout

The mobile frame replaces the fixed sidebar with a drawer. A menu button opens the drawer, and route changes close it so the new page has the full screen. The mobile header keeps the shared header mount and call control, but places the call UI below the header when space is limited.

Mobile navigation uses the same portal options as desktop. It keeps the sidebar open state in one shared reactive value, which lets the header and drawer control the same panel.

References: desk/…/MobileLayout.vue• L1-13 desk/…/MobileAppHeader.vue• L1-27 desk/…/MobileSidebar.vue• L1-30 desk/…/MobileSidebar.vue• L134-143 desk/…/mobile.ts• L1-3

Settings layout

SettingsLayoutBase gives settings pages a common frame for a title, description, page actions, filters, and scrollable content. This keeps management tasks inside the Desk shell while allowing each page to own its data and action flow.

The settings surfaces use this frame for agent access, email accounts, field dependencies, and saved replies. Their shared page pattern supports search or filters where needed, clear empty and loading states, and actions that open an editor or update a record. Email account editing can also open the full Desk email account or email domain record in a new tab when the task needs the broader Desk form.

References: desk/…/SettingsLayoutBase.vue• L1-52 desk/…/Agents.vue• L1-178 desk/…/EmailAccountList.vue• L1-87 desk/…/EmailEdit.vue• L1-160 desk/…/FieldDependencyList.vue• L1-129 desk/…/SavedRepliesList.vue• L1-177

Portal navigation options

The shell presents two navigation sets. Agents can reach operational areas such as tickets, knowledge base, customers, contacts, dashboard, and call logs. Customers see only tickets and the customer knowledge base.

The sidebar hides call logs when calling is not enabled. It also adds public and private saved views to the agent navigation when those views exist. Selecting a saved view keeps the view name in the URL, which lets the list and the sidebar agree on the active item.

References: desk/…/layoutSettings.ts• L17-66 desk/…/AppSidebar.vue• L199-271 desk/…/AppSidebar.vue• L274-295

Profile and shell actions

The profile menu changes with the portal context. Agent users can switch apps, open the customer portal, view support and docs, open settings, and use shortcuts. Customer users receive the smaller customer menu. Both contexts support theme changes and logout.

The shell also hosts manager onboarding prompts. These prompts link setup work to the relevant settings or product route, so onboarding remains a navigation aid rather than a separate product area.

References: desk/…/Sidebar.vue• L124-200 desk/…/Sidebar.vue• L210-224 desk/…/Sidebar.vue• L226-356 desk/…/useApps.ts• L33-67

Reusable view controls

List control model

View controls operate on the list page that provides their current data and actions. This shared context lets filters, sorting, column choices, and quick filters change one list state instead of maintaining separate copies of the same state.

The controls support both the built-in list view and saved HD View records. A saved view can preserve filters, sort order, columns, and row choices. The sidebar and list page use the same view actions for create, update, duplicate, pin, visibility, and delete flows.

References: desk/…/index.ts• L1-4 desk/…/useView.ts• L28-71 desk/…/useView.ts• L118-191 desk/…/useView.ts• L349-453

Filter and quick-filter controls

The filter control gives a list a step-based way to choose a field, choose an operator, enter a value, and review active conditions. It applies the result through the list action so the list and its saved view use the same filter state.

Quick filters offer a shorter path for common fields. They replace an existing condition for the same field and use direct matching for structured values or contains matching for text. This keeps quick filtering compatible with the full filter control.

References: desk/…/Filter.vue• L1-145 desk/…/Filter.vue• L166-321 desk/…/filter.ts• L66-137 desk/…/QuickFilters.vue• L1-18 desk/…/QuickFilters.vue• L31-69

Sort and column controls

Sort control lets a user add several sort fields, change direction, reorder them, or clear them. Column control lets a user add, remove, rename, resize, and reorder visible fields, then reset the list to its default shape.

Both controls update the list through shared actions. Their changes can therefore affect the current view and become part of a saved view rather than staying as temporary visual changes.

References: desk/…/SortBy.vue• L20-35 desk/…/SortBy.vue• L69-167 desk/…/SortBy.vue• L240-283 desk/…/ColumnSettings.vue• L1-15 desk/…/ColumnSettings.vue• L17-99 desk/…/ColumnSettings.vue• L219-303

Communication controls

Ticket communication controls give an agent one place to reply by email or add an internal comment. The two editors are mutually exclusive, support keyboard shortcuts, and close when the agent moves outside the active editor.

The email editor joins recipient selection, sender choice, attachments, quoted content, and saved replies into one reply flow. Draft content is kept per ticket in the browser, while supported image, video, and plain-text attachments can be previewed before the agent leaves the ticket; other files remain download links.

References: desk/…/CommunicationArea.vue• L1-105 desk/…/CommunicationArea.vue• L130-271 desk/…/EmailEditor.vue• L1-215 desk/…/EmailEditor.vue• L311-398 desk/…/EmailEditor.vue• L400-501 desk/…/AttachmentItem.vue• L1-37 desk/…/AttachmentItem.vue• L62-121

Responsive behavior

Viewport mode

The shell treats a viewport below 640 pixels as mobile. The screen-size composable watches browser resize events, so the selected layout can change while the app is open. The agent root uses this signal to switch between the desktop and mobile layout family.

The mobile form is not only a smaller desktop form. It changes navigation to a drawer, removes the collapse option, and closes the drawer after route changes. List controls also use horizontal scrolling where needed so narrow screens can keep the same list capabilities. Settings forms move from a single column to a wider two-column form when space allows, while the ticket communication area uses the full mobile width.

References: desk/…/screen.ts• L1-29 desk/…/AgentRoot.vue• L11-31 desk/…/AppSidebar.vue• L166-173 desk/…/QuickFilters.vue• L1-18 desk/…/EmailEdit.vue• L78-127 desk/…/CommunicationArea.vue• L275-295

Global client configuration

App-wide state and feedback

desk/…/App.vue wraps routed pages in the Frappe UI provider and mounts the shared dialog host. It sets a light theme when no saved theme exists, applies the configured favicon, and reports online or offline changes with a toast.

The app also passes user and system time zones to the UI library. These values come from the booted browser context and let shared date and time behavior use the right context without page-level setup.

References: desk/…/App.vue• L1-6 desk/…/App.vue• L19-43 desk/…/main.js• L26-37 desk/…/main.js• L66-77

Site and Helpdesk settings

The config store loads Helpdesk settings once for the client and exposes product-wide values such as brand data, the preferred landing area, and portal notices. A live settings event reloads this data, so shell behavior can follow server changes without a full page reload.

The root uses the knowledge-base preference when it chooses an initial customer destination. The sidebar uses the portal-permission notice setting to decide whether managers and admins need a shell-level notice. Saved reply settings also use the client config to limit the available scope choices when team restrictions disable global replies.

References: desk/…/config.ts• L6-16 desk/…/config.ts• L18-43 desk/…/HRoot.vue• L1-17 desk/…/Sidebar.vue• L210-224 desk/…/SavedRepliesList.vue• L206-208 desk/…/SavedRepliesList.vue• L298-330

Cross-system services

The startup layer connects the shell to services that affect all pages. These include server data requests, live events, translation, telemetry, dialogs, and shared UI components. The shell does not own each feature's business state, but it supplies the common path through which those features reach the browser.

The app switcher is one example of this boundary. It asks the server for available apps, adds Helpdesk as the Desk entry, and performs a full navigation when the user selects another app.

References: desk/…/main.js• L1-24 desk/…/main.js• L63-77 desk/…/useApps.ts• L26-65

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep route names aligned with sidebar options, saved view route_name values, onboarding links, and agent-to-customer redirects.
  • Keep the router's Desk-access, persona, and setup redirects aligned with the /helpdesk/ history base and the configured customer home page.
  • When adding or changing a Desk route, decide whether it belongs under AgentRoot or outside the shell like setup, then define its behavior for both desktop and mobile layout modes where applicable.
  • When changing list-view state, preserve the shared list actions used by the filter popover, quick filters, command palette, sort control, column control, and saved views.
  • When changing settings screens, preserve the SettingsLayoutBase slots and the step or record transitions that let list pages return from their editors.
  • When changing reply composition, preserve the handoff between communication controls, saved-reply actions, attachment state, recipient validation, and the ticket update event.
  • When changing global config values, preserve the settings-update event path so an open shell does not keep stale brand or portal settings.
  • When changing the /helpdesk/ base path or login redirect, check full-page login return paths and links that open the customer portal or another Desk app.

Important failure modes

TriggerConsequenceGuard
A route name no longer matches a sidebar item or saved view route_nameA menu click or saved view can navigate to a missing page or the wrong listTreat named routes as a shared contract across the router, layout settings, and view records
A Desk route bypasses the access guard or its redirect target is staleA customer can reach an agent page, or a signed-in user can land on an invalid customer destinationKeep the router session, agent, Desk-access, and configured customer-home checks together
Setup state and the setup route guard drift apartA site can expose normal Desk pages before setup is complete, or trap a ready site on setupKeep the setup_pending condition and setup route behavior in the same router guard
The history base or login return path changes without both sides changingLogin can return to an invalid URL or navigation can lose the original pageKeep /helpdesk/ consistent in router history, login redirects, and external shell links
A list control bypasses shared list actionsThe list, URL, and saved view can show different filter, sort, or column stateRoute all reusable controls through the provided list actions and view model
A settings page breaks its shared layout or step transitionA user can lose the page action, back path, or return from an editorKeep settings screens on the shared layout slots and preserve their list-to-editor transitions
A reply editor accepts no recipient or loses staged attachments and saved-reply actionsThe agent can send an unusable reply or lose work before the ticket updateKeep recipient checks and the submit, discard, and reset paths together
Settings reload loses the live update listenerBranding or portal notices remain stale until a full reloadPreserve the helpdesk:settings-updated refresh path

Key files

FileWhy to read it
desk/…/main.jsShows application startup, shared services, request feedback, and socket setup
desk/…/App.vueShows the provider, dialog host, theme, favicon, connectivity, and time-zone setup
desk/…/index.tsDefines setup and Desk route groups, route names, history base, and access guards
desk/…/AgentRoot.vueShows the Desk shell selection and the responsive layout boundary
desk/…/AppSidebar.vueConnects portal navigation, saved views, search, notifications, and view actions
desk/…/Sidebar.vueShows profile actions, onboarding, settings, and manager notices
desk/…/DesktopLayout.vueDefines the desktop page frame
desk/…/MobileLayout.vueDefines the mobile page frame
desk/…/SettingsLayoutBase.vueDefines the shared settings page frame and list-to-editor boundary
desk/…/layoutSettings.tsMaps product areas to the agent and customer navigation sets
desk/…/useView.tsExplains saved-view state and the shared view lifecycle
desk/…/Filter.vueShows the shared filter interaction and list action boundary
desk/…/SortBy.vueShows multi-field sorting as a reusable list control
desk/…/ColumnSettings.vueShows visible-column changes and default reset behavior
desk/…/CommunicationArea.vueShows the shared reply and comment controls used in ticket work
desk/…/EmailEditor.vueShows the reusable email reply flow, saved replies, attachments, and draft state
desk/…/AttachmentItem.vueShows the common attachment preview and download behavior
desk/…/Agents.vueIllustrates agent management within the shared settings frame
desk/…/EmailAccountList.vueIllustrates the settings list and account editor entry flow
desk/…/EmailEdit.vueShows provider-aware email account editing and links to full Desk records
desk/…/FieldDependencyList.vueIllustrates enabled settings records and guarded list actions
desk/…/SavedRepliesList.vueShows scoped saved replies and config-driven filter choices
desk/…/config.tsDefines client-wide Helpdesk settings and live refresh behavior