Watch: first submenu item ("- Voice -") is blank when the submenu has 10 items
Maintainers usually reply within 1 day
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
- Configure 9 canned replies in the rules (Voice + 9 = 10 submenu items).
- Receive a notification with a free-form reply action (e.g. Telegram).
- 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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from matejdro/PebbleNotificationCenter2
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
matejdro/PebbleNotificationCenter2#243 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
matejdro/PebbleNotificationCenter2#192 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
matejdro/PebbleNotificationCenter2#242 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
matejdro/PebbleNotificationCenter2#229 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
matejdro/PebbleNotificationCenter2#202 · 1 comment ·
Maintainers usually reply within 1 day
All issues in matejdro/PebbleNotificationCenter2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
AlfaazPlus/QuranApp#752 · 2 comments ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
theopenconversationkit/tock#2148 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
music-assistant/mobile-app#1393 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100