Commit Graph

1 Commits

Author SHA1 Message Date
Aviad Shiber 14f8bdba62 feat: bot callback URL params with componentized toolbar buttons (#416)
Adds ?cb=<encoded_url>&ct=<token> URL params for bot-initiated plan review callbacks.
When a bot posts a Plannotator share link with these params, Approve/Feedback buttons
appear and POST the user's decision (with annotated plan URL) back to the bot.

Changes:
- callback.ts: parse callback config from URL search/hash params, execute POST
- ToolbarButtons.tsx: extract shared FeedbackButton/ApproveButton components (6 instances → 2 components)
- sharing.ts: strip ?cb=&ct= from hash before decompressing share payload
- App.tsx: callback buttons gated on isSharedSession + shareUrl readiness
- 19 tests covering config parsing, URL validation, presigned URL preservation, and POST execution

Co-authored-by: aviadshiber <aviadshiber@users.noreply.github.com>

For provenance purposes, this commit was AI assisted.
2026-03-29 21:08:41 -07:00