Skip to content

Add ignoreNextMessages: stay connected but leave messages unanswered - #28

Merged
ps2 merged 1 commit into
mainfrom
ignore-next-messages
Nov 4, 2026
Merged

ps2 merged 1 commit into
mainfrom
ignore-next-messages

Conversation

@ps2

@ps2 ps2 commented Nov 3, 2026

Copy link
Copy Markdown

Adds an API command that makes the pod skip the next N messages without replying, while keeping the link up:

POST /command {"command": "ignoreNextMessages", "value": 1}

The phone hits its read timeout and tears the link down itself. That reproduces OmnipodKit's unresponsive-pod path on demand (loopandlearn/OmnipodKit#199). A skipped message doesn't advance the pod's sequence, so the phone's next attempt after reconnecting is processed normally.

Used to test loopandlearn/OmnipodKit#209 in the iOS Simulator. It showed the keep-alive reconnect after this teardown on next-dev, its loss in the first version of #209, and its return with the fix. go test ./pkg/pod/... passes. The README documents the command.

POST /command {"command": "ignoreNextMessages", "value": N} makes the pod skip the next N messages without replying, keeping the link up. The phone then hits its read timeout and tears the link down itself, which reproduces the unresponsive-pod path (loopandlearn/OmnipodKit#199) on demand. A skipped message doesn't advance the pod's sequence, so the phone's retry after reconnecting is processed normally.
@marionbarker

Copy link
Copy Markdown

Instructions for use

I tried to test this but I needed some hand holding.

I asked Claude to help me figure out how to use the new feature.

It only adds a JSON API command. It doesn’t change the panel’s page, so even with that branch built, there won’t be a button for it.

Then Claude gave me the instructions for what I need to type into any terminal, where I used the IP address for my rPi in place of <pi-ip>. Is there a different way of doing this?

   curl -X POST http://<pi-ip>:8080/command \
     -H 'Content-Type: application/json' \
     -d '{"command": "ignoreNextMessages", "value": 1}'

This seemed to work, but I can do more testing tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants