feat(cockpit): refund-authorization interrupts example#553
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Surfaced by dogfooding the cockpit refund example in a real browser:
- ChatApprovalCard: center the dialog (margin:auto was cleared by reset
rules, pinning it top-left) and add backdrop blur + 50% dim so the
modal reads as modal against dark chat surfaces.
- ChatApprovalCard: Edit is now non-terminal — emit('edit') no longer
closes the dialog, so callers can reveal an inline editor in the body
slot. Approve/Cancel still close. Added a unit test.
- Cockpit graph: add a Pydantic with_structured_output extraction step
so the approval card shows real amount/customer/reason instead of
$0.00/unknown. Wrap identifiers in backticks so markdown doesn't eat
the underscores in cus_*/re_* IDs.
Verified end-to-end in browser: approve issues at original amount,
edit adjusts the amount then issues, cancel skips the refund.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the cockpit `interrupts` example as a refund-authorization agent. PR #2 of three in the HITL Refund work stream.
Strict gate
Auto-merge intentionally disabled. This PR stays in draft until manual review (Piece 3 in the plan) is signed off in a real browser. The whole point of this PR is the forcing-function: we use what we ship, in the actual cockpit, before writing the blog about it.
Test plan
Depends on PR #552 (merged).
Plan: docs/superpowers/plans/2026-05-25-hitl-refund-cockpit-blog.md
🤖 Generated with Claude Code