Hi,
I’m seeing a reproducible issue with a SuuntoPlus app during active navigation, and I’d like to ask what the recommended mitigation is.
The app is called Constantin. It uses multiple UI templates for different workout views:
td.html - drift / combined view
tp.html - pace-focused view
th.html - heart-rate-focused view
The switching logic follows the documented pattern from the SuuntoPlus examples:
the HTML template only sends a /Zapp/{zapp_index}/Event
main.js handles the event in onEvent()
main.js updates currentTemplate
main.js calls unload('_cm')
getUserInterface() returns the selected template
Simplified version:
var currentTemplate = 'td';
var changeTemplate = function(template) {
if (currentTemplate === template) return;
currentTemplate = template;
unload('_cm');
};
function onEvent(input, output, eventId) {
if (eventId === 1) {
if (currentTemplate === 'td') changeTemplate('tp');
else if (currentTemplate === 'tp') changeTemplate('th');
else changeTemplate('td');
return;
}
if (eventId === 2) {
if (currentTemplate === 'td') changeTemplate('th');
else if (currentTemplate === 'th') changeTemplate('tp');
else changeTemplate('td');
}
}
function getUserInterface() {
return { template: currentTemplate || 'td' };
}
In the templates I use a mechanical button like this:
<pushButton
name="up"
type="lock"
longType="lock"
onClick="$.put('/Zapp/{zapp_index}/Event', 1, null, 'int32');"
onLongPressStart="$.put('/Zapp/{zapp_index}/Event', 2, null, 'int32');"
/>
The UI itself is intentionally split into separate templates instead of one large uiViewSet, because earlier versions had UI/Duktape memory pressure on the physical watch, especially when running together with ZoneSense and navigation. Splitting into separate templates reduced active subscriptions, active evals, and canvas/UI load.
The problem:
When active route navigation is running, pressing the upper button to cycle templates causes a system navigation/POI notification to appear at the bottom of the screen. Sometimes it only flashes, but sometimes it stays visible indefinitely on top of the SuuntoPlus app.
The app itself continues to work. The template changes correctly. Data updates continue. But the system POI/navigation overlay remains visible.
The overlay disappears if I leave Constantin and switch to another screen/app, then return to Constantin. The problem appears only when cycling templates with the upper button while navigation is active.
Things already tested:
removed delayed/postponed rendering from the UI
removed postpone-rendering:true
reduced canvas refreshes and subscriptions
added type="lock" / longType="lock" to the up button
removed a full-screen black root background
changed the root element id from a generic suuntoplus to unique ids per template
verified that the canvas is not full-screen and should not be covering the whole display
None of these mitigated the navigation/POI overlay issue.
So my current suspicion is that this is not caused by canvas rendering or a full-screen DOM element. It looks more like an interaction between:
the physical upper button
active navigation / POI system UI
immediate unload('_cm') from onEvent()
template reloading during the same button event
Questions:
Is using the upper button for SuuntoPlus template switching expected to conflict with active navigation or POI notifications?
Is type="lock" supposed to prevent this kind of system overlay interaction, or does it only affect button lock behavior?
Is calling unload('_cm') directly inside onEvent() considered safe during active navigation?
Would it be better to defer the actual unload('_cm') to the next evaluate() cycle after receiving the button event?
Is uiViewSet / navigate() preferred over template switching for this case, even if it increases active UI memory pressure?
Is there a recommended button for cycling SuuntoPlus views during navigation, for example down or next instead of up?
What I’m trying to achieve is a stable way to cycle between 3 lightweight SuuntoPlus workout views on the physical watch, while active navigation and another S+ app such as ZoneSense are running, without triggering or leaving behind the system navigation/POI overlay.
Any guidance on the recommended architecture or mitigation would be appreciated.