Skip to content

Commit 889d0e8

Browse files
lint
1 parent 0a27fe3 commit 889d0e8

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

client/dashboard/src/pages/hooks/Hooks.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,16 @@ function HookLogRow({
803803
}, [timestamp]);
804804

805805
const serverNameBadge = useMemo(() => {
806+
const isLocal = !serverName;
806807
return (
807-
<span className="text-xs font-mono truncate bg-muted px-1 py-1 rounded-sm">
808+
<span
809+
className={cn(
810+
"text-xs font-mono truncate px-2 py-1 rounded-md",
811+
isLocal
812+
? "bg-muted/50 text-muted-foreground"
813+
: "bg-primary/10 text-primary border border-primary/20 font-medium",
814+
)}
815+
>
808816
{serverName || "local"}
809817
</span>
810818
);
@@ -830,7 +838,7 @@ function HookLogRow({
830838
<div className="shrink-0 w-[150px] flex items-center gap-2">
831839
<HookSourceIcon source={hookSource} className="size-4 shrink-0" />
832840
{hookSource && (
833-
<span className="text-xs text-muted-foreground truncate">
841+
<span className="text-xs text-foreground font-medium truncate">
834842
{hookSource}
835843
</span>
836844
)}

server/internal/hooks/pending_helpers_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515

1616
// TestBufferHook_AtomicAppend tests that buffering hooks uses atomic RPUSH
1717
func TestBufferHook_AtomicAppend(t *testing.T) {
18+
t.Parallel()
1819
ctx, ti := newTestHooksService(t)
1920

2021
sessionID := uuid.NewString()
@@ -49,6 +50,7 @@ func TestBufferHook_AtomicAppend(t *testing.T) {
4950

5051
// TestBufferHook_MultipleConcurrent tests that concurrent buffering works correctly
5152
func TestBufferHook_MultipleConcurrent(t *testing.T) {
53+
t.Parallel()
5254
ctx, ti := newTestHooksService(t)
5355

5456
sessionID := uuid.NewString()
@@ -86,6 +88,7 @@ func TestBufferHook_MultipleConcurrent(t *testing.T) {
8688

8789
// TestFlushPendingHooks_DirectCall tests flushing by calling the flush method directly
8890
func TestFlushPendingHooks_DirectCall(t *testing.T) {
91+
t.Parallel()
8992
ctx, ti := newTestHooksService(t)
9093

9194
sessionID := uuid.NewString()
@@ -132,6 +135,7 @@ func TestFlushPendingHooks_DirectCall(t *testing.T) {
132135

133136
// TestFlushPendingHooks_EmptyList tests flushing when there are no pending hooks
134137
func TestFlushPendingHooks_EmptyList(t *testing.T) {
138+
t.Parallel()
135139
ctx, ti := newTestHooksService(t)
136140

137141
sessionID := uuid.NewString()
@@ -158,6 +162,7 @@ func TestFlushPendingHooks_EmptyList(t *testing.T) {
158162

159163
// TestBufferAndFlush_MultipleSessionsConcurrent tests buffering and flushing across multiple sessions
160164
func TestBufferAndFlush_MultipleSessionsConcurrent(t *testing.T) {
165+
t.Parallel()
161166
ctx, ti := newTestHooksService(t)
162167

163168
numSessions := 10
@@ -201,6 +206,7 @@ func TestBufferAndFlush_MultipleSessionsConcurrent(t *testing.T) {
201206

202207
// TestSessionMetadata_CacheSetGet tests storing and retrieving session metadata
203208
func TestSessionMetadata_CacheSetGet(t *testing.T) {
209+
t.Parallel()
204210
ctx, ti := newTestHooksService(t)
205211

206212
sessionID := uuid.NewString()
@@ -236,6 +242,7 @@ func TestSessionMetadata_CacheSetGet(t *testing.T) {
236242

237243
// TestListAppend_TTLBehavior tests that TTL is only set once for new keys
238244
func TestListAppend_TTLBehavior(t *testing.T) {
245+
t.Parallel()
239246
ctx, ti := newTestHooksService(t)
240247

241248
cacheAdapter := cache.NewRedisCacheAdapter(ti.redisClient)
@@ -265,6 +272,7 @@ func TestListAppend_TTLBehavior(t *testing.T) {
265272

266273
// TestListRange_CorrectDeserialization tests that ListRange properly deserializes msgpack data
267274
func TestListRange_CorrectDeserialization(t *testing.T) {
275+
t.Parallel()
268276
ctx, ti := newTestHooksService(t)
269277

270278
cacheAdapter := cache.NewRedisCacheAdapter(ti.redisClient)

0 commit comments

Comments
 (0)