• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 13374235024

17 Feb 2025 04:00PM UTC coverage: 69.729% (-0.003%) from 69.732%
13374235024

Pull #326

github

web-flow
Merge 646389739 into 73c55a2b3
Pull Request #326: feat: support PII on the dashboard

418 of 657 branches covered (63.62%)

Branch coverage included in aggregate %.

10 of 10 new or added lines in 7 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

842 of 1150 relevant lines covered (73.22%)

70.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/features/dashboard-messages/components/conversation-secrets-detected.tsx
1
import { Alert } from '@/api/generated'
2
import { ReactNode } from 'react'
3
import Markdown from 'react-markdown'
4

5
function ConversationSecretsList({ children }: { children: ReactNode }) {
6
  return <ul>{children}</ul>
7
}
8

9
function ConversationSecretsListItem({ children }: { children: ReactNode }) {
10
  return (
11
    <li className="mb-3 rounded border-b border-gray-200 pb-3 last:border-b-0">
12
      {children}
13
    </li>
14
  )
15
}
16

17
function formatTriggerString(string: string): string {
UNCOV
18
  return string.replace(/REDACTED<[^>]*?>/g, '**REDACTED**')
×
19
}
20

21
// NOTE: The secrets detection backend code appears to be returning fairly
22
// unstructured data with a lot of false positives. This is not actually
23
// referenced in the frontend yet.
24
export function ConversationSecretsDetected({ alerts }: { alerts: Alert[] }) {
25
  return (
26
    <ConversationSecretsList>
27
      {alerts.map((a) => {
UNCOV
28
        if (typeof a.trigger_string !== 'string') return null
×
29

30
        return (
31
          <ConversationSecretsListItem key={a.id}>
32
            <Markdown>{formatTriggerString(a.trigger_string)}</Markdown>
33
          </ConversationSecretsListItem>
34
        )
35
      })}
36
    </ConversationSecretsList>
37
  )
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc