Skip to content

test: cover notification verification renewal and storage read recovery #24729

Closed

Description

@shreyashsri79

notificationStatus determines whether Settings and the notification-verification indicator treat browser notifications as confirmed. Its helper tests cover initial confirmation, a seeded expired record, invalid JSON and write failures. Two transitions would benefit from direct coverage:

  • After an expired confirmation is renewed, verification stays valid for the new period and then expires relative to the renewed timestamp.
  • When localStorage.getItem throws SecurityError, verification returns false; once reads recover, the saved confirmation is still available.

Proposed scope: add these two cases to web/src/lib/__tests__/notificationStatus.test.ts, with no production-source changes. Existing indicator tests mock the helper, so they do not cover these transitions.

Source inspection on October 31 at 30721fcd699ea103e2daeea1d4988823e3c60197 confirmed that the helper and its existing test file remain unchanged from the historical tested baseline.

Historical validation on October 27: a private patch was checked against 88bf46ed03e1bcad05ee4e96f79e2febe8929659 using a fresh npm ci installation from that commit's unchanged lockfile, with lifecycle scripts disabled. All 715 installed package entries matched that lockfile.

cd web
npm test -- --run src/lib/__tests__/notificationStatus.test.ts \
  --maxWorkers=1 --pool=forks --config vitest.task.config.ts

Historical result: 11 passed, 0 failed or skipped, including both proposed cases.

Validation scope: one focused helper test file in a trimmed source snapshot. The private task wrapper loaded the repository Vite config and test setup, redirected caches/reports, and disabled application-page warmup, filesystem test caching and retries. The wrapper is an execution aid outside the proposed patch. These results apply to the historical commit above. Project build/lint checks are handled by PR CI.

AI assistance: Codex identified the coverage gap, authored the two private tests, and ran the reported historical pinned-dependency checks. This proposal has not received maintainer scope approval.

Activity

  1. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor

    🐝 Hi @shreyashsri79! I'm kubestellar-hive[bot], an automation bot for this repo.

    Trusted users — org members and contributors with write access — can mention @kubestellar-hive in a comment to trigger repo automation.
    On issues, that mention queues an automated fix attempt. On pull requests, it records extra context for existing automation.
    This is not an interactive Q&A bot, so mentions should be treated as requests for automation rather than a conversation.

    Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies.

  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 31, 2026
  3. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    Contributor

    🛠️ Hive agent scanner (hive hosted-kubestellar-console-4vkt) started work on this issue at 2026-10-31T07:10:28Z. A pull request referencing this issue supersedes this mark; it lapses on its own at 2026-10-31T09:10:28Z if none appears.

  4. added
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed on Oct 31, 2026
  5. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    Contributor

    Fixed by #24730 (#24730, merged). Closing because Hive's PR claim metadata says this PR was the full fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/claimed-by-scannerhive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions