Add debug lines for fav click

This commit is contained in:
Jack Kingsman
2026-04-08 16:18:46 -07:00
parent 01c86a486e
commit 8e2e039985
6 changed files with 58 additions and 15 deletions
+6 -1
View File
@@ -120,7 +120,12 @@ export function ChannelInfoPane({
<button
type="button"
className="text-sm flex items-center gap-2 hover:text-primary transition-colors"
onClick={() => onToggleFavorite('channel', channel.key)}
onClick={(e) => {
console.log(
`[fav-debug] ChannelInfoPane star clicked t=${performance.now().toFixed(2)} detail=${e.detail} isTrusted=${e.isTrusted}`
);
onToggleFavorite('channel', channel.key);
}}
>
{channel.favorite ? (
<>
+6 -3
View File
@@ -351,9 +351,12 @@ export function ChatHeader({
{(conversation.type === 'channel' || conversation.type === 'contact') && (
<button
className="p-1 rounded hover:bg-accent text-lg leading-none transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
onClick={() =>
onToggleFavorite(conversation.type as 'channel' | 'contact', conversation.id)
}
onClick={(e) => {
console.log(
`[fav-debug] star clicked t=${performance.now().toFixed(2)} detail=${e.detail} isTrusted=${e.isTrusted}`
);
onToggleFavorite(conversation.type as 'channel' | 'contact', conversation.id);
}}
title={favoriteTitle}
aria-label={isFav ? 'Remove from favorites' : 'Add to favorites'}
>
+6 -1
View File
@@ -377,7 +377,12 @@ export function ContactInfoPane({
<button
type="button"
className="text-sm flex items-center gap-2 hover:text-primary transition-colors"
onClick={() => onToggleFavorite('contact', contact.public_key)}
onClick={(e) => {
console.log(
`[fav-debug] ContactInfoPane star clicked t=${performance.now().toFixed(2)} detail=${e.detail} isTrusted=${e.isTrusted}`
);
onToggleFavorite('contact', contact.public_key);
}}
title="Favorite contacts stay loaded on the radio for ACK support"
>
{contact.favorite ? (
@@ -266,7 +266,12 @@ export function RepeaterDashboard({
)}
<button
className="p-1 rounded hover:bg-accent text-lg leading-none transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
onClick={() => onToggleFavorite('contact', conversation.id)}
onClick={(e) => {
console.log(
`[fav-debug] RepeaterDashboard star clicked t=${performance.now().toFixed(2)} detail=${e.detail} isTrusted=${e.isTrusted}`
);
onToggleFavorite('contact', conversation.id);
}}
title={
isFav
? 'Remove from favorites. Favorite contacts stay loaded on the radio for ACK support.'