You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
merge: origin/dev (with 047 dashboard kill) into cloud/issues-048-merge
Brings in the full dashboard refactor (PR #2239):
- DashboardManager is now cloud-internal (no external mini app)
- SYSTEM_DASHBOARD_PACKAGE_NAME removed, replaced by OS_PACKAGE_NAME
- Model-aware display profiles (G1, G2, Z100, Nex)
- Stacked layout for narrow displays (Z100/Mach1)
- Header column alignment fix (worst-case token measurement)
- DEPRECATED_APPS blocklist for old dashboard app
- Weather at 50% display midpoint
Also fixed:
- China deploy: Dockerfile.livekit → Dockerfile.porter (file didn't exist)
- China deploy: removed SYSTEM_DASHBOARD_PACKAGE_NAME env var
- docker-compose.porter.local.yml: same Dockerfile fix
All 5 packages build clean (bun run ci).
Copy file name to clipboardExpand all lines: cloud/issues/039-sdk-v3-api-surface/v2-v3-api-map.md
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,14 +260,56 @@ Timezone is resolved from: user setting (`userTimezone`) → GPS-derived timezon
260
260
261
261
`session.display` integrates with `@mentra/display-utils` automatically. The session knows the device profile (G1, Nex, etc.) — developers don't need to manually create toolkits or pick profiles.
262
262
263
+
### Two-layer wrapping model
264
+
265
+
Text wrapping in MentraOS happens at two independent layers with different responsibilities:
266
+
267
+
**Layer 1 — SDK (`session.display.showText`)**: formats for readability.
268
+
269
+
- Default break mode: **`"word"`** — wraps at word boundaries, hyphenates only when a single word exceeds the line width
270
+
- This is what developers expect. `showText("This is a long sentence")` produces readable word-wrapped output
271
+
- Developer can override with `{ breakMode: "character" }` for dense data / maximum utilisation
272
+
273
+
**Layer 2 — Mobile `DisplayProcessor`**: safety net for physical fit.
274
+
275
+
- Default break mode: **`"character-no-hyphen"`** — breaks mid-character without hyphen only when a line is too wide
276
+
- Purpose: ensure text physically fits on the display without changing the developer's intended formatting
277
+
- Preserves explicit `\n` breaks and pre-formatted structure
278
+
- When the SDK wraps first (layer 1), layer 2 becomes a no-op — lines already fit
279
+
280
+
**Why the defaults differ:**
281
+
282
+
The `DisplayProcessor`'s `"character-no-hyphen"` is intentionally conservative — it runs on every display event regardless of where it came from (SDK apps, system services, old clients). Changing it to `"word"` would re-flow text that a developer deliberately structured, potentially breaking their layout.
283
+
284
+
The SDK's `"word"` default is correct for the common developer case: `showText("raw unformatted string")`. The developer is handing the SDK a raw string and expecting it to handle line breaks sensibly.
285
+
286
+
If a developer pre-formats their text with explicit `\n` breaks and passes it as `string[]` (array), the SDK sends it as-is — skipping layer 1 wrapping entirely — and layer 2 just ensures no line overflows.
`@mentra/display-utils` stays as a standalone package (cloud and mobile use it directly). `session.display` wraps it with session context so SDK developers don't need to import it or pick profiles manually.
|`"word"`| Wrap at word boundaries, hyphenate only if word > line | Default for `session.display.showText` — readable output |
365
+
|`"character"`| Break mid-word with hyphen | Maximum utilisation, dense data |
366
+
|`"character-no-hyphen"`| Break mid-word, no hyphen | Mobile `DisplayProcessor` safety net — preserves dev formatting |
367
+
|`"strict-word"`| Word boundaries only, long words overflow | Rare — when overflow is preferable to breaking a word |
368
+
369
+
**Note on `ColumnComposer` overflow bug**: there is a known off-by-one pixel issue in `ColumnComposer.mergeColumns()` where `Math.ceil` on space padding can push the right column start past `rightColumnStartPx`, causing the right column to overflow by up to 5px and the last character to wrap onto the next line's left position. Fix tracked in `cloud/issues/047-dashboard-refactor/`. The new system dashboard layout avoids `DoubleTextWall` entirely; the fix is still needed for third-party apps using `showDoubleText`.
0 commit comments