Skip to content

feat(acme): add an inspector tab for vendor calls - #10

Merged
tela merged 4 commits into
mainfrom
feat/inspector
Nov 4, 2026
Merged

tela merged 4 commits into
mainfrom
feat/inspector

Conversation

@tela

@tela tela commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

A presenter needs to show what the lender asks Stripe, Plaid and Xero while the demo runs. The recorder already keeps every call, bodies included, with credentials masked. This adds the page that shows them.

Changes

  • feat(shared): the recorder counts how many times it was cleared, and /api/events returns the count as generation. A reset clears the recording but IDs keep counting, so without it an inspector could not tell its list was stale.
  • feat(web): a plain-language caption for each call the lender makes. An unknown call shows its method and path.
  • feat(web): an /inspector route and an Open inspector button in the demo header. Newest call first, with vendor, who served the app emulator, status, duration, request and response bodies (JSON laid out for reading), a vendor filter, and an empty list after a reset.
  • docs(acme): the inspector section of the Usage Guide.

Known limits: seed calls are not shown (seeding does not go through the recorder), there is no per-vendor "what it holds" panel, and the base URL switcher is not built. Reading sales is paged, so a run shows dozens of Stripe calls.

Tests

gofmt -l shared apps                                              (no output)
go vet ./shared/... ./apps/acme-commerce-lenders/...             (clean)
go test -race ./shared/... ./apps/acme-commerce-lenders/...      (all ok)
make check-kits                                                   (ok)
pnpm --dir web lint && pnpm --dir web type-check                 (clean)
pnpm --filter @localstack-app-emulators/acme-commerce-lenders exec vitest run   (29 passed)

Tests were shown to fail without the change: with the generation count removed, the recorder and API tests fail, and with the reset handling removed, the inspector's reset test fails.

Live run in Chrome against Stripe, Plaid and Xero app emulators built from WonderTwin-AI/wondertwin origin/main (8e4a7235), demo and inspector in two tabs: one full run showed 28 calls with captions, the vendor filter worked, a row opened to its bodies, the bank account number showed as [redacted], Reset emptied the inspector from the other tab, a second run filled it again, and the console was clean.

Related

Follows localstack-samples/localstack-app-emulators#7 and localstack-samples/localstack-app-emulators#9.

tela added 4 commits November 3, 2026 22:39
A reset clears the recording but IDs keep counting, so an inspector
polling with since could not tell its list was stale. Count the clears
and return the count with the events.
The inspector's audience should follow the feed without reading vendor
paths. Map each call the lender makes to one sentence, and fall back to
the raw method and path for a call the table does not know.
A presenter needs to show what the lender asks Stripe, Plaid and Xero
while the demo runs. Poll the recorder, show each call with its caption,
source and bodies, filter by vendor, and start over after a reset.
The demo header opens it in a second tab.
Presenters need to know the second tab exists, what each row means, and
that a reset empties it.
@tela
tela merged commit e3f92aa into main Nov 4, 2026
2 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.

1 participant