fix(security): a dismissed status announcement no longer hides the security nudge (#307) #391

Merged
jared merged 1 commits from fix/nudge-dismissed-strip into lotus 2026-10-18 01:49:48 -04:00
Owner

Fixes #307.

SecurityBanner hides itself while another status strip is showing. It checked this by calling pickBanner without the dismissed set that ServerStatusBanner uses. So an announcement the user had already dismissed still counted as "another strip", and the verify / connect-backup / set-up-backup nudge stayed hidden for as long as the announcement was posted, often weeks.

Change

  • The dismissed set moves into a shared jotai atom, statusDismissedAtom in state/serverStatus.ts. It's still persisted to lotus-status-banner-dismissed, and is session-only if storage is unavailable.
  • ServerStatusBanner writes to it, and SecurityBanner passes it to pickBanner. A dismiss updates both straight away.

Verified: new Playwright test in e2e/security-nudge.spec.ts. Kuma is served a fixture with "Community call on Friday", and the device is past its grace period.

  1. The announcement shows and the nudge doesn't.
  2. Dismiss the announcement, then reload.
  3. The nudge shows: "Your encryption keys aren't backed up".

The test fails with the old behaviour and passes here.

tsc clean · unit tests pass · ESLint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #307. `SecurityBanner` hides itself while another status strip is showing. It checked this by calling `pickBanner` **without** the dismissed set that `ServerStatusBanner` uses. So an announcement the user had already dismissed still counted as "another strip", and the verify / connect-backup / set-up-backup nudge stayed hidden for as long as the announcement was posted, often weeks. **Change** - The dismissed set moves into a shared jotai atom, `statusDismissedAtom` in `state/serverStatus.ts`. It's still persisted to `lotus-status-banner-dismissed`, and is session-only if storage is unavailable. - `ServerStatusBanner` writes to it, and `SecurityBanner` passes it to `pickBanner`. A dismiss updates both straight away. **Verified:** new Playwright test in `e2e/security-nudge.spec.ts`. Kuma is served a fixture with "Community call on Friday", and the device is past its grace period. 1. The announcement shows and the nudge doesn't. 2. Dismiss the announcement, then reload. 3. The nudge shows: "Your encryption keys aren't backed up". The test **fails with the old behaviour** and **passes here**. `tsc` clean · unit tests pass · ESLint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-17 20:26:58 -04:00
fix(security): a dismissed status announcement no longer hides the security nudge (#307)
CI / Build & Quality Checks (pull_request) Successful in 3m18s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 13s
CI / Playwright smoke (e2e) (pull_request) Successful in 16m21s
8e7127a350
SecurityBanner asked pickBanner whether another strip would show without
the dismissed set, so a dismissed Kuma announcement (often pinned for
weeks) still counted and suppressed the verify / backup nudge on every
device that had dismissed it. The dismissed set is now a shared jotai
atom (still persisted to localStorage) used by both banners. Adds a
Playwright regression.

Fixes #307

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit a6e90c7bc4 into lotus 2026-10-18 01:49:48 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#391