MCPcopy Create free account
hub / github.com/dailydotdev/apps / TeamDetails

Function TeamDetails

packages/shared/src/components/feedback/FeedbackThread.tsx:129–188  ·  view source on GitHub ↗
({ item }: { item: FeedbackItem })

Source from the content-addressed store, hash-verified

127
128// Classification and client context, shown to team members only
129const TeamDetails = ({ item }: { item: FeedbackItem }): ReactElement | null => {
130 const { classification, clientInfo } = item;
131 const clientRows = Object.entries(clientInfo ?? {}).filter(
132 ([, value]) => !!value,
133 );
134
135 if (
136 !classification &&
137 !item.pageUrl &&
138 !item.userAgent &&
139 !clientRows.length
140 ) {
141 return null;
142 }
143
144 return (
145 <details className="group rounded-16 border border-border-subtlest-tertiary">
146 <summary className="cursor-pointer px-4 py-3 font-bold typo-callout">
147 Details
148 </summary>
149 <div className="flex flex-col gap-2 border-t border-border-subtlest-tertiary px-4 py-3">
150 <DetailRow label="Summary" value={classification?.summary} />
151 <DetailRow label="Urgency" value={classification?.urgency} />
152 <DetailRow label="Sentiment" value={classification?.sentiment} />
153 <DetailRow label="Tags" value={classification?.tags?.join(', ')} />
154 {item.pageUrl && (
155 <div className="flex flex-col gap-1 tablet:flex-row tablet:gap-3">
156 <Typography
157 type={TypographyType.Footnote}
158 color={TypographyColor.Tertiary}
159 className="w-28 shrink-0"
160 >
161 Page
162 </Typography>
163 <a
164 href={item.pageUrl}
165 target="_blank"
166 rel="noopener noreferrer"
167 className="min-w-0 flex-1 break-words text-text-link underline typo-footnote"
168 >
169 {item.pageUrl}
170 </a>
171 </div>
172 )}
173 <DetailRow label="User agent" value={item.userAgent} />
174 {clientRows.map(([key, value]) => (
175 <DetailRow key={key} label={key} value={value} />
176 ))}
177 {classification?.hasPromptInjection && (
178 <Typography
179 type={TypographyType.Footnote}
180 color={TypographyColor.StatusError}
181 >
182 Possible prompt injection detected in this feedback.
183 </Typography>
184 )}
185 </div>
186 </details>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected