Skip to content

Baseboard alarm toggles: a once-a-day Hosted upsell line - #1402

Merged
nedtwigg merged 7 commits into
mainfrom
alarm-upsell-v2
Oct 28, 2026
Merged

nedtwigg merged 7 commits into
mainfrom
alarm-upsell-v2

Conversation

@nedtwigg

Copy link
Copy Markdown
Member

Turning a Baseboard alarm button on can add one live line to its preview: at most once a day per machine, shared across both buttons. It points at what that sink lacks, with an upsell-* ref on any plans link.

State Normal policy Nothing
Voice, Natural Voice off "Turn on Natural Voice in Settings → Notifications" "Choose Local networks or Anywhere in Settings → Network to turn on Natural Voice"
Voice, no plan NO_PLAN_COPY + See Hosted plans (upsell-voice) same
Push, Hosted not enrolled or removed "Get push on your phone with the Hosted Relay in Settings → Network" "Choose Local networks or Anywhere in Settings → Network to get push on your phone"
Push, no plan See Hosted plans (upsell-push), under #1395's refusal sentence same
Push, self-host not enrolled "Set up a phone in Settings → Network" (never names Hosted) same

The line is never shown:

  • on turning a button off
  • before the Burrow service has answered
  • to an entitled user
  • in a build without Hosted mode (except the self-host phone line)

The daily gate (lib/src/lib/alarm-upsell.ts) runs the cheap checks first and then makes at most one capped readBurrowStatusOnce(), and only for push; speech never reads the Burrow. A clock set back counts as a new day, unreadable storage counts as "not shown today", and the day is spent only when the line actually appears. Closing the preview cancels a pending offer.

The preview:

  • With a line it stays up 6 s, and a line that lands mid-fade revives it.
  • Hover or focus holds it, and letting go gives it 2 s.
  • Escape (heard in the capture phase, never stopped) or a press off the line closes it.
  • The line never takes focus from the terminal.

Settings opens at a topic. A new initialTopic prop: the dialog scrolls once the topic is visible, then re-scrolls for 2 s if a section above it grows. Any wheel, pointer or key input cancels that.

The speech row no longer links /hosted#voice. The managed-voice port exists exactly when a build has Hosted mode, so "link only in Hosted builds" leaves no build that shows it. Hosted builds show the Natural Voice section instead. HOSTED_VOICE_URL is removed.

Specs: alert.md → "Settings dialog" gains the once-a-day rule and never name Hosted in a build without Hosted mode. website-docs.md's link obligation narrows to settings where an account has no plan, and pricing.md is updated to match.

Stories cover each line, OpensAtNetwork, and the hold and dismiss behaviour; preview.ts clears the daily key between stories. Every new test is mutation-checked.

🤖 Generated with Claude Code

nedtwigg and others added 6 commits October 28, 2026 02:14
SettingsDialog takes an initialTopic: it scrolls there once the topic
shows (the search index hides every section on the first frame), once
only, and for two seconds re-scrolls when a section above grows, until
the reader's own wheel, pointer, or key input. Baseboard's dialog state
carries the topic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
takeAlarmUpsell decides the one line a Baseboard alarm toggle's preview
may carry: at most once in a rolling day per machine, across both sinks
(dormouse:alarm-upsell-shown-at; a clock set back is a new day, storage
that cannot be read has not shown, and only a line that shows spends
it). Nothing before the network policy answers. Speech reads managed
voice's status; push reads the Burrow's status with one capped
readBurrowStatusOnce, which never starts the poll. Under Nothing each
offer points at the policy instead of what Nothing blocks. Adds the
upsell-voice and upsell-push refs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turning a Baseboard alarm button on asks takeAlarmUpsell for its line;
one that arrives while its preview is up joins it under the inert
section, keeps the preview up 6 s instead of 2 s, and brings back a
preview that had begun to fade. The line opens Settings at its topic, or
the Hosted plans with the upsell-voice / upsell-push ref, and closes the
preview. It is a button that never takes focus from the terminal.
Closing the preview bumps the sequence, so an offer still being decided
is neither shown nor spent. The inert preview's push line drops its own
plans link, which it could never open. Storybook clears the daily key
between stories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hovering or focusing the line holds the preview up, and letting it go
gives it the plain 2 s. Escape, heard in the capture phase because a
terminal swallows its own keys and never stopped, or a press off the
line closes it. useCloseOnOutsideAndEscape takes its anchor and the new
captureKeys in an options object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without a managed-voice port, which only a build with Hosted mode has,
the spoken-alarm row read "Get ElevenLabs voices with Natural Voice" and
linked /hosted#voice, so self-host builds named Hosted. It now names only
the browser or system voice. A Hosted build always has the port, so the
link had no build left to show in; Hosted builds reach Natural Voice
through its own section and the preview's line. HOSTED_VOICE_URL goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alert.md -> "Settings dialog" gains the once-a-day preview line and
the rule never to name Hosted in a build without Hosted mode; the
managed voice group no longer promises a /hosted link. website-docs.md's
link obligation narrows to the settings where an account has no plan,
and pricing.md's front-door paragraph follows. alert.md's budget is
re-baselined for the two rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 71380d3
Status: ✅  Deploy successful!
Preview URL: https://e33b454a.mouseterm.pages.dev
Branch Preview URL: https://alarm-upsell-v2.mouseterm.pages.dev

View logs

@nedtwigg
nedtwigg merged commit 8319ede into main Oct 28, 2026
17 checks passed
@nedtwigg
nedtwigg deleted the alarm-upsell-v2 branch October 28, 2026 11:06
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.

2 participants