Skip to content

feat(cli): forward a reported catalog gap to the feedback channel - #3204

Merged
miga-heygen merged 1 commit into
mainfrom
feat/catalog-search-miss-slack
Sep 4, 2026
Merged

feat(cli): forward a reported catalog gap to the feedback channel#3204
miga-heygen merged 1 commit into
mainfrom
feat/catalog-search-miss-slack

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

hyperframes feedback --search-miss now also POSTs the gap to the backend, which forwards it to the same Slack channel a CLI rating goes to. PostHog still records the event unchanged.

Why

A reported gap is the one search report that is meant to leave the machine, and it names a move the catalog does not have yet. Until now it only became a PostHog event, which nobody watches, so a gap sat unread until someone thought to query for it. Ratings already reach a channel by exactly this path, and gaps are read by the same people.

How

submitCatalogSearchMiss mirrors submitFeedback: same base URL, same heygen_route: canary header, same 5s timeout, same field caps matched to the backend DTO, same swallowed failure. The ack prints before the forward, so a gap report cannot be delayed or failed by it.

Needs the matching backend endpoint (POST /v1/hyperframes/catalog_search_miss) to be deployed before anything reaches Slack. Until then the forward 404s and is swallowed, so this is safe to merge in either order.

Test plan

  • bunx vitest run packages/cli/src/utils/submitFeedback.test.ts - 9 passed, covering the posted URL and body, field truncation, and that a failed forward never throws.
  • bunx oxlint and bunx oxfmt --check clean on the three changed files.
  • Not covered: no live end-to-end post, since the backend endpoint is not deployed yet. packages/cli/src/commands/feedback.telemetryJoinKeys.test.ts fails to resolve @hyperframes/core in a fresh worktree, which reproduces identically on untouched main and is unrelated to this change.

A search miss already reached PostHog, where nobody was watching it. It now
also goes to the same channel a CLI rating goes to, by the same best-effort
POST, so a move the catalog is missing is read rather than queried.

The forward is bounded and swallowed, and the ack prints before it, so a gap
report can never fail or delay the command that sent it.

@miga-heygen miga-heygen 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.

Reviewed at exact head. Catalog search misses are now forwarded to the publish API endpoint as a best-effort POST, bounded by a 5s abort signal and wrapped in a catch so it never fails the command. Fields are capped to backend limits (500/500/50 chars). The ack prints before the forward fires so the reporter never waits on it. Three tests cover the happy path, truncation, and offline resilience.

— Miga

@miga-heygen
miga-heygen enabled auto-merge (squash) September 4, 2026 18:06
@miga-heygen
miga-heygen merged commit 2dc4bbf into main Sep 4, 2026
48 checks passed
@miga-heygen
miga-heygen deleted the feat/catalog-search-miss-slack branch September 4, 2026 18:06
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