Skip to content

feat(listen): link guest accounts to Hookdeck Inspect - #484

Draft
leggetter wants to merge 4 commits into
mainfrom
feature/inspect-guest-links
Draft

leggetter wants to merge 4 commits into
mainfrom
feature/inspect-guest-links

Conversation

@leggetter

@leggetter leggetter commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

hookdeck listen now links guest accounts (project type console) to Hookdeck Inspect instead of Hookdeck Console. Dashboard links for every other project type stay the same.

  • Event links: keep Console's parameters on Inspect's host: https://inspect.hookdeck.com/?event_id=evt_…&team_id=tm_…. Inspect looks the event up and opens the request that created it on its Source page, for a visitor already in that project (hookdeck/core#6158 (Redirect console homepage to Inspect), event-link.server.ts). Anyone else lands on the Inspect home page. Log lines show the link with team_id, because Inspect needs both ids to open the event.
  • Home / "view events" link: the Source page (https://inspect.hookdeck.com/<source id without src_>) when the session listens to exactly one Source, otherwise the Inspect home page. It's only printed for console projects without a saved guest sign-up URL, for example after hookdeck login into a Console project. A guest with a sign-up URL sees the "Sign up to make your webhook URL permanent" hint instead, as before.
  • Labels: for guest accounts, the TUI's [o] action reads "Open in Hookdeck Inspect" and the events hint reads "View your requests in Hookdeck Inspect". Dashboard wording is unchanged.
  • Inspect base URL: new DefaultInspectBaseURL (https://inspect.hookdeck.com). You can override it the same way as the other base URLs, with the hidden --inspect-base flag or inspect_base in config (for example https://inspect-staging.hookdeck.com).
  • --console-base / console_base: deprecated in favour of --inspect-base. Listen links were its only consumer, and guest login doesn't use it (the sign-up URL comes from the API). The flag is still accepted, so existing scripts don't fail on an unknown flag; cobra hides it and prints a deprecation warning. The console_base config key is ignored without a warning; set inspect_base instead.
  • One builder: the compact and interactive renderers used to build event URLs by hand (ConsoleBaseURL + "/?event_id=" + eventID). There was also an unused tui.FormatEventLog with the same copy. Now every link goes through pkg/listen/links (Target.Home, HomeDisplay, EventURL, EventDisplay). The unused function is removed.

Link shapes

Link Before (console project) After (console project)
Event log line and [o] open https://console.hookdeck.com/?event_id=evt_… (&team_id=tm_… on open) https://inspect.hookdeck.com/?event_id=evt_…&team_id=tm_… in both
Home / "view events" (only without a guest sign-up URL) https://console.hookdeck.com?team_id=tm_… https://inspect.hookdeck.com/<bare source id> (one Source) or https://inspect.hookdeck.com (several)
Dashboard (non-guest) unchanged unchanged: …/events/evt_… in log lines, …/events/evt_…?team_id=… on open, …/events/cli?team_id=… home

Release order

Event links only open the event once hookdeck/core#6158 (Redirect console homepage to Inspect) is deployed: that's the PR that teaches Inspect to read event_id and team_id. Until then they land on the Inspect home page. Keep this in draft until #6158 is in production.

Testing

  • go build ./..., go vet ./..., go test ./...: pass.
  • Unit tests: pkg/listen/links (every shape above), pkg/listen/tui/links_test.go, pkg/listen/proxy/renderer_links_test.go (compact and interactive log lines), pkg/listen/printer_test.go (guest hint).
  • Acceptance, run locally with -tags="listen guest" against slice 2 on the first commit: 15 tests passed, none skipped or failed. These cover listen startup, forwarding, binary bodies, the TTY and interactive paths, and guest login. None of them asserts on link text.

Changelog

  • ba444a3: guest links point at Inspect.
  • 79e8012: "Hookdeck Inspect" labels; --console-base deprecated.
  • 9f46aa9: event links use ?event_id= and ?team_id=, which Inspect resolves to the request. This replaces linking to the Source page and the optional request_id field on the attempt message, which is removed.
  • 48c27ab: renames the TUI link helpers and stale "dashboard" comments; no behaviour change.

🤖 Generated with Claude Code

leggetter and others added 4 commits November 4, 2026 09:30
Guest accounts (project type console) were linked to Hookdeck Console
with ?event_id= and ?team_id=, which mean nothing to Hookdeck Inspect.
listen now links guests to Inspect directly:

- Event links go to the event's Source page in Inspect,
  <inspect base>/<source id without src_>. The Source is looked up from
  the attempt's webhook_id. The link adds ?request=<request_id> when the
  attempt carries one, and falls back to Inspect home when the Source is
  unknown.
- The home link is the Source page when the session listens to exactly
  one Source, otherwise Inspect home. Guest links no longer carry
  team_id.
- New optional AttemptBody.RequestID (request_id, omitempty), ready for
  when core adds it to the attempt payload.
- New Inspect base URL, default https://inspect.hookdeck.com, which can
  be overridden with the hidden --inspect-base flag or inspect_base.
- Every link goes through pkg/listen/links. The compact and interactive
  renderers no longer build URLs by hand, and the unused
  tui.FormatEventLog is removed.

Dashboard links for non-guest projects are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nsole-base

The TUI's [o] action and the events hint said "dashboard" for guest accounts,
whose links now open Hookdeck Inspect. They now say "Hookdeck Inspect";
dashboard wording is unchanged.

--console-base has no readers since guest links moved to Inspect. It is now
deprecated in favour of --inspect-base, and still accepted so existing
scripts don't fail on an unknown flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Guest event links now keep Console's parameters on Inspect's host:
https://inspect.hookdeck.com/?event_id=evt_...&team_id=tm_... . Inspect looks
the event up and opens the request that created it on its Source page, for a
visitor already in that project (hookdeck/core#6158).

This replaces linking to the Source page and resolving the Source from the
attempt's connection, so the optional request_id on AttemptBody is no longer
needed and is removed. Log lines show team_id for guests, because Inspect
needs both ids to open the event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Renames the TUI's dashboardHomeURL/eventDashboardURL to homeURL/eventURL,
since they return Inspect links for guest accounts, updates the comments
that still said "dashboard", and removes an unused Sources field from the
renderer link tests. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leggetter
leggetter requested a review from rahulbhadja November 5, 2026 00:32
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.

1 participant