Desktop shell and IPC
The desktop shell hosts the Trilium application as a native Electron app. It starts the local application services, loads the client in protected windows, exposes a narrow bridge for operating-system features, and provides native audio transcription. The desktop client keeps shared application behavior while placing native work and process boundaries under main-process control.
Desktop process
The Electron main process owns the desktop app lifecycle. It opens the local data store, initializes the application core, creates the setup or main window, and registers native services such as trays, shortcuts, printing, dialogs, and transcription. It also applies settings that must be known before a window starts, such as the UI locale, smooth scrolling, and hardware acceleration.
The interface can start when the core is ready while the local Express application finishes starting in parallel. Requests that arrive early wait for the Express application, so the window can become responsive without bypassing server startup. Startup milestones are also recorded from process creation through the first client render, which gives launch work a shared time base across the main and renderer processes.
flowchart TD
A[Launch desktop app] --> B[Register shell and native guards]
B --> C[Open local data store]
C --> D[Initialize application core]
D --> E{Knowledge base initialized?}
E -- No --> F[Show setup window]
E -- Yes --> G[Show main window]
D --> H[Build local application server]
H --> I[Serve shell requests]
F --> J[Initialize knowledge base]
J --> G
G --> K[Record renderer startup milestones]
The process enforces one active desktop instance for a given user-data and port context. A second launch focuses the existing process or asks it to open an extra window. Known port collisions from a new-window launch or a lost instance lock are not treated as fatal startup errors. Protocol requests still wait for the local server.
References: apps/…/main.ts• L54-183 apps/…/main.ts• L185-323 apps/…/main.ts• L388-434 apps/…/startup_metrics.ts• L7-87 apps/…/main.spec.ts• L348-471 apps/…/platform_provider.spec.ts• L94-121
Window lifecycle
The window service maps application state to native windows. It provides a setup window for a new knowledge base, a main window for normal work, and extra windows for separate client views. When setup finishes, it replaces the wizard with the main window so the user does not need to restart the app.
Each window uses the same isolated renderer boundary, preload bridge, session rules, and native event wiring. The main window restores its last usable size, position, maximized state, and full-screen state. If a saved position is no longer visible, the operating system chooses a safe position. Window creation, first paint, and completed page load are startup milestones, while a delayed reveal prevents a blank or permanently hidden main window when the renderer does not paint.
The shell adapts window presentation to the operating system without changing the client surface. Its title-bar controls and optional background effects follow platform support and the current theme and layout, while settings changes update open windows. Spell-check languages and the enabled state also apply across open windows, so a preference change does not require a restart.
The service keeps behavior consistent across manual launches, login launches, and tray use. A login launch can start hidden, a close can hide the main window to the tray, and an explicit quit ends the process. The tray can show open windows and provide quick paths to common note actions.
References: apps/…/window.ts• L83-214 apps/…/window.ts• L217-230 apps/…/window.ts• L232-315 apps/…/window.ts• L317-463 apps/…/window.ts• L475-510 apps/…/window.ts• L562-590 apps/…/window.ts• L793-808 apps/…/window_state.ts• L21-69 apps/…/window.spec.ts• L337-555 apps/…/window.spec.ts• L615-798 apps/…/window_state.spec.ts• L72-168 apps/…/tray.ts• L104-275
First-paint reveal
The first-paint gate keeps a new app window hidden until its renderer has produced the completed initial interface. The main process arms the gate before page loading, the shell holds the gate request, and the renderer releases it after its first useful render. A short timeout and a window-destroyed handler release stalled gates, while a separate reveal timeout ensures that a hung renderer does not leave the window hidden forever.
The same gate applies to the main window and extra windows. Reloads do not wait on an old gate, so the protection targets the first reveal of a newly created window rather than normal page refreshes.
sequenceDiagram
participant M as Main process
participant P as Shell protocol
participant R as Renderer
M->>M: Arm window gate
M->>P: Load application shell
P-->>M: Hold startup-gate request
R->>M: Release first paint
P-->>R: Allow gate script
R-->>M: Produce first frame
M->>M: Reveal window or use bounded fallback
References: apps/…/first_paint_gate.ts• L3-68 apps/…/first_paint_gate.spec.ts• L18-84 apps/…/window.ts• L194-230 apps/…/preload.ts• L80-101 apps/…/protocol.ts• L61-81 apps/…/protocol.ts• L127-150
Application shell
The application shell is the trusted page that displays the Trilium client. Packaged windows load it from the trilium-app://app/ origin, while the main process connects that origin to the local Express application.
Shell origin and protocol handling
The custom shell protocol gives the desktop page a stable origin with cookies, fetch, and normal same-origin behavior. Page loads, API calls, assets, uploads, binary responses, and streamed responses pass through the same Express application used by the local server.
The handler can be installed before the server is ready. Requests wait for the Express application, return errors when startup fails, and deliver stream chunks as they arrive. Multipart and JSON request bodies retain the behavior expected by the server, while response backpressure prevents a fast producer from filling memory. If the renderer cancels a stream, the upstream response receives a close signal instead of continuing to write into a closed channel.
The protocol checks the requesting frame chain before it marks a request as internal desktop traffic. Only the app shell and approved development tools can use the privileged path; a foreign frame or a disposed frame is denied. The first-paint gate script is handled separately so it can wait without invoking the Express application.
References: apps/…/trilium_app_origin.ts• L13-35 apps/…/protocol.ts• L12-84 apps/…/protocol.ts• L86-186 apps/…/protocol.ts• L188-420 apps/…/protocol.spec.ts• L46-247 apps/…/protocol.spec.ts• L636-905
Renderer and main process boundary
Main and extra windows run without Node.js access. The preload script exposes the typed window.electronApi object through Electron's context bridge. The renderer can request native work without receiving direct access to Electron or the file system.
The bridge covers window controls, external links and files, clipboard, context menus, spell check, printing, import and export, setup and restore dialogs, security settings, backup passphrases, provider sign-in, transcription, and system integration. It also carries application live messages, print progress, first-paint release, and startup metrics. Main-process events use the same bridge to notify renderers about shortcuts, navigation, full-screen state, printing, and transcription.
File import uses user-selected capabilities rather than arbitrary paths. Dropped files are resolved only when they are genuine user files. The backup passphrase interface is write-only, so its secret does not return to the renderer. Transcription and live-message listeners return unsubscribe functions, while audio samples use a separate private message port.
References: apps/…/preload.ts• L14-362 apps/…/preload.spec.ts• L66-768 packages/…/electron_api_interface.ts• L239-343 packages/…/electron_api_interface.ts• L629-654 apps/…/capture.ts• L36-123
Platform services
The desktop process supplies platform-facing services that the shared application core needs. This lets shared product flows use native behavior without moving operating-system rules into shared client code.
Platform provider
The desktop platform provider identifies the runtime as Electron and reports the operating system, environment, and local database path. Fatal startup errors become native dialogs. Expected port collisions are distinguished from real startup failures when a new-window launch or a lost instance lock caused the collision.
References: apps/…/platform_provider.ts• L6-36 apps/…/platform_provider.spec.ts• L41-121
Network requests
The desktop request provider gives sync and resource downloads access to the operating system's proxy rules. Requests without an explicit application proxy use Electron's network client after the app is ready. An explicit proxy keeps the shared server request path.
References: apps/…/request.ts• L1-42 apps/…/request.spec.ts• L30-85
Native capability groups
Native features follow a request-and-result pattern. The renderer asks the preload bridge to perform an action, the main process validates it and calls the operating system or a desktop service, and the result returns as a promise or a main-to-renderer event.
| Capability area | Desktop purpose |
|---|---|
| Window and system UI | Control windows, title bars, full screen, tray state, shortcuts, and navigation history. |
| OS file actions | Open approved files, reveal them in the file manager, download same-origin content, use native dialogs, and choose an application for a temporary file. |
| Content tools | Provide clipboard, spell check, context menus, printing, and PDF support. |
| Large data flows | Import files and export note trees without requiring the renderer to hold the full file in memory. |
| Native transcription | Capture microphone and system audio, turn speech into a live transcript, and optionally keep source audio for later review. |
| Protected settings | Change security settings after native confirmation and keep backup passphrases in protected OS storage. |
| Desktop sign-in | Complete desktop-only provider sign-in while keeping tokens in the main process. |
References: apps/…/shell.ts• L39-103 apps/…/shell.ts• L107-230 apps/…/shell.ts• L289-437 apps/…/preload.ts• L215-360 apps/…/shell_handlers.spec.ts• L99-324
Native data and sign-in flows
Native file flows keep privileged paths and large payloads in the main process. File pickers return short-lived capabilities instead of absolute paths to the renderer. Imports can stream archives from disk, exports write to a user-selected destination, and restore keeps a selected backup in a pending native session until the core consumes it.
Desktop-only sign-in also stays in the main process. The flow opens the user's browser, receives the authorization result through a temporary loopback server, checks the returned state, and passes tokens to the provider-specific session service. Backup passphrases use protected operating-system storage and expose status and write-only change actions rather than a renderer getter.
References: apps/…/import.ts• L1-178 apps/…/import.spec.ts• L80-297 apps/…/export.ts• L1-120 apps/…/export.spec.ts• L40-90 apps/…/restore.ts• L1-104 apps/…/restore.spec.ts• L61-127 apps/…/loopback_oauth.ts• L1-115 apps/…/onenote.ts• L1-89 apps/…/onenote.spec.ts• L31-63 apps/…/backup_passphrase.ts• L9-177 apps/…/backup_passphrase.spec.ts• L219-309
Startup integration
The desktop client can start with the operating system and keep that setting in step with the user's application choice. macOS and Windows use Electron login-item support. Linux uses a per-user desktop autostart entry outside Flatpak. Flatpak asks the desktop Background portal to manage the entry inside its sandbox.
The launch command carries a hidden-start marker where needed, so login behavior can differ from a manual launch. If the operating system or portal rejects the change, the app logs the error and continues normal startup.
References: apps/…/auto_launch.ts• L7-121 apps/…/auto_launch.spec.ts• L102-301
Native printing
Printing uses a short-lived native browser window that loads the same application shell and session as the requesting window. The main process sends the rendered job to a printer or creates a PDF. Progress and completion reports return to the requesting renderer.
Linux uses a small off-screen window instead of Chromium off-screen rendering so printing works under Wayland. The path supports direct printing, PDF export, PDF preview data, printer discovery, and printing from a preview. A stalled render is abandoned and its temporary window closes.
References: apps/…/printing.ts• L34-35 apps/…/printing.ts• L114-204 apps/…/printing.ts• L255-470 apps/…/printing.spec.ts• L180-470
Native transcription
Native transcription turns live microphone and system audio into a transcript attached to a meeting note. The desktop process coordinates user-facing state and note updates, while a hidden capture page and a separate utility process keep audio capture and speech work away from the main process.
Recording lifecycle
The recording flow accepts one meeting note at a time. It checks the note and speech models, creates a transcript attachment, starts one speech utility process, and then starts the audio sources. State changes go to every open app window so the client can show starting, recording, pending speech, stopping, and idle states.
Microphone and system audio remain separate sources. The capture page sends fixed-rate sample chunks through a transferred message port to the transcription process. The main process receives utterances, source status, and level updates rather than carrying the continuous audio stream.
When recording stops, capture ends first so buffered samples reach the transcription process. The engine then finishes queued speech before the transcript closes. A lost capture or worker exit stops the session and reports an error. Application quit waits briefly for the same drain process, then continues if the worker does not finish.
flowchart LR
U[Renderer recording controls] --> M[Desktop main process]
M --> C[Hidden capture window]
C -->|Audio sample port| W[Transcription utility process]
W -->|Utterances and state| M
M --> A[Transcript attachment]
M --> U
References: apps/…/index.ts• L45-180 apps/…/capture.ts• L36-123 apps/…/session.ts• L61-124 apps/…/worker_client.ts• L21-75 apps/…/transcription_worker.ts• L18-90 apps/…/index.spec.ts• L166-248 apps/…/capture.spec.ts• L111-190
Speech recognition
The speech engine uses local models. Each source has its own pause detection, so a pause in one source does not cut speech in the other. Recognition turns each speech segment into text with word timing. Optional speaker detection labels system-audio turns, while the microphone is treated as the local speaker.
The desktop resource system registers recognizer, voice activity, and speaker models. A recording needs its recognizer and voice activity models. Speaker identification is optional. The native speech addon is probed once per run so the client can distinguish an unsupported platform from a missing model.
References: apps/…/model.ts• L80-155 apps/…/engine.ts• L105-188 apps/…/session.ts• L136-223 apps/…/model.spec.ts• L8-27 apps/…/engine.spec.ts• L127-325
Transcript persistence
Each completed utterance is written to the meeting note's transcript attachment. The attachment is updated as speech arrives, so other windows receive normal application changes and the user can see the transcript live. Speaker names remain when another window changes them, and a rename is accepted only while the active recording owns that attachment.
If a protected note cannot accept a write, the service keeps the failed data and retries it when the protected session becomes available. An optional recording mode also keeps source WAV audio, a recording manifest, engine settings, and a transcript file beside the live attachment for later review.
References: apps/…/attachment_sink.ts• L9-76 apps/…/audio_recorder.ts• L8-123 apps/…/index.ts• L201-290 apps/…/attachment_sink.spec.ts• L40-133 apps/…/transcription_worker.spec.ts• L97-215
Desktop packaging
Desktop packaging turns the Electron shell and local application services into installable builds for macOS, Windows, and Linux. The package includes the main process, sandbox-compatible preload, frontend, workers, native database and speech dependencies, models' download support, and shared runtime assets.
The build keeps product identity and launch behavior aligned across installers and distribution packages. Linux packages include desktop launch actions. AppImage provides a self-contained launch bundle. Flatpak uses a sandbox wrapper, portal-friendly metadata, and only the display, audio, network, file, notification, keyring, and tray access needed by the app.
Platform app icons are part of that packaged identity. The icon assets are supplied at the sizes needed by desktop installers and launchers.
Locale trimming reduces the packaged runtime without removing a supported application language. The Electron locale manifest is tied to the Electron major version and records the platform-specific locale files that the package may keep.
| Packaging concern | Product-level result |
|---|---|
| Installers and archives | Users receive native delivery formats for supported desktop platforms. |
| Runtime entry points | The renderer receives the preload bridge and the main process loads the packaged application. |
| Workers and assets | Frontend resources, shared styles, application assets, and transcription workers are available at runtime. |
| Native dependencies | Native database and speech modules are placed where Electron can load them. |
| Linux sandbox | Flatpak runs with the permissions needed for display, audio, network, files, notifications, keyring, and tray use. |
| Runtime footprint | Unused Electron language assets do not ship with the application. |
| Binary hardening | Packaged builds do not expose extra Node startup controls or file-protocol privileges. |
References: apps/…/package.json• L13-58 apps/…/build.ts• L7-86 apps/…/artifacts.spec.ts• L5-45 apps/…/electron-locales.json• L1-398 apps/…/trim-locales.spec.ts• L7-85 apps/…/forge.config.ts• L38-199 apps/…/512x512.png apps/…/1000x1000.png apps/…/1024x1024.png apps/…/org.triliumnotes.Trilium.yml• L1-85 apps/…/build-appimage.sh• L1-101
IPC messaging
IPC messaging carries the live messages that keep open clients current. In the desktop case, the trusted renderer uses Electron IPC instead of opening a WebSocket connection to a TCP port.
Renderer message channel
IpcMessagingProvider treats each BrowserWindow as a separate client. Renderer messages go to the shared application message handler, and replies return only to the matching window or to all live windows. Extra windows therefore have their own client identity without another network endpoint.
The channel accepts the same message shape as the server WebSocket path. The preload bridge exposes one sender and an unsubscribe-capable receiver. This keeps shared client behavior while keeping the desktop live channel inside the Electron process.
References: apps/…/ipc_messaging_provider.ts• L5-84 apps/…/preload.ts• L285-295 apps/…/preload.spec.ts• L560-595 packages/…/electron_api_interface.ts• L429-445
Network client channel
The desktop can also serve browser clients when the user enables LAN access. In that mode, the messaging service combines private renderer IPC with a WebSocket channel on the local HTTP listener. Without that choice, the desktop binds no WebSocket endpoint and uses IPC alone.
The combined service keeps client identity tied to its transport. IPC replies stay on IPC, and browser replies stay on WebSocket. Browser connections still use the server session check because they cross the network boundary.
flowchart LR
R[Trusted desktop renderer] -->|Electron IPC| M[Application messaging service]
B[Browser client] -->|WebSocket, LAN access enabled| M
M --> R
M --> B
References: apps/…/main.ts• L234-249 apps/…/composite_messaging_provider.ts• L9-69 apps/…/composite_messaging_provider.spec.ts• L40-112 apps/…/ws_messaging_provider.ts• L12-57 apps/…/www.ts• L78-88
Security boundary
The desktop shell treats renderer content as less trusted than the main process. Navigation, embedded web views, permissions, protocol dispatch, and native shell actions are checked in the main process before they reach the operating system or local application server. The policy applies to setup, print, main, and renderer-created extra windows.
The custom protocol uses frame-chain checks and a per-request internal marker. The frame check identifies requests created by the shell, while the marker tells server middleware that the request came through the trusted desktop path. A public HTTP request to the desktop listener does not receive the renderer's internal authentication and CSRF treatment. Web-view policy denies Node.js, preload, insecure content, broad permissions, and popups for guest content. App-only permissions require the exact shell origin.
Shell actions reject unsafe URL schemes, paths outside approved roots, UNC file URLs, executable paths without confirmation, and downloads that do not match the sender's app origin. The custom application chooser accepts only existing temporary files created by the application and uses a platform-native chooser. Other privileged flows apply the same rule to data and identity: import grants expire and are single-use, restore responses omit selected paths, backup passphrases never return to the renderer, and loopback sign-in accepts only the expected state.
References: apps/…/protocol.ts• L86-186 apps/…/protocol.ts• L493-500 apps/…/electron_request.ts• L1-26 apps/…/web_contents_security.ts• L24-78 apps/…/web_contents_security.ts• L90-354 apps/…/shell.ts• L39-437 apps/…/shell_handlers.spec.ts• L99-324 apps/…/import.spec.ts• L92-263 apps/…/loopback_oauth.ts• L47-115 apps/…/backup_passphrase.ts• L42-177
Related pages
- Platform clients describes how the desktop client fits with the other client runtimes.
- Standalone browser runtime describes the browser-facing runtime that uses the network server path.
- Web clipper extension describes the browser extension that sends captured content to the application.
- Deployment targets and operations describes desktop packaging alongside the other deployable targets.
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the
trilium-app://app/origin consistent across window loading, protocol dispatch, navigation checks, permission checks, print windows, and download validation. - Keep the preload API, shared TypeScript contract, and every main-process IPC handler aligned when changing a native capability.
- Keep renderer listener removal and transport-specific client IDs intact when changing the bridge or composite messaging provider.
- Keep the internal Electron request marker limited to custom-protocol dispatch so public TCP requests retain normal session and CSRF checks.
- Keep import grants, restore responses, backup-passphrase status, and native sign-in results free of privileged paths or secrets.
- Keep the LAN access rule aligned with whether the desktop exposes a network messaging endpoint.
- Keep login-start commands, hidden-start detection, tray behavior, and stored launch options aligned across macOS, Windows, Linux, and Flatpak portal startup.
- Keep print windows on the custom shell origin and pair progress and completion events with the requesting renderer.
- Keep transcription IPC names, shared state, worker messages, model resources, and the private audio port aligned.
- Keep transcript writes resumable for protected notes and optional recording files aligned with their source offsets.
- Keep all window types on the shared preload, security, session, and platform-window rules.
- Keep startup metric names, their process-time baseline, renderer allowlist, and optional log-file behavior aligned when adding launch milestones.
- Keep the first-paint gate arm, shell gate request, renderer release, and bounded reveal fallback aligned for every app window type.
- Keep the sandbox-compatible preload, worker files, native assets, shared assets, and production package layout aligned with Electron entry points.
- Keep app icon assets aligned with installer, launcher, and platform package identity requirements.
- Keep the Electron locale manifest tied to the Electron major version and the shared locale list.
- Keep Flatpak metadata, permissions, the launch wrapper, data directory selection, and Electron resource paths aligned.
- Keep window-state persistence compatible with the user-data directory, display changes, hidden startup, and main-window restore.
- Keep platform title-bar settings, background effects, spell-check state, and live option updates aligned across all open windows.
- Keep setup-window replacement synchronized with database initialization and the options state needed to create the main window.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The shell origin differs between the window URL and a protocol or security check. | The app can fail to load or a security gate can accept the wrong content. | Shared origin constants, frame checks, and exact-origin checks. |
| The first-paint gate is not armed before a new window loads. | The window can show a blank or partial first frame. | Arm each window before loadURL, then release or time out the gate. |
| The renderer never releases the first-paint gate. | The new window can remain hidden. | A two-second gate timeout and a three-second reveal fallback bound the wait. |
| The local Express server fails after the window starts. | Shell requests can wait forever or the renderer can show an incomplete app. | The protocol waits on the server promise and returns an error response on failure. |
| A foreign frame reaches the privileged custom protocol. | Internal request handling can expose the local application path. | Main-process frame-chain checks run before dispatch, with an exact-origin check as a second layer. |
| LAN access enables WebSocket without the normal session check. | A network client can receive live messages without an authenticated session. | The WebSocket leg uses the server session parser and check. |
| A renderer sends an unsafe URL, path, or download target. | The operating system can open or write an unintended resource. | Main-process scheme, path, origin, file, executable, and custom-chooser checks. |
| A renderer tries to open a program without native confirmation. | A file action can run a program instead of opening user content. | Executable paths require a native confirmation. Only one confirmation can be active. |
| A custom application chooser receives an arbitrary or missing path. | The desktop can expose an unintended file to another application or report a false success. | The main process accepts only existing files written in the application's temporary area and reports chooser failure. |
| A dropped script-built file reaches the import path as trusted input. | The renderer can make the main process read an arbitrary path. | Preload resolves genuine user files and the main process uses expiring capability grants. |
| A print window loads outside the shell origin. | Its session lacks the main renderer's application state and the print view can fail. | Printing loads through the custom shell protocol and sender session. |
| A loopback callback has a missing or wrong state. | A sign-in result can be accepted for the wrong authorization request. | The temporary server checks the expected state and times out. |
| The OS keyring is unavailable or uses an unsafe Linux fallback. | A backup passphrase cannot be safely stored or read. | Keyring availability is checked before storage and the renderer cannot read the secret. |
| A worker, capture page, or model fails during recording. | The transcript can stop early or lose the active recording state. | Capture-loss and worker-exit handlers stop the session and preserve written data. |
| Capture stops before its last audio marker reaches the worker. | Buffered speech can be missing from the transcript. | Stop drains capture before stopping the speech process. |
| A protected note rejects a live transcript write. | Recent utterances are not immediately visible. | The attachment sink keeps failed data and retries it after unlock. |
| Transcription takes too long to stop during quit. | The app can remain open indefinitely. | Worker and quit paths use bounded stop timeouts. |
| A startup metric is not allowlisted or the metrics file cannot be written. | An untrusted renderer can add arbitrary launch data, or diagnostics can be missing without affecting startup. | Renderer metric names are allowlisted. Metrics stay in memory and file-write errors are logged. |
| A saved window position is no longer visible after a display change. | The main window can open outside the visible work area. | Window-state loading drops unusable positions. |
| A Flatpak runtime lacks a required portal, permission, or launch wrapper. | Native startup, autostart, file access, or tray behavior can fail. | Flatpak metadata, wrapper, and build checks keep the sandbox contract together. |
| A platform does not support the selected title-bar effect or material. | A window can lose its native controls or render with an unusable background. | Window creation checks platform support and falls back to a plain presentation. |
| Setup completion creates the main window before core options are ready. | The new window can fail to start or use incomplete settings. | The setup-to-main transition waits for the core data load. |
Key files
| File | Why to read it |
|---|---|
| apps/…/main.ts | Shows startup and how core, server, messaging, transcription, and platform services are assembled. |
| apps/…/window.ts | Shows how setup, main, and extra windows host the app and share native rules. |
| apps/…/first_paint_gate.ts | Shows how new windows wait for a useful first frame without an unbounded startup wait. |
| apps/…/window_state.ts | Shows how window placement and display state persist across launches. |
| apps/…/startup_metrics.ts | Shows how main and renderer launch milestones share a process-time baseline and optional log output. |
| apps/…/protocol.ts | Shows how the custom app origin reaches the local Express application and streams responses. |
| apps/…/preload.ts | Shows the renderer-facing native bridge and IPC event directions. |
| apps/…/shell.ts | Shows the safety boundary for OS URL, file, download, chooser, and application actions. |
| apps/…/import.ts | Shows capability-based native file import. |
| apps/…/loopback_oauth.ts | Shows the desktop browser sign-in boundary. |
| apps/…/backup_passphrase.ts | Shows protected backup-passphrase storage and its write-only IPC contract. |
| apps/…/printing.ts | Shows how note content reaches native printing or PDF output. |
| apps/…/index.ts | Shows recording state, model checks, IPC handlers, errors, retries, and quit coordination. |
| apps/…/capture.ts | Shows how microphone and system audio enter the hidden capture page and private audio port. |
| apps/…/session.ts | Shows how source audio becomes timed utterances and speaker turns. |
| apps/…/transcription_worker.ts | Shows the boundary between the main process and native speech utility process. |
| apps/…/attachment_sink.ts | Shows how live utterances and speaker names reach the meeting note. |
| apps/…/ipc_messaging_provider.ts | Shows the private renderer-to-main live message transport. |
| apps/…/composite_messaging_provider.ts | Shows how private IPC and optional browser WebSocket clients share messaging. |
| apps/…/web_contents_security.ts | Shows rules for web-view attachment, navigation, permissions, popups, and media. |
| apps/…/auto_launch.ts | Shows platform-specific startup launch behavior. |
| apps/…/build.ts | Shows how the production runtime is assembled. |
| apps/…/512x512.png, apps/…/1000x1000.png, apps/…/1024x1024.png | Shows the platform icon assets used to present the packaged desktop app. |
| apps/…/org.triliumnotes.Trilium.yml | Shows Flatpak runtime permissions and offline packaging. |