Skip to content

Startup email alerts + live retry countdown - #5

Merged
murugu-21 merged 3 commits into
mainfrom
feat/phase-5-production
Jun 14, 2026
Merged

murugu-21 merged 3 commits into
mainfrom
feat/phase-5-production

Conversation

@murugu-21

Copy link
Copy Markdown
Owner

feat: email alert when the box is woken

The wake Lambda publishes to an SNS topic (email subscription) on the real 0→1
transition — one email per cold start, naming who woke it, for monitoring.

  • CDK: SNS topic + email subscription (notifyEmail context, default
    murugu2001@gmail.com) + sns:Publish grant + TOPIC_ARN on the wake Lambda.
  • Wake Lambda: handler(event) reads the user email from the request body
    (falls back to the JWT sub) and publishes only on the actual start; a notify
    failure never fails the wake.
  • FE: extract email from the Google ID token at login (jwt.emailFromIdToken),
    store it, and send it in the requestWake() body.
  • (Also drops a stray tracked cdk.context.json.)

fix(web): tick the retry countdown every second

RetryCountdown read Date.now() once per render and only re-rendered on the 5s
deliveries refetch, so "in Ns" jumped in ~5s steps. A 1s interval now updates it
smoothly, decoupled from the data poll.

murugu-21 and others added 3 commits June 14, 2026 14:21
RetryCountdown read Date.now() once per render and only re-rendered on the
deliveries tab's 5s refetch, so the "in Ns" countdown jumped in ~5s steps. Add a
1s interval that updates a local `now`, so it counts down smoothly and feels
real-time, decoupled from the data poll.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When the wake Lambda actually starts the box (the 0→1 transition), it publishes
to an SNS topic subscribed by murugu2001@gmail.com — one email per cold start,
naming who woke it, so startups can be monitored.

- CDK: SNS topic + email subscription (notifyEmail context, default
  murugu2001@gmail.com) + sns:Publish grant + TOPIC_ARN on the wake Lambda.
- Wake Lambda: handler(event) reads the user email from the request body
  (falls back to JWT claims) and publishes only on the real start; a notify
  failure never fails the wake.
- FE: extract `email` from the Google ID token at login (jwt.emailFromIdToken),
  store it, and send it in the requestWake() body.

Requires a ComputeStack redeploy + a one-time confirmation of the SNS email
subscription. Until the FE is deployed, the email falls back to the JWT sub.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…che)

Keeps the VPC/AMI/account-ID lookup cache out of git — it regenerates on each
synth/deploy and kept resurfacing as an untracked file (and blocking rebases).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@murugu-21
murugu-21 merged commit 47daa83 into main Jun 14, 2026
5 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