Skip to content

Surface empty states in security utils - #1657

Open
111-Vaishali wants to merge 1 commit into
imDarshanGK:mainfrom
111-Vaishali:feature/security-empty-states
Open

Surface empty states in security utils#1657
111-Vaishali wants to merge 1 commit into
imDarshanGK:mainfrom
111-Vaishali:feature/security-empty-states

Conversation

@111-Vaishali

Copy link
Copy Markdown

Closes #1602

Changes

  • Added buildEmptyStateHtml, buildIssuesListHtml, buildSuggestionsListHtml, and buildStoredListHtml to security-utils.js
  • Centralizes previously inconsistent empty-state messages (issues, suggestions, and history/favorites lists)
  • All output passes through escHtml/safeCssToken, consistent with the file's existing XSS-safety guarantees
  • No existing behavior altered — purely additive functions

Testing

  • Added 15 new tests to security-utils.test.mjs covering:
    • Empty array input
    • Null/non-array input
    • XSS payload safety for empty-state messages
    • Normal rendering when entries exist
  • Full suite: 74/74 tests passing (node --test tests/security-utils.test.mjs)

@imDarshanGK

Copy link
Copy Markdown
Owner

@111-Vaishali Please add a short video demo showcasing your key features for review.

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.

Surface empty states in security utils

2 participants