Watch: first submenu item ("- Voice -") is blank when the submenu has 10 items

Open
#244 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Merciful12 is already working on this.

Since Nov 16, 2026.

  • #245 by @Merciful12 — open

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
kotlin
Domain
mobile-dev

Research direction

Start in watch/src/ui/window_notification/data_loading.c at window_notification_data_receive_show_submenu() and check packet 9 in protocol.md for the action text offset. The issue identifies the offset correction and the 10-item reproduction; verify that - Voice - renders correctly and that a 20-byte title fits in Action.text[21].

Written by the indexing model from the issue text.

Description

Summary

The first item of a submenu (in practice the - Voice - entry of the reply menu) is rendered blank when the submenu has exactly 10 items, e.g. - Voice - + 9 canned replies. Selecting the blank item still works: dictation opens and the reply is sent.

Steps to reproduce

  1. Configure 9 canned replies in the rules (Voice + 9 = 10 submenu items).
  2. Receive a notification with a free-form reply action (e.g. Telegram).
  3. On the watch, open the actions → Reply.

Expected: the first entry reads - Voice -.
Actual: the first entry is empty (Pebble Time 2).

Cause

window_notification_data_receive_show_submenu() in watch/src/ui/window_notification/data_loading.c starts parsing the action texts at offset 2:

const uint8_t num_actions = data[2];
size_t position = 2;

According to protocol.md (packet 9), byte 2 is the number of actions and the first action text starts at offset 3. So the first title is copied with the action count byte prepended. The following items stay aligned, because the extra byte is included in strlen().

PebbleOS skips control characters below 0x20 when rendering text, except newline (0x0A). That's why the bug is invisible with most item counts. With exactly 10 items the title becomes "\n- Voice -", and the single-line menu cell shows only the empty first line.

Side effect: a 20-byte first title becomes 21 bytes + NUL, which overflows Action.text[21] by one byte.

Fix: start at offset 3.

Dominant language
Kotlin
Stars
36
Forks
6
Avg merge
15h 6m
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from matejdro/PebbleNotificationCenter2

All issues in matejdro/PebbleNotificationCenter2

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.