Skip to content

Add Index trigger gesture to webhook headers#298

Merged
crc-32 merged 1 commit into
coredevices:masterfrom
sarfata:feat/index-webhook-trigger-header
Jul 21, 2026
Merged

Add Index trigger gesture to webhook headers#298
crc-32 merged 1 commit into
coredevices:masterfrom
sarfata:feat/index-webhook-trigger-header

Conversation

@sarfata

@sarfata sarfata commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • include the Index recording gesture in webhook requests as X-Index-Trigger
  • send stable values single-click-hold and double-click-hold
  • prevent user-configured headers from overriding the actual trigger
  • document the header and receiving example

Why

Webhook receivers currently get the recording and transcription but cannot tell which configured Index action triggered the request. Exposing the gesture lets integrations route single-click-and-hold and double-click-and-hold recordings to different workflows.

The app already computes this distinction in RecordingOperationFactory; this change carries it through the upload operation to the HTTP request.

Testing

  • added a common test that locks the two public header values
  • checked every IndexWebhookApi.uploadIfEnabled implementation and call site
  • git diff --check passes
  • local Gradle execution could not configure the project because this machine has no Android SDK; upstream CI should exercise the full multiplatform build

@CLAassistant

CLAassistant commented Jul 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3af4716741

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sarfata
sarfata force-pushed the feat/index-webhook-trigger-header branch from 3af4716 to fc6aa34 Compare July 17, 2026 04:19
@sjp4
sjp4 requested a review from crc-32 July 17, 2026 17:31
@derek-knox

Copy link
Copy Markdown

@sarfata I noticed this PR after PRing a related one here.

I think adding a X-Index-Trigger header makes sense, but I was wondering how were you making requests with two different gestures to begin with? Maybe you are using a fork? Or am I missing a means to wire two Webhooks with each gesture in the existing Pebble app?

@sarfata

sarfata commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@derek-knox I am selecting the option to send Both trigger to the webhook.

image

@derek-knox

derek-knox commented Jul 20, 2026

Copy link
Copy Markdown

@derek-knox I am selecting the option to send Both trigger to the webhook.

image

Ah, makes sense. I removed that part in my PR. Your header vs. my different endpoints to get to the similar reliable routing—difference is single vs. multiple endpoints.

@ericmigi

Copy link
Copy Markdown
Contributor

@crc-32 good one to merge

@crc-32 crc-32 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! thanks for the contribution!

@crc-32
crc-32 merged commit 388aeee into coredevices:master Jul 21, 2026
3 checks passed
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.

5 participants